@wix/agent-skills 1.18.1 → 1.19.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/package.json +1 -1
- package/skills/wix-app/SKILL.md +13 -13
- package/skills/wix-app/references/APP_VALIDATION.md +7 -33
- package/skills/wix-app/references/BACKEND_API.md +151 -152
- package/skills/wix-app/references/DASHBOARD_PAGE.md +18 -14
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +6 -3
- package/skills/wix-app/references/EXTENSION_REGISTRATION.md +12 -8
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +23 -26
- package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +7 -6
- package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +71 -4
- package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +67 -7
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +1 -1
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +9 -6
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +59 -89
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +23 -4
- package/skills/wix-base44-connector/SKILL.md +168 -48
- package/skills/wix-base44-connector/scripts/{utils.js → utils.cjs} +69 -48
- package/skills/wix-docs/SKILL.md +109 -111
- package/skills/wix-docs/references/API_SPEC_SEARCH.md +35 -23
- package/skills/wix-docs/references/CALLING.md +91 -0
- package/skills/wix-docs/references/EXTRACTING.md +5 -3
- package/skills/wix-headless/references/DOC_DISCOVERY.md +9 -3
- package/skills/wix-manage/SKILL.md +8 -2
- package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +59 -33
- package/skills/wix-manage/references/bookings/bookings-staff-setup.md +45 -22
- package/skills/wix-manage/references/bookings/multi-resource-service-creation.md +70 -12
- package/skills/wix-manage/references/calendar/configure-default-business-hours.md +53 -17
- package/skills/wix-manage/references/seo/manage-content-plan.md +247 -0
- package/skills/wix-manage/references/seo/manage-seo-tags.md +59 -6
- package/skills/wix-manage/references/stores/change-store-currency.md +10 -0
- package/skills/wix-manage/references/stores/create-product-catalog-v3.md +17 -1
- package/skills/wix-manage/references/stores/update-product-with-options.md +9 -0
- package/skills/wix-vibe-headless/SKILL.md +17 -18
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +1 -1
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +119 -0
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +61 -67
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +31 -29
- package/skills/wix-vibe-headless/platforms/base44.md +18 -7
- package/skills/wix-vibe-headless/platforms/generic.md +13 -12
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +4 -8
- package/skills/wix-vibe-headless/references/blog/seed/{seed-blog.js → seed-blog.cjs} +2 -3
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +5 -14
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +5 -9
- package/skills/wix-vibe-headless/references/bookings/seed/{seed-bookings.js → seed-bookings.cjs} +2 -2
- package/skills/wix-vibe-headless/references/bookings/seed/{seed-rentals.js → seed-rentals.cjs} +3 -3
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +1 -1
- package/skills/wix-vibe-headless/references/cms/seed/SEED.md +2 -2
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/events/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/events/seed/{seed-events.js → seed-events.cjs} +2 -2
- package/skills/wix-vibe-headless/references/forms/INSTRUCTIONS.md +2 -1
- package/skills/wix-vibe-headless/references/forms/seed/SEED.md +1 -1
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/members/seed/SEED.md +2 -3
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +1 -1
- package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/portfolio/seed/{seed-portfolio.js → seed-portfolio.cjs} +2 -2
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +5 -14
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +1 -1
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/pricing-plans/seed/{seed-pricing-plans.js → seed-pricing-plans.cjs} +2 -2
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +5 -15
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/restaurants/seed/{seed-restaurants.js → seed-restaurants.cjs} +2 -2
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +363 -327
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +1 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +2 -2
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +63 -78
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +59 -43
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +51 -14
- package/skills/wix-vibe-headless/references/storefront/seed/{seed-store.js → seed-store.cjs} +194 -28
- package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +0 -75
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Generate and Read a Wix Site's Content Plan"
|
|
3
|
+
description: Generate an SEO content plan and read its blog post topics, or troubleshoot an existing content plan flow stuck at KEYWORD_RESEARCH while polling GetContentPlanFlow. Use this recipe for both generation and stalled-flow questions: it explains the intentional pause, the Create Content Plan release request, missing flow IDs, and the exact public API paths and response fields.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generate and Read a Wix Site's Content Plan
|
|
7
|
+
|
|
8
|
+
## Choose the request path before calling an API
|
|
9
|
+
|
|
10
|
+
For a request to **generate a new plan**, follow the generation sequence below.
|
|
11
|
+
For a request about an **existing flow**, use this branch instead; do not start
|
|
12
|
+
the generation sequence or make a discovery call to look for the flow.
|
|
13
|
+
|
|
14
|
+
`KEYWORD_RESEARCH` is an intentional pause, even after ten minutes. Explain
|
|
15
|
+
that Create Content Plan (step 3) releases the existing flow; do not cancel it
|
|
16
|
+
or trigger a replacement just because it is parked.
|
|
17
|
+
First check whether the conversation or a prior response contains the actual
|
|
18
|
+
`contentPlanFlowId`:
|
|
19
|
+
|
|
20
|
+
- **Missing ID:** Explain the intentional pause and ask for the existing flow
|
|
21
|
+
ID. End the turn without making a status or release call. You can name the
|
|
22
|
+
release endpoint, `POST https://www.wixapis.com/promote/seo/v1/create-content-plan`,
|
|
23
|
+
but do not execute an example request. Placeholder text such as
|
|
24
|
+
`<YOUR_FLOW_ID>` is never an API argument.
|
|
25
|
+
- **Known ID:** Use that actual flow UUID in the step 3 request's
|
|
26
|
+
`contentPlanFlowId` field to release the existing flow when requested.
|
|
27
|
+
|
|
28
|
+
For example, when the user reports a flow parked at `KEYWORD_RESEARCH` but
|
|
29
|
+
provides only a site ID, the next action is a reply, not an API call:
|
|
30
|
+
|
|
31
|
+
> That status is an intentional pause. Create Content Plan releases the
|
|
32
|
+
> existing flow. Please send the content plan flow ID from your trigger or
|
|
33
|
+
> status response so I can use it in the release request.
|
|
34
|
+
|
|
35
|
+
The user's reported status is enough to explain the pause; checking it first
|
|
36
|
+
requires the very flow ID that is missing. A site ID is not a flow ID, even
|
|
37
|
+
though both have UUID format.
|
|
38
|
+
Do not guess a collection endpoint to discover the active flow.
|
|
39
|
+
|
|
40
|
+
The complete status URL is
|
|
41
|
+
`https://www.wixapis.com/promote/seo/v1/content-plan-flows/{contentPlanFlowId}`.
|
|
42
|
+
Use this exact public base path and substitute the known ID. Do not call
|
|
43
|
+
`GET /content-plan-flows` without an ID or construct a URL from a service name.
|
|
44
|
+
|
|
45
|
+
Trigger, poll, release, poll, read. That is the full loop. The API is
|
|
46
|
+
asynchronous — generation takes minutes — and the flow **parks at
|
|
47
|
+
`KEYWORD_RESEARCH` until you explicitly release it**.
|
|
48
|
+
|
|
49
|
+
All paths are relative to `https://www.wixapis.com/promote/seo/v1`.
|
|
50
|
+
The API selects the site from the caller's authorization context.
|
|
51
|
+
Writing requires the **Manage SEO Settings** permission.
|
|
52
|
+
|
|
53
|
+
For a generation request, the only writes in this workflow are Trigger and
|
|
54
|
+
Create Content Plan. Do not update the site's business profile, name,
|
|
55
|
+
description, categories, or publication state to try to accelerate generation.
|
|
56
|
+
Those are separate tasks requiring the user's actual data and authorization.
|
|
57
|
+
`CREATED` can persist while work is queued; it does not justify setup changes
|
|
58
|
+
or extra discovery calls. Continue checking the same flow without modifying
|
|
59
|
+
the site.
|
|
60
|
+
|
|
61
|
+
Keep every call scoped to the site the user selected. If site context cannot
|
|
62
|
+
be resolved, report the lookup failure and request clarification; do not
|
|
63
|
+
substitute another available site or change its business information. Missing
|
|
64
|
+
context is not proof that the selected site does not exist or belongs to a
|
|
65
|
+
different account. Say that its context could not be retrieved; do not claim
|
|
66
|
+
that the user's site ID is invalid or offer replacement sites. Likewise, unmet
|
|
67
|
+
prerequisites do not authorize switching sites or inventing business data.
|
|
68
|
+
|
|
69
|
+
## Polling without losing progress
|
|
70
|
+
|
|
71
|
+
Treat each numbered step below as a separate API execution, not sections of
|
|
72
|
+
one script. Even a loop capped at 60 polls can outlive the execution timeout
|
|
73
|
+
and lose the returned flow ID. A polling script must issue one GET and return
|
|
74
|
+
`{ contentPlanFlowId, status }` immediately; decide the next action after that
|
|
75
|
+
response. Never embed the trigger, polling loops, release, and candidate read
|
|
76
|
+
in a single execution. Trigger and release are mutations: if the client asks
|
|
77
|
+
whether an execution changes data, identify them as writes, not read-only.
|
|
78
|
+
|
|
79
|
+
Generation waits on an external process. Do not put the entire generation in
|
|
80
|
+
one long-running function, an unbounded `while` loop, or a busy-wait. Trigger
|
|
81
|
+
once and return the flow ID immediately. Use separate, bounded status checks
|
|
82
|
+
for the same ID so each response is visible and you can act on its status.
|
|
83
|
+
A status check is one GET, not a loop that waits for a terminal state.
|
|
84
|
+
Use the client's supported waiting mechanism between checks; do not assume
|
|
85
|
+
that timers or sleep functions exist inside an API execution sandbox.
|
|
86
|
+
|
|
87
|
+
Continue across status checks while the flow is progressing. At
|
|
88
|
+
`KEYWORD_RESEARCH`, release it immediately once, then keep checking that same
|
|
89
|
+
flow until `SUCCESS` and read its candidates. Do not keep polling the parked
|
|
90
|
+
state instead of releasing it, or stop with only a promise to finish later.
|
|
91
|
+
If the client cannot continue waiting, report the flow ID and last observed
|
|
92
|
+
status honestly; that is an incomplete generation, not success.
|
|
93
|
+
|
|
94
|
+
## The exact call sequence
|
|
95
|
+
|
|
96
|
+
### 1. Trigger
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
POST /content-plan-flows/trigger
|
|
100
|
+
{}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Returns `{ "contentPlanFlowId": "..." }`. Return this response and end this
|
|
104
|
+
execution here. Save the ID in the conversation before making any status
|
|
105
|
+
request. Do not append step 2 to the trigger script.
|
|
106
|
+
|
|
107
|
+
### 2. Poll until KEYWORD_RESEARCH
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
GET /content-plan-flows/{contentPlanFlowId}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Execute this GET once and return its response. This execution contains no
|
|
114
|
+
`for`/`while` loop and no timer. Repeat it as a separate call when another
|
|
115
|
+
status check is needed. Keep the response compact: flow ID and status suffice.
|
|
116
|
+
|
|
117
|
+
The response is `{ "contentPlanFlow": { "id": "...", "status": "..." } }`.
|
|
118
|
+
Read `contentPlanFlow.status`, not a top-level `status`. A missing status is a
|
|
119
|
+
response-shape problem: inspect the response instead of silently looping.
|
|
120
|
+
`CREATED` alone does not identify a missing prerequisite. If the flow remains
|
|
121
|
+
there without progressing, report the stalled flow ID and observed status; do
|
|
122
|
+
not invent a missing business category or description.
|
|
123
|
+
Always send the trigger's ID when following this generation. The documented
|
|
124
|
+
omitted-ID behavior selects a previous successful flow, not the active flow;
|
|
125
|
+
it is not a way to discover the ID of a parked flow.
|
|
126
|
+
See [Get Content Plan Flow](https://dev.wix.com/docs/api-reference/business-management/seo/content-plan-content-plan-flow-v1/get-content-plan-flow).
|
|
127
|
+
|
|
128
|
+
Typical status progression: `CREATED` → `SITE_ANALYSIS` → `KEYWORD_RESEARCH`. Check every
|
|
129
|
+
few seconds using the bounded approach above. Completion time varies.
|
|
130
|
+
|
|
131
|
+
**Stop polling and act on these terminal states:**
|
|
132
|
+
- `PENDING_REQUIREMENTS` — the site has unmet prerequisites, such as missing
|
|
133
|
+
business location information. Identify the actual missing prerequisite from
|
|
134
|
+
available evidence; do not assume category or description is the cause.
|
|
135
|
+
Report what needs completing and do not repeatedly trigger new flows.
|
|
136
|
+
- `FAIL` — the pipeline failed. Trigger a new flow to retry.
|
|
137
|
+
- `CANCELED` — someone canceled the flow.
|
|
138
|
+
|
|
139
|
+
### 3. Release the flow
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
POST /create-content-plan
|
|
143
|
+
{ "contentPlanFlowId": "..." }
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
This advances the flow past `KEYWORD_RESEARCH`. Check `success` in the
|
|
147
|
+
response. If `false`, read `message`.
|
|
148
|
+
|
|
149
|
+
**Without this call the flow waits forever.**
|
|
150
|
+
|
|
151
|
+
### 4. Poll until SUCCESS
|
|
152
|
+
|
|
153
|
+
Same single-GET execution as step 2, returning after each check. Status walks
|
|
154
|
+
`CONTENT_PLAN` → `SUCCESS`. Read candidates in a subsequent execution after
|
|
155
|
+
observing `SUCCESS`.
|
|
156
|
+
|
|
157
|
+
### 5. Read the briefs
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
GET /content-plan-flows/{contentPlanFlowId}/blog-post-candidates
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Returns `{ "blogPostCandidates": [...] }`. Each candidate's brief fields are
|
|
164
|
+
nested under `briefData`, not at the candidate's top level. Map them directly:
|
|
165
|
+
|
|
166
|
+
```js
|
|
167
|
+
const topics = response.blogPostCandidates.map(candidate => ({
|
|
168
|
+
id: candidate.id,
|
|
169
|
+
title: candidate.briefData?.h1Title,
|
|
170
|
+
keyword: candidate.briefData?.keyword,
|
|
171
|
+
mainKeyword: candidate.briefData?.mainKeyword,
|
|
172
|
+
supportingPageUrl: candidate.briefData?.pageUrl
|
|
173
|
+
}));
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
`pageUrl` identifies the existing site page the proposed post supports; it is
|
|
177
|
+
not the URL of a newly published blog post. Generation creates briefs, not
|
|
178
|
+
published posts. Do not read `candidate.title`, `candidate.keyword`, or
|
|
179
|
+
`candidate.pageUrl`, or infer missing data from those nonexistent top-level
|
|
180
|
+
fields. If a nested field is absent, report it as unavailable and inspect the
|
|
181
|
+
raw candidate before making another request. Report the actual returned
|
|
182
|
+
titles and available keywords/supporting page URLs. Do not invent briefs or
|
|
183
|
+
claim completion from the release response.
|
|
184
|
+
See [List Blog Post Candidates](https://dev.wix.com/docs/api-reference/business-management/seo/content-plan-blog-post-candidate-v1/list-blog-post-candidates).
|
|
185
|
+
|
|
186
|
+
### Present the result
|
|
187
|
+
|
|
188
|
+
Start with the flow ID, observed `SUCCESS` status, and returned candidate count.
|
|
189
|
+
Use a compact table with one row per topic: suggested title, target keyword,
|
|
190
|
+
main keyword, and supporting page URL. Include the actual returned URL as a
|
|
191
|
+
link; do not merely say that each brief contains a URL. Avoid repeating SEO
|
|
192
|
+
titles and descriptions unless requested. If the answer must be shortened,
|
|
193
|
+
label the displayed subset and total explicitly instead of claiming to show all
|
|
194
|
+
topics. These are AI-generated suggestions; do not promise rankings or traffic.
|
|
195
|
+
Assess the returned topics before recommending them: if they are repetitive,
|
|
196
|
+
mostly restate the site name, or lack a clear connection to the site's business,
|
|
197
|
+
say so plainly. Successful generation does not establish editorial quality.
|
|
198
|
+
Still show the actual results; do not silently replace weak titles with invented
|
|
199
|
+
ones or call them optimized without evidence. Explain what business context
|
|
200
|
+
would help assess or refine them, without modifying the site's settings.
|
|
201
|
+
|
|
202
|
+
## Editing keywords (optional)
|
|
203
|
+
|
|
204
|
+
After step 2, before or after step 3, read the keywords:
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
GET /content-plan-keyword-research-items
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Edit one keyword (field-masked, only `keyword` and `main_keyword` writable):
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
PATCH /keyword-research-items/{itemId}
|
|
214
|
+
{
|
|
215
|
+
"keywordResearchId": "...",
|
|
216
|
+
"item": { "id": "...", "keyword": "new keyword" },
|
|
217
|
+
"fieldMask": "keyword"
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Copy-on-write:** the response may carry a different `keywordResearchId`.
|
|
222
|
+
Always use the one from the response for the next write. Edits are not
|
|
223
|
+
durable across generations.
|
|
224
|
+
|
|
225
|
+
## What this recipe adds over the docs
|
|
226
|
+
|
|
227
|
+
The published reference documents each method. This recipe adds:
|
|
228
|
+
|
|
229
|
+
1. **The parking gate.** The docs say `KEYWORD_RESEARCH` is a status. This
|
|
230
|
+
recipe says: the flow stops there until you call Create Content Plan.
|
|
231
|
+
Without that call, polling runs forever.
|
|
232
|
+
|
|
233
|
+
2. **PENDING_REQUIREMENTS handling.** This explicit status signals unmet
|
|
234
|
+
prerequisites. Report it and identify the missing requirement only from
|
|
235
|
+
evidence; do not infer it from a queued `CREATED` status or fill in business
|
|
236
|
+
information on the user's behalf.
|
|
237
|
+
|
|
238
|
+
3. **Copy-on-write on keyword edits.** The `keywordResearchId` can change
|
|
239
|
+
on the first write. Use the one from the response.
|
|
240
|
+
|
|
241
|
+
## Do not
|
|
242
|
+
|
|
243
|
+
- Poll forever without calling Create Content Plan (step 3).
|
|
244
|
+
- Read candidates before `SUCCESS`.
|
|
245
|
+
- Retry after `PENDING_REQUIREMENTS`.
|
|
246
|
+
- Ask for a site ID.
|
|
247
|
+
- Retry after a 403 — the caller lacks **Manage SEO Settings**.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Manage a Wix Site's SEO Tags"
|
|
3
|
-
description: Read and update
|
|
3
|
+
description: Read and update SEO titles and tags at the right level. For "change my site's SEO title", clarify homepage, specific page, or page-type pattern before discovery or writes; site-level tags accept meta tags only, never titles. Discover item IDs and pattern variables, read before every full-replace write, and report resolved tags with their sources.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Manage a Wix Site's SEO Tags
|
|
@@ -38,6 +38,21 @@ Match the user's request to the level that owns the change:
|
|
|
38
38
|
| "All my product/blog/event pages should be titled like X" — a convention for every item of a page type | Pattern | **SEO Patterns** |
|
|
39
39
|
| "Change the title of this page/product/post" — one specific item | Item | **Item SEO Tags** |
|
|
40
40
|
|
|
41
|
+
**Site SEO Tags accepts meta tags only** (including site-level social image
|
|
42
|
+
and robots settings). Never send `title`, `link`, or `script` tags to
|
|
43
|
+
`PATCH /site-seo-tags`. Use Item SEO Tags for a specific page's title, or
|
|
44
|
+
SEO Patterns for a page-type title convention. See the
|
|
45
|
+
[Site SEO Tags object](https://dev.wix.com/docs/api-reference/business-management/seo/site-seo-tags-v1/site-seo-tags-object).
|
|
46
|
+
|
|
47
|
+
If the user says "change my site's SEO title" without identifying a page or
|
|
48
|
+
page type, ask whether they mean the homepage, another specific page, or a
|
|
49
|
+
page-type title convention. Ask immediately after reading this recipe; do not make discovery or schema
|
|
50
|
+
queries until scope is clear. For an explicit
|
|
51
|
+
homepage request, discover its actual ID; never assume an ID such as `home`.
|
|
52
|
+
Use Item SEO Tags with `STATIC_PAGE`, read its current tags, and merge the title
|
|
53
|
+
into the complete set. Follow the static-page publication rules below.
|
|
54
|
+
Do not substitute `og:title` for the requested SEO title.
|
|
55
|
+
|
|
41
56
|
Work at the level that matches the change. Writing the same title onto many
|
|
42
57
|
items is the same outcome as one pattern and much harder to undo. If the user's
|
|
43
58
|
words fit more than one level, ask one short question before writing. An
|
|
@@ -84,7 +99,38 @@ No request body. Returns `itemSeoTags` with `tags`, `resolvedTags`,
|
|
|
84
99
|
|
|
85
100
|
### List Item SEO Tags — `GET /item-seo-tags/{itemType}?paging.limit=100`
|
|
86
101
|
|
|
87
|
-
No request body. Returns `
|
|
102
|
+
No request body. Returns `itemSeoTags[]` and `pagingMetadata` with cursors.
|
|
103
|
+
`itemSeoTagsList` is not a response field. Each array entry is an Item SEO Tags
|
|
104
|
+
object directly, not a wrapper: read `entry.itemId`, `entry.tags`, and
|
|
105
|
+
`entry.resolvedTags`, not `entry.itemSeoTags`. Use `itemId` as the path ID;
|
|
106
|
+
`id` is a composite identifier and `hostPageId` is not the item identifier.
|
|
107
|
+
|
|
108
|
+
For static-page discovery, call this with `STATIC_PAGE`. Example response:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"itemSeoTags": [
|
|
113
|
+
{
|
|
114
|
+
"itemType": "STATIC_PAGE",
|
|
115
|
+
"itemId": "<page-id>",
|
|
116
|
+
"tags": [],
|
|
117
|
+
"resolvedTags": [
|
|
118
|
+
{ "tag": { "type": "title", "children": "Home | Studio Shop" },
|
|
119
|
+
"source": "TAG_SOURCE_DEFAULT_PATTERN" }
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"pagingMetadata": { "hasNext": false }
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Inspect the returned page identities and resolved tags to identify the requested
|
|
128
|
+
page, then Get that exact `itemId` before writing. If the response does not
|
|
129
|
+
unambiguously identify it, ask the user to identify the page. Do not interpret
|
|
130
|
+
a missing response field as an empty page list, assume the first entry is the
|
|
131
|
+
homepage, or create/update a pattern as a fallback for a missing page. A
|
|
132
|
+
single-page request never authorizes changing all pages of its type.
|
|
133
|
+
See [List Item SEO Tags](https://dev.wix.com/docs/api-reference/business-management/seo/item-seo-tags-v1/list-item-seo-tags).
|
|
88
134
|
|
|
89
135
|
### Set Site SEO Tags — `PATCH /site-seo-tags`
|
|
90
136
|
|
|
@@ -255,8 +301,9 @@ issue another Get — the write response is the confirmation.
|
|
|
255
301
|
- **Calling List Item SEO Tags expecting product names.** List returns IDs
|
|
256
302
|
and tags, not names. Use Search Products to find the ID by name first.
|
|
257
303
|
- **Retrying a 400 with a different request shape without checking why.** A 400
|
|
258
|
-
|
|
259
|
-
|
|
304
|
+
can mean the target level is wrong, not just the shape. Read the validation
|
|
305
|
+
message and check the level rules first. Compare against the shapes in this
|
|
306
|
+
recipe, fix the mismatch, send once. Three retries with guessed shapes is three wasted calls.
|
|
260
307
|
|
|
261
308
|
Tags can currently be written only for the site's primary language: leave
|
|
262
309
|
`language` unset on every write. There is no revision checking — the last write
|
|
@@ -298,12 +345,18 @@ success.
|
|
|
298
345
|
- **`UNSUPPORTED_ITEM_TYPE`:** the error message lists the item types the API
|
|
299
346
|
supports; use it to redirect the request rather than retrying blindly.
|
|
300
347
|
- **`ITEM_NOT_FOUND`:** re-discover the item ID; do not guess a new one.
|
|
348
|
+
- **Unsupported site-level tag / `FIELD_NOT_ALLOWED`:** a rejected `title`,
|
|
349
|
+
`link`, or `script` is a wrong-level error, not a nesting or field-mask error.
|
|
350
|
+
Do not retry it at site level or silently drop the requested tag. Clarify the
|
|
351
|
+
target if needed, then use the appropriate item or pattern API. Get that
|
|
352
|
+
target's current tags before merging and writing; never reuse the site's
|
|
353
|
+
tags as the new target's complete set. A rejected write saved no changes.
|
|
301
354
|
- **Invalid tags:** tags are validated before anything is saved, so nothing
|
|
302
355
|
changed; fix the tag and resend the same complete set.
|
|
303
356
|
- **`400` on a request you built from this recipe:** compare the request you
|
|
304
357
|
sent against the shapes in this recipe's "REST request and response shapes"
|
|
305
|
-
section. Fix the mismatch — a wrong
|
|
306
|
-
`fieldMask` sent as an array instead of a string — and send again. Never
|
|
358
|
+
section and the wrong-level recovery rule above. Fix the mismatch — a wrong
|
|
359
|
+
nesting level, a missing wrapper key, or `fieldMask` sent as an array instead of a string — and send again. Never
|
|
307
360
|
resend the same shape, and never walk through variations hoping one is
|
|
308
361
|
accepted.
|
|
309
362
|
- **Setting tags for `EVENTS_PAGE` items:** not supported yet, although reading
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Change Store Currency"
|
|
3
|
+
description: "Changes the store's payment currency through Site Properties and explains delayed currency updates in catalog responses."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Change Store Currency
|
|
7
|
+
|
|
8
|
+
Use the [Site Properties currency recipe](https://dev.wix.com/docs/api-reference/business-management/site-properties/skills/change-payment-currency-site-properties.md) to set the requested payment currency and read it back. Confirm the change with the user before updating it.
|
|
9
|
+
|
|
10
|
+
Catalog product responses may temporarily show the previous currency after carts and checkout use the new one. Allow time for propagation, then recheck.
|
|
@@ -83,9 +83,22 @@ If any product is missing a price, **do not call the API**. Ask for the missing
|
|
|
83
83
|
|
|
84
84
|
## Build each product
|
|
85
85
|
|
|
86
|
+
> [!WARNING]
|
|
87
|
+
> **Hard requirement before every create call:** If `productType` is `"PHYSICAL"`, the request MUST include `physicalProperties` on the product and on every variant:
|
|
88
|
+
>
|
|
89
|
+
> ```json
|
|
90
|
+
> {
|
|
91
|
+
> "productType": "PHYSICAL",
|
|
92
|
+
> "physicalProperties": {},
|
|
93
|
+
> "variantsInfo": {"variants": [{"physicalProperties": {}}]}
|
|
94
|
+
> }
|
|
95
|
+
> ```
|
|
96
|
+
>
|
|
97
|
+
> Put supplied physical fields such as weight or dimensions inside those objects; use `{}` when none were supplied. Never invent them, and never execute or retry a physical-product request when either object is absent.
|
|
98
|
+
|
|
86
99
|
| Concern | Rule |
|
|
87
100
|
|---|---|
|
|
88
|
-
| Type | `PHYSICAL`
|
|
101
|
+
| Type | `PHYSICAL` requires both `productType: "PHYSICAL"` and product-level `physicalProperties`, plus both `productType: "PHYSICAL"` and variant-level `physicalProperties` on every variant. `DIGITAL` omits physical properties and carries `inventoryItem.inStock` plus `digitalProperties.digitalFile` on each variant. |
|
|
89
102
|
| Variants | Include at least one. Price, SKU, barcode, inventory, and digital file are variant-level fields. |
|
|
90
103
|
| Price | Use a string in `price.actualPrice.amount`; add `compareAtPrice` only when supplied. |
|
|
91
104
|
| SKU | Preserve supplied strings exactly, including `#`, punctuation, and leading zeroes. Keep variant SKUs unique unless explicitly requested otherwise. |
|
|
@@ -221,6 +234,8 @@ The first is for single endpoints; the second is for bulk endpoints. If the user
|
|
|
221
234
|
|
|
222
235
|
For one product when the user supplied no quantity, stock state, or inventory-tracking request, the complete direct path is `POST /stores/v3/products` with `{"product": PRODUCT}`. Do not infer `inStock: true`, add `inventoryItem`, or choose `/products-with-inventory`; physical product type does not imply inventory. If it has ready images, add `"fields": ["MEDIA_ITEMS_INFO"]` to the same no-inventory request.
|
|
223
236
|
|
|
237
|
+
For a physical product on either create endpoint, never send `productType: "PHYSICAL"` by itself. Include `physicalProperties: {}` on the product and `physicalProperties: {}` on every physical variant (or populate those objects with the supplied physical dimensions/weight). The API validates these as aligned one-of pairs and returns 400 if either corresponding field is missing.
|
|
238
|
+
|
|
224
239
|
For one physical product with inventory, the complete direct path is one `POST /stores/v3/products-with-inventory` call with `{"product": PRODUCT}`. Put `inventoryItem` on its priced variant. If it has ready images, add `"fields": ["MEDIA_ITEMS_INFO"]` to that same request. The product shape, envelope, endpoint, and validation paths are complete here: do not search another recipe or schema, probe an alternate endpoint, or make a post-create read unless the projected create response does not prove requested media.
|
|
225
240
|
|
|
226
241
|
### Request projected media when validating images
|
|
@@ -300,4 +315,5 @@ Retry only failed transient items, not successful products. If a requested field
|
|
|
300
315
|
- `variantsInfo must not be empty`: include at least one priced variant per product.
|
|
301
316
|
- Option/variant mismatch: create every requested combination and reference every option once per variant.
|
|
302
317
|
- Media not visible: use the uploaded `wixstatic.com` URL in `media.itemsInfo.items`; do not set `media.main`.
|
|
318
|
+
- `productType` alignment 400 (`product is invalid: productType and the corresponding physical_properties field must be passed together`): pair `productType: "PHYSICAL"` with `physicalProperties` on the product and on every physical variant. The API validates these as aligned one-of pairs, so do not retry with only one level populated. Pair `productType: "DIGITAL"` with the digital variant fields instead.
|
|
303
319
|
- Digital product rejected at add-to-cart: `ITEM_NOT_FOUND_IN_CATALOG` means the variant has no `digitalProperties.digitalFile`; `exceeds available inventory` means it has no `inventoryItem.inStock`. Both read back as a healthy product.
|
|
@@ -218,6 +218,14 @@ curl -X PATCH "https://www.wixapis.com/stores/v3/products/{productId}" \
|
|
|
218
218
|
|
|
219
219
|
When updating existing variants, include each existing variant `id`. If no GUID is passed, a variant is created with a new GUID. Each variant object is replaced whole rather than merged, so carry over the fields you are not changing: rebuilding a variant from just its `id` plus the field you want to set drops everything else and is rejected on the first required field it lost (`price must not be empty`). Start from the variant as returned by Get Product and override only what the user asked to change.
|
|
220
220
|
|
|
221
|
+
### Renaming an Existing Choice Is Not Supported
|
|
222
|
+
|
|
223
|
+
`options[].choicesSettings.choices` is immutable once a choice exists — this includes the choice's own `name`. If the user asks to rename, fix a typo in, or standardize the name of an **existing** option choice (for example a shared/reusable customization like "Color" or "Patch Design" that already has variants), do not attempt an Update Product or Update Customization PATCH: it returns `200`, `product.revision`/`customization.revision` increments, but the name is silently left unchanged — confirm this yourself with a fresh Get Product/Get Customization call and you will still see the old name. There is currently no endpoint that renames an existing choice, even when you pass back the same `choiceId` and preserve every other choice, option, and variant exactly.
|
|
224
|
+
|
|
225
|
+
Do not try workarounds that risk the existing variant matrix — do not delete and recreate the choice/option (this destroys all variants using it, along with their prices, SKUs, and inventory), and do not use Set Customization Choices (it fails once the choice is assigned to any product). Tell the user this specific rename isn't possible via the API today and that manually renaming the choice in the Wix dashboard (Site → Products → the product's options) is the only way, or point them to `SupportAndFeedback` to report the gap.
|
|
226
|
+
|
|
227
|
+
This only blocks renaming an *existing* choice. Adding brand-new choices to an option (Add/Bulk Add Customization Choices, or including a new choice name in a full Update Product `options` payload) works normally.
|
|
228
|
+
|
|
221
229
|
### Convert a Simple Product to Color Variants
|
|
222
230
|
|
|
223
231
|
When adding the first option to a simple product, do not preserve a choice-less default variant unchanged. A simple product often has one existing variant with price or stock but no `choices`. After you add a `Color` option, every variant in `variantsInfo.variants` must include choices that match the product options.
|
|
@@ -413,6 +421,7 @@ Confirm from `product.variantsInfo.variants[].digitalProperties.digitalFile` in
|
|
|
413
421
|
- To update `variantsInfo.variants`, also pass `options`, and vice versa. Variants and options are mutually dependent and must stay aligned.
|
|
414
422
|
- When converting a simple product to an optioned product, rebuild the variants list so every variant has `choices`; do not keep an existing choice-less default variant unchanged.
|
|
415
423
|
- Always include `choicesSettings` with the complete list of choices when updating a product with options.
|
|
424
|
+
- An existing choice's `name` can't be changed via Update Product or Update Customization. The request succeeds and revision increments, but the rename is silently dropped — see "Renaming an Existing Choice Is Not Supported" above.
|
|
416
425
|
- Use `optionChoiceNames` rather than `optionChoiceIds` in variants for more reliable updates. Reading them back is not symmetric: Get Product returns each variant's `choices` with `optionChoiceIds` only, and fills in `optionChoiceNames` just when the request's `fields` array includes `"VARIANT_OPTION_CHOICE_NAMES"`. So to find the variant for a named choice such as `Large`, either pass that field and match on the name, or take the choice GUID from `options[].choicesSettings.choices[].choiceId` and match it against `variants[].choices[].optionChoiceIds.choiceId`. Matching on a name the response never carried raises nothing — it just selects no variant.
|
|
417
426
|
- Include the `renderType` in `optionChoiceNames`.
|
|
418
427
|
|
|
@@ -86,34 +86,35 @@ This skill is the deliberately **client-only, REST-only** path. It is independen
|
|
|
86
86
|
genuine gap (a field, an endpoint, or an error the snippets don't cover), extend the client with
|
|
87
87
|
`wixApiRequest` — confirming the exact endpoint, method, and body first. **For that iteration and
|
|
88
88
|
troubleshooting** — finding the right endpoint, reading a method's request/response schema, or
|
|
89
|
-
diagnosing an API error —
|
|
90
|
-
|
|
89
|
+
diagnosing an API error — consult the official Wix API documentation using the documentation
|
|
90
|
+
skill available in your environment to search methods, read pages, and inspect API schemas.
|
|
91
91
|
Reference index: https://dev.wix.com/docs/api-reference.md
|
|
92
92
|
- **Provide the user with deep links to the Wix dashboard**: In many cases, the user will need to modify the default vertical data in the Wix dashboard. Always provide the user with these links. The relevant information for each vertical's links is in its `INSTRUCTIONS.md` file.
|
|
93
93
|
|
|
94
94
|
## How this skill is structured
|
|
95
95
|
|
|
96
|
-
`<SKILL_ROOT>` is this file's directory (strip `/SKILL.md`). Each vertical
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
`<SKILL_ROOT>` is this file's directory (strip `/SKILL.md`). Each vertical supplies integration
|
|
97
|
+
code under `references/<vertical>/app/`: REST helpers in `app/rest/`, and, depending on the
|
|
98
|
+
vertical, utilities, hooks, context, components, or pages. All use the **shared transport** in
|
|
99
99
|
`references/shared/app/` (`app/rest/wix-client.js` + `wix-config.js`, identical for every vertical).
|
|
100
100
|
Set `WIX_CLIENT_ID` (and `WIX_METASITE_ID`) in `wix-config.js`. Deploying `references/<vertical>/app/`
|
|
101
|
-
and `references/shared/app/` into the app's `src/` puts every file in place — the helpers
|
|
101
|
+
and `references/shared/app/` into the app's `src/` puts every file in place — the REST helpers land in
|
|
102
102
|
`src/rest/`, so their relative imports resolve.
|
|
103
103
|
|
|
104
104
|
**Where these files live in the app, and how they get there** (pre-installed at setup, or copied
|
|
105
105
|
in) **is your platform's call — follow your platform instructions for that.**
|
|
106
106
|
|
|
107
|
-
Each vertical's `INSTRUCTIONS.md`
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
Each vertical's `INSTRUCTIONS.md` specifies its prerequisites, supplied pieces, exported interfaces,
|
|
108
|
+
and the presentation you must build. **Read it before implementation**: reuse the supplied pieces
|
|
109
|
+
and build the missing presentation without reimplementing shipped logic. Follow the platform's
|
|
110
|
+
and vertical's completion guidance where provided.
|
|
110
111
|
|
|
111
112
|
## Routing — pick the vertical(s) from the request
|
|
112
113
|
|
|
113
114
|
Load the vertical(s) the user's app needs; a project may combine several (e.g. a restaurant
|
|
114
115
|
with a blog, or a store with pricing plans).
|
|
115
116
|
|
|
116
|
-
Each vertical's
|
|
117
|
+
Each vertical's integration files ship in `references/<vertical>/app/`; copy that dir plus
|
|
117
118
|
`references/shared/app/` into the app's `src/` (base44 does this at install via `deploy.cjs`).
|
|
118
119
|
|
|
119
120
|
| The user wants… | Vertical | Read |
|
|
@@ -165,14 +166,12 @@ installed, not what the business is about. Never default to store/bookings on si
|
|
|
165
166
|
`references/shared/app/` into the app's `src/`, and set `WIX_CLIENT_ID` in `wix-config.js`. (Where
|
|
166
167
|
and how they get there is your platform's call — see its instructions. On base44 the install step
|
|
167
168
|
writes and verifies `wix-config.js` for you, so there's nothing to set by hand.)
|
|
168
|
-
4. **
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
5. **Verify** against the vertical's checklist before declaring done: token persists across
|
|
175
|
-
reload, live data renders (or a real empty state), and purchases go through the Wix redirect.
|
|
169
|
+
4. **Build the presentation and wire the integration** following the vertical's `INSTRUCTIONS.md`.
|
|
170
|
+
Reuse its supplied pieces through their documented interfaces, build the presentation it leaves
|
|
171
|
+
to you, and connect routes/providers as specified. Do not reimplement shipped logic. Style new
|
|
172
|
+
presentation using the existing platform theme.
|
|
173
|
+
5. **Complete the applicable platform and vertical guidance**, including any required checks and
|
|
174
|
+
handoff instructions they provide.
|
|
176
175
|
|
|
177
176
|
> Some flows need Wix-side setup the user completes later (payments connected, the deployed
|
|
178
177
|
> domain allow-listed on the OAuth client for hosted-checkout return, collection permissions).
|
|
@@ -25,7 +25,7 @@ The Wix skills live under \`.agents/skills/\` — on ANY turn, read them from th
|
|
|
25
25
|
- **events** — publish events and handle RSVPs or ticket sales.
|
|
26
26
|
- **members** — let visitors create an account and sign in — this is **auth**.
|
|
27
27
|
- **restaurants** — publish a menu, take online orders, and manage table reservations.
|
|
28
|
-
-
|
|
28
|
+
- **Documentation fallback** for **frontend code**, **backend code**, or **runtime / API management operations** alike: consult the official Wix API documentation using the documentation skill available in your environment.
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
31
|
const amd = '/app/AGENTS.md';
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Wix Managed Headless — Base44 storefront client + seed
|
|
2
|
+
|
|
3
|
+
You are building a **Wix Managed** headless storefront inside Base44 — the business is described in your
|
|
4
|
+
initial prompt, and the Wix connector is already configured.
|
|
5
|
+
|
|
6
|
+
The shipped client is already configured. Use its documented hooks and components; no ID lookup
|
|
7
|
+
or configuration changes are needed.
|
|
8
|
+
|
|
9
|
+
> **The Wix skills installed below are the complete build and seed path for this app.** **Do NOT use the Base44 commerce kit (or any Base44 solution kit).**
|
|
10
|
+
|
|
11
|
+
**Banner disabled for this entry flow:** do not add `<WixManageBanner/>`; skip the shared
|
|
12
|
+
storefront instructions' optional banner integration.
|
|
13
|
+
|
|
14
|
+
Follow STEPs 1–4 below exactly. Fire product image generations first, then build the client
|
|
15
|
+
(STEP 2), and seed (STEP 3) **after** the client is built — generation finishes while you build.
|
|
16
|
+
|
|
17
|
+
## STEP 1 — Install the Wix skills and deploy the storefront vertical to the app
|
|
18
|
+
|
|
19
|
+
Install three skills — they land under `.agents/skills/`:
|
|
20
|
+
- **`wix-vibe-headless`** — storefront build instructions, hook/component contracts, and seeding modules.
|
|
21
|
+
- **`wix-manage`** — REST recipes for managing and configuring the Wix site.
|
|
22
|
+
- **`wix-base44-connector`** — Wix connector usage, API contracts, and documentation discovery.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Run this through exec_tool, exactly as written — installs all three skills, deploys the `storefront` REST scaffolds + UI into `src/`, and pins the AGENTS.md note.
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
const { execSync } = require('child_process');
|
|
29
|
+
const { existsSync, readdirSync } = require('fs');
|
|
30
|
+
const results = {};
|
|
31
|
+
for (const skill of ['wix-vibe-headless', 'wix-manage', 'wix-base44-connector']) {
|
|
32
|
+
if (existsSync(`/app/.agents/skills/${skill}/SKILL.md`)) { results[skill] = 'already_installed'; continue; }
|
|
33
|
+
try {
|
|
34
|
+
const out = execSync(`CI=1 npx -y skills add wix/skills/skills/${skill} --yes 2>&1`,
|
|
35
|
+
{ cwd: '/app', timeout: 60000, shell: '/bin/bash' }).toString().replace(/\x1b\[[0-9;]*m/g, '');
|
|
36
|
+
results[skill] = /installed 1 skill|found 1 skill/i.test(out) ? 'success'
|
|
37
|
+
: out.includes('No valid skills') ? 'not_found' : 'unknown';
|
|
38
|
+
} catch (e) { results[skill] = 'error: ' + e.message; }
|
|
39
|
+
}
|
|
40
|
+
const deploy = execSync(`node /app/.agents/skills/wix-vibe-headless/install/deploy.cjs storefront`, { cwd: '/app' }).toString();
|
|
41
|
+
const agentsMd = execSync(`node /app/.agents/skills/wix-vibe-headless/install/pin-agents-md.cjs`, { cwd: '/app' }).toString();
|
|
42
|
+
return { results, installed: readdirSync('/app/.agents/skills'), deploy: JSON.parse(deploy), agentsMd: JSON.parse(agentsMd) };
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## STEP 2 — Build the client
|
|
46
|
+
|
|
47
|
+
Read `.agents/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md` and follow it **EXACTLY** — the single source of truth for how the storefront client is built.
|
|
48
|
+
|
|
49
|
+
The shipped storefront provides catalog, cart, and checkout. Identify the additional workflows
|
|
50
|
+
in the user's request and implement them alongside the storefront. If a workflow needs an
|
|
51
|
+
external service or missing information, continue the work you can complete and identify the
|
|
52
|
+
remaining dependency.
|
|
53
|
+
|
|
54
|
+
For code or actions not covered by this skill, read and follow the installed connector skill at
|
|
55
|
+
`.agents/skills/wix-base44-connector/SKILL.md` to find Wix documentation and APIs.
|
|
56
|
+
|
|
57
|
+
Build the client using the component outlines, interfaces, and theme guidance in `INSTRUCTIONS.md`.
|
|
58
|
+
The shipped files are already deployed and configured; you do not need to read their source or
|
|
59
|
+
rebuild them. If you encounter an error after building the client, read or change whatever you
|
|
60
|
+
need to diagnose and fix it.
|
|
61
|
+
|
|
62
|
+
## STEP 3 — Seed the storefront
|
|
63
|
+
|
|
64
|
+
**Never delete or clean up anything on the user's site — seeding is additive only.** It's a live
|
|
65
|
+
user-owned business, so never delete or overwrite existing content, even apparent sample data. If a
|
|
66
|
+
cleanup truly seems needed, ask the user first.
|
|
67
|
+
|
|
68
|
+
Seed by calling the storefront's ready-made seed module, `seed-store.cjs` — `require()` it and use its
|
|
69
|
+
one-call `setupStore` (build-time exec_tool). Read
|
|
70
|
+
`.agents/skills/wix-vibe-headless/references/storefront/seed/SEED.md` for the full `setupStore`
|
|
71
|
+
contract — the `ctx` and the product/category shapes.
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
const seed = require(require("path").resolve(".agents/skills/wix-vibe-headless/references/storefront/seed/seed-store.cjs"));
|
|
75
|
+
const result = await seed.setupStore(ctx, { products, categories }); // one call: install → products → categories → images
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
For code or actions not covered by this skill, read and follow the installed connector skill at
|
|
79
|
+
`.agents/skills/wix-base44-connector/SKILL.md` to find Wix documentation and APIs.
|
|
80
|
+
|
|
81
|
+
**Auth for these admin calls is the already-configured Wix headless connector — nothing else.** Get its
|
|
82
|
+
access token and send it as a bearer token:
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
86
|
+
// then: fetch(url, { headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json" }, ... })
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Inline via exec_tool, `base44` is already declared — use it directly; do **not** import
|
|
90
|
+
`@base44/sdk`, re-declare it, or call `createClient()` (that's for standalone `.js` files only;
|
|
91
|
+
inline it throws *"Identifier 'base44' has already been declared."*).
|
|
92
|
+
|
|
93
|
+
**Product images.** Fire every `generate_image` **before you build the client**, and seed **after**
|
|
94
|
+
it — generation finishes while you build, so by the time you write the seed call your images are
|
|
95
|
+
ready: each finished result now reads `status: "completed"` with its final
|
|
96
|
+
`https://media.base44.com/...` url. Read every `imageUrl` from the results **as they read at that
|
|
97
|
+
moment** — not from what they said when you called the tool — and pass them in the single
|
|
98
|
+
`setupStore` call. A result without a final url by then (still running, or failed) → seed that
|
|
99
|
+
product **without** `imageUrl` and attach it afterwards with `attachProductImages`.
|
|
100
|
+
|
|
101
|
+
## STEP 4 — Wrap up
|
|
102
|
+
|
|
103
|
+
### Preview
|
|
104
|
+
|
|
105
|
+
Images that are still generating may show `/__generating__/…` placeholders;
|
|
106
|
+
the platform replaces these automatically at turn end, with a stock fallback if generation
|
|
107
|
+
fails. You can finish without waiting for those images or replacing their placeholder URLs.
|
|
108
|
+
|
|
109
|
+
### Final text response
|
|
110
|
+
|
|
111
|
+
**Never paste a Wix dashboard link or path.**
|
|
112
|
+
|
|
113
|
+
**Before writing your final text response, make one handoff call** — `search_base44_docs(query="how do I manage my store's products, orders and inventory?", prefer_dashboard=true)`. Use its handoff guidance, note that the seeded catalog is mock data they can edit, replace or delete, and state any requested workflows that remain unfinished and what is needed to complete them.
|
|
114
|
+
|
|
115
|
+
## Additional Wix functionality
|
|
116
|
+
|
|
117
|
+
During the initial build or later, use the installed connector skill at
|
|
118
|
+
`.agents/skills/wix-base44-connector/SKILL.md` to find Wix documentation and APIs for writing code
|
|
119
|
+
or performing actions not covered by this skill.
|