@hostinger/mcp 3.38.0 → 3.38.2
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/.github/workflows/build-release.yaml +12 -11
- package/CHANGELOG.md +17 -0
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/headless/VERSION +2 -2
- package/skills/headless/steps/04-content-model/SKILL.md +22 -14
- package/src/core/oauth.js +9 -2
- package/src/core/oauth.ts +9 -2
- package/src/core/runtime.js +10 -2
- package/src/core/runtime.ts +10 -2
- package/src/core/skills.js +3 -3
- package/src/core/skills.ts +3 -3
- 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
|
@@ -7,10 +7,13 @@ on:
|
|
|
7
7
|
- main
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
|
+
# npm trusted publishing trusts this whole workflow file, so any job here holding id-token: write can publish
|
|
11
|
+
# the package. Only the publish jobs hold it, and besides GitHub's own actions they run no downloaded code:
|
|
12
|
+
# no npm update and no dependency install (npm publish packs the files and runs no scripts), and a pinned,
|
|
13
|
+
# checksummed mcp-publisher.
|
|
10
14
|
release:
|
|
11
15
|
runs-on: ubuntu-latest
|
|
12
16
|
permissions:
|
|
13
|
-
id-token: write
|
|
14
17
|
contents: write
|
|
15
18
|
outputs:
|
|
16
19
|
new_version: ${{ steps.version.outputs.version }}
|
|
@@ -77,12 +80,6 @@ jobs:
|
|
|
77
80
|
node-version: '24.x'
|
|
78
81
|
registry-url: 'https://registry.npmjs.org'
|
|
79
82
|
|
|
80
|
-
- name: Update NPM
|
|
81
|
-
run: npm install -g npm@latest
|
|
82
|
-
|
|
83
|
-
- name: Install dependencies
|
|
84
|
-
run: npm install
|
|
85
|
-
|
|
86
83
|
- name: Publish package
|
|
87
84
|
run: npm publish --provenance --access public
|
|
88
85
|
|
|
@@ -119,9 +116,6 @@ jobs:
|
|
|
119
116
|
registry-url: 'https://npm.pkg.github.com'
|
|
120
117
|
scope: '@hostinger'
|
|
121
118
|
|
|
122
|
-
- name: Install dependencies
|
|
123
|
-
run: npm install
|
|
124
|
-
|
|
125
119
|
- name: Publish package
|
|
126
120
|
run: |
|
|
127
121
|
sed -i 's+"name": ".*+"name": "@${{ github.repository }}",+gI' ./package.json
|
|
@@ -145,9 +139,16 @@ jobs:
|
|
|
145
139
|
with:
|
|
146
140
|
node-version: '24.x'
|
|
147
141
|
|
|
142
|
+
# Pinned and checksummed: this job can mint the npm publishing identity. To upgrade, take the
|
|
143
|
+
# sha256 digest of mcp-publisher_linux_amd64.tar.gz from the registry release's assets.
|
|
148
144
|
- name: Install MCP Publisher
|
|
145
|
+
env:
|
|
146
|
+
MCP_PUBLISHER_VERSION: v1.8.7
|
|
147
|
+
MCP_PUBLISHER_SHA256: 00b21004149a4ce66f0782508ae4a2bce67d1bea395a8da0bd8028159fb59579
|
|
149
148
|
run: |
|
|
150
|
-
curl -
|
|
149
|
+
curl -fsSL -o mcp-publisher.tar.gz "https://github.com/modelcontextprotocol/registry/releases/download/$MCP_PUBLISHER_VERSION/mcp-publisher_linux_amd64.tar.gz"
|
|
150
|
+
echo "$MCP_PUBLISHER_SHA256 mcp-publisher.tar.gz" | sha256sum -c -
|
|
151
|
+
tar xzf mcp-publisher.tar.gz mcp-publisher
|
|
151
152
|
chmod +x ./mcp-publisher
|
|
152
153
|
|
|
153
154
|
- name: Login to MCP Registry using GitHub OIDC
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ 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
|
+
## v3.38.2 — 2026-11-11
|
|
8
|
+
|
|
9
|
+
### Also in this release
|
|
10
|
+
|
|
11
|
+
- Release automation: `.github/workflows/build-release.yaml`
|
|
12
|
+
- Bundled agent skills: `skills/headless/VERSION`
|
|
13
|
+
- OAuth sign-in flow: `src/core/oauth.js`, `src/core/oauth.ts`
|
|
14
|
+
- Request handling and authentication: `src/core/runtime.js`, `src/core/runtime.ts`
|
|
15
|
+
|
|
16
|
+
## v3.38.1 — 2026-11-11
|
|
17
|
+
|
|
18
|
+
### Also in this release
|
|
19
|
+
|
|
20
|
+
- Dependencies: `package-lock.json`
|
|
21
|
+
- Bundled agent skills: `skills/headless/VERSION`, `skills/headless/steps/04-content-model/SKILL.md`
|
|
22
|
+
- Other files: `src/core/skills.js`, `src/core/skills.ts`
|
|
23
|
+
|
|
7
24
|
## v3.38.0 — 2026-11-11
|
|
8
25
|
|
|
9
26
|
### 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": "3.38.
|
|
20
|
+
"version": "3.38.2",
|
|
21
21
|
"packages": [
|
|
22
22
|
{
|
|
23
23
|
"registryType": "npm",
|
|
24
24
|
"identifier": "@hostinger/mcp",
|
|
25
|
-
"version": "3.38.
|
|
25
|
+
"version": "3.38.2",
|
|
26
26
|
"transport": {
|
|
27
27
|
"type": "stdio"
|
|
28
28
|
},
|
package/skills/headless/VERSION
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
version=3.38.
|
|
2
|
-
commit=
|
|
1
|
+
version=3.38.2
|
|
2
|
+
commit=df3ce7a7bae2
|
|
3
3
|
built=2026-11-11
|
|
@@ -170,30 +170,38 @@ Source every image in a few batched calls, not a search and a fetch per photo:
|
|
|
170
170
|
"sourdough bread", "bakery interior", "Lisbon street").
|
|
171
171
|
- With an `UNSPLASH_ACCESS_KEY` in the environment, use the official API, one call per theme:
|
|
172
172
|
`GET https://api.unsplash.com/search/photos?query=<theme>&orientation=landscape&per_page=20` with
|
|
173
|
-
header `Authorization: Client-ID <key>`. Each result's `urls.raw` is the file
|
|
174
|
-
|
|
173
|
+
header `Authorization: Client-ID <key>`. Each result's `urls.raw` is the file (its `photo-…`
|
|
174
|
+
part, before `?`, is the `<file id>`), `id` the `<page id>`, `alt_description` what it shows and
|
|
175
|
+
`user.name` the photographer; for each photo you keep, also `GET` its
|
|
175
176
|
`links.download_location` (same header), as the API terms require.
|
|
176
177
|
- Without a key, open the theme's search page `https://unsplash.com/s/photos/<theme-with-dashes>`
|
|
177
|
-
with your **web-fetch tool**, once per theme,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
with your **web-fetch tool**, once per theme, with this prompt (a short fixed answer keeps the
|
|
179
|
+
fetch fast):
|
|
180
|
+
|
|
181
|
+
```text
|
|
182
|
+
List up to 12 free photos on this page, one line each, in this exact format and nothing else:
|
|
183
|
+
<file id> | <page id> | <alt text> | <photographer>
|
|
184
|
+
<file id> is the photo-… part of its images.unsplash.com URL, copied exactly, before any "?".
|
|
185
|
+
<page id> is the part after unsplash.com/photos/ in its photo page link.
|
|
186
|
+
Skip plus.unsplash.com/premium_photo-… results: they are Unsplash+ and not free.
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Fetch the themes in parallel when your tool allows several calls at once. Fall back to a web
|
|
190
|
+
search limited to `unsplash.com` plus a fetch of one photo page (`https://unsplash.com/photos/<…>`)
|
|
191
|
+
only for a subject no search page covers.
|
|
184
192
|
- Every other `unsplash.com` request (curl on any page, `/photos/<id>/download`, `/napi/…`,
|
|
185
193
|
`/oembed`) hits a bot challenge: a `307` to `/.within.website` (Anubis) or a 401. If your fetch
|
|
186
194
|
tool gets the challenge page too, stop: no user-agent spoofing or other workarounds. On a
|
|
187
195
|
WordPress backend where Option A hasn't already failed, offer it; otherwise ask the user for an
|
|
188
196
|
`UNSPLASH_ACCESS_KEY` or record the gap (step 5).
|
|
189
|
-
2. **Check them all in one command.** Pick a candidate per image brief from
|
|
197
|
+
2. **Check them all in one command.** Pick a candidate per image brief from its alt text, then in one
|
|
190
198
|
shell command request each web-size URL
|
|
191
|
-
(`https://images.unsplash.com
|
|
199
|
+
(`https://images.unsplash.com/<file id>?w=1600&q=80&fm=jpg&fit=max`, query string replaced) and
|
|
192
200
|
confirm 200 `image/jpeg`, and save a small preview (`?w=500`) of each into one folder, e.g.:
|
|
193
201
|
|
|
194
202
|
```bash
|
|
195
203
|
mkdir -p ~/.hostinger/<domain>/media/previews && cd ~/.hostinger/<domain>/media/previews && \
|
|
196
|
-
for id in
|
|
204
|
+
for id in <file id> <file id>; do
|
|
197
205
|
curl -s -o /dev/null -w "$id %{http_code} %{content_type}\n" "https://images.unsplash.com/$id?w=1600&q=80&fm=jpg&fit=max"
|
|
198
206
|
curl -s -o "$id.jpg" "https://images.unsplash.com/$id?w=500&q=60&fm=jpg&fit=max"
|
|
199
207
|
done
|
|
@@ -211,8 +219,8 @@ Source every image in a few batched calls, not a search and a fetch per photo:
|
|
|
211
219
|
`content.json` instead: `url`, `alt`, `filename`, and the credit as `caption`):
|
|
212
220
|
|
|
213
221
|
```markdown
|
|
214
|
-
Image: https://images.unsplash.com
|
|
215
|
-
Image credit: <Photographer> — https://unsplash.com/photos/<id> (Unsplash License)
|
|
222
|
+
Image: https://images.unsplash.com/<file id>?w=1600&q=80&fm=jpg&fit=max
|
|
223
|
+
Image credit: <Photographer> — https://unsplash.com/photos/<page id> (Unsplash License)
|
|
216
224
|
Image alt: <what the photo shows>
|
|
217
225
|
Image file: <site>-<subject>.jpg
|
|
218
226
|
```
|
package/src/core/oauth.js
CHANGED
|
@@ -348,8 +348,15 @@ export class OAuthProvider {
|
|
|
348
348
|
_listenForCallback(expectedState, port) {
|
|
349
349
|
return new Promise((resolve, reject) => {
|
|
350
350
|
const server = createServer((req, res) => {
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
// Any local process or web page can reach this port: a request target that does not parse (GET //)
|
|
352
|
+
// gets a 404 instead of an exception, which would crash the server.
|
|
353
|
+
let url;
|
|
354
|
+
try {
|
|
355
|
+
url = new URL(req.url, `http://127.0.0.1:${port}`);
|
|
356
|
+
} catch {
|
|
357
|
+
url = null;
|
|
358
|
+
}
|
|
359
|
+
if (url?.pathname !== CALLBACK_PATH) {
|
|
353
360
|
res.writeHead(404);
|
|
354
361
|
res.end();
|
|
355
362
|
return;
|
package/src/core/oauth.ts
CHANGED
|
@@ -320,8 +320,15 @@ export class OAuthProvider {
|
|
|
320
320
|
private _listenForCallback(expectedState: string, port: number): Promise<{ code: string; port: number }> {
|
|
321
321
|
return new Promise((resolve, reject) => {
|
|
322
322
|
const server: Server = createServer((req, res) => {
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
// Any local process or web page can reach this port: a request target that does not parse (GET //)
|
|
324
|
+
// gets a 404 instead of an exception, which would crash the server.
|
|
325
|
+
let url: URL | null;
|
|
326
|
+
try {
|
|
327
|
+
url = new URL(req.url || '/', `http://127.0.0.1:${port}`);
|
|
328
|
+
} catch {
|
|
329
|
+
url = null;
|
|
330
|
+
}
|
|
331
|
+
if (!url || url.pathname !== CALLBACK_PATH) {
|
|
325
332
|
res.writeHead(404);
|
|
326
333
|
res.end();
|
|
327
334
|
return;
|
package/src/core/runtime.js
CHANGED
|
@@ -350,7 +350,9 @@ class MCPServer {
|
|
|
350
350
|
// Container secrets (Docker's /run/secrets, the Kubernetes service-account token under /var/run/secrets) and runtime state.
|
|
351
351
|
'/run', '/var/run', '/private/var/run',
|
|
352
352
|
// Every user's home directory, whatever the current home is (root's is /root, a container's can be /).
|
|
353
|
-
'/home', '/Users',
|
|
353
|
+
'/home', '/Users',
|
|
354
|
+
// Windows: the profiles, the system, installed programs and their machine-wide data.
|
|
355
|
+
...(process.platform === 'win32' ? [path.join(process.env.SystemDrive || 'C:', 'Users'), process.env.SystemRoot, process.env.ProgramData, process.env.ProgramFiles, process.env['ProgramFiles(x86)']].filter(Boolean) : [])];
|
|
354
356
|
|
|
355
357
|
// A deploy publishes what it reads, and the path comes from the model, so prompt-injected arguments could
|
|
356
358
|
// publish any readable file. Refused, before anything is read or sent: the home directory and every directory
|
|
@@ -360,6 +362,11 @@ class MCPServer {
|
|
|
360
362
|
// os is imported by deploy.template: the JS generator dedupes import blocks by their whole text, and this block
|
|
361
363
|
// must stay identical to agency-hosting/shared's, or tus and fs are imported twice.
|
|
362
364
|
assertDeployablePath(localPath) {
|
|
365
|
+
// A UNC or device path (\\host\share, //host/share, \\?\UNC\…) is opened over SMB by the realpath below, which on
|
|
366
|
+
// Windows sends the user's NTLM credentials to that host: refused before anything touches it.
|
|
367
|
+
if (/^[\\/]{2}/.test(localPath)) {
|
|
368
|
+
throw new Error('Refusing to deploy ' + localPath + ': it is a network path. Pass a local project directory or archive.');
|
|
369
|
+
}
|
|
363
370
|
let real;
|
|
364
371
|
try {
|
|
365
372
|
real = fs.realpathSync.native(localPath);
|
|
@@ -413,7 +420,8 @@ class MCPServer {
|
|
|
413
420
|
const inSystem = !inHome && this.systemDirectories.some((dir) => inside(dir, real) || inside(real, dir));
|
|
414
421
|
// Windows drops trailing dots and spaces from a name: .ssh. is .ssh.
|
|
415
422
|
const inCredentials = real.split(path.sep).some((segment) => this.credentialDirectories.includes((process.platform === 'win32' ? segment.replace(/[. ]+$/, '') : segment).toLowerCase()));
|
|
416
|
-
|
|
423
|
+
// A drive or filesystem root (D:\ on Windows) holds everything on it.
|
|
424
|
+
if (real === path.parse(real).root || /^[\\/]{2}/.test(real) || inside(real, home) || otherHome || inHomeData || inProfile || inSystem || inCredentials || (fs.statSync(real).isFile() && this.isSecretFile(path.basename(real)))) {
|
|
417
425
|
throw new Error('Refusing to deploy ' + localPath + ': it is, or contains, a home, system or credentials location. Pass the project directory or archive.');
|
|
418
426
|
}
|
|
419
427
|
}
|
package/src/core/runtime.ts
CHANGED
|
@@ -384,7 +384,9 @@ class MCPServer {
|
|
|
384
384
|
// Container secrets (Docker's /run/secrets, the Kubernetes service-account token under /var/run/secrets) and runtime state.
|
|
385
385
|
'/run', '/var/run', '/private/var/run',
|
|
386
386
|
// Every user's home directory, whatever the current home is (root's is /root, a container's can be /).
|
|
387
|
-
'/home', '/Users',
|
|
387
|
+
'/home', '/Users',
|
|
388
|
+
// Windows: the profiles, the system, installed programs and their machine-wide data.
|
|
389
|
+
...(process.platform === 'win32' ? [path.join(process.env.SystemDrive || 'C:', 'Users'), process.env.SystemRoot, process.env.ProgramData, process.env.ProgramFiles, process.env['ProgramFiles(x86)']].filter((dir): dir is string => !!dir) : [])];
|
|
388
390
|
|
|
389
391
|
// A deploy publishes what it reads, and the path comes from the model, so prompt-injected arguments could
|
|
390
392
|
// publish any readable file. Refused, before anything is read or sent: the home directory and every directory
|
|
@@ -394,6 +396,11 @@ class MCPServer {
|
|
|
394
396
|
// os is imported by deploy.template: the JS generator dedupes import blocks by their whole text, and this block
|
|
395
397
|
// must stay identical to agency-hosting/shared's, or tus and fs are imported twice.
|
|
396
398
|
private assertDeployablePath(localPath: string): void {
|
|
399
|
+
// A UNC or device path (\\host\share, //host/share, \\?\UNC\…) is opened over SMB by the realpath below, which on
|
|
400
|
+
// Windows sends the user's NTLM credentials to that host: refused before anything touches it.
|
|
401
|
+
if (/^[\\/]{2}/.test(localPath)) {
|
|
402
|
+
throw new Error('Refusing to deploy ' + localPath + ': it is a network path. Pass a local project directory or archive.');
|
|
403
|
+
}
|
|
397
404
|
let real: string;
|
|
398
405
|
try {
|
|
399
406
|
real = fs.realpathSync.native(localPath);
|
|
@@ -447,7 +454,8 @@ class MCPServer {
|
|
|
447
454
|
const inSystem = !inHome && this.systemDirectories.some((dir: string) => inside(dir, real) || inside(real, dir));
|
|
448
455
|
// Windows drops trailing dots and spaces from a name: .ssh. is .ssh.
|
|
449
456
|
const inCredentials = real.split(path.sep).some((segment: string) => this.credentialDirectories.includes((process.platform === 'win32' ? segment.replace(/[. ]+$/, '') : segment).toLowerCase()));
|
|
450
|
-
|
|
457
|
+
// A drive or filesystem root (D:\ on Windows) holds everything on it.
|
|
458
|
+
if (real === path.parse(real).root || /^[\\/]{2}/.test(real) || inside(real, home) || otherHome || inHomeData || inProfile || inSystem || inCredentials || (fs.statSync(real).isFile() && this.isSecretFile(path.basename(real)))) {
|
|
451
459
|
throw new Error('Refusing to deploy ' + localPath + ': it is, or contains, a home, system or credentials location. Pass the project directory or archive.');
|
|
452
460
|
}
|
|
453
461
|
}
|
package/src/core/skills.js
CHANGED
|
@@ -204,10 +204,10 @@ export default [
|
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
"uri": "skill://hostinger-headless/steps/04-content-model/SKILL.md",
|
|
207
|
-
"digest": "sha256:
|
|
208
|
-
"size":
|
|
207
|
+
"digest": "sha256:af3d11403d5fe9551597e6194983ec4a71905def85ad672f1edeb267db8949ee",
|
|
208
|
+
"size": 16429,
|
|
209
209
|
"mimeType": "text/markdown",
|
|
210
|
-
"text": "---\nname: headless-step-content-model\ndescription: \"Step 4 (content model) of the Hostinger Headless flow. Prepare phase: turns brief.md into a content helper (content-model.md) — fixed Title/Description plus a tailored generation prompt per section (Navigation, Pages, Articles) — and generates the drafts/images, no live backend needed. Push phase: routes to the backend subfolder to create it the backend's way once provision is ready.\"\n---\n\n# headless-step-content-model\n\nTwo phases around the **instance barrier** (see the top-level `SKILL.md`):\n\n- **Prepare — no instance.** Build the content helper from `brief.md` and generate the content it\n calls for. Runs *during* the provision wait; needs only the brief.\n- **Push — needs the instance.** Create that content in the backend. Gated on\n `provision.status == \"completed\"`; routes to `wordpress/` or `ecommerce/`.\n\n**In:** `brief.md`. **Out:** `content-model.md` (+ any generated media under\n`~/.hostinger/<domain>/media/`).\n\n> Don't wait for provisioning — the helper comes from the brief alone.\n\n---\n\n## Prepare phase — write the content helper (no instance)\n\n`content-model.md` is a lightweight helper, not a schema. Fill the **fixed values** from the brief and\nwrite a **generation prompt** for each section — tailored to *this* site, not generic. Then run those\nprompts to produce the drafts (and images), so the push phase is just upload.\n\nWrite `content-model.md` from this template, adapting every prompt to the brief's purpose, audience\nand tone:\n\n```markdown\n# Content — <domain>\n\n> Content helper prepared from brief.md on <today>. Fixed values are set; each prompt is run\n> during the provision wait to generate the content and media. Push to the backend happens later.\n\n## Title\n<site name, from the brief>\n\n## Description\n<one–two line site description / default meta, from the brief>\n\n## Navigation\n> Generate the primary menu from the site's pages in reading order (<list the brief's pages>).\n> Short labels; note which items are static pages vs. listing pages. Add a footer menu if the\n> brief implies one (socials, contact).\n\n## Pages\n> Generate each page the brief lists. For every page: title, slug, a short section outline, the\n> copy for static pages (e.g. About, Contact), and SEO title + description.\n> <bullet the brief's pages with their one-line purpose>\n\n## Articles (optional)\n> Generate <N> articles across the brief's categories (<list them>). For each: title, slug,\n> body in the brief's tone, category, any relationship (e.g. destination), published date, SEO,\n> and a featured image (see *Images* below — Hostinger AI generation or Unsplash stock) with\n> alt text. Omit if the brief has no article-like content.\n\n## Products (optional — required for a commerce brief)\n> Skip for a non-commerce brief. For a commerce brief, generate the catalog content here (prepare\n> work, no instance): for each product — name, slug, SKU, short + long description in the brief's\n> tone, price, the collection it belongs to, variants if any, and a product image (see *Images* —\n> Hostinger AI generation or Unsplash stock) with alt text. Group products into the collections\n> the brief implies, and generate any **coupons** the brief calls for (code, type, amount). The\n> `ecommerce` push phase creates these on the store's sales channel; a **WordPress + WooCommerce** brief\n> seeds them into WooCommerce instead (see `wordpress/SKILL.md` + `wordpress/woocommerce.md`) — there\n> the **SKU is the idempotency key** and coupons + product categories are part of the catalog.\n```\n\nGuidance:\n\n- **Fixed vs. prompt.** Title and Description are concrete values. Navigation, Pages and Articles are\n prompts because their volume/wording is generated — keep them as prompts so the push phase (or a\n rerun) can regenerate consistently.\n- **Run the prompts now.** Generate the actual page copy and article drafts during the wait — this is\n the slowest work and the whole reason it runs in parallel. Images depend on the chosen source (see\n *Images* below): Unsplash photos and your own generated files can be produced now; Hostinger AI\n images only generate once the instance exists, so write their brief now and generate at the barrier.\n Put any generated/own media in `~/.hostinger/<domain>/media/` and reference it by filename. Record\n alt text for every image.\n- **WordPress: drafts go straight into `content.json`.** On a WordPress backend, write the generated\n copy, terms, menu and image details into `~/.hostinger/<domain>/content.json` (format: `wordpress/SKILL.md`\n Step 1), not into `content-model.md`, so nothing is written twice. `content-model.md` keeps the fixed\n values, the prompts and the image briefs.\n- **Optional sections.** Drop **Articles** if the brief has no article-like content. Drop **Products**\n for a non-commerce brief; for a commerce brief, generate the product catalog here (names, prices,\n descriptions, collections, images) — that's prepare work, and the `ecommerce` push phase then creates\n it on the store.\n- **Don't block on design.** The design step (5) owns the look, and it runs in parallel during the\n provision wait, so never wait for it here. If `design.md` already exists when you source images,\n follow its **Imagery** section; otherwise generate neutral, on-topic imagery from the brief.\n\n### Images — generate with Hostinger AI, or source stock from Unsplash\n\nEvery article (and every product) needs an image. There are two sources, and **you MUST offer the user\nboth and let them choose — never pick silently.** State the default for this backend in one line, name\nthe other option, and proceed on their answer (\"you decide\" = use the default; a skipped tool result is\nnot an answer, see *When you ask the user* in the top-level `SKILL.md`):\n\n| Option | Tool | Backends | Needs the live instance? |\n|---|---|---|---|\n| **A — Hostinger AI image generation** *(default for WordPress / WooCommerce)* | `wordpress_ai-content_generate-images` | WordPress, WordPress + WooCommerce | **yes** — runs at the instance barrier |\n| **B — Unsplash stock photos** *(default for Ecommerce / Webapp; the fallback everywhere)* | Unsplash API, or web fetch of Unsplash search pages | any | no — pure prepare work |\n\n> **Do not silently fall back to stock on a WordPress site.** On WordPress / WooCommerce the default is\n> **Hostinger AI (Option A)** — on-brand, generated from `design.md`. Using Unsplash on a WordPress build\n> is only correct when **the user chose it**, or when **AI generation actually failed** (and then you say\n> so). Taking stock because it is faster, synchronous, or avoids the async poll is a **defect**, not a\n> shortcut: the async start → poll → upload-before-expiry flow (Option A below) is the expected work, not\n> an optional extra. If you are tempted to skip it \"for speed\", stop and offer the user the choice instead.\n\nIf you can generate images yourself (some agents can), offer that as a third option; only if the user\npicks it, put the files in `media/` (no tool needed). **Record alt text for every image whichever source\nyou use.**\n\n**During the prepare wait, write an image brief for each image** into `content-model.md` no matter the\noption (subject, `image_type`, aspect, and the alt text you expect). Option B can also *fetch* the\nphoto now (below); Option A only generates once the instance exists, so its briefs wait for the barrier.\n\n#### Option A — Hostinger AI image generation (WordPress backends)\n\n`wordpress_ai-content_generate-images` generates on-brand images for a live WordPress install, so it\nruns **at the instance barrier** (after `provision.status == \"completed\"`), using the install from\n`site.json` (`username`, and `wordpress.install_id` → the `software` path param). Follow `design.md`'s\n**Imagery** section for look and palette. It is **asynchronous**:\n\n1. **Start** one generation per image:\n\n ```json\n { \"operation\": \"wordpress_ai-content_generate-images\",\n \"params\": {\n \"username\": \"<site.json username>\",\n \"software\": \"<site.json wordpress.install_id>\",\n \"prompt\": \"<what the image shows; for a logo, the wordmark + mark to render>\",\n \"image_type\": \"hero|background|inline|gallery|product|logo\",\n \"num_of_images\": 1,\n \"style\": \"<photographic style tokens from design.md; ignored for logo>\",\n \"color_guidance\": \"<logo only — colour direction, not rendered as text>\" } }\n ```\n\n `prompt` (3–2500 chars) and `image_type` are required; `width`/`height` (128–2048) default per type\n and are ignored for `logo`. Returns `202` with a `generation_id` and `status: in-progress`.\n **Only one generation runs per install at a time** — a `409` means one is already running (and it\n returns no id), so wait for it to finish before starting the next. The endpoint allows 10\n requests/minute.\n\n2. **Poll** `wordpress_ai-content_generation-result` with `{ username, software, generation_id }`\n every few seconds until `status` is `completed` (or `failed`). A completed result carries\n `result.images[]` — each with a **temporary** `url`, plus `width`, `height`, `content_type` — and\n `result.expires_at`.\n\n3. **Use the images before they expire.** The URLs are short-lived, so in the push phase hand each\n `url` straight to WordPress with `media-upload-from-url`, which downloads and stores WP's own copy\n (see the wordpress push `SKILL.md`). Don't persist the temporary URL as the live image. There is no\n photographer to credit — leave `caption` empty or a short on-brand one. Generate these images last,\n right before the push, and put each `url` in its article's or product's `image` in `content.json`\n (with `alt` and `filename`).\n\n On `failed`, retry once with a tightened prompt; if it fails again, fall back to Option B and note\n the gap. Never block the whole push on a single image.\n\n#### Option B — stock photos from Unsplash (any backend, no instance)\n\nThis is still prepare work and needs no live backend: you pick the photos and record their URLs here,\nand the push phase uploads them.\n\nSource every image in a few batched calls, not a search and a fetch per photo:\n\n1. **Find candidates, a page of them per fetch.** Group the image briefs into a few themes (e.g.\n \"sourdough bread\", \"bakery interior\", \"Lisbon street\").\n - With an `UNSPLASH_ACCESS_KEY` in the environment, use the official API, one call per theme:\n `GET https://api.unsplash.com/search/photos?query=<theme>&orientation=landscape&per_page=20` with\n header `Authorization: Client-ID <key>`. Each result's `urls.raw` is the file, `alt_description`\n what it shows and `user.name` the photographer; for each photo you keep, also `GET` its\n `links.download_location` (same header), as the API terms require.\n - Without a key, open the theme's search page `https://unsplash.com/s/photos/<theme-with-dashes>`\n with your **web-fetch tool**, once per theme, and ask it to list every free photo on the page with\n its `images.unsplash.com/photo-<…>` URL quoted exactly (the part before `?`), the photo page\n link, the alt text and the photographer. One fetch returns 10–20 candidates. Skip the\n `plus.unsplash.com/premium_photo-…` results: they are Unsplash+ and not free. Fetch the themes in\n parallel when your tool allows several calls at once. Fall back to a web search limited to\n `unsplash.com` plus a fetch of one photo page (`https://unsplash.com/photos/<…>`) only for a\n subject no search page covers.\n - Every other `unsplash.com` request (curl on any page, `/photos/<id>/download`, `/napi/…`,\n `/oembed`) hits a bot challenge: a `307` to `/.within.website` (Anubis) or a 401. If your fetch\n tool gets the challenge page too, stop: no user-agent spoofing or other workarounds. On a\n WordPress backend where Option A hasn't already failed, offer it; otherwise ask the user for an\n `UNSPLASH_ACCESS_KEY` or record the gap (step 5).\n2. **Check them all in one command.** Pick a candidate per image brief from the alt text, then in one\n shell command request each web-size URL\n (`https://images.unsplash.com/photo-<…>?w=1600&q=80&fm=jpg&fit=max`, query string replaced) and\n confirm 200 `image/jpeg`, and save a small preview (`?w=500`) of each into one folder, e.g.:\n\n ```bash\n mkdir -p ~/.hostinger/<domain>/media/previews && cd ~/.hostinger/<domain>/media/previews && \\\n for id in photo-<a> photo-<b>; do\n curl -s -o /dev/null -w \"$id %{http_code} %{content_type}\\n\" \"https://images.unsplash.com/$id?w=1600&q=80&fm=jpg&fit=max\"\n curl -s -o \"$id.jpg\" \"https://images.unsplash.com/$id?w=500&q=60&fm=jpg&fit=max\"\n done\n ```\n\n The upload ability needs this direct file URL, not the photo page.\n3. **Look before you keep it.** View the previews, all in one turn where your tool can open several\n images at once. Alt text from a search page describes the photo better than a search snippet, but\n a photo often isn't quite what its title says. Reject anything off-topic and take the next\n candidate from the same list. If nothing fits exactly, take the closest real photo and note the gap\n rather than mislabel it.\n4. **Write alt text from what the photo shows**, not from the article's image brief. For example,\n use \"Shopfronts and parked scooters on a Hanoi street\" even if the article is about rain.\n5. **Record it** under each article in `content-model.md` (on WordPress, in the article's `image` in\n `content.json` instead: `url`, `alt`, `filename`, and the credit as `caption`):\n\n ```markdown\n Image: https://images.unsplash.com/photo-<…>?w=1600&q=80&fm=jpg&fit=max\n Image credit: <Photographer> — https://unsplash.com/photos/<id> (Unsplash License)\n Image alt: <what the photo shows>\n Image file: <site>-<subject>.jpg\n ```\n\n If you can't get a real photo, write `Image gap: <reason>` in place of these lines and tell the\n user. Never substitute drawn or generated images without saying so.\n\nUnsplash photos are free to use under the Unsplash License. Still credit the photographer: the push\nphase stores \"Photo by <Photographer> on Unsplash\" as the image caption.\n\nThen update `state.json`: set `stage` to the next prepare stage still to do, fresh `updated_at`. Do\n**not** advance past the barrier here.\n\n---\n\n## Push phase — create it the backend's way (needs the instance)\n\nOnly once `provision.status == \"completed\"` (see *State and artifacts* in the top-level `SKILL.md`),\nroute on the brief's **Suggested backend** and follow that subfolder, which maps the helper onto the\nlive backend — for WordPress, through the per-site WP MCP's ability tools (the installation JWT\nauthenticates that MCP session; `wp/v2` REST is the public read surface, not a write path for the\ntoken) to create the menu, pages, posts, categories and media:\n\n| Suggested backend | Follow |\n|---|---|\n| WordPress | `wordpress/SKILL.md` |\n| WordPress + WooCommerce | `wordpress/SKILL.md` — pushes WP content **and** seeds the WooCommerce catalog (its WooCommerce section + `wordpress/woocommerce.md`) |\n| Ecommerce | `ecommerce/SKILL.md` |\n| Webapp | — (no push; skip to frontend) |\n\n> **Supported backends: `wordpress` (optionally with a WooCommerce store), `ecommerce`, and `webapp`** —\n> where `webapp` is \"supported\" by **skipping this whole stage** (it has no content backend; see the note\n> below). A **WordPress + WooCommerce** brief routes to `wordpress/SKILL.md`, which pushes the WP content\n> **and** seeds the WooCommerce catalog in the same push. PocketBase is not available in this version.\n> Push to whichever single backend provision set up (see the provision router) — don't try to push to two\n> backends here.\n>\n> **Webapp has no content backend.** There is no CMS or store to seed, so a `webapp` brief **skips this\n> whole stage** — both prepare and push. The app owns its own data (its own API or database). Leave\n> `content-model.md` unwritten, mark content-model `skipped` in the run log, and go straight to the\n> frontend step.\n\nAfter the push completes, update `state.json` and continue to the frontend **data** phase.\n"
|
|
210
|
+
"text": "---\nname: headless-step-content-model\ndescription: \"Step 4 (content model) of the Hostinger Headless flow. Prepare phase: turns brief.md into a content helper (content-model.md) — fixed Title/Description plus a tailored generation prompt per section (Navigation, Pages, Articles) — and generates the drafts/images, no live backend needed. Push phase: routes to the backend subfolder to create it the backend's way once provision is ready.\"\n---\n\n# headless-step-content-model\n\nTwo phases around the **instance barrier** (see the top-level `SKILL.md`):\n\n- **Prepare — no instance.** Build the content helper from `brief.md` and generate the content it\n calls for. Runs *during* the provision wait; needs only the brief.\n- **Push — needs the instance.** Create that content in the backend. Gated on\n `provision.status == \"completed\"`; routes to `wordpress/` or `ecommerce/`.\n\n**In:** `brief.md`. **Out:** `content-model.md` (+ any generated media under\n`~/.hostinger/<domain>/media/`).\n\n> Don't wait for provisioning — the helper comes from the brief alone.\n\n---\n\n## Prepare phase — write the content helper (no instance)\n\n`content-model.md` is a lightweight helper, not a schema. Fill the **fixed values** from the brief and\nwrite a **generation prompt** for each section — tailored to *this* site, not generic. Then run those\nprompts to produce the drafts (and images), so the push phase is just upload.\n\nWrite `content-model.md` from this template, adapting every prompt to the brief's purpose, audience\nand tone:\n\n```markdown\n# Content — <domain>\n\n> Content helper prepared from brief.md on <today>. Fixed values are set; each prompt is run\n> during the provision wait to generate the content and media. Push to the backend happens later.\n\n## Title\n<site name, from the brief>\n\n## Description\n<one–two line site description / default meta, from the brief>\n\n## Navigation\n> Generate the primary menu from the site's pages in reading order (<list the brief's pages>).\n> Short labels; note which items are static pages vs. listing pages. Add a footer menu if the\n> brief implies one (socials, contact).\n\n## Pages\n> Generate each page the brief lists. For every page: title, slug, a short section outline, the\n> copy for static pages (e.g. About, Contact), and SEO title + description.\n> <bullet the brief's pages with their one-line purpose>\n\n## Articles (optional)\n> Generate <N> articles across the brief's categories (<list them>). For each: title, slug,\n> body in the brief's tone, category, any relationship (e.g. destination), published date, SEO,\n> and a featured image (see *Images* below — Hostinger AI generation or Unsplash stock) with\n> alt text. Omit if the brief has no article-like content.\n\n## Products (optional — required for a commerce brief)\n> Skip for a non-commerce brief. For a commerce brief, generate the catalog content here (prepare\n> work, no instance): for each product — name, slug, SKU, short + long description in the brief's\n> tone, price, the collection it belongs to, variants if any, and a product image (see *Images* —\n> Hostinger AI generation or Unsplash stock) with alt text. Group products into the collections\n> the brief implies, and generate any **coupons** the brief calls for (code, type, amount). The\n> `ecommerce` push phase creates these on the store's sales channel; a **WordPress + WooCommerce** brief\n> seeds them into WooCommerce instead (see `wordpress/SKILL.md` + `wordpress/woocommerce.md`) — there\n> the **SKU is the idempotency key** and coupons + product categories are part of the catalog.\n```\n\nGuidance:\n\n- **Fixed vs. prompt.** Title and Description are concrete values. Navigation, Pages and Articles are\n prompts because their volume/wording is generated — keep them as prompts so the push phase (or a\n rerun) can regenerate consistently.\n- **Run the prompts now.** Generate the actual page copy and article drafts during the wait — this is\n the slowest work and the whole reason it runs in parallel. Images depend on the chosen source (see\n *Images* below): Unsplash photos and your own generated files can be produced now; Hostinger AI\n images only generate once the instance exists, so write their brief now and generate at the barrier.\n Put any generated/own media in `~/.hostinger/<domain>/media/` and reference it by filename. Record\n alt text for every image.\n- **WordPress: drafts go straight into `content.json`.** On a WordPress backend, write the generated\n copy, terms, menu and image details into `~/.hostinger/<domain>/content.json` (format: `wordpress/SKILL.md`\n Step 1), not into `content-model.md`, so nothing is written twice. `content-model.md` keeps the fixed\n values, the prompts and the image briefs.\n- **Optional sections.** Drop **Articles** if the brief has no article-like content. Drop **Products**\n for a non-commerce brief; for a commerce brief, generate the product catalog here (names, prices,\n descriptions, collections, images) — that's prepare work, and the `ecommerce` push phase then creates\n it on the store.\n- **Don't block on design.** The design step (5) owns the look, and it runs in parallel during the\n provision wait, so never wait for it here. If `design.md` already exists when you source images,\n follow its **Imagery** section; otherwise generate neutral, on-topic imagery from the brief.\n\n### Images — generate with Hostinger AI, or source stock from Unsplash\n\nEvery article (and every product) needs an image. There are two sources, and **you MUST offer the user\nboth and let them choose — never pick silently.** State the default for this backend in one line, name\nthe other option, and proceed on their answer (\"you decide\" = use the default; a skipped tool result is\nnot an answer, see *When you ask the user* in the top-level `SKILL.md`):\n\n| Option | Tool | Backends | Needs the live instance? |\n|---|---|---|---|\n| **A — Hostinger AI image generation** *(default for WordPress / WooCommerce)* | `wordpress_ai-content_generate-images` | WordPress, WordPress + WooCommerce | **yes** — runs at the instance barrier |\n| **B — Unsplash stock photos** *(default for Ecommerce / Webapp; the fallback everywhere)* | Unsplash API, or web fetch of Unsplash search pages | any | no — pure prepare work |\n\n> **Do not silently fall back to stock on a WordPress site.** On WordPress / WooCommerce the default is\n> **Hostinger AI (Option A)** — on-brand, generated from `design.md`. Using Unsplash on a WordPress build\n> is only correct when **the user chose it**, or when **AI generation actually failed** (and then you say\n> so). Taking stock because it is faster, synchronous, or avoids the async poll is a **defect**, not a\n> shortcut: the async start → poll → upload-before-expiry flow (Option A below) is the expected work, not\n> an optional extra. If you are tempted to skip it \"for speed\", stop and offer the user the choice instead.\n\nIf you can generate images yourself (some agents can), offer that as a third option; only if the user\npicks it, put the files in `media/` (no tool needed). **Record alt text for every image whichever source\nyou use.**\n\n**During the prepare wait, write an image brief for each image** into `content-model.md` no matter the\noption (subject, `image_type`, aspect, and the alt text you expect). Option B can also *fetch* the\nphoto now (below); Option A only generates once the instance exists, so its briefs wait for the barrier.\n\n#### Option A — Hostinger AI image generation (WordPress backends)\n\n`wordpress_ai-content_generate-images` generates on-brand images for a live WordPress install, so it\nruns **at the instance barrier** (after `provision.status == \"completed\"`), using the install from\n`site.json` (`username`, and `wordpress.install_id` → the `software` path param). Follow `design.md`'s\n**Imagery** section for look and palette. It is **asynchronous**:\n\n1. **Start** one generation per image:\n\n ```json\n { \"operation\": \"wordpress_ai-content_generate-images\",\n \"params\": {\n \"username\": \"<site.json username>\",\n \"software\": \"<site.json wordpress.install_id>\",\n \"prompt\": \"<what the image shows; for a logo, the wordmark + mark to render>\",\n \"image_type\": \"hero|background|inline|gallery|product|logo\",\n \"num_of_images\": 1,\n \"style\": \"<photographic style tokens from design.md; ignored for logo>\",\n \"color_guidance\": \"<logo only — colour direction, not rendered as text>\" } }\n ```\n\n `prompt` (3–2500 chars) and `image_type` are required; `width`/`height` (128–2048) default per type\n and are ignored for `logo`. Returns `202` with a `generation_id` and `status: in-progress`.\n **Only one generation runs per install at a time** — a `409` means one is already running (and it\n returns no id), so wait for it to finish before starting the next. The endpoint allows 10\n requests/minute.\n\n2. **Poll** `wordpress_ai-content_generation-result` with `{ username, software, generation_id }`\n every few seconds until `status` is `completed` (or `failed`). A completed result carries\n `result.images[]` — each with a **temporary** `url`, plus `width`, `height`, `content_type` — and\n `result.expires_at`.\n\n3. **Use the images before they expire.** The URLs are short-lived, so in the push phase hand each\n `url` straight to WordPress with `media-upload-from-url`, which downloads and stores WP's own copy\n (see the wordpress push `SKILL.md`). Don't persist the temporary URL as the live image. There is no\n photographer to credit — leave `caption` empty or a short on-brand one. Generate these images last,\n right before the push, and put each `url` in its article's or product's `image` in `content.json`\n (with `alt` and `filename`).\n\n On `failed`, retry once with a tightened prompt; if it fails again, fall back to Option B and note\n the gap. Never block the whole push on a single image.\n\n#### Option B — stock photos from Unsplash (any backend, no instance)\n\nThis is still prepare work and needs no live backend: you pick the photos and record their URLs here,\nand the push phase uploads them.\n\nSource every image in a few batched calls, not a search and a fetch per photo:\n\n1. **Find candidates, a page of them per fetch.** Group the image briefs into a few themes (e.g.\n \"sourdough bread\", \"bakery interior\", \"Lisbon street\").\n - With an `UNSPLASH_ACCESS_KEY` in the environment, use the official API, one call per theme:\n `GET https://api.unsplash.com/search/photos?query=<theme>&orientation=landscape&per_page=20` with\n header `Authorization: Client-ID <key>`. Each result's `urls.raw` is the file (its `photo-…`\n part, before `?`, is the `<file id>`), `id` the `<page id>`, `alt_description` what it shows and\n `user.name` the photographer; for each photo you keep, also `GET` its\n `links.download_location` (same header), as the API terms require.\n - Without a key, open the theme's search page `https://unsplash.com/s/photos/<theme-with-dashes>`\n with your **web-fetch tool**, once per theme, with this prompt (a short fixed answer keeps the\n fetch fast):\n\n ```text\n List up to 12 free photos on this page, one line each, in this exact format and nothing else:\n <file id> | <page id> | <alt text> | <photographer>\n <file id> is the photo-… part of its images.unsplash.com URL, copied exactly, before any \"?\".\n <page id> is the part after unsplash.com/photos/ in its photo page link.\n Skip plus.unsplash.com/premium_photo-… results: they are Unsplash+ and not free.\n ```\n\n Fetch the themes in parallel when your tool allows several calls at once. Fall back to a web\n search limited to `unsplash.com` plus a fetch of one photo page (`https://unsplash.com/photos/<…>`)\n only for a subject no search page covers.\n - Every other `unsplash.com` request (curl on any page, `/photos/<id>/download`, `/napi/…`,\n `/oembed`) hits a bot challenge: a `307` to `/.within.website` (Anubis) or a 401. If your fetch\n tool gets the challenge page too, stop: no user-agent spoofing or other workarounds. On a\n WordPress backend where Option A hasn't already failed, offer it; otherwise ask the user for an\n `UNSPLASH_ACCESS_KEY` or record the gap (step 5).\n2. **Check them all in one command.** Pick a candidate per image brief from its alt text, then in one\n shell command request each web-size URL\n (`https://images.unsplash.com/<file id>?w=1600&q=80&fm=jpg&fit=max`, query string replaced) and\n confirm 200 `image/jpeg`, and save a small preview (`?w=500`) of each into one folder, e.g.:\n\n ```bash\n mkdir -p ~/.hostinger/<domain>/media/previews && cd ~/.hostinger/<domain>/media/previews && \\\n for id in <file id> <file id>; do\n curl -s -o /dev/null -w \"$id %{http_code} %{content_type}\\n\" \"https://images.unsplash.com/$id?w=1600&q=80&fm=jpg&fit=max\"\n curl -s -o \"$id.jpg\" \"https://images.unsplash.com/$id?w=500&q=60&fm=jpg&fit=max\"\n done\n ```\n\n The upload ability needs this direct file URL, not the photo page.\n3. **Look before you keep it.** View the previews, all in one turn where your tool can open several\n images at once. Alt text from a search page describes the photo better than a search snippet, but\n a photo often isn't quite what its title says. Reject anything off-topic and take the next\n candidate from the same list. If nothing fits exactly, take the closest real photo and note the gap\n rather than mislabel it.\n4. **Write alt text from what the photo shows**, not from the article's image brief. For example,\n use \"Shopfronts and parked scooters on a Hanoi street\" even if the article is about rain.\n5. **Record it** under each article in `content-model.md` (on WordPress, in the article's `image` in\n `content.json` instead: `url`, `alt`, `filename`, and the credit as `caption`):\n\n ```markdown\n Image: https://images.unsplash.com/<file id>?w=1600&q=80&fm=jpg&fit=max\n Image credit: <Photographer> — https://unsplash.com/photos/<page id> (Unsplash License)\n Image alt: <what the photo shows>\n Image file: <site>-<subject>.jpg\n ```\n\n If you can't get a real photo, write `Image gap: <reason>` in place of these lines and tell the\n user. Never substitute drawn or generated images without saying so.\n\nUnsplash photos are free to use under the Unsplash License. Still credit the photographer: the push\nphase stores \"Photo by <Photographer> on Unsplash\" as the image caption.\n\nThen update `state.json`: set `stage` to the next prepare stage still to do, fresh `updated_at`. Do\n**not** advance past the barrier here.\n\n---\n\n## Push phase — create it the backend's way (needs the instance)\n\nOnly once `provision.status == \"completed\"` (see *State and artifacts* in the top-level `SKILL.md`),\nroute on the brief's **Suggested backend** and follow that subfolder, which maps the helper onto the\nlive backend — for WordPress, through the per-site WP MCP's ability tools (the installation JWT\nauthenticates that MCP session; `wp/v2` REST is the public read surface, not a write path for the\ntoken) to create the menu, pages, posts, categories and media:\n\n| Suggested backend | Follow |\n|---|---|\n| WordPress | `wordpress/SKILL.md` |\n| WordPress + WooCommerce | `wordpress/SKILL.md` — pushes WP content **and** seeds the WooCommerce catalog (its WooCommerce section + `wordpress/woocommerce.md`) |\n| Ecommerce | `ecommerce/SKILL.md` |\n| Webapp | — (no push; skip to frontend) |\n\n> **Supported backends: `wordpress` (optionally with a WooCommerce store), `ecommerce`, and `webapp`** —\n> where `webapp` is \"supported\" by **skipping this whole stage** (it has no content backend; see the note\n> below). A **WordPress + WooCommerce** brief routes to `wordpress/SKILL.md`, which pushes the WP content\n> **and** seeds the WooCommerce catalog in the same push. PocketBase is not available in this version.\n> Push to whichever single backend provision set up (see the provision router) — don't try to push to two\n> backends here.\n>\n> **Webapp has no content backend.** There is no CMS or store to seed, so a `webapp` brief **skips this\n> whole stage** — both prepare and push. The app owns its own data (its own API or database). Leave\n> `content-model.md` unwritten, mark content-model `skipped` in the run log, and go straight to the\n> frontend step.\n\nAfter the push completes, update `state.json` and continue to the frontend **data** phase.\n"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
"uri": "skill://hostinger-headless/steps/04-content-model/ecommerce/SKILL.md",
|
package/src/core/skills.ts
CHANGED
|
@@ -218,10 +218,10 @@ const skills: Skill[] = [
|
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
220
|
"uri": "skill://hostinger-headless/steps/04-content-model/SKILL.md",
|
|
221
|
-
"digest": "sha256:
|
|
222
|
-
"size":
|
|
221
|
+
"digest": "sha256:af3d11403d5fe9551597e6194983ec4a71905def85ad672f1edeb267db8949ee",
|
|
222
|
+
"size": 16429,
|
|
223
223
|
"mimeType": "text/markdown",
|
|
224
|
-
"text": "---\nname: headless-step-content-model\ndescription: \"Step 4 (content model) of the Hostinger Headless flow. Prepare phase: turns brief.md into a content helper (content-model.md) — fixed Title/Description plus a tailored generation prompt per section (Navigation, Pages, Articles) — and generates the drafts/images, no live backend needed. Push phase: routes to the backend subfolder to create it the backend's way once provision is ready.\"\n---\n\n# headless-step-content-model\n\nTwo phases around the **instance barrier** (see the top-level `SKILL.md`):\n\n- **Prepare — no instance.** Build the content helper from `brief.md` and generate the content it\n calls for. Runs *during* the provision wait; needs only the brief.\n- **Push — needs the instance.** Create that content in the backend. Gated on\n `provision.status == \"completed\"`; routes to `wordpress/` or `ecommerce/`.\n\n**In:** `brief.md`. **Out:** `content-model.md` (+ any generated media under\n`~/.hostinger/<domain>/media/`).\n\n> Don't wait for provisioning — the helper comes from the brief alone.\n\n---\n\n## Prepare phase — write the content helper (no instance)\n\n`content-model.md` is a lightweight helper, not a schema. Fill the **fixed values** from the brief and\nwrite a **generation prompt** for each section — tailored to *this* site, not generic. Then run those\nprompts to produce the drafts (and images), so the push phase is just upload.\n\nWrite `content-model.md` from this template, adapting every prompt to the brief's purpose, audience\nand tone:\n\n```markdown\n# Content — <domain>\n\n> Content helper prepared from brief.md on <today>. Fixed values are set; each prompt is run\n> during the provision wait to generate the content and media. Push to the backend happens later.\n\n## Title\n<site name, from the brief>\n\n## Description\n<one–two line site description / default meta, from the brief>\n\n## Navigation\n> Generate the primary menu from the site's pages in reading order (<list the brief's pages>).\n> Short labels; note which items are static pages vs. listing pages. Add a footer menu if the\n> brief implies one (socials, contact).\n\n## Pages\n> Generate each page the brief lists. For every page: title, slug, a short section outline, the\n> copy for static pages (e.g. About, Contact), and SEO title + description.\n> <bullet the brief's pages with their one-line purpose>\n\n## Articles (optional)\n> Generate <N> articles across the brief's categories (<list them>). For each: title, slug,\n> body in the brief's tone, category, any relationship (e.g. destination), published date, SEO,\n> and a featured image (see *Images* below — Hostinger AI generation or Unsplash stock) with\n> alt text. Omit if the brief has no article-like content.\n\n## Products (optional — required for a commerce brief)\n> Skip for a non-commerce brief. For a commerce brief, generate the catalog content here (prepare\n> work, no instance): for each product — name, slug, SKU, short + long description in the brief's\n> tone, price, the collection it belongs to, variants if any, and a product image (see *Images* —\n> Hostinger AI generation or Unsplash stock) with alt text. Group products into the collections\n> the brief implies, and generate any **coupons** the brief calls for (code, type, amount). The\n> `ecommerce` push phase creates these on the store's sales channel; a **WordPress + WooCommerce** brief\n> seeds them into WooCommerce instead (see `wordpress/SKILL.md` + `wordpress/woocommerce.md`) — there\n> the **SKU is the idempotency key** and coupons + product categories are part of the catalog.\n```\n\nGuidance:\n\n- **Fixed vs. prompt.** Title and Description are concrete values. Navigation, Pages and Articles are\n prompts because their volume/wording is generated — keep them as prompts so the push phase (or a\n rerun) can regenerate consistently.\n- **Run the prompts now.** Generate the actual page copy and article drafts during the wait — this is\n the slowest work and the whole reason it runs in parallel. Images depend on the chosen source (see\n *Images* below): Unsplash photos and your own generated files can be produced now; Hostinger AI\n images only generate once the instance exists, so write their brief now and generate at the barrier.\n Put any generated/own media in `~/.hostinger/<domain>/media/` and reference it by filename. Record\n alt text for every image.\n- **WordPress: drafts go straight into `content.json`.** On a WordPress backend, write the generated\n copy, terms, menu and image details into `~/.hostinger/<domain>/content.json` (format: `wordpress/SKILL.md`\n Step 1), not into `content-model.md`, so nothing is written twice. `content-model.md` keeps the fixed\n values, the prompts and the image briefs.\n- **Optional sections.** Drop **Articles** if the brief has no article-like content. Drop **Products**\n for a non-commerce brief; for a commerce brief, generate the product catalog here (names, prices,\n descriptions, collections, images) — that's prepare work, and the `ecommerce` push phase then creates\n it on the store.\n- **Don't block on design.** The design step (5) owns the look, and it runs in parallel during the\n provision wait, so never wait for it here. If `design.md` already exists when you source images,\n follow its **Imagery** section; otherwise generate neutral, on-topic imagery from the brief.\n\n### Images — generate with Hostinger AI, or source stock from Unsplash\n\nEvery article (and every product) needs an image. There are two sources, and **you MUST offer the user\nboth and let them choose — never pick silently.** State the default for this backend in one line, name\nthe other option, and proceed on their answer (\"you decide\" = use the default; a skipped tool result is\nnot an answer, see *When you ask the user* in the top-level `SKILL.md`):\n\n| Option | Tool | Backends | Needs the live instance? |\n|---|---|---|---|\n| **A — Hostinger AI image generation** *(default for WordPress / WooCommerce)* | `wordpress_ai-content_generate-images` | WordPress, WordPress + WooCommerce | **yes** — runs at the instance barrier |\n| **B — Unsplash stock photos** *(default for Ecommerce / Webapp; the fallback everywhere)* | Unsplash API, or web fetch of Unsplash search pages | any | no — pure prepare work |\n\n> **Do not silently fall back to stock on a WordPress site.** On WordPress / WooCommerce the default is\n> **Hostinger AI (Option A)** — on-brand, generated from `design.md`. Using Unsplash on a WordPress build\n> is only correct when **the user chose it**, or when **AI generation actually failed** (and then you say\n> so). Taking stock because it is faster, synchronous, or avoids the async poll is a **defect**, not a\n> shortcut: the async start → poll → upload-before-expiry flow (Option A below) is the expected work, not\n> an optional extra. If you are tempted to skip it \"for speed\", stop and offer the user the choice instead.\n\nIf you can generate images yourself (some agents can), offer that as a third option; only if the user\npicks it, put the files in `media/` (no tool needed). **Record alt text for every image whichever source\nyou use.**\n\n**During the prepare wait, write an image brief for each image** into `content-model.md` no matter the\noption (subject, `image_type`, aspect, and the alt text you expect). Option B can also *fetch* the\nphoto now (below); Option A only generates once the instance exists, so its briefs wait for the barrier.\n\n#### Option A — Hostinger AI image generation (WordPress backends)\n\n`wordpress_ai-content_generate-images` generates on-brand images for a live WordPress install, so it\nruns **at the instance barrier** (after `provision.status == \"completed\"`), using the install from\n`site.json` (`username`, and `wordpress.install_id` → the `software` path param). Follow `design.md`'s\n**Imagery** section for look and palette. It is **asynchronous**:\n\n1. **Start** one generation per image:\n\n ```json\n { \"operation\": \"wordpress_ai-content_generate-images\",\n \"params\": {\n \"username\": \"<site.json username>\",\n \"software\": \"<site.json wordpress.install_id>\",\n \"prompt\": \"<what the image shows; for a logo, the wordmark + mark to render>\",\n \"image_type\": \"hero|background|inline|gallery|product|logo\",\n \"num_of_images\": 1,\n \"style\": \"<photographic style tokens from design.md; ignored for logo>\",\n \"color_guidance\": \"<logo only — colour direction, not rendered as text>\" } }\n ```\n\n `prompt` (3–2500 chars) and `image_type` are required; `width`/`height` (128–2048) default per type\n and are ignored for `logo`. Returns `202` with a `generation_id` and `status: in-progress`.\n **Only one generation runs per install at a time** — a `409` means one is already running (and it\n returns no id), so wait for it to finish before starting the next. The endpoint allows 10\n requests/minute.\n\n2. **Poll** `wordpress_ai-content_generation-result` with `{ username, software, generation_id }`\n every few seconds until `status` is `completed` (or `failed`). A completed result carries\n `result.images[]` — each with a **temporary** `url`, plus `width`, `height`, `content_type` — and\n `result.expires_at`.\n\n3. **Use the images before they expire.** The URLs are short-lived, so in the push phase hand each\n `url` straight to WordPress with `media-upload-from-url`, which downloads and stores WP's own copy\n (see the wordpress push `SKILL.md`). Don't persist the temporary URL as the live image. There is no\n photographer to credit — leave `caption` empty or a short on-brand one. Generate these images last,\n right before the push, and put each `url` in its article's or product's `image` in `content.json`\n (with `alt` and `filename`).\n\n On `failed`, retry once with a tightened prompt; if it fails again, fall back to Option B and note\n the gap. Never block the whole push on a single image.\n\n#### Option B — stock photos from Unsplash (any backend, no instance)\n\nThis is still prepare work and needs no live backend: you pick the photos and record their URLs here,\nand the push phase uploads them.\n\nSource every image in a few batched calls, not a search and a fetch per photo:\n\n1. **Find candidates, a page of them per fetch.** Group the image briefs into a few themes (e.g.\n \"sourdough bread\", \"bakery interior\", \"Lisbon street\").\n - With an `UNSPLASH_ACCESS_KEY` in the environment, use the official API, one call per theme:\n `GET https://api.unsplash.com/search/photos?query=<theme>&orientation=landscape&per_page=20` with\n header `Authorization: Client-ID <key>`. Each result's `urls.raw` is the file, `alt_description`\n what it shows and `user.name` the photographer; for each photo you keep, also `GET` its\n `links.download_location` (same header), as the API terms require.\n - Without a key, open the theme's search page `https://unsplash.com/s/photos/<theme-with-dashes>`\n with your **web-fetch tool**, once per theme, and ask it to list every free photo on the page with\n its `images.unsplash.com/photo-<…>` URL quoted exactly (the part before `?`), the photo page\n link, the alt text and the photographer. One fetch returns 10–20 candidates. Skip the\n `plus.unsplash.com/premium_photo-…` results: they are Unsplash+ and not free. Fetch the themes in\n parallel when your tool allows several calls at once. Fall back to a web search limited to\n `unsplash.com` plus a fetch of one photo page (`https://unsplash.com/photos/<…>`) only for a\n subject no search page covers.\n - Every other `unsplash.com` request (curl on any page, `/photos/<id>/download`, `/napi/…`,\n `/oembed`) hits a bot challenge: a `307` to `/.within.website` (Anubis) or a 401. If your fetch\n tool gets the challenge page too, stop: no user-agent spoofing or other workarounds. On a\n WordPress backend where Option A hasn't already failed, offer it; otherwise ask the user for an\n `UNSPLASH_ACCESS_KEY` or record the gap (step 5).\n2. **Check them all in one command.** Pick a candidate per image brief from the alt text, then in one\n shell command request each web-size URL\n (`https://images.unsplash.com/photo-<…>?w=1600&q=80&fm=jpg&fit=max`, query string replaced) and\n confirm 200 `image/jpeg`, and save a small preview (`?w=500`) of each into one folder, e.g.:\n\n ```bash\n mkdir -p ~/.hostinger/<domain>/media/previews && cd ~/.hostinger/<domain>/media/previews && \\\n for id in photo-<a> photo-<b>; do\n curl -s -o /dev/null -w \"$id %{http_code} %{content_type}\\n\" \"https://images.unsplash.com/$id?w=1600&q=80&fm=jpg&fit=max\"\n curl -s -o \"$id.jpg\" \"https://images.unsplash.com/$id?w=500&q=60&fm=jpg&fit=max\"\n done\n ```\n\n The upload ability needs this direct file URL, not the photo page.\n3. **Look before you keep it.** View the previews, all in one turn where your tool can open several\n images at once. Alt text from a search page describes the photo better than a search snippet, but\n a photo often isn't quite what its title says. Reject anything off-topic and take the next\n candidate from the same list. If nothing fits exactly, take the closest real photo and note the gap\n rather than mislabel it.\n4. **Write alt text from what the photo shows**, not from the article's image brief. For example,\n use \"Shopfronts and parked scooters on a Hanoi street\" even if the article is about rain.\n5. **Record it** under each article in `content-model.md` (on WordPress, in the article's `image` in\n `content.json` instead: `url`, `alt`, `filename`, and the credit as `caption`):\n\n ```markdown\n Image: https://images.unsplash.com/photo-<…>?w=1600&q=80&fm=jpg&fit=max\n Image credit: <Photographer> — https://unsplash.com/photos/<id> (Unsplash License)\n Image alt: <what the photo shows>\n Image file: <site>-<subject>.jpg\n ```\n\n If you can't get a real photo, write `Image gap: <reason>` in place of these lines and tell the\n user. Never substitute drawn or generated images without saying so.\n\nUnsplash photos are free to use under the Unsplash License. Still credit the photographer: the push\nphase stores \"Photo by <Photographer> on Unsplash\" as the image caption.\n\nThen update `state.json`: set `stage` to the next prepare stage still to do, fresh `updated_at`. Do\n**not** advance past the barrier here.\n\n---\n\n## Push phase — create it the backend's way (needs the instance)\n\nOnly once `provision.status == \"completed\"` (see *State and artifacts* in the top-level `SKILL.md`),\nroute on the brief's **Suggested backend** and follow that subfolder, which maps the helper onto the\nlive backend — for WordPress, through the per-site WP MCP's ability tools (the installation JWT\nauthenticates that MCP session; `wp/v2` REST is the public read surface, not a write path for the\ntoken) to create the menu, pages, posts, categories and media:\n\n| Suggested backend | Follow |\n|---|---|\n| WordPress | `wordpress/SKILL.md` |\n| WordPress + WooCommerce | `wordpress/SKILL.md` — pushes WP content **and** seeds the WooCommerce catalog (its WooCommerce section + `wordpress/woocommerce.md`) |\n| Ecommerce | `ecommerce/SKILL.md` |\n| Webapp | — (no push; skip to frontend) |\n\n> **Supported backends: `wordpress` (optionally with a WooCommerce store), `ecommerce`, and `webapp`** —\n> where `webapp` is \"supported\" by **skipping this whole stage** (it has no content backend; see the note\n> below). A **WordPress + WooCommerce** brief routes to `wordpress/SKILL.md`, which pushes the WP content\n> **and** seeds the WooCommerce catalog in the same push. PocketBase is not available in this version.\n> Push to whichever single backend provision set up (see the provision router) — don't try to push to two\n> backends here.\n>\n> **Webapp has no content backend.** There is no CMS or store to seed, so a `webapp` brief **skips this\n> whole stage** — both prepare and push. The app owns its own data (its own API or database). Leave\n> `content-model.md` unwritten, mark content-model `skipped` in the run log, and go straight to the\n> frontend step.\n\nAfter the push completes, update `state.json` and continue to the frontend **data** phase.\n"
|
|
224
|
+
"text": "---\nname: headless-step-content-model\ndescription: \"Step 4 (content model) of the Hostinger Headless flow. Prepare phase: turns brief.md into a content helper (content-model.md) — fixed Title/Description plus a tailored generation prompt per section (Navigation, Pages, Articles) — and generates the drafts/images, no live backend needed. Push phase: routes to the backend subfolder to create it the backend's way once provision is ready.\"\n---\n\n# headless-step-content-model\n\nTwo phases around the **instance barrier** (see the top-level `SKILL.md`):\n\n- **Prepare — no instance.** Build the content helper from `brief.md` and generate the content it\n calls for. Runs *during* the provision wait; needs only the brief.\n- **Push — needs the instance.** Create that content in the backend. Gated on\n `provision.status == \"completed\"`; routes to `wordpress/` or `ecommerce/`.\n\n**In:** `brief.md`. **Out:** `content-model.md` (+ any generated media under\n`~/.hostinger/<domain>/media/`).\n\n> Don't wait for provisioning — the helper comes from the brief alone.\n\n---\n\n## Prepare phase — write the content helper (no instance)\n\n`content-model.md` is a lightweight helper, not a schema. Fill the **fixed values** from the brief and\nwrite a **generation prompt** for each section — tailored to *this* site, not generic. Then run those\nprompts to produce the drafts (and images), so the push phase is just upload.\n\nWrite `content-model.md` from this template, adapting every prompt to the brief's purpose, audience\nand tone:\n\n```markdown\n# Content — <domain>\n\n> Content helper prepared from brief.md on <today>. Fixed values are set; each prompt is run\n> during the provision wait to generate the content and media. Push to the backend happens later.\n\n## Title\n<site name, from the brief>\n\n## Description\n<one–two line site description / default meta, from the brief>\n\n## Navigation\n> Generate the primary menu from the site's pages in reading order (<list the brief's pages>).\n> Short labels; note which items are static pages vs. listing pages. Add a footer menu if the\n> brief implies one (socials, contact).\n\n## Pages\n> Generate each page the brief lists. For every page: title, slug, a short section outline, the\n> copy for static pages (e.g. About, Contact), and SEO title + description.\n> <bullet the brief's pages with their one-line purpose>\n\n## Articles (optional)\n> Generate <N> articles across the brief's categories (<list them>). For each: title, slug,\n> body in the brief's tone, category, any relationship (e.g. destination), published date, SEO,\n> and a featured image (see *Images* below — Hostinger AI generation or Unsplash stock) with\n> alt text. Omit if the brief has no article-like content.\n\n## Products (optional — required for a commerce brief)\n> Skip for a non-commerce brief. For a commerce brief, generate the catalog content here (prepare\n> work, no instance): for each product — name, slug, SKU, short + long description in the brief's\n> tone, price, the collection it belongs to, variants if any, and a product image (see *Images* —\n> Hostinger AI generation or Unsplash stock) with alt text. Group products into the collections\n> the brief implies, and generate any **coupons** the brief calls for (code, type, amount). The\n> `ecommerce` push phase creates these on the store's sales channel; a **WordPress + WooCommerce** brief\n> seeds them into WooCommerce instead (see `wordpress/SKILL.md` + `wordpress/woocommerce.md`) — there\n> the **SKU is the idempotency key** and coupons + product categories are part of the catalog.\n```\n\nGuidance:\n\n- **Fixed vs. prompt.** Title and Description are concrete values. Navigation, Pages and Articles are\n prompts because their volume/wording is generated — keep them as prompts so the push phase (or a\n rerun) can regenerate consistently.\n- **Run the prompts now.** Generate the actual page copy and article drafts during the wait — this is\n the slowest work and the whole reason it runs in parallel. Images depend on the chosen source (see\n *Images* below): Unsplash photos and your own generated files can be produced now; Hostinger AI\n images only generate once the instance exists, so write their brief now and generate at the barrier.\n Put any generated/own media in `~/.hostinger/<domain>/media/` and reference it by filename. Record\n alt text for every image.\n- **WordPress: drafts go straight into `content.json`.** On a WordPress backend, write the generated\n copy, terms, menu and image details into `~/.hostinger/<domain>/content.json` (format: `wordpress/SKILL.md`\n Step 1), not into `content-model.md`, so nothing is written twice. `content-model.md` keeps the fixed\n values, the prompts and the image briefs.\n- **Optional sections.** Drop **Articles** if the brief has no article-like content. Drop **Products**\n for a non-commerce brief; for a commerce brief, generate the product catalog here (names, prices,\n descriptions, collections, images) — that's prepare work, and the `ecommerce` push phase then creates\n it on the store.\n- **Don't block on design.** The design step (5) owns the look, and it runs in parallel during the\n provision wait, so never wait for it here. If `design.md` already exists when you source images,\n follow its **Imagery** section; otherwise generate neutral, on-topic imagery from the brief.\n\n### Images — generate with Hostinger AI, or source stock from Unsplash\n\nEvery article (and every product) needs an image. There are two sources, and **you MUST offer the user\nboth and let them choose — never pick silently.** State the default for this backend in one line, name\nthe other option, and proceed on their answer (\"you decide\" = use the default; a skipped tool result is\nnot an answer, see *When you ask the user* in the top-level `SKILL.md`):\n\n| Option | Tool | Backends | Needs the live instance? |\n|---|---|---|---|\n| **A — Hostinger AI image generation** *(default for WordPress / WooCommerce)* | `wordpress_ai-content_generate-images` | WordPress, WordPress + WooCommerce | **yes** — runs at the instance barrier |\n| **B — Unsplash stock photos** *(default for Ecommerce / Webapp; the fallback everywhere)* | Unsplash API, or web fetch of Unsplash search pages | any | no — pure prepare work |\n\n> **Do not silently fall back to stock on a WordPress site.** On WordPress / WooCommerce the default is\n> **Hostinger AI (Option A)** — on-brand, generated from `design.md`. Using Unsplash on a WordPress build\n> is only correct when **the user chose it**, or when **AI generation actually failed** (and then you say\n> so). Taking stock because it is faster, synchronous, or avoids the async poll is a **defect**, not a\n> shortcut: the async start → poll → upload-before-expiry flow (Option A below) is the expected work, not\n> an optional extra. If you are tempted to skip it \"for speed\", stop and offer the user the choice instead.\n\nIf you can generate images yourself (some agents can), offer that as a third option; only if the user\npicks it, put the files in `media/` (no tool needed). **Record alt text for every image whichever source\nyou use.**\n\n**During the prepare wait, write an image brief for each image** into `content-model.md` no matter the\noption (subject, `image_type`, aspect, and the alt text you expect). Option B can also *fetch* the\nphoto now (below); Option A only generates once the instance exists, so its briefs wait for the barrier.\n\n#### Option A — Hostinger AI image generation (WordPress backends)\n\n`wordpress_ai-content_generate-images` generates on-brand images for a live WordPress install, so it\nruns **at the instance barrier** (after `provision.status == \"completed\"`), using the install from\n`site.json` (`username`, and `wordpress.install_id` → the `software` path param). Follow `design.md`'s\n**Imagery** section for look and palette. It is **asynchronous**:\n\n1. **Start** one generation per image:\n\n ```json\n { \"operation\": \"wordpress_ai-content_generate-images\",\n \"params\": {\n \"username\": \"<site.json username>\",\n \"software\": \"<site.json wordpress.install_id>\",\n \"prompt\": \"<what the image shows; for a logo, the wordmark + mark to render>\",\n \"image_type\": \"hero|background|inline|gallery|product|logo\",\n \"num_of_images\": 1,\n \"style\": \"<photographic style tokens from design.md; ignored for logo>\",\n \"color_guidance\": \"<logo only — colour direction, not rendered as text>\" } }\n ```\n\n `prompt` (3–2500 chars) and `image_type` are required; `width`/`height` (128–2048) default per type\n and are ignored for `logo`. Returns `202` with a `generation_id` and `status: in-progress`.\n **Only one generation runs per install at a time** — a `409` means one is already running (and it\n returns no id), so wait for it to finish before starting the next. The endpoint allows 10\n requests/minute.\n\n2. **Poll** `wordpress_ai-content_generation-result` with `{ username, software, generation_id }`\n every few seconds until `status` is `completed` (or `failed`). A completed result carries\n `result.images[]` — each with a **temporary** `url`, plus `width`, `height`, `content_type` — and\n `result.expires_at`.\n\n3. **Use the images before they expire.** The URLs are short-lived, so in the push phase hand each\n `url` straight to WordPress with `media-upload-from-url`, which downloads and stores WP's own copy\n (see the wordpress push `SKILL.md`). Don't persist the temporary URL as the live image. There is no\n photographer to credit — leave `caption` empty or a short on-brand one. Generate these images last,\n right before the push, and put each `url` in its article's or product's `image` in `content.json`\n (with `alt` and `filename`).\n\n On `failed`, retry once with a tightened prompt; if it fails again, fall back to Option B and note\n the gap. Never block the whole push on a single image.\n\n#### Option B — stock photos from Unsplash (any backend, no instance)\n\nThis is still prepare work and needs no live backend: you pick the photos and record their URLs here,\nand the push phase uploads them.\n\nSource every image in a few batched calls, not a search and a fetch per photo:\n\n1. **Find candidates, a page of them per fetch.** Group the image briefs into a few themes (e.g.\n \"sourdough bread\", \"bakery interior\", \"Lisbon street\").\n - With an `UNSPLASH_ACCESS_KEY` in the environment, use the official API, one call per theme:\n `GET https://api.unsplash.com/search/photos?query=<theme>&orientation=landscape&per_page=20` with\n header `Authorization: Client-ID <key>`. Each result's `urls.raw` is the file (its `photo-…`\n part, before `?`, is the `<file id>`), `id` the `<page id>`, `alt_description` what it shows and\n `user.name` the photographer; for each photo you keep, also `GET` its\n `links.download_location` (same header), as the API terms require.\n - Without a key, open the theme's search page `https://unsplash.com/s/photos/<theme-with-dashes>`\n with your **web-fetch tool**, once per theme, with this prompt (a short fixed answer keeps the\n fetch fast):\n\n ```text\n List up to 12 free photos on this page, one line each, in this exact format and nothing else:\n <file id> | <page id> | <alt text> | <photographer>\n <file id> is the photo-… part of its images.unsplash.com URL, copied exactly, before any \"?\".\n <page id> is the part after unsplash.com/photos/ in its photo page link.\n Skip plus.unsplash.com/premium_photo-… results: they are Unsplash+ and not free.\n ```\n\n Fetch the themes in parallel when your tool allows several calls at once. Fall back to a web\n search limited to `unsplash.com` plus a fetch of one photo page (`https://unsplash.com/photos/<…>`)\n only for a subject no search page covers.\n - Every other `unsplash.com` request (curl on any page, `/photos/<id>/download`, `/napi/…`,\n `/oembed`) hits a bot challenge: a `307` to `/.within.website` (Anubis) or a 401. If your fetch\n tool gets the challenge page too, stop: no user-agent spoofing or other workarounds. On a\n WordPress backend where Option A hasn't already failed, offer it; otherwise ask the user for an\n `UNSPLASH_ACCESS_KEY` or record the gap (step 5).\n2. **Check them all in one command.** Pick a candidate per image brief from its alt text, then in one\n shell command request each web-size URL\n (`https://images.unsplash.com/<file id>?w=1600&q=80&fm=jpg&fit=max`, query string replaced) and\n confirm 200 `image/jpeg`, and save a small preview (`?w=500`) of each into one folder, e.g.:\n\n ```bash\n mkdir -p ~/.hostinger/<domain>/media/previews && cd ~/.hostinger/<domain>/media/previews && \\\n for id in <file id> <file id>; do\n curl -s -o /dev/null -w \"$id %{http_code} %{content_type}\\n\" \"https://images.unsplash.com/$id?w=1600&q=80&fm=jpg&fit=max\"\n curl -s -o \"$id.jpg\" \"https://images.unsplash.com/$id?w=500&q=60&fm=jpg&fit=max\"\n done\n ```\n\n The upload ability needs this direct file URL, not the photo page.\n3. **Look before you keep it.** View the previews, all in one turn where your tool can open several\n images at once. Alt text from a search page describes the photo better than a search snippet, but\n a photo often isn't quite what its title says. Reject anything off-topic and take the next\n candidate from the same list. If nothing fits exactly, take the closest real photo and note the gap\n rather than mislabel it.\n4. **Write alt text from what the photo shows**, not from the article's image brief. For example,\n use \"Shopfronts and parked scooters on a Hanoi street\" even if the article is about rain.\n5. **Record it** under each article in `content-model.md` (on WordPress, in the article's `image` in\n `content.json` instead: `url`, `alt`, `filename`, and the credit as `caption`):\n\n ```markdown\n Image: https://images.unsplash.com/<file id>?w=1600&q=80&fm=jpg&fit=max\n Image credit: <Photographer> — https://unsplash.com/photos/<page id> (Unsplash License)\n Image alt: <what the photo shows>\n Image file: <site>-<subject>.jpg\n ```\n\n If you can't get a real photo, write `Image gap: <reason>` in place of these lines and tell the\n user. Never substitute drawn or generated images without saying so.\n\nUnsplash photos are free to use under the Unsplash License. Still credit the photographer: the push\nphase stores \"Photo by <Photographer> on Unsplash\" as the image caption.\n\nThen update `state.json`: set `stage` to the next prepare stage still to do, fresh `updated_at`. Do\n**not** advance past the barrier here.\n\n---\n\n## Push phase — create it the backend's way (needs the instance)\n\nOnly once `provision.status == \"completed\"` (see *State and artifacts* in the top-level `SKILL.md`),\nroute on the brief's **Suggested backend** and follow that subfolder, which maps the helper onto the\nlive backend — for WordPress, through the per-site WP MCP's ability tools (the installation JWT\nauthenticates that MCP session; `wp/v2` REST is the public read surface, not a write path for the\ntoken) to create the menu, pages, posts, categories and media:\n\n| Suggested backend | Follow |\n|---|---|\n| WordPress | `wordpress/SKILL.md` |\n| WordPress + WooCommerce | `wordpress/SKILL.md` — pushes WP content **and** seeds the WooCommerce catalog (its WooCommerce section + `wordpress/woocommerce.md`) |\n| Ecommerce | `ecommerce/SKILL.md` |\n| Webapp | — (no push; skip to frontend) |\n\n> **Supported backends: `wordpress` (optionally with a WooCommerce store), `ecommerce`, and `webapp`** —\n> where `webapp` is \"supported\" by **skipping this whole stage** (it has no content backend; see the note\n> below). A **WordPress + WooCommerce** brief routes to `wordpress/SKILL.md`, which pushes the WP content\n> **and** seeds the WooCommerce catalog in the same push. PocketBase is not available in this version.\n> Push to whichever single backend provision set up (see the provision router) — don't try to push to two\n> backends here.\n>\n> **Webapp has no content backend.** There is no CMS or store to seed, so a `webapp` brief **skips this\n> whole stage** — both prepare and push. The app owns its own data (its own API or database). Leave\n> `content-model.md` unwritten, mark content-model `skipped` in the run log, and go straight to the\n> frontend step.\n\nAfter the push completes, update `state.json` and continue to the frontend **data** phase.\n"
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
"uri": "skill://hostinger-headless/steps/04-content-model/ecommerce/SKILL.md",
|
|
@@ -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: '3.38.
|
|
7
|
+
startServer({ name: 'hostinger-agency-hosting-mcp', version: '3.38.2', 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: '3.38.
|
|
7
|
+
startServer({ name: 'hostinger-agency-hosting-mcp', version: '3.38.2', 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: '3.38.
|
|
6
|
+
startServer({ name: 'hostinger-agent-readiness-mcp', version: '3.38.2', 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: '3.38.
|
|
6
|
+
startServer({ name: 'hostinger-agent-readiness-mcp', version: '3.38.2', 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: '3.38.
|
|
8
|
+
startServer({ name: 'hostinger-api-mcp', version: '3.38.2', 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: '3.38.
|
|
8
|
+
startServer({ name: 'hostinger-api-mcp', version: '3.38.2', 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: '3.38.
|
|
7
|
+
startServer({ name: 'hostinger-hosting-mcp', version: '3.38.2', 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: '3.38.
|
|
7
|
+
startServer({ name: 'hostinger-hosting-mcp', version: '3.38.2', 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