@wix/agent-skills 1.23.0 → 1.25.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.
Files changed (61) hide show
  1. package/README.md +1 -0
  2. package/package.json +2 -1
  3. package/skills/wix-app/SKILL.md +4 -1
  4. package/skills/wix-app/references/BUSINESS_MANAGER_THEME.md +108 -0
  5. package/skills/wix-app/references/BUSINESS_MANAGER_TOKENS.md +81 -0
  6. package/skills/wix-app/references/DASHBOARD_MODAL.md +41 -0
  7. package/skills/wix-app/references/DASHBOARD_PAGE.md +2 -0
  8. package/skills/wix-app/references/DASHBOARD_PLUGIN.md +19 -4
  9. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +64 -50
  10. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +5 -4
  11. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +8 -7
  12. package/skills/wix-app/references/dashboard-page/DYNAMIC_PARAMETERS.md +21 -38
  13. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +4 -3
  14. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +28 -25
  15. package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +8 -2
  16. package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +12 -14
  17. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +4 -3
  18. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +66 -9
  19. package/skills/wix-app/references/editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md +25 -0
  20. package/skills/wix-app/references/editor-react-component/OVERFLOW.md +146 -0
  21. package/skills/wix-app/references/editor-react-component/PARTS.md +6 -0
  22. package/skills/wix-app/scripts/scan-a11y-eslint.cjs +25 -1
  23. package/skills/wix-headless/SKILL.md +0 -1
  24. package/skills/wix-headless/references/CAPABILITIES.md +3 -3
  25. package/skills/wix-headless/references/DISCOVERY.md +1 -1
  26. package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
  27. package/skills/wix-headless/references/SEED.md +1 -1
  28. package/skills/wix-headless/references/SETUP.md +1 -1
  29. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +1 -1
  30. package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +2 -2
  31. package/skills/wix-headless/references/managed/AUTHENTICATION.md +3 -14
  32. package/skills/wix-headless/scripts/bootstrap.mjs +156 -0
  33. package/skills/{wix-headless-fast → wix-headless-kit}/SKILL.md +83 -64
  34. package/skills/{wix-headless-fast → wix-headless-kit}/cold-start/bootstrap.mjs +2 -2
  35. package/skills/{wix-headless-fast → wix-headless-kit}/cold-start/cold-start.md +26 -35
  36. package/skills/wix-headless-kit/guides/capabilities.md +76 -0
  37. package/skills/wix-headless-kit/guides/feedback.md +98 -0
  38. package/skills/{wix-headless-fast → wix-headless-kit}/guides/migration.md +20 -9
  39. package/skills/{wix-headless-fast → wix-headless-kit}/install/AGENTS.md +5 -2
  40. package/skills/{wix-headless-fast → wix-headless-kit}/install/attach.mjs +5 -2
  41. package/skills/wix-headless-kit/install/bootstrap.mjs +156 -0
  42. package/skills/{wix-headless-fast → wix-headless-kit}/install/check.mjs +2 -2
  43. package/skills/wix-headless-kit/install/context.mjs +169 -0
  44. package/skills/{wix-headless-fast → wix-headless-kit}/install/deploy.mjs +17 -4
  45. package/skills/{wix-headless-fast → wix-headless-kit}/install/setup.mjs +89 -55
  46. package/skills/{wix-headless-fast → wix-headless-kit}/install/templates.mjs +1 -1
  47. package/skills/wix-manage/SKILL.md +2 -8
  48. package/skills/wix-manage/references/cms/cms-dashboard-navigation.md +2 -2
  49. package/skills/wix-manage/references/cms/cms-data-items-crud.md +263 -31
  50. package/skills/wix-manage/references/cms/cms-publishing-flow.md +15 -15
  51. package/skills/wix-manage/references/cms/cms-schema-management.md +58 -7
  52. package/skills/wix-manage/references/sites/query-sites.md +1 -8
  53. package/skills/wix-auth/SKILL.md +0 -12
  54. package/skills/wix-auth/references/device-flow.md +0 -140
  55. package/skills/wix-headless-fast/install/context.mjs +0 -126
  56. package/skills/wix-manage/references/cms/cms-data-operations-extended.md +0 -263
  57. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +0 -162
  58. /package/skills/{wix-headless-fast → wix-headless-kit}/guides/existing-site.md +0 -0
  59. /package/skills/{wix-headless-fast → wix-headless-kit}/guides/reference-mode.md +0 -0
  60. /package/skills/{wix-headless-fast → wix-headless-kit}/install/agents-md.mjs +0 -0
  61. /package/skills/{wix-headless-fast → wix-headless-kit}/install/lock.mjs +0 -0
@@ -1,27 +1,30 @@
1
1
  // Set up the project in the current folder — one deterministic call from "the folder and the
2
- // brief" to "brand layer can start", for a folder that is NOT yet a Wix project:
2
+ // brief" to "brand layer can start". The folder decides (install/context.mjs folderShape, five file
3
+ // facts: wix.config.json, its site.outputDirectory, the migration variables in .env.local,
4
+ // package.json, index.html):
3
5
  //
4
- // node <SKILL_ROOT>/install/setup.mjs --vertical <storefront|bookings|…> \
6
+ // node <SKILL_ROOT>/install/setup.mjs --vertical <storefront|bookings|…>[,<vertical>…] \
5
7
  // [--plan plan.json] [--business-name "<Brand>"] [--stack astro|react|lib|static] \
6
8
  // [--subfolder [--folder-name <npm-safe-name>]]
7
9
  //
8
- // - `wix.config.json` present → refuses. The folder is already a Wix project; deploy.mjs adds
9
- // this skill's code or a solution to it, then one install, then the seed if there is content.
10
- // One exception: a config and NO project whose `.env.local` (`wix env pull`, run here) declares a
11
- // MIGRATION PREVIEW — the config names a site created only to host the deployment, the env names
12
- // the site being migrated. Then → MIGRATE: the composed template is copied in around the config,
13
- // the code deploys with the parent's app as its client, the install starts, and NO seed runs: the
14
- // parent owns its content. Release still goes where the config says (install/context.mjs).
15
- // - a project but no `wix.config.json` (a package.json, or an index.html at the root) → CONNECT:
16
- // `npm create @wix/new@latest init` in place creates the site and the config, then deploy.
17
- // - otherwise (empty, or loose files such as a CSV or a brief) → CREATE: `wix create` with the
18
- // vertical's composed template (templates/<vertical>/project: the CLI's blank scaffold with the
19
- // vertical deployed and a lockfile), placed in the current directory (`--business-name` required).
10
+ // empty (or loose files: a CSV, a brief) → CREATE: `wix create` with the vertical's composed template
11
+ // (templates/<vertical>/project), placed in the current directory (`--business-name` required).
12
+ // a frontend, no wix.config.json (a package.json, or an index.html at the root) → ADOPT: `init` in
13
+ // place gives the project a new, empty site, then deploy. `--stack` required.
14
+ // CREATE and ADOPT are the two cases that seed: the run made the site, it is empty by construction,
15
+ // and the plan's content goes in (with --plan; without one the agent drafts a plan and seeds it, SKILL.md step 2).
16
+ // a config and no frontend, .env.local declaring a MIGRATION PREVIEW → MIGRATE: the composed template
17
+ // is copied in around the config, the code deploys with the parent's app as its client, the install
18
+ // starts. Nothing seeded: the parent owns its content.
19
+ // a config, index.html at the root, no package.json → PUBLISHED STATIC (a site published through the
20
+ // drop flow and downloaded): the config's site, no init; site/ becomes the upload, the REST layer
21
+ // deploys there, the pages move in (the agent's step). Nothing seeded.
22
+ // a config and a frontend (package.json, or index.html in the output folder) → refuses: iterate.
23
+ // a config and nothing else → refuses: attach.mjs's case.
20
24
  //
21
- // The script reads file markers only (wix.config.json, a package.json or index.html); everything
22
- // else is the agent's call: when connecting, `--stack` is required and comes from SKILL.md step 1,
23
- // and what the project needs for that stack on Wix hosting is prose there, not detection here. The
24
- // seed runs only when `--plan` is given: a brief that has not supplied any content gets no seed.
25
+ // Setup seeds only a site it created in this run. A site that existed before the run is never seeded
26
+ // by setup: the agent reads what the site holds (the vertical's read-site.mjs) and runs the seed module
27
+ // deliberately when the brief supplies or describes content. Seeds are additive and idempotent by name.
25
28
  //
26
29
  // Composes pieces that also remain individually runnable (deploy.mjs, the vertical's seed module)
27
30
  // to recover one failed step. Emits ONE JSON event per line and exits in ~35s with the two long
@@ -33,7 +36,7 @@ import { basename, dirname, join, resolve } from "node:path";
33
36
  import { fileURLToPath } from "node:url";
34
37
  import { AGENT_CONFIG_FILES, writeAgentsMd } from "./agents-md.mjs";
35
38
  import { listVerticals, templatesDir } from "./templates.mjs";
36
- import { siteContext } from "./context.mjs";
39
+ import { folderShape, siteContext } from "./context.mjs";
37
40
 
38
41
  const SKILL_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");
39
42
 
@@ -51,7 +54,12 @@ const flag = (name) => {
51
54
  };
52
55
  const businessName = flag("business-name");
53
56
  const planPath = flag("plan");
54
- const vertical = flag("vertical");
57
+ // Every vertical the brief needs, comma-separated. The first one's composed template scaffolds the
58
+ // project and its seed runs from --plan; the others deploy in the same call so the ONE install covers
59
+ // them (adding a vertical after the install has started costs a second install). Their seeds run
60
+ // afterwards, each with its own plan, when the brief gives them content.
61
+ const verticals = (flag("vertical") ?? "").split(",").map((v) => v.trim()).filter(Boolean);
62
+ const vertical = verticals[0] ?? null;
55
63
  const stackFlag = flag("stack");
56
64
  // Opt-in: keep a CREATE's project in a subfolder instead of the current directory.
57
65
  const subfolder = argv.includes("--subfolder");
@@ -59,11 +67,11 @@ const subfolder = argv.includes("--subfolder");
59
67
  let TEMPLATES;
60
68
  try { TEMPLATES = templatesDir(); } catch (e) { fail("templates", e.message); }
61
69
  const knownVerticals = listVerticals(TEMPLATES);
62
- const usage = `usage: setup.mjs --vertical <${knownVerticals.join("|")}> [--plan plan.json] [--business-name "<Brand>"] [--stack astro|react|lib|static] [--subfolder]`;
70
+ const usage = `usage: setup.mjs --vertical <${knownVerticals.join("|")}>[,<vertical>…] [--plan plan.json] [--business-name "<Brand>"] [--stack astro|react|lib|static] [--subfolder]`;
63
71
  // --vertical is REQUIRED: a defaulted vertical deploys the wrong code and runs the wrong seed.
64
72
  if (!vertical) fail("args", usage);
65
- if (!knownVerticals.includes(vertical)) {
66
- fail("args", `unknown vertical "${vertical}" — shipped verticals: ${knownVerticals.join(", ")}`);
73
+ for (const v of verticals) {
74
+ if (!knownVerticals.includes(v)) fail("args", `unknown vertical "${v}" — shipped verticals: ${knownVerticals.join(", ")}`);
67
75
  }
68
76
  if (stackFlag && !["astro", "react", "lib", "static"].includes(stackFlag)) {
69
77
  fail("args", `unknown --stack "${stackFlag}" — astro, react, lib or static`);
@@ -74,22 +82,27 @@ if (planPath && !existsSync(planPath)) fail("args", `plan file not found: ${plan
74
82
  const cwd = process.cwd();
75
83
  const has = (p) => existsSync(join(cwd, p));
76
84
  const pkg = has("package.json") ? JSON.parse(readFileSync(join(cwd, "package.json"), "utf8")) : null;
77
- const hasProject = !!pkg || has("index.html");
78
- // A config here: refuse, unless it is a migration preview with no project yet (the site context
79
- // pulls .env.local when missing — that is where the migration is declared).
80
85
  let ctx = null;
86
+ let shape = folderShape(cwd).shape;
81
87
  if (has("wix.config.json")) {
82
- ctx = siteContext({ cwd });
83
- if (hasProject || !ctx.migration.active) {
84
- fail("place", "this folder is already a Wix project (wix.config.json): nothing to set up. deploy.mjs <vertical> adds this skill's code or a solution to it; then ONE npm install; then the vertical's seed module if there is content to create. A config with no project is attach.mjs's case (SKILL.md step 3)" + (ctx.pullError ? ` — note: env pull failed here (${ctx.pullError.slice(0, 120)})` : ""));
88
+ ctx = siteContext({ cwd }); // pulls .env.local when missing — where a migration is declared
89
+ shape = ctx.folder.shape;
90
+ if (shape !== "migration" && shape !== "published-static") {
91
+ fail("place", `this folder is already a Wix project (wix.config.json), shape "${shape}": nothing to set up. ${ctx.folder.next} (SKILL.md step 3)` + (ctx.pullError ? ` — note: env pull failed here (${ctx.pullError.slice(0, 120)})` : ""));
92
+ }
93
+ if (shape === "published-static" && stackFlag && stackFlag !== "static") {
94
+ fail("args", `a published static site (index.html beside wix.config.json, no package.json) is the static stack; --stack ${stackFlag} does not apply`);
85
95
  }
86
96
  }
87
- const mode = ctx ? "migrate" : hasProject ? "connect" : "create";
88
- if (mode === "connect" && !stackFlag) {
89
- fail("args", "connecting a project on disk needs --stack astro|react|lib|static — the stack you resolved in SKILL.md step 1 for this project");
97
+ const mode = { migration: "migrate", "published-static": "published-static", project: "adopt", empty: "create" }[shape];
98
+ const migrating = mode === "migrate";
99
+ const publishedStatic = mode === "published-static";
100
+ const hasProject = shape === "project";
101
+ if (mode === "adopt" && !stackFlag) {
102
+ fail("args", "adopting a project on disk needs --stack astro|react|lib|static — the stack you resolved in SKILL.md step 1 for this project");
90
103
  }
91
- const stack = stackFlag ?? "astro";
92
- emit("folder", { mode, stack, project: hasProject ? (pkg?.name ?? basename(cwd)) : null, ...(ctx ? { migration: ctx.migration, deploySiteId: ctx.deploy.siteId, warnings: ctx.warnings } : {}) });
104
+ const stack = publishedStatic ? "static" : (stackFlag ?? "astro");
105
+ emit("folder", { mode, shape, stack, project: hasProject ? (pkg?.name ?? basename(cwd)) : null, ...(ctx ? { deploySiteId: ctx.deploy.siteId, warnings: ctx.warnings } : {}), ...(migrating ? { migration: ctx.migration } : {}) });
93
106
 
94
107
  let projectDir = cwd;
95
108
  let folderName = null;
@@ -134,11 +147,13 @@ if (mode === "create") {
134
147
  } else if (mode === "migrate") {
135
148
  // ---- 1 · a migration preview: the config and credentials came with the folder -------------------
136
149
  // No site is created and nothing is provisioned: `wix.config.json` already names the deploy site
137
- // and its app, `.env.local` the parent's. Managed Astro gets the vertical's composed template copied
138
- // in around them (what `wix create` would have copied; the config and env are never overwritten);
139
- // any other stack is code-only and deploy below adds it.
140
- if (planPath) emit("seed_skipped", { reason: `migration preview of site ${ctx.migration.parentSiteId}: the site owns its content and nothing is seeded — the plan is ignored` });
141
- if (stack === "astro") {
150
+ // and its app, `.env.local` the parent's. The download usually carries the CLI's blank Astro
151
+ // starter beside the config: then the project is kept and deploy below adds the vertical's code and
152
+ // dependencies into it, as for an adopted project. A bare config (no package.json) gets the
153
+ // vertical's composed template copied in around it on managed Astro; any other stack is code-only.
154
+ if (stack === "astro" && has("package.json")) {
155
+ emit("migration_project_kept", { folder: cwd, project: pkg?.name ?? basename(cwd) });
156
+ } else if (stack === "astro") {
142
157
  const template = join(templatesDir({ need: `${vertical}/project` }), vertical, "project");
143
158
  emit("scaffolding", { folder: cwd, template, from: "migration preview" });
144
159
  cpSync(template, cwd, { recursive: true, force: false, errorOnExist: false });
@@ -150,12 +165,18 @@ if (mode === "create") {
150
165
  const gi = join(cwd, ".gitignore");
151
166
  const cur = existsSync(gi) ? readFileSync(gi, "utf8") : "";
152
167
  if (!/\.env/.test(cur)) writeFileSync(gi, cur + "\n# local env (pulled from Wix)\n.env.local\n.env\n");
168
+ } else if (publishedStatic) {
169
+ // ---- 1 · a published static site: the config came with the folder, the site exists -------------
170
+ // No init: `wix.config.json` already names the site the pages are published on (and its app). The
171
+ // pages stay where they are; the static handling below points the upload at site/ and the `next`
172
+ // says to move them in.
173
+ emit("preparing", { folder: cwd, siteId: ctx.deploy.siteId, from: "published static site" });
153
174
  } else {
154
175
  // ---- 1 · init in place --------------------------------------------------------------------------
155
176
  // The CLI's `init` links the folder to a NEW site: creates the site and its OAuth app, writes
156
177
  // wix.config.json and .env.local, touches nothing else. Non-interactive under CI=1; the site is
157
178
  // named after the folder (rename it in the dashboard).
158
- emit("initializing", { folder: cwd });
179
+ emit("adopting", { folder: cwd });
159
180
  const init = spawnSync("npm", ["create", "@wix/new@latest", "--", "init"],
160
181
  { cwd, env: { ...process.env, CI: "1" }, encoding: "utf8", timeout: 300_000 });
161
182
  if (init.status !== 0 || !has("wix.config.json")) {
@@ -172,17 +193,17 @@ if (stack === "static") {
172
193
  wixConfig.site = { ...(wixConfig.site ?? {}), outputDirectory: `./${STATIC_OUT}` };
173
194
  writeFileSync(join(projectDir, "wix.config.json"), JSON.stringify(wixConfig, null, 2) + "\n");
174
195
  }
175
- emit(mode === "create" ? "scaffolded" : mode === "migrate" ? "migration_preview" : "connected", {
196
+ emit({ create: "scaffolded", migrate: "migration_preview", adopt: "adopted", "published-static": "prepared" }[mode], {
176
197
  folder: folderName ?? cwd, stack,
177
- ...(ctx ? { deploySiteId: ctx.deploy.siteId, contentSiteId: ctx.content.siteId } : { siteId }),
198
+ ...(migrating ? { deploySiteId: ctx.deploy.siteId, contentSiteId: ctx.content.siteId } : { siteId }),
178
199
  });
179
200
 
180
201
  // ---- 2 · deploy shipped code + deps ---------------------------------------------------------------
181
202
  // A CREATE from the composed template already holds the code and the lock: deploy adds nothing and
182
- // reports the project; a CONNECT gets the code and its dependencies here.
203
+ // reports the project; an ADOPT gets the code and its dependencies here.
183
204
  const deploy = spawnSync(
184
205
  "node",
185
- [join(SKILL_ROOT, "install", "deploy.mjs"), vertical, "--stack", stack, ...(stack === "static" ? ["--out", STATIC_OUT] : []), ...(planPath ? ["--plan", resolve(planPath)] : [])],
206
+ [join(SKILL_ROOT, "install", "deploy.mjs"), ...verticals, "--stack", stack, ...(stack === "static" ? ["--out", STATIC_OUT] : []), ...(planPath ? ["--plan", resolve(planPath)] : [])],
186
207
  { cwd: projectDir, encoding: "utf8", timeout: 60_000 },
187
208
  );
188
209
  if (deploy.status !== 0) fail("deploy", deploy.stderr || deploy.stdout);
@@ -223,7 +244,7 @@ if (mode === "create" && !subfolder && projectDir !== cwd) {
223
244
  // ---- 2d · the agent config files `wix create` would have written --------------------------------
224
245
  // Skipped by the CLI because of --skip-install. Fill-only: a project that has its own AGENTS.md
225
246
  // keeps it (the event says `kept`).
226
- emit("agent_configs", writeAgentsMd(projectDir, { skill: basename(SKILL_ROOT), stack, ...(ctx ? { migration: { parentSiteId: ctx.migration.parentSiteId, deploySiteId: ctx.deploy.siteId } } : {}) }));
247
+ emit("agent_configs", writeAgentsMd(projectDir, { skill: basename(SKILL_ROOT), stack, ...(migrating ? { migration: { parentSiteId: ctx.migration.parentSiteId, deploySiteId: ctx.deploy.siteId } } : {}) }));
227
248
 
228
249
  // ---- 3 · start the dependency install, detached --------------------------------------------------
229
250
  // ONE install, here, for any project with a package.json (deploy patched it). The static stack has
@@ -243,13 +264,19 @@ if (stack !== "static" && existsSync(join(projectDir, "package.json"))) {
243
264
  emit("install_started", install);
244
265
  }
245
266
 
246
- // ---- 4 · start the seed, detached (only with a plan) ---------------------------------------------
267
+ // ---- 4 · start the seed, detached (a site this run created, with a plan) ---------------------------
247
268
  // The seed includes a Wix-side provisioning wait of unpredictable length (10-80s); running it in
248
269
  // the caller's foreground would idle the agent for exactly that long. Detach it like the install:
249
- // result JSON + exit-code marker land as files the caller syncs on before release. Seeding is
250
- // additive: it never deletes or overwrites what the site holds.
270
+ // result JSON + exit-code marker land as files the caller syncs on before release. Only a site this
271
+ // run created is seeded here; every other site existed before the run and is read first, then the
272
+ // agent runs the seed module itself when the brief supplies content. Seeds are additive and
273
+ // idempotent by name.
274
+ const madeTheSite = mode === "create" || mode === "adopt";
251
275
  let seed = null;
252
- if (planPath && mode !== "migrate") {
276
+ if (planPath && !madeTheSite) {
277
+ emit("seed_skipped", { reason: `${mode}: the site existed before this run; setup seeds only a site it created. Read what the site holds (templates/${vertical}/seed/read-site.mjs), then run templates/${vertical}/seed/seed-*.mjs ${planPath} yourself when the brief supplies or describes content` });
278
+ }
279
+ if (planPath && madeTheSite) {
253
280
  const seedDir = join(TEMPLATES, vertical, "seed");
254
281
  const seedName = existsSync(seedDir)
255
282
  ? readdirSync(seedDir).find((f) => f.startsWith("seed-") && f.endsWith(".mjs"))
@@ -264,7 +291,7 @@ if (planPath && mode !== "migrate") {
264
291
  );
265
292
  seedChild.unref();
266
293
  seed = { resultFile: "seed-result.json", log: "seed.log", doneMarker: ".seed-exit", success: "file contains 0" };
267
- emit("seeding_started", { vertical, ...seed });
294
+ emit("seeding_started", { vertical, ...seed, ...(verticals.length > 1 ? { note: `the plan seeds ${vertical}; the other verticals' seeds run afterwards, each with its own plan` } : {}) });
268
295
  }
269
296
 
270
297
  // ---- done ----------------------------------------------------------------------------------------
@@ -276,23 +303,30 @@ const release = {
276
303
  }[stack];
277
304
  // On a migration preview the links and `siteId` are the PARENT's — the site whose content the pages
278
305
  // show and whose dashboard manages it; `deploySiteId` is where `wix release` goes.
306
+ const others = verticals.slice(1);
279
307
  emit("ready_for_brand_layer", {
280
308
  mode,
309
+ shape,
281
310
  stack,
311
+ verticals,
282
312
  projectDir,
283
- siteId: ctx ? ctx.content.siteId : siteId,
284
- ...(ctx ? { deploySiteId: ctx.deploy.siteId, migration: { parentSiteId: ctx.migration.parentSiteId } } : {}),
313
+ siteId: migrating ? ctx.content.siteId : siteId,
314
+ ...(migrating ? { deploySiteId: ctx.deploy.siteId, migration: { parentSiteId: ctx.migration.parentSiteId } } : {}),
285
315
  dashboardUrl: deployResult.dashboardUrl,
286
316
  productsUrl: deployResult.productsUrl,
287
317
  categoriesUrl: deployResult.categoriesUrl,
288
318
  install,
289
319
  seed,
290
320
  next:
321
+ (publishedStatic ? "a published static site: its pages are live on this site already and keep their URL; move index.html, the other pages, styles and assets into site/ (the root keeps the config, the plan, the seed output and the skills) and wire the solution into the page that needs it; " : "") +
291
322
  (mode === "migrate"
292
323
  ? "a migration preview: the site being migrated owns its content (read it with the vertical's read-site.mjs when the brief allows probing; never seed it); theme + write the home page; "
293
- : planPath
294
- ? "theme + write the home page; "
295
- : "the site is new and empty — seed it (a plan per step 2, the vertical's seed module) or say so; theme + write the home page; ") +
324
+ : madeTheSite
325
+ ? (planPath ? "theme + write the home page; " : "the site is new and empty and no plan was given, so nothing was seeded yet: seed it now (a plan per step 2 — the brief's content, or one drafted per the vertical's SEED.md — then the vertical's seed module), and name the placeholder content in the closing message; theme + write the home page; ")
326
+ : `nothing was seeded (setup seeds only a site it created): read what the site holds with templates/${vertical}/seed/read-site.mjs, then run templates/${vertical}/seed/seed-*.mjs <plan> when the brief supplies or describes content; theme + write the home page; `) +
327
+ (others.length && mode !== "migrate"
328
+ ? `${others.join(", ")} deployed too, no further install needed: run each one's seed module (templates/<vertical>/seed/) with its own plan when the brief gives it content (the members seed installs the Members Area app and needs no plan); `
329
+ : "") +
296
330
  (install || seed ? "then wait for the done markers" + (seed ? ", verify .seed-exit is 0 (else read seed.log and re-run the seed module)" : "") + "; " : "") +
297
331
  `then ${release}` +
298
332
  (mode === "migrate" ? "; the release is the PREVIEW on the deploy site — close with its URL and the parent's dashboard, say the original site is unchanged and that completing the migration is the user's next step in the Wix CLI once they approve" : ""),
@@ -142,7 +142,7 @@ function fetchTemplates(cache) {
142
142
 
143
143
  // A sparse, shallow clone of templates/ at a ref (branch, tag, or commit id) into a temp dir.
144
144
  function cloneSparse(repo, ref) {
145
- const tmp = mkdtempSync(join(tmpdir(), "wix-headless-fast-templates-"));
145
+ const tmp = mkdtempSync(join(tmpdir(), "wix-headless-kit-templates-"));
146
146
  let r;
147
147
  if (ref && /^[0-9a-f]{40}$/i.test(ref)) {
148
148
  // a commit: shallow-fetch just it (GitHub serves any reachable commit by id)
@@ -135,19 +135,13 @@ Uses Calendar Events API to create WORKING_HOURS events on the business schedule
135
135
  ## CMS
136
136
 
137
137
  ### [CMS Data Items CRUD](references/cms/cms-data-items-crud.md)
138
- "Add, query, update, and delete items in CMS collections. Use this to insert content, bulk insert/update/patch/delete items, query with filters, and manage collection data. Key endpoints: /wix-data/v2/items, /wix-data/v2/bulk/items/*."
139
-
140
- ### [CMS Data Operations Extended](references/cms/cms-data-operations-extended.md)
141
- Additional CMS data operations including count, upsert (bulk save), and update by filter patterns.
138
+ "Add, query, update, and delete items in CMS collections, one at a time or in bulk. Also covers counting items, upserting with bulk save, truncating a collection, aggregating data with a pipeline, linking items through single- and multi-reference fields, and reading items with their referenced items expanded."
142
139
 
143
140
  ### [CMS eCommerce Catalog Integration](references/cms/cms-ecommerce-catalog-integration.md)
144
141
  The recommended way to sell existing CMS collection items (tickets, bookings, memberships) through Wix checkout. Add the CATALOG plugin to convert any CMS collection into purchasable products with cart and payment integration.
145
142
 
146
- ### [CMS References And Relationships](references/cms/cms-references-and-relationships.md)
147
- "Add, replace, or remove items from MULTI_REFERENCE fields. Use insert-references, replace-references, remove-references endpoints. Required for managing multi-reference relationships - these CANNOT be set via regular insert/update/patch operations. Also covers single references and querying with expanded references."
148
-
149
143
  ### [CMS Schema Management](references/cms/cms-schema-management.md)
150
- Create and modify CMS collection structures. Covers listing collections, creating collections with fields, adding/removing fields, and updating collection settings.
144
+ Create and modify CMS collection structures. Covers listing collections, creating collections with fields, adding/removing fields (including single- and multi-reference fields that link two collections), and updating collection settings.
151
145
 
152
146
  ### [CMS Draft & Publish Workflow (Draft Items plugin)](references/cms/cms-publishing-flow.md)
153
147
  "Interact with CMS collections that gate their items behind a draft/publish workflow via the Draft Items plugin. Covers detecting the plugin, locating the paired drafts collection, reading published vs draft items, authoring/editing drafts, and publishing, unpublishing, reverting, and deleting items. Key endpoints: /wix-data/v2/items/publish-draft, /wix-data/v2/items/unpublish, /wix-data/v2/collections/add-draft-items-plugin, and the paired drafts collection referenced by draftItemsPluginOptions.draftsCollectionId."
@@ -28,8 +28,8 @@ Fetch the entity via REST, then link the matching dashboard page. All calls use
28
28
 
29
29
  | Entity | Read API | Dashboard link |
30
30
  |---|---|---|
31
- | Collection (schema) | `GET /wix-data/v2/collections/{collectionId}` · `GET /wix-data/v2/collections` (list) | `wix-cms/data/{collectionId}` |
32
- | Data item | `POST /wix-data/v2/items/query` (body includes `dataCollectionId`) · `GET /wix-data/v2/items/{itemId}?dataCollectionId=...` | `wix-cms/data/{collectionId}` (the collection's items table) |
31
+ | Collection (schema) | `GET https://www.wixapis.com/wix-data/v2/collections/{collectionId}` · `GET https://www.wixapis.com/wix-data/v2/collections` (list) | `wix-cms/data/{collectionId}` |
32
+ | Data item | `POST https://www.wixapis.com/wix-data/v2/items/query` (body includes `dataCollectionId`) · `GET https://www.wixapis.com/wix-data/v2/items/{itemId}?dataCollectionId=...` | `wix-cms/data/{collectionId}` (the collection's items table) |
33
33
 
34
34
  Example — after creating a collection and inserting items:
35
35