@wix/agent-skills 1.22.0 → 1.23.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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "Site Import"
3
- description: Drive the Wix Site Import agent to migrate an existing store or site from another platform (Shopify, WooCommerce, Magento, or any URL) into Wix, or to import from CSV/TSV export files with no source site. Use this skill whenever the user wants to import, migrate, or clone a store/site into Wix, mentions moving off Shopify/WooCommerce/Magento, or gives a source store URL and asks to bring it into Wix. Covers starting the import, polling progress, answering the agent's mid-import questions, handling deploy/failure/auth-expiry states, and sending post-deploy follow-up changes.
3
+ description: Drive the Wix Site Import agent to migrate an existing store or site from another platform (Shopify, WooCommerce, Magento, or any URL) into Wix — as a brand-new site or into the user's existing one — or to import from CSV/TSV export files with no source site. Use this skill whenever the user wants to import, migrate, or clone a store/site into Wix, mentions moving off Shopify/WooCommerce/Magento, or gives a source store URL and asks to bring it into Wix. Covers starting the import, polling progress, answering the agent's mid-import questions, handling deploy/failure/auth-expiry states, and sending post-deploy follow-up changes.
4
4
  ---
5
5
 
6
6
  # Site Import
@@ -24,8 +24,7 @@ and report the final result.
24
24
  5. **This API is the only site-creation tool for this task** — never
25
25
  substitute other Wix site-builder tools (see Scope).
26
26
 
27
- Base URL: `https://www.wixapis.com/site-import`. All calls use account-level
28
- scope on the signed-in Wix user's account. A full import typically takes
27
+ Base URL: `https://www.wixapis.com/site-import`. A full import typically takes
29
28
  15–60 minutes.
30
29
 
31
30
  ## Calling the API
@@ -46,11 +45,12 @@ nothing useful.
46
45
  page, or any client-side code — those fail with CORS. The entire experience
47
46
  is plain chat — API calls plus short messages.
48
47
 
49
- Use the Wix account-level REST API tool available in your environment with
50
- the **full URL**. Start, Send-a-message, and Cancel are mutating (POST);
51
- Poll is read-only (GET).
48
+ Use the Wix REST API tool available in your environment with the **full
49
+ URL** (account-level, or site-scoped with a target `siteId` — see Start
50
+ below for when each applies). Start, Send-a-message, and Cancel are mutating
51
+ (POST); Poll is read-only (GET).
52
52
 
53
- Example — Start:
53
+ Example — Start, account-level (creates a new site):
54
54
 
55
55
  ```
56
56
  POST https://www.wixapis.com/site-import/v1/imports
@@ -60,6 +60,19 @@ Body: {
60
60
  }
61
61
  ```
62
62
 
63
+ Example — Start, site-scoped (imports into the user's existing site — same
64
+ body, plus a `wix-site-id` header naming the destination site; see the
65
+ Destination note under Start below):
66
+
67
+ ```
68
+ POST https://www.wixapis.com/site-import/v1/imports
69
+ Headers: { "wix-site-id": "<destination siteId>" }
70
+ Body: {
71
+ "request": "Import https://example-store.com into my site",
72
+ "source_url": "https://example-store.com"
73
+ }
74
+ ```
75
+
63
76
  Example — Start from exported files (no source site, FILE run):
64
77
 
65
78
  ```
@@ -96,11 +109,10 @@ API. Never fall back to other site-building tools (site-builder/template/AI
96
109
  site-generation tools) to "compensate" — not when the import is slow, and
97
110
  especially not when it FAILS.
98
111
 
99
- **Status comes ONLY from this API's Poll endpoint.** Never call
100
- `WixSiteBuilder`, `CreateSiteFromTemplate`, `pullSiteCreationJob`, or any
101
- other connector tool to "check on the build" — `WixSiteBuilder` in particular
102
- STARTS a new site build on every call, even when the prompt asks for status.
103
- A failed import ends with a clear failure report and a full stop; the user
112
+ **Status comes ONLY from this API's Poll endpoint.** Never call another
113
+ site-building or site-creation capability to "check on the build" — some
114
+ such tools start a new site build on every call, even when asked only for
115
+ status. A failed import ends with a clear failure report and a full stop; the user
104
116
  must never discover a different site in their account that they didn't ask
105
117
  for. If an alternative makes sense, propose it AFTER reporting the failure
106
118
  and act only on the user's explicit yes.
@@ -112,6 +124,17 @@ calling **Start**, confirm:
112
124
  - The source URL and platform are correct — or, for a file-only import, the
113
125
  export file URL(s) are correct
114
126
  - The user understands it runs for up to ~60 minutes and may ask questions mid-way
127
+ - Which destination they want: a brand-new site, or their existing site by id
128
+ (site-scoped) — this can't be changed once Start is called. Importing into
129
+ an existing site writes into it directly and can add or overwrite its
130
+ current pages and content, so make sure they understand that before you
131
+ proceed — it isn't a safe side-by-side preview.
132
+ **If they want their existing site but haven't given a `siteId`, resolve
133
+ it yourself first** — from the account/site context already available to
134
+ you, or by querying the account's sites (see the Query Sites skill) — and
135
+ ask the user to pick when more than one candidate matches what they
136
+ described. Never guess a `siteId` or silently default to an account-level
137
+ call just because none was supplied.
115
138
 
116
139
  Also confirm before calling **Cancel** — it's irreversible.
117
140
 
@@ -183,14 +206,34 @@ You are the user experience; the API is plumbing. Keep the protocol invisible:
183
206
  `request`, and no `fileUrls`, is rejected with `SITE_UNIDENTIFIED`.
184
207
  Returns: `importId`, `sourcePlatform`, `sourceConfidence`, `destinationSiteId`.
185
208
  `sourcePlatform` comes back as `CSV` for a FILE run (no site was probed, so
186
- `sourceConfidence` is meaningless there). `destinationSiteId` is the id of
187
- the Wix site being imported into — returned as soon as Start succeeds,
188
- even before a source is confirmed.
189
- **One import per store at a time, keyed on `source_url`** (or the file set
190
- when there's no `source_url`): re-starting with the same identity continues
191
- the SAME migration (server returns the existing `importId`, no new import
192
- created). A different identity always starts an independent migration, even
193
- for the same user. If a different user on the account already owns an
209
+ `sourceConfidence` is meaningless there).
210
+ **Destination (new site vs. an existing site) is decided by call scope, not
211
+ a body field:** account-level (no site context) always creates a brand-new
212
+ site — the default when the user has none yet or wants a fresh one;
213
+ site-scoped (adding a `wix-site-id: <siteId>` header, same body — see the
214
+ examples above) writes into that existing site instead. Ask the user which
215
+ they want before calling Start — it can't change afterward. Get this
216
+ wrong at Start and you'll silently create an unwanted second site instead
217
+ of writing into the one they meant. Once Start has scoped the import,
218
+ keep sending that same `wix-site-id` header on every later call for that
219
+ `importId` (Poll, Send-a-message, Cancel included) — it won't create
220
+ another site at this point, but omitting it will fail authorization
221
+ against the site-scoped import. `destinationSiteId` in the
222
+ response echoes this (empty = new site, set = that existing site), returned
223
+ as soon as Start succeeds, even before a source is confirmed.
224
+ **One import per store at a time, keyed on `source_url` (or the file set
225
+ when there's no `source_url`) together with call scope** — account-level
226
+ and a given `wix-site-id` are different keys even for the identical
227
+ `source_url`/file set: re-starting with the same identity (same source
228
+ AND same scope) continues the SAME migration (server returns the
229
+ existing `importId`, no new import created). A different identity —
230
+ a different source, a different file set, or the same source at a
231
+ *different* call scope — always starts an independent migration, even
232
+ for the same user. This is why getting the scope wrong at Start matters
233
+ (see above): re-calling Start with the corrected scope does not fix the
234
+ original import, it starts a second, independent one. To redo a
235
+ mis-scoped import, **Cancel it first**, then Start again with the
236
+ correct scope. If a different user on the account already owns an
194
237
  import for that identity, Start returns
195
238
  `409 { "code": "IMPORT_IN_PROGRESS" }` — tell the user and stop.
196
239
 
@@ -238,7 +281,9 @@ You are the user experience; the API is plumbing. Keep the protocol invisible:
238
281
  - `FAILED` — terminal. Relay `message` in plain words.
239
282
  - `AUTH_EXPIRED` — recoverable, NOT success, nothing is live (golden rule 1).
240
283
  Tell the user the connection to their account expired and you're restarting,
241
- then call Start again with the same request — work so far is preserved.
284
+ then call Start again with the same request, using the same call scope
285
+ (account-level, or the same `wix-site-id`) as the original Start — work so
286
+ far is preserved.
242
287
  - `CANCELLED` — terminal.
243
288
  - **Anything the user says mid-import goes straight to Send-a-message** — no
244
289
  need to wait for `NEEDS_INPUT`.
@@ -269,26 +314,45 @@ the user has no way to open a file.
269
314
  - Never invent a `deployUrl` — only report the one returned with `DEPLOYED`.
270
315
  - Treat `NEEDS_INPUT` and `AUTH_EXPIRED` as normal conversation turns, not
271
316
  errors.
272
- - **Site Import is in limited rollout, with no self-service enablement path.**
273
- If Start returns `404` or `403` with `"code": "NOT_ENABLED"`, tell the user
274
- plainly that site import isn't available on their account yet — then stop.
317
+ - **Site Import is in closed beta, with no self-service enablement path.**
318
+ A `"code": "NOT_ENABLED"` on a `401`, `403`, or `404` from Start always means this
319
+ account isn't in the beta — whether the call was account-level or
320
+ site-scoped. The code isn't always present on an **account-level** call:
321
+ a not-yet-enrolled account's Start has been observed to come back as a
322
+ plain `401`/`403` (`{"message": "The caller is not permitted to perform this
323
+ action."}`, no code) as well as a plain `404` — treat any of those shapes there
324
+ as the beta-lockout case too. Don't probe other endpoints to diagnose it,
325
+ don't retry, and **don't create a site through any other site-building
326
+ capability to compensate — creating a site through a different path is
327
+ not a workaround here, it's the specific mistake this rule exists to
328
+ prevent.** Tell the user plainly and warmly that Site Import is
329
+ currently in a closed beta, that you'd be happy to help once they're
330
+ in, and that they can request access by filling out this short form:
331
+ https://forms.gle/RfZqVRtGCsPv7U7M6 — the team will follow up. Then
332
+ stop, having created nothing.
275
333
  **Do not tell them to "contact Wix support"**: this API is unlisted and
276
334
  ALPHA, Wix Support has no visibility into it or way to grant access, and the
277
335
  public "importing a site created outside of Wix" help-center article is an
278
336
  unrelated, long-stalled feature-request page — sending a user to either is a
279
- dead end. If a Wix feedback tool is available in your environment, you may
280
- offer to send feedback noting their interest; that is the only channel that
281
- reaches the team. Do not retry or fall back to another site-creation tool.
282
- - Any other `403` on Start means the caller is not authorized — tell the user
283
- and stop. Do not probe other endpoints to diagnose this. A `400` means a
284
- required field is missing (`request`/`message` must be 1–20000 chars),
285
- `source_url` exceeds 2048 chars, or `fileUrls` has more than 20 entries or
286
- one over 2048 chars. A request with no identifiable site (no `source_url`
287
- and no URL in `request`) and no `fileUrls` is rejected with
288
- `SITE_UNIDENTIFIED` — ask the user for the store URL or export file(s) and
289
- retry. A `fileUrls` entry that isn't a reachable http/https URL rejects the
290
- whole call with `INVALID_FILE_URL` — tell the user which link failed and ask
291
- for a working one.
337
+ dead end. The form above is the only channel that reaches the team.
338
+ **A `401`, `403`, or `404` on a site-scoped call *without* `"code": "NOT_ENABLED"`
339
+ is different** — it means the caller isn't authorized for that `siteId`
340
+ (wrong id, wrong account, no access), not a beta-enrollment issue. Tell
341
+ the user the destination site isn't accessible with their current
342
+ connection and stop; don't send them to the beta form for this.
343
+ - For any other unrecognized error or exception on Start — a transient server
344
+ error, a timeout, a rate limit, or anything that isn't the closed-beta case
345
+ above or one of the specific cases below — don't guess that it's a
346
+ beta-enrollment issue and don't retry silently. Tell the user the import
347
+ couldn't be started, share what went wrong in plain language, and stop.
348
+ - A `400` on Start means a required field is missing (`request`/`message`
349
+ must be 1–20000 chars), `source_url` exceeds 2048 chars, or `fileUrls` has
350
+ more than 20 entries or one over 2048 chars. A request with no identifiable
351
+ site (no `source_url` and no URL in `request`) and no `fileUrls` is rejected
352
+ with `SITE_UNIDENTIFIED` — ask the user for the store URL or export file(s)
353
+ and retry. A `fileUrls` entry that isn't a reachable http/https URL rejects
354
+ the whole call with `INVALID_FILE_URL` — tell the user which link failed and
355
+ ask for a working one.
292
356
  - Requesting an unknown id in `artifactIds` is silently ignored — not an error.
293
357
  A document simply may not exist yet on an earlier turn.
294
358
  - **The user cannot open files.** If a message mentions a document by filename,