@wix/agent-skills 1.20.1 → 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 +71 -113
- package/skills/wix-app/references/APP_TOOLS.md +2 -1
- package/skills/wix-app/references/BACKEND_EVENT.md +3 -3
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +41 -152
- package/skills/wix-app/references/DASHBOARD_MODAL.md +4 -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/SDK_MODULE_MAP.md +44 -0
- package/skills/wix-app/references/SITE_PLUGIN.md +36 -190
- package/skills/wix-app/references/app-tools/TOOLS.md +3 -1
- package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +21 -0
- 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/ECOM_NAVIGATION.md +17 -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/dashboard-plugin/SLOTS.md +4 -18
- 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-app/references/site-plugin/EXAMPLES.md +1 -1
- package/skills/wix-headless-fast/SKILL.md +144 -221
- package/skills/wix-headless-fast/cold-start/bootstrap.mjs +156 -0
- package/skills/wix-headless-fast/{entry/skill.md → cold-start/cold-start.md} +15 -15
- 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 +35 -0
- package/skills/wix-headless-fast/install/agents-md.mjs +39 -0
- package/skills/wix-headless-fast/install/attach.mjs +161 -86
- 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 +259 -0
- package/skills/wix-headless-fast/install/templates.mjs +168 -0
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-coupon.md +10 -19
- package/skills/wix-manage/references/events/create-wix-event.md +5 -1
- 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/install/fast-path.mjs +0 -181
- package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +0 -301
- 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/seed-blog.mjs +0 -287
- package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +0 -275
- 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/seed-bookings.mjs +0 -302
- package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +0 -353
- 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/seed-cms.mjs +0 -324
- package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +0 -305
- 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/seed-events.mjs +0 -276
- package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +0 -338
- 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/seed-forms.mjs +0 -327
- package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +0 -314
- 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/seed-members.mjs +0 -94
- package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +0 -313
- 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/seed-portfolio.mjs +0 -258
- package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +0 -294
- 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/seed-pricing-plans.mjs +0 -279
- package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +0 -358
- 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/seed-restaurants.mjs +0 -479
- 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/storefront/INSTRUCTIONS.md +0 -608
- 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 -309
- 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 -167
- 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 -124
- package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +0 -525
|
@@ -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
|
|
|
@@ -43,9 +42,10 @@ existing session just reports `logged_in`).
|
|
|
43
42
|
|
|
44
43
|
## Phase 0 — The project's folder, and Node
|
|
45
44
|
|
|
46
|
-
**Work from the folder that
|
|
47
|
-
project; if the current folder
|
|
48
|
-
For **connect**, **iterate** and **existing site**: you are already in it
|
|
45
|
+
**Work from the folder that holds the project, or that will.** For a **new** build: an empty folder
|
|
46
|
+
is the project; if the current folder holds unrelated things, make one named for the business and
|
|
47
|
+
`cd` into it. For **connect**, **iterate** and **existing site**: you are already in it — the
|
|
48
|
+
project's root, where its `package.json` or `index.html` is. Everything below — the
|
|
49
49
|
bootstrap, the skills, the scaffold — lands in this folder, so a later session opened in the project
|
|
50
50
|
finds all of it.
|
|
51
51
|
|
|
@@ -69,9 +69,9 @@ externally-downloaded code.
|
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
71
|
# macOS/Linux:
|
|
72
|
-
curl -fsSL -O https://www.wix.com/skills/headless/
|
|
72
|
+
curl -fsSL -O https://www.wix.com/skills/headless-fast/cold-start/bootstrap.mjs
|
|
73
73
|
# Windows PowerShell:
|
|
74
|
-
iwr https://www.wix.com/skills/headless/
|
|
74
|
+
iwr https://www.wix.com/skills/headless-fast/cold-start/bootstrap.mjs -OutFile bootstrap.mjs
|
|
75
75
|
|
|
76
76
|
node bootstrap.mjs
|
|
77
77
|
```
|
|
@@ -107,10 +107,10 @@ CI=1 npx skills@latest add wix/skills \
|
|
|
107
107
|
They land under `.agents/skills/`. Then **open
|
|
108
108
|
`.agents/skills/wix-headless-fast/SKILL.md` and follow it** — it owns the rest of the run:
|
|
109
109
|
resolve the stack, scaffold, deploy the shipped code, seed, build the brand layer, release.
|
|
110
|
-
(
|
|
111
|
-
|
|
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.)
|
|
112
112
|
|
|
113
113
|
- **Don't** scaffold, install apps, or seed by hand here — the skill does all of that. This
|
|
114
|
-
|
|
114
|
+
page stops at *logged in*.
|
|
115
115
|
- You're already authenticated from Phase 1, so the skill's CLI auth step will pass without
|
|
116
116
|
prompting again.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# An existing site: a new frontend for a site that already has its content
|
|
2
|
+
|
|
3
|
+
Read when the brief names a Wix site by its id. Nothing here is seeded: the site owns its content
|
|
4
|
+
and the frontend reads it live. `<SKILL_ROOT>` is the installed skill folder; the shipped code is
|
|
5
|
+
under `<SKILL_ROOT>/templates/` (SKILL.md, "The run").
|
|
6
|
+
|
|
7
|
+
**Read the site, then run attach.** First, one call tells you what
|
|
8
|
+
the site is — its name, currency, and the Wix apps installed on it:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
curl -sS -X POST 'https://www.wixapis.com/_api/dynamic-context/v1/dynamic-context/markdown' \
|
|
12
|
+
-H "Authorization: $(npx -y @wix/cli@latest token)" -H 'Content-Type: application/json' \
|
|
13
|
+
-d '{"siteId": "<siteId>"}'
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The installed apps name the verticals (Wix Stores → storefront, Wix Bookings → bookings, and
|
|
17
|
+
so on per the Verticals table); the brief picks among them. Then one deterministic call, same
|
|
18
|
+
shape as setup (SKILL.md step 3):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node <SKILL_ROOT>/install/attach.mjs --site <siteId> --business-name "<site name>" --vertical <vertical>[,<vertical>]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`init`/`wix create` always create a site, so they are not used here. attach does what they do
|
|
25
|
+
after creating one — the site's OAuth app, Wix hosting, `wix.config.json` — against the site
|
|
26
|
+
given, copies the first vertical's composed template, deploys the rest, and starts the install
|
|
27
|
+
detached. No seed runs and nothing on the site changes: the content is the site's own, read
|
|
28
|
+
live through the deployed data layer. `attached` also says whether a frontend is already
|
|
29
|
+
serving at the site's address (`frontend.serving`, with the release date). When it is, a
|
|
30
|
+
`wix release` from this project replaces it — the old deployment keeps its own address and
|
|
31
|
+
production can be pointed back, but the user's site changes. Tell the user before you release,
|
|
32
|
+
with the address and the date; if the brief did not ask for a new frontend, ask first and
|
|
33
|
+
wait. Say it again when you close.
|
|
34
|
+
|
|
35
|
+
**Get the measure of the site before you design.** Enough to know what you are building
|
|
36
|
+
for: what the chosen verticals will render, roughly how much of it, and what it is like —
|
|
37
|
+
six items in three groups design differently from six hundred. Run the vertical's reader:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
node <SKILL_ROOT>/templates/<vertical>/seed/read-site.mjs --site <siteId> [--limit <n>]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
It prints one JSON: whether the vertical's app is installed, counts, one page of each entity
|
|
44
|
+
with the fields the pages render, and `calls`, the requests it made with their documentation
|
|
45
|
+
URLs. The lists are one page; the counts are the site.
|
|
46
|
+
|
|
47
|
+
When the brief needs a read the script does not make, it is a build-time call with the
|
|
48
|
+
**site's** token, sent raw as the `Authorization` header (the account token from the call
|
|
49
|
+
above does not scope to a site), minted inline in each command —
|
|
50
|
+
`-H "Authorization: $(npx -y @wix/cli@latest token --site <siteId>)"` — and never written to
|
|
51
|
+
a file, not in the project and not in `/tmp`.
|
|
52
|
+
**The rule above applies in full: not one of these calls comes from memory.** Read the
|
|
53
|
+
request where it is written, then call. Where to read, in this order:
|
|
54
|
+
- **The reader**, `templates/<vertical>/seed/read-site.mjs` — the reads the pages make, as
|
|
55
|
+
literal calls with their documentation URLs.
|
|
56
|
+
- **`wix-manage`**, at `.agents/skills/wix-manage/` — REST recipes for managing a site's
|
|
57
|
+
business solutions: exact endpoint, method and payload per operation, curl included. Its
|
|
58
|
+
SKILL.md is the index, by solution; open the recipe for the vertical's solution.
|
|
59
|
+
- **`wix-docs`**, at `.agents/skills/wix-docs/` — the Wix API reference, reached by
|
|
60
|
+
**search, not by browsing files**: the skill folder holds the how-to, not the pages. Open
|
|
61
|
+
its SKILL.md; it gives one `curl` to semantic search (`POST
|
|
62
|
+
/mcp-docs-search/v1/docs/search/markdown`, natural-language `search_term`) that returns
|
|
63
|
+
condensed method docs — endpoint, request example, response shape — and the rule that any
|
|
64
|
+
`dev.wix.com/docs/…` URL plus `.md` is the full page. Progressive: search first, read the
|
|
65
|
+
full document only when the hit lacks what you need.
|
|
66
|
+
If what you opened does not have the call, go to the next; do not try a variant, and do not
|
|
67
|
+
build one from a call you did find: the path and body you send are copied from the output
|
|
68
|
+
you read or they are not sent.
|
|
69
|
+
|
|
70
|
+
**In a folder that already holds a project** (a `package.json` or `index.html`, no
|
|
71
|
+
`wix.config.json`), attach writes the config into it and deploys for `--stack` instead of
|
|
72
|
+
scaffolding; pass the stack resolved in SKILL.md step 1. **A frontend that will be hosted
|
|
73
|
+
elsewhere** (Vercel, your own server) runs attach with `--hosting self --origin <url>[,<url>]`: no
|
|
74
|
+
Wix hosting is created, and the origins go on the OAuth app's allow-list so checkout can return
|
|
75
|
+
to them; add the public origin when it goes live. Then SKILL.md steps 4 and 5 as for any run,
|
|
76
|
+
with the install marker the only one to wait on.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Reference mode: a static site, or a server-rendered app in another language
|
|
2
|
+
|
|
3
|
+
Read when SKILL.md step 1 resolves to a stack that cannot run `app/`. `<SKILL_ROOT>` is the
|
|
4
|
+
installed skill folder; the shipped code is under `<SKILL_ROOT>/templates/`. Steps 2 to 5 of
|
|
5
|
+
SKILL.md still apply; this file is the mechanics that differ.
|
|
6
|
+
|
|
7
|
+
The data layer ships a second time as a **REST layer**: `templates/shared/rest/` (the auth seam
|
|
8
|
+
`client.ts`, `media.ts`, `config.ts`) and `templates/<vertical>/rest/` (the same exports as the
|
|
9
|
+
vertical's `app/wix/<vertical>/` data layer, over `fetch`), typed against the same `types.ts` and
|
|
10
|
+
importing the same `*-core.ts` rule files as the SDK layer — one implementation of the rules, two
|
|
11
|
+
transports. The vertical's `INSTRUCTIONS.md` names its modules and what each surface does with
|
|
12
|
+
them; this section is the mechanics, the same for every vertical.
|
|
13
|
+
|
|
14
|
+
- **Static site (no bundler).** Step 3's setup with `--stack static` runs `init` in the project
|
|
15
|
+
folder (site, OAuth app, `wix.config.json`), points `site.outputDirectory` at `"./site"`, and
|
|
16
|
+
runs `deploy.mjs <vertical> --stack static --out site`, which composes the REST layer and the
|
|
17
|
+
vertical's framework-free stores flat into `site/js/wix/` and strips them to browser ESM
|
|
18
|
+
(comments kept, the `.ts` kept beside the `.js` to read). The site lives in that **subfolder**,
|
|
19
|
+
`site/`, holding only the pages, styles, assets and `js/`: `wix release` uploads it whole, so the
|
|
20
|
+
project root (config, `plan.json`, seed output, the skills) must not be it; move the pages in.
|
|
21
|
+
(On a project that already has its config, the same `deploy.mjs` call does the deploy.) Pages
|
|
22
|
+
import the vertical's modules from `./js/wix/` in a `<script type="module">`: the stores hold
|
|
23
|
+
the state machines (subscribe, render from `getState()`, call actions), the page holds the
|
|
24
|
+
rendering. The visitor token lives in `localStorage` and is the
|
|
25
|
+
visitor's identity across Wix — never mint one per page. A route is a page plus a query-string
|
|
26
|
+
slug (`item.html?slug=…`). Wix static hosting serves files, not directories: `/shop` does not
|
|
27
|
+
resolve to `shop/index.html`, and there is no routes configuration — name the file and link
|
|
28
|
+
to it. Seed per the vertical's `SEED.md` (Node + the CLI token, no project dependencies).
|
|
29
|
+
Release with `npx @wix/cli@latest release` — no build. Item-page tags come from the entity's
|
|
30
|
+
`seoData`, set after the fetch (`document.title`, the meta description).
|
|
31
|
+
- **Server-rendered, another language (Flask, Laravel, Rails, …).** The same shape as managed
|
|
32
|
+
Astro — pages rendered on the server, the interactive surfaces in the browser — with hosting and
|
|
33
|
+
SEO plumbing theirs. `init` still runs in the project folder; run `deploy.mjs <vertical> --stack
|
|
34
|
+
static` there too: it only needs `wix.config.json` and writes `js/wix/`. Split by where the call
|
|
35
|
+
runs:
|
|
36
|
+
- **Reads render on the server.** Port the vertical's `rest/` read module and its `*-core.ts` to
|
|
37
|
+
the server language: each function is one HTTP call with a literal URL and JSON body, and the
|
|
38
|
+
core carries the rules. That code is tested and proven against live sites — carry its bodies
|
|
39
|
+
over as they are, `fields` arrays and filter keys included (they are not guessable, and a
|
|
40
|
+
near-miss returns empty or unformatted data with no error), and render what Wix returns
|
|
41
|
+
(`formattedAmount`, never a number you format yourself). The shipped JS runs: when in doubt,
|
|
42
|
+
run the module with Node against the same site and compare one entity with your port. Public
|
|
43
|
+
reads need no visitor identity — one anonymous visitor token per server process, refreshed per
|
|
44
|
+
`client.ts`, is enough for them.
|
|
45
|
+
- **Visitor-specific state runs in the browser.** Whatever the vertical does on the visitor's
|
|
46
|
+
behalf (a store's cart and checkout, a booking, an RSVP, a form submit) loads the vertical's
|
|
47
|
+
`js/wix/` module in the templates and talks to Wix from the page, exactly as a static site
|
|
48
|
+
does: the browser owns the visitor token in `localStorage`, so the server handles no
|
|
49
|
+
per-visitor tokens. If that state must run server-side anyway, `client.ts`'s header applies:
|
|
50
|
+
one token set per visitor in the visitor's session, never one process-wide token (that is one
|
|
51
|
+
identity shared by everyone).
|
|
52
|
+
- **A Wix-hosted flow returns to the origin that started it, and only to one it knows.**
|
|
53
|
+
Checkout, a booking payment, a plan purchase all open on Wix and come back to your server;
|
|
54
|
+
the return works only for an origin on the site's OAuth app allow-list. Add the server's
|
|
55
|
+
origin — the dev one while verifying (`http://localhost:<port>`), the public https one when it
|
|
56
|
+
goes live — before the first checkout test: wix-manage's *Manage OAuth Apps* recipe, "Update an
|
|
57
|
+
OAuth App", field `allowedRedirectDomains`, on the app whose id is `appId` in
|
|
58
|
+
`wix.config.json`. Without it the Wix page opens and cannot return. Do it; do not only say it.
|
|
59
|
+
- **Pre-rendered → Wix-hosted.** If the project builds to static HTML (Frozen-Flask, Pelican,
|
|
60
|
+
Hugo, Eleventy, any static-site generator), Wix can host the output: run `deploy.mjs
|
|
61
|
+
<vertical> --stack static --out <build dir>` so `js/wix/` lands inside the build output (or
|
|
62
|
+
copy it there after each build), make the generator emit a page for **every** entity slug the
|
|
63
|
+
vertical's list read returns (walk it by cursor, never only the first page), point
|
|
64
|
+
`site.outputDirectory` at the build folder, `wix release`. The build's own reads use one
|
|
65
|
+
anonymous visitor token for the duration of the build. What Wix hosts is exactly the contents
|
|
66
|
+
of that folder after your last build, served as files: every asset a page references must be
|
|
67
|
+
in there and current — if the pipeline has more than one build step (templates, then a CSS or
|
|
68
|
+
asset bundle), they all run, in order, on every rebuild, or the release carries a stale piece.
|
|
69
|
+
a clean path does not resolve to a folder's `index.html`; name the file and link to it. Generated pages
|
|
70
|
+
sit at different depths, so reference `js/wix/` through one base path (a template variable,
|
|
71
|
+
or root-relative `/js/wix/…`), never `./js/wix/` — a relative path breaks one level down. **The generated page
|
|
72
|
+
is the first paint, not the whole surface**: the vertical's interactive behaviour (a store's
|
|
73
|
+
sort, filters, and cart; a blog's search; a booking flow) still runs client-side on top of it
|
|
74
|
+
from the same `js/wix/` modules, so the vertical's surface contracts in `INSTRUCTIONS.md`
|
|
75
|
+
apply unchanged. Close with the rebuild + release command and one line for the owner: content
|
|
76
|
+
edits made in the dashboard reach the site when that command runs; the browser-side flows are
|
|
77
|
+
live regardless. A running server (live reads on every request) stays theirs to host.
|
|
78
|
+
Then read the vertical's `INSTRUCTIONS.md` for the surfaces and hard rules, and the shared
|
|
79
|
+
`DESIGN.md`/`CONTENT.md`. **Before writing any surface, read the vertical's shipped hooks and
|
|
80
|
+
components** — its `INSTRUCTIONS.md` lists which files and what to take from each. They don't
|
|
81
|
+
deploy on this stack, and they are working, tested code for exactly the behaviour you are about
|
|
82
|
+
to write in your own; rewriting them from prose is where the bugs come from (the runs that
|
|
83
|
+
skipped them shipped a broken quick-add, the run that read them didn't). Both were written for
|
|
84
|
+
the stacks that receive the code, so they speak that stack's dialect: the Tailwind classes in the
|
|
85
|
+
skeletons and the components are one spelling of layout and behaviour rules that hold everywhere
|
|
86
|
+
(a bounded image band on phones, name and price on separate lines, the buy control pinned to the
|
|
87
|
+
tile's bottom, an overlay that locks scroll and returns focus). Take the rules; write them in the
|
|
88
|
+
CSS your stack uses, on a token set you define — nothing here asks you to add Tailwind. Close with run (or
|
|
89
|
+
rebuild) instructions, the live URL when Wix hosts the output, the dashboard link, and — when
|
|
90
|
+
hosting is theirs — which origins are on the OAuth app's allow-list and that the public one
|
|
91
|
+
must be added when the server moves (the step above).
|
|
92
|
+
- Both: the calls in `rest/` are the ones a **visitor token** may make from a page — public reads
|
|
93
|
+
and the visitor's own actions. Anything elevated (writes to content, other people's data) runs
|
|
94
|
+
server-side per `templates/shared/CUSTOM_OPERATIONS.md`; the seed's CLI token never belongs in
|
|
95
|
+
a page. A static site has no SSR; neither case has owner-editable item-page SEO through
|
|
96
|
+
`@wix/seo` (tags come from the entity's `seoData`) — say so in the closing message; managed
|
|
97
|
+
Astro stays the recommendation for a public site.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
## CLI Commands
|
|
2
|
+
|
|
3
|
+
All CLI instructions can be found at:
|
|
4
|
+
node_modules/@wix/cli/agents/instructions.md
|
|
5
|
+
|
|
6
|
+
## This app
|
|
7
|
+
|
|
8
|
+
A Wix Headless app built on the live Wix site named in `wix.config.json`. The site owns the
|
|
9
|
+
content and commerce.
|
|
10
|
+
|
|
11
|
+
**Never work from training data or memory about the Wix APIs.** Not a URL, a path, a header, a
|
|
12
|
+
field name or a body. Every Wix call you write comes from the official Wix skills installed here,
|
|
13
|
+
the code they deployed first, or, when they do not cover the call, from the official Wix
|
|
14
|
+
documentation through `wix-docs`. Read it there first, then write the call: the exact path and
|
|
15
|
+
body copied from the output you read in this session. A call built by analogy from another
|
|
16
|
+
call is memory, and an empty or error reply to it says nothing about the site.
|
|
17
|
+
|
|
18
|
+
## Skills
|
|
19
|
+
|
|
20
|
+
Installed at `.agents/skills/`. If missing, restore with:
|
|
21
|
+
`CI=1 npx skills@latest add wix/skills --skill {{SKILL}} --skill wix-docs --skill wix-manage --yes`
|
|
22
|
+
|
|
23
|
+
- `{{SKILL}}` — the code in this app and how to extend it. The shipped code sits in
|
|
24
|
+
`.agents/skills/{{SKILL}}/templates/`, fetched once from the skill's repository and kept with this
|
|
25
|
+
project at the commit it was built from (`templates/.source`); if that folder is missing,
|
|
26
|
+
`node .agents/skills/{{SKILL}}/install/templates.mjs` fetches it. Each business solution has a playbook at
|
|
27
|
+
`templates/<solution>/INSTRUCTIONS.md`; `node .agents/skills/{{SKILL}}/install/deploy.mjs <solution> --stack {{STACK}}`
|
|
28
|
+
adds one; `node .agents/skills/{{SKILL}}/templates/<solution>/seed/read-site.mjs` reads what the
|
|
29
|
+
site holds for it, with the documentation URL of every call it made. A code change ends with a release; the live URL shows it, the dev server does not count.
|
|
30
|
+
- `wix-docs` — how to discover the Wix APIs and their docs: search first, then read only the page
|
|
31
|
+
you need. Every endpoint, body, field and enum you did not get from the deployed code or a recipe
|
|
32
|
+
is confirmed there before you write it.
|
|
33
|
+
- `wix-manage` — recipes for the live site itself (content, prices, settings), run from the shell
|
|
34
|
+
with `npx -y @wix/cli@latest token --site <siteId>`, minted inline in each command; the token
|
|
35
|
+
never lands in a file anywhere (not the project, not `/tmp`) nor in client code.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Writes a new project's agent config files — AGENTS.md, CLAUDE.md (an import of it),
|
|
2
|
+
// .gemini/settings.json. The AGENTS.md text is the file beside this one, `install/AGENTS.md`,
|
|
3
|
+
// with {{SKILL}} (the installed skill folder's name) and {{STACK}} filled in. It keeps the CLI's
|
|
4
|
+
// shape (the CLI commands pointer `wix create` writes) and says what the CLI's cannot: which skills
|
|
5
|
+
// this project carries, where, how to restore them, and the one rule about Wix calls.
|
|
6
|
+
// `wix create` writes its own set only when @wix/cli resolves from the project's node_modules at
|
|
7
|
+
// scaffold time; setup scaffolds with --skip-install and attach never runs the CLI scaffold,
|
|
8
|
+
// so we write them. Fill-only: a file that exists is left alone.
|
|
9
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { dirname, join } from "node:path";
|
|
11
|
+
import { fileURLToPath } from "node:url";
|
|
12
|
+
|
|
13
|
+
const TEMPLATE = join(dirname(fileURLToPath(import.meta.url)), "AGENTS.md");
|
|
14
|
+
|
|
15
|
+
// The three files, as the CLI names them. Exported so setup can drop the CLI's own copies from
|
|
16
|
+
// the scaffold before moving it up (ours replaces them; a file the USER already has is kept).
|
|
17
|
+
export const AGENT_CONFIG_FILES = ["AGENTS.md", "CLAUDE.md", ".gemini"];
|
|
18
|
+
|
|
19
|
+
export function writeAgentsMd(projectDir, vars) {
|
|
20
|
+
const written = [], kept = [];
|
|
21
|
+
const agents = join(projectDir, "AGENTS.md");
|
|
22
|
+
if (existsSync(agents)) kept.push("AGENTS.md");
|
|
23
|
+
else {
|
|
24
|
+
const text = readFileSync(TEMPLATE, "utf8").replace(/\{\{(\w+)\}\}/g, (_, k) => vars[k.toLowerCase()] ?? "");
|
|
25
|
+
writeFileSync(agents, text); written.push("AGENTS.md");
|
|
26
|
+
}
|
|
27
|
+
const claude = join(projectDir, "CLAUDE.md");
|
|
28
|
+
if (existsSync(claude)) kept.push("CLAUDE.md");
|
|
29
|
+
else { writeFileSync(claude, "@AGENTS.md"); written.push("CLAUDE.md"); }
|
|
30
|
+
const gemini = join(projectDir, ".gemini", "settings.json");
|
|
31
|
+
if (existsSync(gemini)) kept.push(".gemini/settings.json");
|
|
32
|
+
else {
|
|
33
|
+
mkdirSync(join(projectDir, ".gemini"), { recursive: true });
|
|
34
|
+
writeFileSync(gemini, JSON.stringify({ contextFileName: "AGENTS.md" }, null, 2) + "\n");
|
|
35
|
+
written.push(".gemini/settings.json");
|
|
36
|
+
}
|
|
37
|
+
// kept: the folder already had its own — left untouched, so it says nothing about these skills
|
|
38
|
+
return { written, kept };
|
|
39
|
+
}
|