@wix/agent-skills 1.21.0 → 1.22.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 +60 -4
- package/skills/wix-app/references/DASHBOARD_PAGE.md +11 -25
- package/skills/wix-app/references/DATA_COLLECTION.md +16 -219
- package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +182 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +97 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_COLLECTION.md +184 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +203 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_SETTINGS.md +44 -0
- package/skills/wix-app/references/dashboard-page/QUERY_AND_PAGING.md +182 -0
- package/skills/wix-app/references/dashboard-page/TABLE_STATE.md +133 -0
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +10 -5
- package/skills/wix-app/references/data-collection/LIFECYCLE.md +68 -0
- package/skills/wix-app/references/data-collection/PERMISSIONS.md +47 -0
- package/skills/wix-app/references/data-collection/SCHEMA.md +181 -0
- package/skills/wix-app/references/data-collection/WIX_DATA.md +38 -66
- package/skills/wix-headless-fast/SKILL.md +61 -223
- package/skills/wix-headless-fast/cold-start/bootstrap.mjs +156 -0
- package/skills/wix-headless-fast/{entry/skill.md → cold-start/cold-start.md} +11 -12
- package/skills/wix-headless-fast/guides/existing-site.md +76 -0
- package/skills/wix-headless-fast/guides/reference-mode.md +97 -0
- package/skills/wix-headless-fast/install/AGENTS.md +6 -3
- package/skills/wix-headless-fast/install/attach.mjs +15 -47
- package/skills/wix-headless-fast/install/deploy.mjs +21 -60
- package/skills/wix-headless-fast/install/lock.mjs +55 -0
- package/skills/wix-headless-fast/install/setup.mjs +32 -12
- package/skills/wix-headless-fast/install/templates.mjs +168 -0
- package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +27 -0
- package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +83 -37
- package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +0 -303
- package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +0 -136
- package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +0 -112
- package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +0 -42
- package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +0 -31
- package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +0 -22
- package/skills/wix-headless-fast/references/blog/app/wix/blog/blog-feed-store.ts +0 -137
- package/skills/wix-headless-fast/references/blog/app/wix/blog/post-store.ts +0 -78
- package/skills/wix-headless-fast/references/blog/app/wix/blog/posts-core.ts +0 -117
- package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +0 -52
- package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy-core.ts +0 -47
- package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +0 -58
- package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +0 -62
- package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +0 -97
- package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +0 -24
- package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +0 -16156
- package/skills/wix-headless-fast/references/blog/rest/posts.ts +0 -42
- package/skills/wix-headless-fast/references/blog/rest/taxonomy.ts +0 -62
- package/skills/wix-headless-fast/references/blog/seed/SEED.md +0 -81
- package/skills/wix-headless-fast/references/blog/seed/read-site.mjs +0 -22
- package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +0 -287
- package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +0 -277
- package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +0 -144
- package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +0 -119
- package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +0 -32
- package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +0 -23
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-core.ts +0 -218
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-flow-store.ts +0 -169
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +0 -121
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-core.ts +0 -92
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-store.ts +0 -90
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +0 -57
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +0 -72
- package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +0 -76
- package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +0 -22
- package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +0 -11962
- package/skills/wix-headless-fast/references/bookings/rest/booking.ts +0 -113
- package/skills/wix-headless-fast/references/bookings/rest/services.ts +0 -55
- package/skills/wix-headless-fast/references/bookings/seed/SEED.md +0 -71
- package/skills/wix-headless-fast/references/bookings/seed/read-site.mjs +0 -28
- package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +0 -302
- package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +0 -355
- package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +0 -50
- package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +0 -37
- package/skills/wix-headless-fast/references/cms/app/wix/cms/collection-store.ts +0 -158
- package/skills/wix-headless-fast/references/cms/app/wix/cms/item-store.ts +0 -93
- package/skills/wix-headless-fast/references/cms/app/wix/cms/items-core.ts +0 -177
- package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +0 -123
- package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +0 -75
- package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +0 -41
- package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +0 -11262
- package/skills/wix-headless-fast/references/cms/rest/items.ts +0 -125
- package/skills/wix-headless-fast/references/cms/seed/SEED.md +0 -112
- package/skills/wix-headless-fast/references/cms/seed/read-site.mjs +0 -20
- package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +0 -324
- package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +0 -307
- package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +0 -66
- package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +0 -178
- package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +0 -118
- package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +0 -35
- package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +0 -24
- package/skills/wix-headless-fast/references/events/app/wix/events/events-core.ts +0 -130
- package/skills/wix-headless-fast/references/events/app/wix/events/events-store.ts +0 -97
- package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +0 -55
- package/skills/wix-headless-fast/references/events/app/wix/events/registration-core.ts +0 -113
- package/skills/wix-headless-fast/references/events/app/wix/events/registration-store.ts +0 -156
- package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +0 -97
- package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +0 -61
- package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +0 -12
- package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +0 -80
- package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +0 -21
- package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +0 -11884
- package/skills/wix-headless-fast/references/events/rest/events.ts +0 -57
- package/skills/wix-headless-fast/references/events/rest/registration.ts +0 -83
- package/skills/wix-headless-fast/references/events/seed/SEED.md +0 -95
- package/skills/wix-headless-fast/references/events/seed/read-site.mjs +0 -26
- package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +0 -276
- package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +0 -340
- package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +0 -85
- package/skills/wix-headless-fast/references/forms/app/wix/forms/form-store.ts +0 -332
- package/skills/wix-headless-fast/references/forms/app/wix/forms/forms-core.ts +0 -238
- package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +0 -54
- package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions-core.ts +0 -216
- package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +0 -59
- package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +0 -135
- package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +0 -10593
- package/skills/wix-headless-fast/references/forms/rest/forms.ts +0 -34
- package/skills/wix-headless-fast/references/forms/rest/submissions.ts +0 -56
- package/skills/wix-headless-fast/references/forms/seed/SEED.md +0 -116
- package/skills/wix-headless-fast/references/forms/seed/read-site.mjs +0 -20
- package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +0 -327
- package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +0 -316
- package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +0 -60
- package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +0 -155
- package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +0 -78
- package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +0 -47
- package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +0 -66
- package/skills/wix-headless-fast/references/members/app/wix/members/auth-core.ts +0 -105
- package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +0 -59
- package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +0 -53
- package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +0 -122
- package/skills/wix-headless-fast/references/members/app/wix/members/members-core.ts +0 -43
- package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +0 -29
- package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +0 -21
- package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +0 -42
- package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +0 -10
- package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +0 -11
- package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +0 -10329
- package/skills/wix-headless-fast/references/members/rest/auth.ts +0 -215
- package/skills/wix-headless-fast/references/members/rest/members.ts +0 -26
- package/skills/wix-headless-fast/references/members/seed/SEED.md +0 -39
- package/skills/wix-headless-fast/references/members/seed/read-site.mjs +0 -15
- package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +0 -94
- package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +0 -315
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +0 -110
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +0 -90
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/GalleryMedia.tsx +0 -35
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +0 -85
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +0 -32
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +0 -21
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +0 -31
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collection-projects-store.ts +0 -82
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collections-store.ts +0 -58
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio-core.ts +0 -177
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +0 -78
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/project-detail-store.ts +0 -81
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +0 -55
- package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +0 -30
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +0 -21
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +0 -29
- package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +0 -10197
- package/skills/wix-headless-fast/references/portfolio/rest/portfolio.ts +0 -75
- package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +0 -86
- package/skills/wix-headless-fast/references/portfolio/seed/read-site.mjs +0 -20
- package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +0 -256
- package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +0 -296
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +0 -47
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +0 -101
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +0 -41
- package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +0 -16
- package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +0 -22
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +0 -54
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-core.ts +0 -106
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-store.ts +0 -64
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +0 -27
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase-core.ts +0 -43
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +0 -22
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +0 -30
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +0 -41
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +0 -40
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +0 -21
- package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +0 -11226
- package/skills/wix-headless-fast/references/pricing-plans/rest/plans.ts +0 -31
- package/skills/wix-headless-fast/references/pricing-plans/rest/purchase.ts +0 -20
- package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +0 -79
- package/skills/wix-headless-fast/references/pricing-plans/seed/read-site.mjs +0 -21
- package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +0 -279
- package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +0 -360
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +0 -142
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +0 -26
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +0 -121
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +0 -155
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +0 -34
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +0 -43
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +0 -34
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-core.ts +0 -155
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-store.ts +0 -89
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +0 -71
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +0 -103
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering-core.ts +0 -124
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +0 -185
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservation-store.ts +0 -193
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations-core.ts +0 -94
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +0 -74
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +0 -168
- package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +0 -47
- package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +0 -22
- package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +0 -12
- package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +0 -12560
- package/skills/wix-headless-fast/references/restaurants/rest/menu.ts +0 -60
- package/skills/wix-headless-fast/references/restaurants/rest/ordering.ts +0 -169
- package/skills/wix-headless-fast/references/restaurants/rest/reservations.ts +0 -68
- package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +0 -89
- package/skills/wix-headless-fast/references/restaurants/seed/read-site.mjs +0 -25
- package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +0 -499
- package/skills/wix-headless-fast/references/shared/CONTENT.md +0 -22
- package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +0 -73
- package/skills/wix-headless-fast/references/shared/DESIGN.md +0 -26
- package/skills/wix-headless-fast/references/shared/SUPPLIED-CONTENT.md +0 -23
- package/skills/wix-headless-fast/references/shared/app/styles/global.css +0 -52
- package/skills/wix-headless-fast/references/shared/app/wix/config.ts +0 -15
- package/skills/wix-headless-fast/references/shared/app/wix/media.ts +0 -81
- package/skills/wix-headless-fast/references/shared/app/wix/money.ts +0 -24
- package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +0 -89
- package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +0 -46
- package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +0 -46
- package/skills/wix-headless-fast/references/shared/rest/client.ts +0 -155
- package/skills/wix-headless-fast/references/shared/rest/config.ts +0 -3
- package/skills/wix-headless-fast/references/shared/rest/media.ts +0 -65
- package/skills/wix-headless-fast/references/shared/seed/images.mjs +0 -145
- package/skills/wix-headless-fast/references/shared/seed/read-site.mjs +0 -99
- package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +0 -612
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +0 -26
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +0 -155
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +0 -266
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/OptionPicker.tsx +0 -95
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +0 -136
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +0 -48
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +0 -39
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +0 -34
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-core.ts +0 -121
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +0 -107
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +0 -138
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +0 -314
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +0 -133
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/product-detail-store.ts +0 -147
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/shop-store.ts +0 -289
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +0 -169
- package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +0 -65
- package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +0 -12247
- package/skills/wix-headless-fast/references/storefront/rest/cart.ts +0 -132
- package/skills/wix-headless-fast/references/storefront/rest/catalog.ts +0 -123
- package/skills/wix-headless-fast/references/storefront/seed/SEED.md +0 -130
- package/skills/wix-headless-fast/references/storefront/seed/read-site.mjs +0 -38
- package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +0 -561
|
@@ -21,7 +21,12 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
21
21
|
|
|
22
22
|
## The model
|
|
23
23
|
|
|
24
|
-
- **Shipped code is the implementation.** Every vertical ships under `
|
|
24
|
+
- **Shipped code is the implementation.** Every vertical ships under `templates/<vertical>/` in
|
|
25
|
+
the skill's repository, not in the skill folder: `node <SKILL_ROOT>/install/templates.mjs`
|
|
26
|
+
fetches all of it once into `<SKILL_ROOT>/templates/` (a second) and prints the path; every
|
|
27
|
+
script below fetches it itself when the folder is missing. The folder stays with the project
|
|
28
|
+
(only the composed `project/` scaffolds are left out of its repository), so a later session
|
|
29
|
+
reads the version the project was built from. Each vertical holds:
|
|
25
30
|
- `app/` — the framework-agnostic core (TypeScript): a data layer that returns **plain,
|
|
26
31
|
serializable DTOs** (images resolved to https URLs, prices pre-formatted), React hooks, and
|
|
27
32
|
routing-free headless components. Works in Astro islands, Vite SPAs, and Next.
|
|
@@ -30,6 +35,9 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
30
35
|
- `seed/` — a build-time REST seed script (plain-data plan in, created content out) plus its
|
|
31
36
|
`SEED.md` contract.
|
|
32
37
|
- `INSTRUCTIONS.md` — the vertical's playbook: file map, what you build, hard rules.
|
|
38
|
+
- `project/` — the vertical composed into the Wix CLI's blank Astro scaffold, with its
|
|
39
|
+
lockfile: what `wix create` copies for a new site, so the first vertical installs without
|
|
40
|
+
resolving.
|
|
33
41
|
- **One auth seam.** All shipped code calls Wix through `src/wix/sdk.ts`: on Wix-managed Astro
|
|
34
42
|
auth is ambient (no client, no id); on any other React setup the same file runs a manual
|
|
35
43
|
visitor client off the public client id in `src/wix/config.ts`. The deploy step configures
|
|
@@ -40,7 +48,7 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
40
48
|
owns it and confirm the contract with `wix-docs`; never infer one from generated SDK types,
|
|
41
49
|
package files, or `node_modules`. A normal caller-permitted operation belongs in a new
|
|
42
50
|
data-layer function. A privileged operation belongs in a validated server endpoint — see
|
|
43
|
-
`
|
|
51
|
+
`templates/shared/CUSTOM_OPERATIONS.md`. The presentation **doesn't ship**: the vertical's
|
|
44
52
|
INSTRUCTIONS names the surfaces you design and implement yourself on the shipped hooks,
|
|
45
53
|
with a skeleton carrying each surface's contract (for storefront: the shop and PDP pages
|
|
46
54
|
with their islands, and home).
|
|
@@ -65,11 +73,20 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
65
73
|
capability without copying sensitive code. For a normal file upload, add a named
|
|
66
74
|
`capabilities.mediaUpload.policies` entry to the plan; Fast ships its client helper, Astro
|
|
67
75
|
endpoint, dependencies, and generated policy module once. Read
|
|
68
|
-
`
|
|
76
|
+
`templates/shared/CUSTOM_OPERATIONS.md` before choosing it. The agent wires the helper to
|
|
69
77
|
the product UI; it never authors or widens the endpoint.
|
|
70
78
|
|
|
71
79
|
## The run
|
|
72
80
|
|
|
81
|
+
Needed throughout: Node ≥ 20.11, git, a logged-in Wix CLI (`npx @wix/cli@latest whoami`;
|
|
82
|
+
`npx @wix/cli@latest login` is a device-code flow: surface the URL and code to the user, never
|
|
83
|
+
read tokens into context), and the two companion skills beside this one, `wix-docs` and
|
|
84
|
+
`wix-manage` (if `.agents/skills/` lacks them:
|
|
85
|
+
`CI=1 npx skills@latest add wix/skills --skill wix-docs --skill wix-manage --yes`). The cold-start
|
|
86
|
+
page, `cold-start/cold-start.md`, gets a machine with none of this to that point. Then fetch the shipped
|
|
87
|
+
code once: `node <SKILL_ROOT>/install/templates.mjs`. It prints the folder;
|
|
88
|
+
the `templates/…` paths below are relative to `<SKILL_ROOT>`, where it lands.
|
|
89
|
+
|
|
73
90
|
1. **Resolve the stack.** Default is **Wix-managed Astro** — take it unless the user names
|
|
74
91
|
another framework or the directory already holds one. Then, by what the shipped code can run
|
|
75
92
|
there:
|
|
@@ -84,8 +101,9 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
84
101
|
don't apply: `--stack lib`. The agent binds the stores and writes its framework's components
|
|
85
102
|
against the same contracts.
|
|
86
103
|
- **No bundler, or another language** — a static site (plain HTML/CSS/JS), a server-rendered
|
|
87
|
-
app (Flask, Laravel, Rails, …): **reference mode** (
|
|
88
|
-
|
|
104
|
+
app (Flask, Laravel, Rails, …): **reference mode** (its section below, and
|
|
105
|
+
`<SKILL_ROOT>/guides/reference-mode.md`). Nothing from `app/` deploys; the REST layer
|
|
106
|
+
deploys for the browser side, and the server side ports it for its reads.
|
|
89
107
|
|
|
90
108
|
**What Wix hosting takes, and what each stack needs to be released there.** `wix release`
|
|
91
109
|
uploads the folder named in `wix.config.json` (`site.outputDirectory`) and serves it as
|
|
@@ -109,19 +127,17 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
109
127
|
`outputDirectory: { client, server }`; otherwise it is self-hosted, with its domain added to
|
|
110
128
|
the OAuth app's allowed domains before checkout can return to it.
|
|
111
129
|
- **Static** (no build): `outputDirectory` points at the folder the pages live in; a route is a
|
|
112
|
-
page plus a query-string slug (reference mode
|
|
130
|
+
page plus a query-string slug (reference mode).
|
|
113
131
|
2. **The seed plan.** When the brief supplies the content in any form — a CSV, JSON or
|
|
114
132
|
spreadsheet, a list in the prompt, a PDF price list, a folder of photos and a text file, a
|
|
115
133
|
link to their current catalog, anything else that names the content — that IS the plan: map
|
|
116
|
-
it into `plan.json` per `
|
|
134
|
+
it into `plan.json` per `templates/shared/SUPPLIED-CONTENT.md` and the vertical's `SEED.md`
|
|
117
135
|
("Supplied content"), every entry, names and prices verbatim, their images and no others.
|
|
118
136
|
Draft a plan from the brief only when nothing was supplied (read only the vertical's
|
|
119
137
|
`SEED.md` for this — it depends only on the brief; save the vertical's `INSTRUCTIONS.md` for
|
|
120
138
|
step 4, where it's needed). **An existing site has no plan**: when the brief names a site by
|
|
121
139
|
its id, the site holds the content already — nothing is seeded, and the frontend reads what
|
|
122
|
-
is there (step 3's attach path).
|
|
123
|
-
(`npx @wix/cli@latest whoami`; login via the device-code flow — surface the URL+code, never
|
|
124
|
-
read tokens into context).
|
|
140
|
+
is there (step 3's attach path).
|
|
125
141
|
3. **Set up the project, in its folder** — one deterministic call, the same for an empty folder
|
|
126
142
|
and for a project already on disk; **the folder decides** what it does:
|
|
127
143
|
|
|
@@ -129,13 +145,15 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
129
145
|
node <SKILL_ROOT>/install/setup.mjs --vertical <vertical> [--plan plan.json] [--business-name "<Brand>"]
|
|
130
146
|
```
|
|
131
147
|
|
|
132
|
-
- **Empty** (or only loose files: a CSV, a brief) → **create**:
|
|
133
|
-
|
|
148
|
+
- **Empty** (or only loose files: a CSV, a brief) → **create**: `wix create` with the
|
|
149
|
+
vertical's composed template, here; `--business-name` names the site.
|
|
134
150
|
- **A project without `wix.config.json`** (a `package.json`, or an `index.html` at the root:
|
|
135
151
|
someone's Astro, Vite, Next, plain HTML) → **connect**: `init` in place links the folder
|
|
136
152
|
to a new site (the site is named after the folder), then the shipped code deploys into
|
|
137
153
|
the project as it is. Pass `--stack` for the stack you resolved in step 1, and make the
|
|
138
154
|
project what that stack needs on Wix hosting (step 1) before or right after the call.
|
|
155
|
+
With `--stack static` setup also makes `site/` the folder `wix release` uploads and deploys
|
|
156
|
+
the REST layer into `site/js/wix/`; you move the pages, styles and assets in (`guides/reference-mode.md`).
|
|
139
157
|
- **`wix.config.json` and a project** → refuses: the folder is already a Wix project with a
|
|
140
158
|
frontend, whether the CLI made it, a hand wrote it, or this skill built it. Three commands
|
|
141
159
|
from the project root do everything setup would: `deploy.mjs <vertical…> --stack <stack>`
|
|
@@ -146,11 +164,9 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
146
164
|
- **`wix.config.json` and no project** (what `init` leaves in an empty folder) → the site
|
|
147
165
|
exists and has no frontend yet: `attach.mjs` (below), which takes the site from the config,
|
|
148
166
|
reuses its hosting, scaffolds and deploys. No seed: the site owns its content.
|
|
149
|
-
- The brief names a site by id →
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
runs attach with `--hosting self --origin <url>[,<url>]`: no Wix hosting is created, and the
|
|
153
|
-
origins go on the OAuth app's allow-list so checkout can return to them.
|
|
167
|
+
- The brief names a site by id → not this call: read `<SKILL_ROOT>/guides/existing-site.md`
|
|
168
|
+
and follow it (read the site, then `attach.mjs`, which does what setup does against the
|
|
169
|
+
site given; self-hosting and a project already on disk are in there too).
|
|
154
170
|
|
|
155
171
|
`--vertical` is required and picks which shipped code deploys AND which seed runs — use
|
|
156
172
|
the vertical you resolved from the Verticals table. **`--plan` decides whether anything is
|
|
@@ -169,79 +185,15 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
169
185
|
write. `--subfolder` creates it in a new folder named after the business instead, for a current
|
|
170
186
|
folder that must stay as it is; the skills then sit one level above the project.
|
|
171
187
|
|
|
172
|
-
It emits one JSON event per line and returns in **~35s**: **scaffolds** the project
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
jobs** — the dependency install (`npm ci --ignore-scripts || npm install --ignore-scripts`)
|
|
188
|
+
It emits one JSON event per line and returns in **~35s**: **scaffolds** the project from the
|
|
189
|
+
vertical's composed template (`wix create` copies it: the code and its lockfile arrive with
|
|
190
|
+
the scaffold), **deploys** whatever the folder still lacks (patching `package.json` with every
|
|
191
|
+
dependency the code imports), then **starts two detached background jobs** — the dependency install (`npm ci --ignore-scripts || npm install --ignore-scripts`)
|
|
176
192
|
and the **seed** — whose logs and completion markers are in the events. The final
|
|
177
193
|
`ready_for_brand_layer` event carries the project dir, siteId, ready-made dashboard links,
|
|
178
194
|
and both markers. Relay notable events. On an `error` event, recover just that step via the
|
|
179
195
|
manual path below, then continue.
|
|
180
196
|
|
|
181
|
-
**Existing-site runs (the brief names a Wix site by its id — a new frontend for a site that
|
|
182
|
-
already has its content): read the site, then run attach.** First, one call tells you what
|
|
183
|
-
the site is — its name, currency, and the Wix apps installed on it:
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
curl -sS -X POST 'https://www.wixapis.com/_api/dynamic-context/v1/dynamic-context/markdown' \
|
|
187
|
-
-H "Authorization: $(npx -y @wix/cli@latest token)" -H 'Content-Type: application/json' \
|
|
188
|
-
-d '{"siteId": "<siteId>"}'
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
The installed apps name the verticals (Wix Stores → storefront, Wix Bookings → bookings, and
|
|
192
|
-
so on per the Verticals table); the brief picks among them. Then one deterministic call, same
|
|
193
|
-
shape as setup:
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
node <SKILL_ROOT>/install/attach.mjs --site <siteId> --business-name "<site name>" --vertical <vertical>[,<vertical>]
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
`init`/`wix create` always create a site, so they are not used here. attach does what they do
|
|
200
|
-
after creating one — the site's OAuth app, Wix hosting, `wix.config.json` — against the site
|
|
201
|
-
given, scaffolds the CLI's Astro template, deploys the shipped code, and starts the install
|
|
202
|
-
detached. No seed runs and nothing on the site changes: the content is the site's own, read
|
|
203
|
-
live through the deployed data layer. `attached` also says whether a frontend is already
|
|
204
|
-
serving at the site's address (`frontend.serving`, with the release date). When it is, a
|
|
205
|
-
`wix release` from this project replaces it — the old deployment keeps its own address and
|
|
206
|
-
production can be pointed back, but the user's site changes. Tell the user before you release,
|
|
207
|
-
with the address and the date; if the brief did not ask for a new frontend, ask first and
|
|
208
|
-
wait. Say it again when you close.
|
|
209
|
-
|
|
210
|
-
**Get the measure of the site before you design.** Enough to know what you are building
|
|
211
|
-
for: what the chosen verticals will render, roughly how much of it, and what it is like —
|
|
212
|
-
six items in three groups design differently from six hundred. Run the vertical's reader:
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
node <SKILL_ROOT>/references/<vertical>/seed/read-site.mjs --site <siteId> [--limit <n>]
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
It prints one JSON: whether the vertical's app is installed, counts, one page of each entity
|
|
219
|
-
with the fields the pages render, and `calls`, the requests it made with their documentation
|
|
220
|
-
URLs. The lists are one page; the counts are the site.
|
|
221
|
-
|
|
222
|
-
When the brief needs a read the script does not make, it is a build-time call with the
|
|
223
|
-
**site's** token, sent raw as the `Authorization` header (the account token from the call
|
|
224
|
-
above does not scope to a site), minted inline in each command —
|
|
225
|
-
`-H "Authorization: $(npx -y @wix/cli@latest token --site <siteId>)"` — and never written to
|
|
226
|
-
a file, not in the project and not in `/tmp`.
|
|
227
|
-
**The rule above applies in full: not one of these calls comes from memory.** Read the
|
|
228
|
-
request where it is written, then call. Where to read, in this order:
|
|
229
|
-
- **The reader**, `references/<vertical>/seed/read-site.mjs` — the reads the pages make, as
|
|
230
|
-
literal calls with their documentation URLs.
|
|
231
|
-
- **`wix-manage`**, at `.agents/skills/wix-manage/` — REST recipes for managing a site's
|
|
232
|
-
business solutions: exact endpoint, method and payload per operation, curl included. Its
|
|
233
|
-
SKILL.md is the index, by solution; open the recipe for the vertical's solution.
|
|
234
|
-
- **`wix-docs`**, at `.agents/skills/wix-docs/` — the Wix API reference, reached by
|
|
235
|
-
**search, not by browsing files**: the skill folder holds the how-to, not the pages. Open
|
|
236
|
-
its SKILL.md; it gives one `curl` to semantic search (`POST
|
|
237
|
-
/mcp-docs-search/v1/docs/search/markdown`, natural-language `search_term`) that returns
|
|
238
|
-
condensed method docs — endpoint, request example, response shape — and the rule that any
|
|
239
|
-
`dev.wix.com/docs/…` URL plus `.md` is the full page. Progressive: search first, read the
|
|
240
|
-
full document only when the hit lacks what you need.
|
|
241
|
-
If what you opened does not have the call, go to the next; do not try a variant, and do not
|
|
242
|
-
build one from a call you did find: the path and body you send are copied from the output
|
|
243
|
-
you read or they are not sent.
|
|
244
|
-
|
|
245
197
|
**Recovering one step, or adding a solution later:** the pieces run on their own from the
|
|
246
198
|
project root — `node <SKILL_ROOT>/install/deploy.mjs <vertical…> --stack <stack>` (the client
|
|
247
199
|
id is read from `wix.config.json`), ONE `npm ci --ignore-scripts || npm install
|
|
@@ -257,14 +209,14 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
257
209
|
tokens, brand the chrome, and implement the vertical's creative surfaces yourself on the
|
|
258
210
|
shipped hooks (for storefront: your product card + grid, shop surface, PDP surface, and the
|
|
259
211
|
home page) — designed to fit the brief, not copied from the reference components. Read the
|
|
260
|
-
INSTRUCTIONS and the shared floors — `
|
|
261
|
-
`
|
|
212
|
+
INSTRUCTIONS and the shared floors — `templates/shared/DESIGN.md` +
|
|
213
|
+
`templates/shared/CONTENT.md` — now (not earlier — their contracts matter only from this
|
|
262
214
|
step on); the hook/DTO
|
|
263
215
|
contracts are inlined there, so don't open the shipped files themselves. **Author your
|
|
264
216
|
surfaces in as few messages as possible** — batch multiple Write calls in one message
|
|
265
217
|
(components are independent files); don't pay a round-trip per file.
|
|
266
218
|
If the brief needs a core operation that shipped code does not cover, read
|
|
267
|
-
`
|
|
219
|
+
`templates/shared/CUSTOM_OPERATIONS.md` before writing it. Use one documented path and
|
|
268
220
|
implement it; do not reverse-engineer SDK internals.
|
|
269
221
|
5. **When both background jobs have completed** — the install's marker
|
|
270
222
|
(`node_modules/.package-lock.json`) and the seed's (`.seed-exit`) both exist — **verify the
|
|
@@ -289,147 +241,33 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
289
241
|
|
|
290
242
|
## Reference mode — a static site, or a server-rendered app in another language
|
|
291
243
|
|
|
292
|
-
The data layer
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
OAuth app, `wix.config.json`). The site lives in a **subfolder** — `site/` — holding only the
|
|
301
|
-
pages, styles, and `js/`; set `site.outputDirectory` in the config to `"./site"`. `wix release`
|
|
302
|
-
uploads that directory whole, so the project root (config, `plan.json`, seed output, anything
|
|
303
|
-
else) must not be it. Then `node <SKILL_ROOT>/install/deploy.mjs <vertical> --stack static --out
|
|
304
|
-
site` composes the REST layer and the vertical's framework-free stores flat into `site/js/wix/`
|
|
305
|
-
and strips them to browser ESM (comments kept, the `.ts` kept beside the `.js` to read). Pages
|
|
306
|
-
import the vertical's modules from `./js/wix/` in a `<script type="module">`: the stores hold
|
|
307
|
-
the state machines (subscribe, render from `getState()`, call actions), the page holds the
|
|
308
|
-
rendering. The visitor token lives in `localStorage` and is the
|
|
309
|
-
visitor's identity across Wix — never mint one per page. A route is a page plus a query-string
|
|
310
|
-
slug (`item.html?slug=…`). Wix static hosting serves files, not directories: `/shop` does not
|
|
311
|
-
resolve to `shop/index.html`, and there is no routes configuration — name the file and link
|
|
312
|
-
to it. Seed per the vertical's `SEED.md` (Node + the CLI token, no project dependencies).
|
|
313
|
-
Release with `npx @wix/cli@latest release` — no build. Item-page tags come from the entity's
|
|
314
|
-
`seoData`, set after the fetch (`document.title`, the meta description).
|
|
315
|
-
- **Server-rendered, another language (Flask, Laravel, Rails, …).** The same shape as managed
|
|
316
|
-
Astro — pages rendered on the server, the interactive surfaces in the browser — with hosting and
|
|
317
|
-
SEO plumbing theirs. `init` still runs in the project folder; run `deploy.mjs <vertical> --stack
|
|
318
|
-
static` there too: it only needs `wix.config.json` and writes `js/wix/`. Split by where the call
|
|
319
|
-
runs:
|
|
320
|
-
- **Reads render on the server.** Port the vertical's `rest/` read module and its `*-core.ts` to
|
|
321
|
-
the server language: each function is one HTTP call with a literal URL and JSON body, and the
|
|
322
|
-
core carries the rules. That code is tested and proven against live sites — carry its bodies
|
|
323
|
-
over as they are, `fields` arrays and filter keys included (they are not guessable, and a
|
|
324
|
-
near-miss returns empty or unformatted data with no error), and render what Wix returns
|
|
325
|
-
(`formattedAmount`, never a number you format yourself). The shipped JS runs: when in doubt,
|
|
326
|
-
run the module with Node against the same site and compare one entity with your port. Public
|
|
327
|
-
reads need no visitor identity — one anonymous visitor token per server process, refreshed per
|
|
328
|
-
`client.ts`, is enough for them.
|
|
329
|
-
- **Visitor-specific state runs in the browser.** Whatever the vertical does on the visitor's
|
|
330
|
-
behalf (a store's cart and checkout, a booking, an RSVP, a form submit) loads the vertical's
|
|
331
|
-
`js/wix/` module in the templates and talks to Wix from the page, exactly as a static site
|
|
332
|
-
does: the browser owns the visitor token in `localStorage`, so the server handles no
|
|
333
|
-
per-visitor tokens. If that state must run server-side anyway, `client.ts`'s header applies:
|
|
334
|
-
one token set per visitor in the visitor's session, never one process-wide token (that is one
|
|
335
|
-
identity shared by everyone).
|
|
336
|
-
- **A Wix-hosted flow returns to the origin that started it, and only to one it knows.**
|
|
337
|
-
Checkout, a booking payment, a plan purchase all open on Wix and come back to your server;
|
|
338
|
-
the return works only for an origin on the site's OAuth app allow-list. Add the server's
|
|
339
|
-
origin — the dev one while verifying (`http://localhost:<port>`), the public https one when it
|
|
340
|
-
goes live — before the first checkout test: wix-manage's *Manage OAuth Apps* recipe, "Update an
|
|
341
|
-
OAuth App", field `allowedRedirectDomains`, on the app whose id is `appId` in
|
|
342
|
-
`wix.config.json`. Without it the Wix page opens and cannot return. Do it; do not only say it.
|
|
343
|
-
- **Pre-rendered → Wix-hosted.** If the project builds to static HTML (Frozen-Flask, Pelican,
|
|
344
|
-
Hugo, Eleventy, any static-site generator), Wix can host the output: run `deploy.mjs
|
|
345
|
-
<vertical> --stack static --out <build dir>` so `js/wix/` lands inside the build output (or
|
|
346
|
-
copy it there after each build), make the generator emit a page for **every** entity slug the
|
|
347
|
-
vertical's list read returns (walk it by cursor, never only the first page), point
|
|
348
|
-
`site.outputDirectory` at the build folder, `wix release`. The build's own reads use one
|
|
349
|
-
anonymous visitor token for the duration of the build. What Wix hosts is exactly the contents
|
|
350
|
-
of that folder after your last build, served as files: every asset a page references must be
|
|
351
|
-
in there and current — if the pipeline has more than one build step (templates, then a CSS or
|
|
352
|
-
asset bundle), they all run, in order, on every rebuild, or the release carries a stale piece.
|
|
353
|
-
a clean path does not resolve to a folder's `index.html`; name the file and link to it. Generated pages
|
|
354
|
-
sit at different depths, so reference `js/wix/` through one base path (a template variable,
|
|
355
|
-
or root-relative `/js/wix/…`), never `./js/wix/` — a relative path breaks one level down. **The generated page
|
|
356
|
-
is the first paint, not the whole surface**: the vertical's interactive behaviour (a store's
|
|
357
|
-
sort, filters, and cart; a blog's search; a booking flow) still runs client-side on top of it
|
|
358
|
-
from the same `js/wix/` modules, so the vertical's surface contracts in `INSTRUCTIONS.md`
|
|
359
|
-
apply unchanged. Close with the rebuild + release command and one line for the owner: content
|
|
360
|
-
edits made in the dashboard reach the site when that command runs; the browser-side flows are
|
|
361
|
-
live regardless. A running server (live reads on every request) stays theirs to host.
|
|
362
|
-
Then read the vertical's `INSTRUCTIONS.md` for the surfaces and hard rules, and the shared
|
|
363
|
-
`DESIGN.md`/`CONTENT.md`. **Before writing any surface, read the vertical's shipped hooks and
|
|
364
|
-
components** — its `INSTRUCTIONS.md` lists which files and what to take from each. They don't
|
|
365
|
-
deploy on this stack, and they are working, tested code for exactly the behaviour you are about
|
|
366
|
-
to write in your own; rewriting them from prose is where the bugs come from (the runs that
|
|
367
|
-
skipped them shipped a broken quick-add, the run that read them didn't). Both were written for
|
|
368
|
-
the stacks that receive the code, so they speak that stack's dialect: the Tailwind classes in the
|
|
369
|
-
skeletons and the components are one spelling of layout and behaviour rules that hold everywhere
|
|
370
|
-
(a bounded image band on phones, name and price on separate lines, the buy control pinned to the
|
|
371
|
-
tile's bottom, an overlay that locks scroll and returns focus). Take the rules; write them in the
|
|
372
|
-
CSS your stack uses, on a token set you define — nothing here asks you to add Tailwind. Close with run (or
|
|
373
|
-
rebuild) instructions, the live URL when Wix hosts the output, the dashboard link, and — when
|
|
374
|
-
hosting is theirs — which origins are on the OAuth app's allow-list and that the public one
|
|
375
|
-
must be added when the server moves (the step above).
|
|
376
|
-
- Both: the calls in `rest/` are the ones a **visitor token** may make from a page — public reads
|
|
377
|
-
and the visitor's own actions. Anything elevated (writes to content, other people's data) runs
|
|
378
|
-
server-side per `references/shared/CUSTOM_OPERATIONS.md`; the seed's CLI token never belongs in
|
|
379
|
-
a page. A static site has no SSR; neither case has owner-editable item-page SEO through
|
|
380
|
-
`@wix/seo` (tags come from the entity's `seoData`) — say so in the closing message; managed
|
|
381
|
-
Astro stays the recommendation for a public site.
|
|
244
|
+
The shipped data layer exists a second time as a **REST layer** over `fetch`, for the stacks that
|
|
245
|
+
cannot run `app/`: a static site with no bundler, or a server-rendered app in another language
|
|
246
|
+
(Flask, Laravel, Rails). The REST layer deploys for the browser side; the server side ports its
|
|
247
|
+
reads. When step 1 resolves to one of these stacks, read `<SKILL_ROOT>/guides/reference-mode.md`
|
|
248
|
+
before step 3: it holds the mechanics (the `site/` layout and setup's part in it, what runs in the
|
|
249
|
+
browser versus the server, the OAuth allow-list for a self-hosted origin, pre-rendered output) and
|
|
250
|
+
how to close such a run. A public site is still better served by managed Astro; say so when you
|
|
251
|
+
close.
|
|
382
252
|
|
|
383
253
|
## Verticals
|
|
384
254
|
|
|
385
255
|
| The user wants… | Vertical | Playbook |
|
|
386
256
|
| -------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------ |
|
|
387
|
-
| Online store: products, categories, variants, cart, checkout | **storefront** | `
|
|
388
|
-
| Appointments/classes: services, time slots, staff, booking, checkout | **bookings** | `
|
|
389
|
-
| Blog: post feed, categories/tags, rich-content post pages | **blog** | `
|
|
390
|
-
| Structured content collections (directory, recipes, listings) with pages designed per schema | **cms** | `
|
|
391
|
-
| Any visitor-fillable form: contact/enquiry, signup, application, survey — rendered from the live schema | **forms** | `
|
|
392
|
-
| Events: listing, event pages, free RSVP, ticket sales via hosted checkout | **events** | `
|
|
393
|
-
| Member accounts: custom in-app login/sign-up, gated pages, account page | **members** | `
|
|
394
|
-
| Portfolio/showcase: collections of projects, project pages with media galleries | **portfolio** | `
|
|
395
|
-
| Membership/subscription plans: pricing page, plan detail, hosted purchase | **pricing-plans** | `
|
|
396
|
-
| Restaurant: menu with photos, online ordering, table reservations | **restaurants** | `
|
|
257
|
+
| Online store: products, categories, variants, cart, checkout | **storefront** | `templates/storefront/INSTRUCTIONS.md` |
|
|
258
|
+
| Appointments/classes: services, time slots, staff, booking, checkout | **bookings** | `templates/bookings/INSTRUCTIONS.md` |
|
|
259
|
+
| Blog: post feed, categories/tags, rich-content post pages | **blog** | `templates/blog/INSTRUCTIONS.md` |
|
|
260
|
+
| Structured content collections (directory, recipes, listings) with pages designed per schema | **cms** | `templates/cms/INSTRUCTIONS.md` |
|
|
261
|
+
| Any visitor-fillable form: contact/enquiry, signup, application, survey — rendered from the live schema | **forms** | `templates/forms/INSTRUCTIONS.md` |
|
|
262
|
+
| Events: listing, event pages, free RSVP, ticket sales via hosted checkout | **events** | `templates/events/INSTRUCTIONS.md` |
|
|
263
|
+
| Member accounts: custom in-app login/sign-up, gated pages, account page | **members** | `templates/members/INSTRUCTIONS.md` |
|
|
264
|
+
| Portfolio/showcase: collections of projects, project pages with media galleries | **portfolio** | `templates/portfolio/INSTRUCTIONS.md` |
|
|
265
|
+
| Membership/subscription plans: pricing page, plan detail, hosted purchase | **pricing-plans** | `templates/pricing-plans/INSTRUCTIONS.md` |
|
|
266
|
+
| Restaurant: menu with photos, online ordering, table reservations | **restaurants** | `templates/restaurants/INSTRUCTIONS.md` |
|
|
397
267
|
|
|
398
268
|
Verticals compose: a brief that spans several (a restaurant with a blog, a store with member
|
|
399
269
|
accounts) deploys them together — setup takes one vertical; deploy the rest with
|
|
400
270
|
`node <SKILL_ROOT>/install/deploy.mjs <vertical…>` from the project root before the install
|
|
401
|
-
starts, and run each vertical's seed. A request that
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
## Adding a vertical (structure contract)
|
|
406
|
-
|
|
407
|
-
New verticals follow the same layout — the deploy script discovers them automatically (any
|
|
408
|
-
`references/<name>/app/` directory is a vertical):
|
|
409
|
-
|
|
410
|
-
```
|
|
411
|
-
references/<vertical>/
|
|
412
|
-
INSTRUCTIONS.md # playbook: file map, wiring per stack, what you build, hard rules
|
|
413
|
-
app/ # framework-agnostic core — disjoint paths so verticals never collide:
|
|
414
|
-
wix/<vertical>/ # types.ts (DTOs) + data layer (calls via ../sdk, images via ../media)
|
|
415
|
-
# + *-store.ts: the state machines, framework-free (ship on every stack)
|
|
416
|
-
hooks/<vertical>/ # React hooks — thin bindings of the stores (SSR-friendly: accept initial data)
|
|
417
|
-
components/<vertical>/ # routing-free components (plain <a> default + LinkComponent prop)
|
|
418
|
-
styles/global.css # Tailwind v4 + the @theme design tokens (shared token family)
|
|
419
|
-
app-astro/ # Astro overlay importing ONLY from the core:
|
|
420
|
-
pages/… # SSR fetch → DTO props → client:load islands; item pages carry
|
|
421
|
-
# wixMetadata + <SEO.Tags>; chrome islands are client:only
|
|
422
|
-
# (storefront ships no pages — its INSTRUCTIONS carries their skeletons)
|
|
423
|
-
layouts/… # (reuse SiteLayout when it fits)
|
|
424
|
-
seed/ # seed-<vertical>.mjs (REST, mints its own CLI token) + SEED.md
|
|
425
|
-
rest/ # the REST twin of app/wix/<vertical>/: same exports over fetch, importing
|
|
426
|
-
# the same *-core.ts (rules + DTO mappers, type-only imports) and types.ts;
|
|
427
|
-
# flat ./x.js imports — deploy --stack static composes and strips it
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
Core rules the structure encodes: a rule or mapper lives once, in `app/wix/<vertical>/*-core.ts`,
|
|
431
|
-
imported by both transports (a call added to `app/` gets its `rest/` twin in the same PR; `tsc`
|
|
432
|
-
over both is the parity check); raw API entities never leave the data layer (DTOs only);
|
|
433
|
-
client-shared state uses a module-scope store (never React context — it can't span Astro
|
|
434
|
-
islands); every image URL is resolved through `src/wix/media.ts`; every money value is a
|
|
435
|
-
formatted string by the time a component sees it.
|
|
271
|
+
starts, and run each vertical's seed. A request that matches no shipped vertical has no shipped
|
|
272
|
+
code: it is built from the Wix API reference through `wix-docs` (search, then the method page),
|
|
273
|
+
with the same rule as every other call, on the same project and stack.
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawn, spawnSync } from 'node:child_process';
|
|
3
|
+
import { existsSync, mkdirSync, openSync, readFileSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
|
|
7
|
+
// ── tiny event protocol (one JSON object per line) ───────────────────────────
|
|
8
|
+
const emit = (event, extra = {}) =>
|
|
9
|
+
process.stdout.write(JSON.stringify({ event, ...extra }) + '\n');
|
|
10
|
+
const fail = (event, extra = {}) => {
|
|
11
|
+
emit(event, { ok: false, ...extra });
|
|
12
|
+
process.exit(1);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// ── platform-safe binary names (npm/npx are .cmd on Windows) ─────────────────
|
|
16
|
+
const isWin = process.platform === 'win32';
|
|
17
|
+
const bin = (name) => (isWin ? `${name}.cmd` : name);
|
|
18
|
+
const WIX = [bin('npx'), '-y', '@wix/cli@latest']; // run the CLI via npx — no global install/mutation
|
|
19
|
+
|
|
20
|
+
// Force the CLI into non-interactive "agent" mode. Without an agent signal in
|
|
21
|
+
// the env, `wix login` renders an interactive Ink TUI (device code + keypress)
|
|
22
|
+
// that needs a raw TTY and crashes in an agent sandbox — and it never emits the
|
|
23
|
+
// JSON login events this script forwards. The CLI uses @vercel/detect-agent,
|
|
24
|
+
// whose first check is the AI_AGENT env var, so setting it guarantees agent mode
|
|
25
|
+
// (and the awaiting_user/success/logged_in events) for every child we spawn.
|
|
26
|
+
// Respect an existing value so a known runner (claude, cursor, …) keeps its name.
|
|
27
|
+
const AGENT_ENV = { ...process.env, AI_AGENT: process.env.AI_AGENT || 'wix-headless-fast-skill' };
|
|
28
|
+
|
|
29
|
+
// Where the detached login parks its output between runs. It has to outlive this
|
|
30
|
+
// process, so it can't be a pipe and can't live in the project.
|
|
31
|
+
const STATE_DIR = join(tmpdir(), 'wix-headless-fast-login');
|
|
32
|
+
const LOG = join(STATE_DIR, 'login.log');
|
|
33
|
+
const PIDFILE = join(STATE_DIR, 'login.pid');
|
|
34
|
+
|
|
35
|
+
// run a command, capture stdout+stderr (combined), return {status, out}
|
|
36
|
+
function capture(cmd, args, opts = {}) {
|
|
37
|
+
const r = spawnSync(cmd, args, { encoding: 'utf8', shell: isWin, env: AGENT_ENV, ...opts });
|
|
38
|
+
return { status: r.status ?? 1, out: `${r.stdout || ''}${r.stderr || ''}`, error: r.error };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ── 1. CLI reachable (via npx — no install) ──────────────────────────────────
|
|
42
|
+
function checkCli() {
|
|
43
|
+
const r = capture(WIX[0], [...WIX.slice(1), '--version']);
|
|
44
|
+
if (r.status !== 0) fail('cli_unreachable', { detail: r.out.trim().slice(0, 400) });
|
|
45
|
+
// npx interleaves "npm notice …" lines with the version, so don't just take the
|
|
46
|
+
// last line — pick the first semver-looking token, falling back to the last line.
|
|
47
|
+
const version = (r.out.match(/\d+\.\d+\.\d+[^\s]*/) || [])[0] || r.out.trim().split('\n').pop();
|
|
48
|
+
emit('cli_ok', { version });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// ── 2. Reuse an existing session, or start device login ──────────────────────
|
|
52
|
+
const hasExistingSession = () => capture(WIX[0], [...WIX.slice(1), 'whoami']).status === 0;
|
|
53
|
+
|
|
54
|
+
function loginEvents() {
|
|
55
|
+
if (!existsSync(LOG)) return [];
|
|
56
|
+
return readFileSync(LOG, 'utf8')
|
|
57
|
+
.split('\n')
|
|
58
|
+
.map((l) => l.trim())
|
|
59
|
+
.filter(Boolean)
|
|
60
|
+
.map((l) => {
|
|
61
|
+
try {
|
|
62
|
+
return JSON.parse(l);
|
|
63
|
+
} catch {
|
|
64
|
+
return null; // non-JSON CLI chatter
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
.filter((e) => e && e.event);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const alive = (pid) => {
|
|
71
|
+
try {
|
|
72
|
+
process.kill(pid, 0);
|
|
73
|
+
return true;
|
|
74
|
+
} catch {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// A login this machine started earlier may still be waiting on the browser. Reuse
|
|
80
|
+
// its code instead of minting a second one — a new login invalidates nothing, but
|
|
81
|
+
// it hands the user a different code than the one already on their screen.
|
|
82
|
+
function pendingLogin() {
|
|
83
|
+
if (!existsSync(PIDFILE)) return null;
|
|
84
|
+
let state;
|
|
85
|
+
try {
|
|
86
|
+
state = JSON.parse(readFileSync(PIDFILE, 'utf8'));
|
|
87
|
+
} catch {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
if (!state.pid || !alive(state.pid)) return null;
|
|
91
|
+
const ev = loginEvents().find((e) => e.event === 'awaiting_user');
|
|
92
|
+
if (!ev) return null;
|
|
93
|
+
// Don't hand back a code that's about to expire mid-typing.
|
|
94
|
+
const ageSeconds = Math.round((Date.now() - state.startedAt) / 1000);
|
|
95
|
+
if (ageSeconds > (ev.expiresInSeconds ?? 600) - 60) return null;
|
|
96
|
+
return ev;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Detach so the login keeps polling after this process exits. stdio goes to a
|
|
100
|
+
// file, not a pipe: a pipe dies with the parent, and the CLI would get EPIPE.
|
|
101
|
+
function startLogin() {
|
|
102
|
+
mkdirSync(STATE_DIR, { recursive: true });
|
|
103
|
+
writeFileSync(LOG, '');
|
|
104
|
+
const out = openSync(LOG, 'a');
|
|
105
|
+
const child = spawn(WIX[0], [...WIX.slice(1), 'login'], {
|
|
106
|
+
detached: true,
|
|
107
|
+
stdio: ['ignore', out, out],
|
|
108
|
+
env: AGENT_ENV,
|
|
109
|
+
shell: isWin,
|
|
110
|
+
});
|
|
111
|
+
child.on('error', (e) => fail('login_failed', { detail: String(e) }));
|
|
112
|
+
writeFileSync(PIDFILE, JSON.stringify({ pid: child.pid, startedAt: Date.now() }));
|
|
113
|
+
child.unref();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
async function waitForCode(timeoutMs = 60000) {
|
|
117
|
+
const deadline = Date.now() + timeoutMs;
|
|
118
|
+
while (Date.now() < deadline) {
|
|
119
|
+
const events = loginEvents();
|
|
120
|
+
const ev = events.find((e) => e.event === 'awaiting_user');
|
|
121
|
+
if (ev) return ev;
|
|
122
|
+
const bad = events.find((e) => e.event === 'login_failed');
|
|
123
|
+
if (bad) fail('login_failed', bad);
|
|
124
|
+
await new Promise((r) => setTimeout(r, 500));
|
|
125
|
+
}
|
|
126
|
+
const detail = existsSync(LOG) ? readFileSync(LOG, 'utf8').trim().slice(-1500) : '';
|
|
127
|
+
fail('login_failed', {
|
|
128
|
+
detail: detail || `wix login produced no device code within ${timeoutMs / 1000}s.`,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// The next move is the user's, so hand the code back and exit rather than holding
|
|
133
|
+
// the caller open for a browser round-trip. `message` is the sentence to relay.
|
|
134
|
+
function surrenderTo(ev) {
|
|
135
|
+
emit('awaiting_user', {
|
|
136
|
+
...ev,
|
|
137
|
+
message:
|
|
138
|
+
`To connect your Wix account, open ${ev.verificationUri} and enter the code ` +
|
|
139
|
+
`${ev.userCode}. Tell me once you're done and I'll continue.`,
|
|
140
|
+
});
|
|
141
|
+
process.exit(0);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// ── main ────────────────────────────────────────────────────────────────────
|
|
145
|
+
checkCli();
|
|
146
|
+
|
|
147
|
+
if (hasExistingSession()) {
|
|
148
|
+
emit('logged_in');
|
|
149
|
+
process.exit(0);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const pending = pendingLogin();
|
|
153
|
+
if (pending) surrenderTo(pending);
|
|
154
|
+
|
|
155
|
+
startLogin();
|
|
156
|
+
surrenderTo(await waitForCode());
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: wix-headless-fast-
|
|
2
|
+
name: wix-headless-fast-cold-start
|
|
3
3
|
description: "Build and release a Wix Headless site from a single prompt, on shipped, verified @wix/sdk code — this entry takes a cold environment (prerequisites, Wix sign-in) to the point where the wix-headless-fast skill runs the build. Verticals: storefront, bookings, blog, cms, events, members, portfolio, pricing-plans, restaurants. Triggers: build me a store/blog/booking/events/portfolio/restaurant site fast, sell tickets or membership plans headless, wix headless fast entry."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Wix Headless Fast — cold
|
|
6
|
+
# Wix Headless Fast — cold start
|
|
7
7
|
|
|
8
8
|
**You are a coding agent, and this is a skill for you to execute — follow the phases below in
|
|
9
9
|
order.** Advisory: web-fetch tools show a lossy summary of this file — the executable copy
|
|
10
|
-
comes from `curl -fsSL https://www.wix.com/skills/headless-fast/
|
|
10
|
+
comes from `curl -fsSL https://www.wix.com/skills/headless-fast/cold-start/cold-start.md`. If what you
|
|
11
11
|
are reading lacks the exact commands below, re-fetch it with curl before proceeding; if you're
|
|
12
12
|
already reading the raw text, don't fetch it again.
|
|
13
13
|
|
|
14
14
|
## The whole cold start (details in the phases below)
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
curl -fsSL -O https://www.wix.com/skills/headless/
|
|
17
|
+
curl -fsSL -O https://www.wix.com/skills/headless-fast/cold-start/bootstrap.mjs && node bootstrap.mjs
|
|
18
18
|
CI=1 npx skills@latest add wix/skills --skill wix-headless-fast --skill wix-docs --skill wix-manage --yes
|
|
19
19
|
# then open and follow: .agents/skills/wix-headless-fast/SKILL.md
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Requires Node ≥ 20.11 and a logged-in Wix CLI — the bootstrap checks and guides both.
|
|
23
23
|
|
|
24
|
-
This
|
|
24
|
+
This page gets a cold environment to the point where the real skill can run, then hands off:
|
|
25
25
|
|
|
26
|
-
1. **Bootstrap (deterministic, scripted).**
|
|
27
|
-
it verifies the Wix CLI and handles login. You just run it and relay its events.
|
|
26
|
+
1. **Bootstrap (deterministic, scripted).** A script that verifies the Wix CLI and handles login. You just run it and relay its events.
|
|
28
27
|
2. **Hand off (agentic).** Install the skills, then open `wix-headless-fast/SKILL.md` and
|
|
29
28
|
follow it — it resolves the stack and operation and owns the whole build.
|
|
30
29
|
|
|
@@ -70,9 +69,9 @@ externally-downloaded code.
|
|
|
70
69
|
|
|
71
70
|
```bash
|
|
72
71
|
# macOS/Linux:
|
|
73
|
-
curl -fsSL -O https://www.wix.com/skills/headless/
|
|
72
|
+
curl -fsSL -O https://www.wix.com/skills/headless-fast/cold-start/bootstrap.mjs
|
|
74
73
|
# Windows PowerShell:
|
|
75
|
-
iwr https://www.wix.com/skills/headless/
|
|
74
|
+
iwr https://www.wix.com/skills/headless-fast/cold-start/bootstrap.mjs -OutFile bootstrap.mjs
|
|
76
75
|
|
|
77
76
|
node bootstrap.mjs
|
|
78
77
|
```
|
|
@@ -108,10 +107,10 @@ CI=1 npx skills@latest add wix/skills \
|
|
|
108
107
|
They land under `.agents/skills/`. Then **open
|
|
109
108
|
`.agents/skills/wix-headless-fast/SKILL.md` and follow it** — it owns the rest of the run:
|
|
110
109
|
resolve the stack, scaffold, deploy the shipped code, seed, build the brand layer, release.
|
|
111
|
-
(
|
|
112
|
-
|
|
110
|
+
(A request outside the shipped verticals — see its SKILL.md § Verticals — is built from the Wix
|
|
111
|
+
API reference through `wix-docs`, on the same project; SKILL.md says how.)
|
|
113
112
|
|
|
114
113
|
- **Don't** scaffold, install apps, or seed by hand here — the skill does all of that. This
|
|
115
|
-
|
|
114
|
+
page stops at *logged in*.
|
|
116
115
|
- You're already authenticated from Phase 1, so the skill's CLI auth step will pass without
|
|
117
116
|
prompting again.
|