@wix/agent-skills 1.7.0 → 1.8.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/README.md +3 -7
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +2 -0
- package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
- package/skills/wix-design-system/SKILL.md +4 -0
- package/skills/wix-headless/SKILL.md +55 -32
- package/skills/wix-headless/references/BUILD-astro.md +246 -0
- package/skills/wix-headless/references/BUILD-own-build.md +167 -0
- package/skills/wix-headless/references/BUILD.md +50 -252
- package/skills/wix-headless/references/DESIGN_SYSTEM.md +94 -34
- package/skills/wix-headless/references/DISCOVERY-connect.md +55 -0
- package/skills/wix-headless/references/DISCOVERY-create.md +238 -0
- package/skills/wix-headless/references/DISCOVERY.md +41 -422
- package/skills/wix-headless/references/PLAN-connect.md +19 -0
- package/skills/wix-headless/references/PLAN-create.md +17 -0
- package/skills/wix-headless/references/PLAN.md +37 -27
- package/skills/wix-headless/references/SEED.md +27 -18
- package/skills/wix-headless/references/SETUP.md +32 -213
- package/skills/wix-headless/references/astro/blog/BLOG_PAGES.md +5 -4
- package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +337 -0
- package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +428 -0
- package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +5 -5
- package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +10 -10
- package/skills/wix-headless/references/astro/cms/PORTFOLIO.md +12 -13
- package/skills/wix-headless/references/astro/cms/RESOURCE_LIBRARY.md +10 -12
- package/skills/wix-headless/references/astro/cms/TEAM_DIRECTORY.md +8 -8
- package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +50 -27
- package/skills/wix-headless/references/astro/ecom/CART_PAGES.md +7 -8
- package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +5 -5
- package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +3 -3
- package/skills/wix-headless/references/astro/forms/CONTACT_FORM.md +5 -19
- package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +2 -2
- package/skills/wix-headless/references/astro/gift-cards/PAGES.md +1 -1
- package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +6 -6
- package/skills/wix-headless/references/astro/stores/CATEGORY_PAGES.md +4 -4
- package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +3 -3
- package/skills/wix-headless/references/astro/stores/HOME_AND_NAV.md +3 -3
- package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +9 -9
- package/skills/wix-headless/references/astro/stores/SHARED_WIRING.md +5 -4
- package/skills/wix-headless/references/astro/templates/Footer.astro +1 -1
- package/skills/wix-headless/references/astro/templates/Layout.astro +1 -1
- package/skills/wix-headless/references/astro/templates/Navigation.astro +1 -1
- package/skills/wix-headless/references/astro/templates/astro.config.mjs +1 -1
- package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +218 -0
- package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +194 -0
- package/skills/wix-headless/references/astro/templates/bookings/ManageBooking.tsx +84 -0
- package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +25 -0
- package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +50 -0
- package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +45 -0
- package/skills/wix-headless/references/astro/templates/bookings/api/confirm-booking.ts +34 -0
- package/skills/wix-headless/references/astro/templates/bookings/api/waitlist.ts +74 -0
- package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +111 -0
- package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +413 -0
- package/skills/wix-headless/references/astro/templates/bookings/manage-booking.astro +76 -0
- package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +81 -0
- package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +65 -0
- package/skills/wix-headless/references/astro/templates/global.css +2 -2
- package/skills/wix-headless/references/astro/templates/index.astro +1 -1
- package/skills/wix-headless/references/blog/BLOG_CONTENT.md +19 -9
- package/skills/wix-headless/references/blog/INSTRUCTIONS.md +3 -3
- package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +106 -0
- package/skills/wix-headless/references/bookings/SERVICES_DATA.md +295 -0
- package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +4 -2
- package/skills/wix-headless/references/cms/INSTRUCTIONS.md +27 -1
- package/skills/wix-headless/references/commands/known-apps.json +2 -1
- package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +142 -0
- package/skills/wix-headless/references/custom/INSTRUCTIONS.md +71 -21
- package/skills/wix-headless/references/custom/blog/WIRING.md +52 -0
- package/skills/wix-headless/references/custom/bookings/WIRING.md +88 -0
- package/skills/wix-headless/references/custom/cms/WIRING.md +97 -0
- package/skills/wix-headless/references/custom/ecom/WIRING.md +67 -0
- package/skills/wix-headless/references/custom/forms/WIRING.md +101 -0
- package/skills/wix-headless/references/custom/stores/WIRING.md +80 -0
- package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +5 -5
- package/skills/wix-headless/references/forms/INSTRUCTIONS.md +2 -2
- package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +3 -3
- package/skills/wix-headless/references/images/INSTRUCTIONS.md +16 -15
- package/skills/wix-headless/references/seed-recipes.md +2 -2
- package/skills/wix-headless/references/shared/AGENTS_MD.md +47 -0
- package/skills/wix-headless/references/shared/AUTHENTICATION.md +3 -5
- package/skills/wix-headless/references/shared/DESIGN_MD.md +85 -0
- package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +29 -28
- package/skills/wix-headless/references/shared/IMPLEMENTER.md +87 -27
- package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +2 -2
- package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +24 -313
- package/skills/wix-headless/references/shared/STYLING.md +8 -18
- package/skills/wix-headless/references/stores/INSTRUCTIONS.md +39 -9
- package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +17 -14
- package/skills/wix-headless/references/verticals/_schema.json +1 -1
- package/skills/wix-headless/references/verticals/_schema.md +3 -3
- package/skills/wix-headless/references/verticals/blog.md +1 -1
- package/skills/wix-headless/references/verticals/bookings.md +41 -0
- package/skills/wix-headless/references/verticals/cms.md +1 -1
- package/skills/wix-headless/references/verticals/ecom.md +2 -2
- package/skills/wix-headless/references/verticals/gift-cards.md +1 -1
- package/skills/wix-headless/references/verticals/stores.md +1 -1
- package/skills/wix-headless/scripts/check-manifest.mjs +143 -6
- package/skills/wix-headless/scripts/compose.mjs +540 -0
- package/skills/wix-headless/scripts/emit-design-tokens.mjs +128 -51
- package/skills/wix-headless/scripts/flatten.sh +61 -0
- package/skills/wix-headless/scripts/generate-images.mjs +242 -0
- package/skills/wix-headless/scripts/scaffold.sh +47 -16
- package/skills/wix-headless/scripts/write-decorative-json.mjs +62 -0
- package/skills/wix-manage/SKILL.md +1 -1
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +1 -1
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +1 -1
- package/skills/wix-manage/references/cms/cms-references-and-relationships.md +1 -1
- package/skills/wix-manage/references/cms/cms-schema-management.md +1 -1
- package/skills/wix-manage/references/domains/domain-search-and-purchase.md +10 -7
- package/skills/wix-manage/references/forms/create-form.md +49 -1
- package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1 -1
- package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +1 -1
- package/skills/wix-headless/references/astro/COMPOSE.md +0 -142
- package/skills/wix-headless/scripts/finalize-run-json.mjs +0 -141
- package/skills/wix-headless/scripts/init-site-json.mjs +0 -101
- package/skills/wix-headless/scripts/preview.sh +0 -45
- package/skills/wix-headless/scripts/release.sh +0 -73
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Write the initial .wix/site.json — slim metadata snapshot for resume
|
|
3
|
-
// detection + run.json composition. Subagents do NOT read this file during
|
|
4
|
-
// the run; the orchestrator is the sole reader/writer and inlines anything
|
|
5
|
-
// downstream phases need into their prompts.
|
|
6
|
-
//
|
|
7
|
-
// Final shape:
|
|
8
|
-
// {
|
|
9
|
-
// "brand": { "name": "...", "description": "..." },
|
|
10
|
-
// "frontend": "astro" | "custom",
|
|
11
|
-
// "verticals": ["stores", "cms", ...],
|
|
12
|
-
// "siteId": "..." (optional — Setup Step 1 may patch later),
|
|
13
|
-
// "appId": "..." (optional — Setup Step 1 may patch later)
|
|
14
|
-
// }
|
|
15
|
-
//
|
|
16
|
-
// Usage:
|
|
17
|
-
// node init-site-json.mjs <project-dir> <brand-name> <brand-description> \
|
|
18
|
-
// <verticals-csv> --frontend <astro|custom> \
|
|
19
|
-
// [--site-id <id>] [--app-id <id>]
|
|
20
|
-
// (In practice only "astro" reaches this step — custom frontends route to the
|
|
21
|
-
// not-available stub before Discovery's approval/site.json write.)
|
|
22
|
-
//
|
|
23
|
-
// Behavior:
|
|
24
|
-
// - Refuses to overwrite an existing .wix/site.json (exit 2). The orchestrator
|
|
25
|
-
// should call this exactly once during Discovery's "After Approval" step.
|
|
26
|
-
// To re-init for testing, the caller can rm the file first.
|
|
27
|
-
// - Creates .wix/ if it doesn't exist.
|
|
28
|
-
// - Outputs a JSON summary to stdout.
|
|
29
|
-
|
|
30
|
-
import { writeFileSync, existsSync, mkdirSync } from "node:fs";
|
|
31
|
-
import { join } from "node:path";
|
|
32
|
-
|
|
33
|
-
const ALLOWED_FRONTENDS = new Set(["astro", "custom"]);
|
|
34
|
-
|
|
35
|
-
let frontend = "astro";
|
|
36
|
-
let siteId;
|
|
37
|
-
let appId;
|
|
38
|
-
const positional = [];
|
|
39
|
-
const rawArgs = process.argv.slice(2);
|
|
40
|
-
for (let i = 0; i < rawArgs.length; i++) {
|
|
41
|
-
const arg = rawArgs[i];
|
|
42
|
-
if (arg === "--frontend") {
|
|
43
|
-
frontend = rawArgs[++i];
|
|
44
|
-
} else if (arg.startsWith("--frontend=")) {
|
|
45
|
-
frontend = arg.slice("--frontend=".length);
|
|
46
|
-
} else if (arg === "--site-id") {
|
|
47
|
-
siteId = rawArgs[++i];
|
|
48
|
-
} else if (arg.startsWith("--site-id=")) {
|
|
49
|
-
siteId = arg.slice("--site-id=".length);
|
|
50
|
-
} else if (arg === "--app-id") {
|
|
51
|
-
appId = rawArgs[++i];
|
|
52
|
-
} else if (arg.startsWith("--app-id=")) {
|
|
53
|
-
appId = arg.slice("--app-id=".length);
|
|
54
|
-
} else {
|
|
55
|
-
positional.push(arg);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (!ALLOWED_FRONTENDS.has(frontend)) {
|
|
60
|
-
console.error(`init-site-json: --frontend must be one of ${[...ALLOWED_FRONTENDS].join(", ")}; got ${JSON.stringify(frontend)}`);
|
|
61
|
-
process.exit(2);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const [projectDir, brandName, brandDescription, verticalsCsv] = positional;
|
|
65
|
-
|
|
66
|
-
if (!projectDir || !brandName || brandDescription === undefined || !verticalsCsv) {
|
|
67
|
-
console.error("usage: init-site-json.mjs <project-dir> <brand-name> <brand-description> <verticals-csv> --frontend <astro|custom> [--site-id <id>] [--app-id <id>]");
|
|
68
|
-
process.exit(2);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const verticals = verticalsCsv
|
|
72
|
-
.split(",")
|
|
73
|
-
.map((v) => v.trim())
|
|
74
|
-
.filter(Boolean);
|
|
75
|
-
|
|
76
|
-
if (verticals.length === 0) {
|
|
77
|
-
console.error("init-site-json: <verticals-csv> resolved to zero verticals — cms is always loaded, so this is a bug");
|
|
78
|
-
process.exit(2);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const wixDir = join(projectDir, ".wix");
|
|
82
|
-
const sitePath = join(wixDir, "site.json");
|
|
83
|
-
|
|
84
|
-
if (existsSync(sitePath)) {
|
|
85
|
-
console.error(`init-site-json: ${sitePath} already exists — refusing to overwrite. Discovery should call this exactly once.`);
|
|
86
|
-
process.exit(2);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
mkdirSync(wixDir, { recursive: true });
|
|
90
|
-
|
|
91
|
-
const site = {
|
|
92
|
-
brand: { name: brandName, description: brandDescription },
|
|
93
|
-
frontend,
|
|
94
|
-
verticals,
|
|
95
|
-
};
|
|
96
|
-
if (siteId) site.siteId = siteId;
|
|
97
|
-
if (appId) site.appId = appId;
|
|
98
|
-
|
|
99
|
-
writeFileSync(sitePath, JSON.stringify(site, null, 2) + "\n");
|
|
100
|
-
|
|
101
|
-
console.log(JSON.stringify({ status: "ok", path: sitePath, frontend, verticals, ...(siteId ? { siteId } : {}), ...(appId ? { appId } : {}) }, null, 2));
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Build the project and deploy a rotating preview URL.
|
|
3
|
-
#
|
|
4
|
-
# Usage:
|
|
5
|
-
# bash <SKILL_ROOT>/scripts/preview.sh
|
|
6
|
-
#
|
|
7
|
-
# Run from the project directory (CWD = <project>/). Requires wix.config.json.
|
|
8
|
-
#
|
|
9
|
-
# Output: stdout is the preview URL that `npx @wix/cli@latest preview` printed; the
|
|
10
|
-
# orchestrator captures it and records as outcome.previewUrl in run.json. All
|
|
11
|
-
# other CLI output goes to stderr.
|
|
12
|
-
#
|
|
13
|
-
# `preview` does NOT populate the Frontend link in headless settings — that's
|
|
14
|
-
# what `release.sh` is for. Use preview for fast iteration on a rotating URL;
|
|
15
|
-
# use release for production deploy + transactional-email URL stability.
|
|
16
|
-
#
|
|
17
|
-
# Exit codes:
|
|
18
|
-
# 0 — ok; preview URL on stdout
|
|
19
|
-
# <other> — build or preview failed; stderr surfaces the underlying error
|
|
20
|
-
# (TypeScript / Astro errors are code bugs, not endpoint drift —
|
|
21
|
-
# the orchestrator's recovery ladder doesn't retry build).
|
|
22
|
-
|
|
23
|
-
set -euo pipefail
|
|
24
|
-
|
|
25
|
-
# Build first; surface compile errors verbatim if it fails.
|
|
26
|
-
npx @wix/cli@latest build 1>&2
|
|
27
|
-
|
|
28
|
-
# Preview captures the deployed URL on stdout. We tee its output to stderr for
|
|
29
|
-
# the user-visible log AND parse the URL out for the orchestrator's stdout.
|
|
30
|
-
PREVIEW_OUTPUT="$(mktemp)"
|
|
31
|
-
trap 'rm -f "$PREVIEW_OUTPUT"' EXIT
|
|
32
|
-
|
|
33
|
-
npx @wix/cli@latest preview 2>&1 | tee "$PREVIEW_OUTPUT" 1>&2
|
|
34
|
-
|
|
35
|
-
# Wix CLI prints `Site preview URL: <url>` (or similar) — extract the first
|
|
36
|
-
# https URL from the output. If multiple are printed, the first is the canonical
|
|
37
|
-
# preview URL.
|
|
38
|
-
PREVIEW_URL="$(grep -oE 'https://[A-Za-z0-9.-]+\.wix-host\.com[^[:space:]]*' "$PREVIEW_OUTPUT" | head -n 1 || true)"
|
|
39
|
-
|
|
40
|
-
if [[ -z "$PREVIEW_URL" ]]; then
|
|
41
|
-
echo "preview.sh: could not extract a *.wix-host.com URL from preview output" >&2
|
|
42
|
-
exit 1
|
|
43
|
-
fi
|
|
44
|
-
|
|
45
|
-
echo "$PREVIEW_URL"
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Build the project and release to production. Unlike preview.sh, this populates
|
|
3
|
-
# the Frontend link in dashboard → Settings → Headless Settings → Manage URLs,
|
|
4
|
-
# which Wix injects into transactional emails (order confirmations, password
|
|
5
|
-
# resets, member invites). Use release.sh for production deploys.
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
# bash <SKILL_ROOT>/scripts/release.sh
|
|
9
|
-
#
|
|
10
|
-
# Run from the project directory (CWD = <project>/). Requires wix.config.json.
|
|
11
|
-
#
|
|
12
|
-
# Output: stdout is the released URL that `npx @wix/cli@latest release` printed
|
|
13
|
-
# (extracted from the line `Site published on <url>`); the orchestrator
|
|
14
|
-
# captures it as outcome.releaseUrl in run.json. All other CLI output goes
|
|
15
|
-
# to stderr.
|
|
16
|
-
#
|
|
17
|
-
# Exit codes:
|
|
18
|
-
# 0 — ok; release URL on stdout
|
|
19
|
-
# <other> — build or release failed; stderr surfaces the underlying error.
|
|
20
|
-
# Build failures are code bugs (TypeScript / Astro / missing
|
|
21
|
-
# module) — the orchestrator does NOT retry. Release auth failures
|
|
22
|
-
# surface as `Run npx @wix/cli@latest login and retry.`
|
|
23
|
-
# Known transient release failures are retried by this script.
|
|
24
|
-
|
|
25
|
-
set -euo pipefail
|
|
26
|
-
|
|
27
|
-
npx @wix/cli@latest build 1>&2
|
|
28
|
-
|
|
29
|
-
RELEASE_OUTPUT="$(mktemp)"
|
|
30
|
-
trap 'rm -f "$RELEASE_OUTPUT"' EXIT
|
|
31
|
-
|
|
32
|
-
release_is_retryable() {
|
|
33
|
-
grep -Eiq 'ECONNRESET|ETIMEDOUT|EAI_AGAIN|STATE_MISMATCH|temporary system error|temporarily unavailable|try again shortly' "$RELEASE_OUTPUT"
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
MAX_RELEASE_ATTEMPTS="${WIX_RELEASE_ATTEMPTS:-3}"
|
|
37
|
-
RELEASE_STATUS=1
|
|
38
|
-
|
|
39
|
-
for ((attempt = 1; attempt <= MAX_RELEASE_ATTEMPTS; attempt++)); do
|
|
40
|
-
: >"$RELEASE_OUTPUT"
|
|
41
|
-
set +e
|
|
42
|
-
npx @wix/cli@latest release 2>&1 | tee "$RELEASE_OUTPUT" 1>&2
|
|
43
|
-
RELEASE_STATUS=${PIPESTATUS[0]}
|
|
44
|
-
set -e
|
|
45
|
-
|
|
46
|
-
if [[ "$RELEASE_STATUS" -eq 0 ]]; then
|
|
47
|
-
break
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
if [[ "$attempt" -lt "$MAX_RELEASE_ATTEMPTS" ]] && release_is_retryable; then
|
|
51
|
-
sleep_seconds=$((attempt * 5))
|
|
52
|
-
echo "release.sh: release attempt $attempt failed with a retryable Wix error; retrying in ${sleep_seconds}s" >&2
|
|
53
|
-
sleep "$sleep_seconds"
|
|
54
|
-
continue
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
exit "$RELEASE_STATUS"
|
|
58
|
-
done
|
|
59
|
-
|
|
60
|
-
# CLI prints `Site published on <url>` — extract the URL after that marker.
|
|
61
|
-
# Fall back to the first Wix-hosted URL if the marker line is not found
|
|
62
|
-
# (CLI wording may vary between versions).
|
|
63
|
-
RELEASE_URL="$(sed -nE 's/.*Site published on ([^[:space:]]+).*/\1/p' "$RELEASE_OUTPUT" | head -n 1 || true)"
|
|
64
|
-
if [[ -z "$RELEASE_URL" ]]; then
|
|
65
|
-
RELEASE_URL="$(grep -oE 'https://[A-Za-z0-9.-]+\.wix-(site-)?host\.com[^[:space:]]*' "$RELEASE_OUTPUT" | head -n 1 || true)"
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
|
-
if [[ -z "$RELEASE_URL" ]]; then
|
|
69
|
-
echo "release.sh: could not extract a release URL from release output" >&2
|
|
70
|
-
exit 1
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
echo "$RELEASE_URL"
|