@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
|
@@ -12,9 +12,43 @@ Treat a broad request such as "How can I improve my Google Ads campaign?" as a C
|
|
|
12
12
|
|
|
13
13
|
This differs from [Get AI Campaign Suggestions](get-campaign-suggestions.md), which generates keywords, budgets, locations, copy, images, and other inputs used while **building** a campaign. Do not route pre-campaign keyword, budget, creative, or targeting generation here.
|
|
14
14
|
|
|
15
|
+
## Present every guide as an actionable plan
|
|
16
|
+
|
|
17
|
+
Every response that presents a retrieved or supplied guide must use the actionable structure below. Do not wait for the user to ask for links, more detail, or a richer guide.
|
|
18
|
+
|
|
19
|
+
1. On the first batch, start with the campaign name when known and link `campaignSuccessGuide.url` as the analyzed landing page when present. Do not repeat that context on later batches in the same conversation.
|
|
20
|
+
2. Filter to `OPEN` suggestions and preserve their API priority order. Hide `COMPLETED` suggestions and tracking-status words unless the user explicitly asks what they completed.
|
|
21
|
+
3. Show at most three not-yet-shown `OPEN` suggestions in a single-column numbered list under **Start here**, with a user-facing label and one concrete next step each.
|
|
22
|
+
4. When at least one suggestion in the visible batch has supported agent work, add one **I can help** block that groups what the agent can perform after approval.
|
|
23
|
+
5. When at least one suggestion in the visible batch has a navigation destination that should be shown now, finish with a **Next actions** block containing each destination exactly once. Use an absolute Markdown link when its exact URL is available. When an Editor URL cannot be resolved through the single attempt described below, write **Go to the Editor** once as plain guidance instead of omitting the destination or guessing a URL.
|
|
24
|
+
6. If unshown `OPEN` suggestions remain, close by saying this batch contains the highest-priority remaining tasks and invite the user to see the next batch. A request for more is approval to show the next three; do not ask another confirmation question first.
|
|
25
|
+
|
|
26
|
+
### Fast path when the guide is already supplied
|
|
27
|
+
|
|
28
|
+
When the user supplies or paraphrases the guide recommendations, build the response from that information before doing any other discovery:
|
|
29
|
+
|
|
30
|
+
1. Treat “still need to” and equivalent wording as `OPEN`, and anything the user says is marked complete as `COMPLETED`.
|
|
31
|
+
2. Hide completed items, select the first three open items in the supplied order, and note only whether more open items remain. Do not name a later-batch item in the invitation.
|
|
32
|
+
3. Do not resolve the campaign, list campaigns, retrieve or create the guide, query analytics, inspect action APIs, or read linked action recipes. Those calls cannot improve a guide the user already supplied. The only exception is the campaign identity resolution required by [Google Ads Dashboard Navigation](google-ads-dashboard-navigation.md) after the user explicitly chooses to manage Search Themes manually.
|
|
33
|
+
4. Resolve only navigation needed by the visible batch, using existing site context or the single site-metadata attempt below, then return the actionable plan immediately.
|
|
34
|
+
|
|
35
|
+
Track which suggestion types have been shown during the current conversation so later batches continue instead of repeating. When a refreshed guide contains a newly opened suggestion, place it among the unshown items by the API's current priority order. When a suggestion changes from `COMPLETED` back to `OPEN`, treat it as unshown so the reopened task appears again.
|
|
36
|
+
|
|
37
|
+
Omit **I can help** or **Next actions** when that section would be empty.
|
|
38
|
+
|
|
39
|
+
Use Markdown that reads top to bottom. Never use a table, grid, columns, or side-by-side layout for suggestions. Suggestion labels and next steps are content, not controls: do not turn them into links or conversational actions. A manual task stays plain text and points to the shared destination in **Next actions**.
|
|
40
|
+
|
|
41
|
+
Keep navigation and delegated work distinct:
|
|
42
|
+
|
|
43
|
+
- Navigation opens a destination and uses an absolute Markdown link such as `[Go to Editor](https://...)` when the exact URL is known. The plain **Go to the Editor** fallback is destination guidance, not a link or a suggested follow-up message.
|
|
44
|
+
- Delegated work asks the agent to do something it actually supports. Group these offers in prose. If suggesting a conversational follow-up, include at most one for the highest-priority supported `OPEN` item and phrase it as an explicit request, such as **Draft FAQ content for me** or **Inspect my site speed**, never as the bare task label **Add an FAQ section**.
|
|
45
|
+
- Only suggestions in the visible `OPEN` batch create navigation or offers. Do not offer work or add a destination for a hidden later-batch or `COMPLETED` suggestion.
|
|
46
|
+
|
|
47
|
+
If there are no `OPEN` suggestions, say that nothing currently needs attention without listing completed items, and omit **I can help** and **Next actions**. If all open suggestions have already been shown in this conversation, say that every currently open task has been covered.
|
|
48
|
+
|
|
15
49
|
## Resolve the campaign
|
|
16
50
|
|
|
17
|
-
The guide endpoints require a campaign UUID, but users often provide only a campaign name or say "my campaign." Google Ads calls operate on the current Wix site from the call context; the site is not a request-body field. Use an already-selected site context without asking the user to repeat it. If there is no unambiguous current site, ask which site to use instead of probing several sites. Follow the rest of this resolution flow only when retrieving or updating a guide. If the conversation already contains the guide recommendations and the user only wants them presented, do not block the action plan on campaign identity; resolve only the site context needed for relevant navigation.
|
|
51
|
+
The guide endpoints require a campaign UUID, but users often provide only a campaign name or say "my campaign." Google Ads calls operate on the current Wix site from the call context; the site is not a request-body field. Use an already-selected site context without asking the user to repeat it. If there is no unambiguous current site, ask which site to use instead of probing several sites. Follow the rest of this resolution flow only when retrieving or updating a guide. If the conversation already contains the guide recommendations and the user only wants them presented, do not block the action plan on campaign identity; resolve only the site context needed for relevant navigation. When the user explicitly chooses manual Search Themes management, resolve its campaign-scoped destination through [Google Ads Dashboard Navigation](google-ads-dashboard-navigation.md), not this guide-retrieval flow.
|
|
18
52
|
|
|
19
53
|
Site listing is for resolving navigation metadata only. Never use account-wide site listing to hunt for a campaign before retrieving or updating a guide. A current-site ID in the available context counts as an unambiguous selected site even when the user's prompt does not repeat its name. If no current-site ID is available, ask which site to use.
|
|
20
54
|
|
|
@@ -69,41 +103,49 @@ curl -X POST \
|
|
|
69
103
|
|
|
70
104
|
The first call may analyze the landing page, campaign configuration, and relevant site connections and can take up to **120 seconds**. Later calls normally return the saved guide unless campaign changes require another analysis. Wait for the request; do not retry prematurely. If execution times out with an unknown outcome, report the uncertainty and retrieve the guide later instead of immediately triggering another analysis.
|
|
71
105
|
|
|
72
|
-
Present only the suggestions the API returns
|
|
106
|
+
Present only the suggestions the API returns. `suggestions` is already in priority order: preserve the relative order of the visible `OPEN` batch. An empty array means no currently detected items need attention, not an API failure.
|
|
73
107
|
|
|
74
108
|
`OPEN` means pending action. `COMPLETED` means the user marked the item completed; it does **not** mean the API changed the site or campaign for them.
|
|
75
109
|
|
|
76
|
-
##
|
|
77
|
-
|
|
78
|
-
Do not return a bare list of task labels. Turn the returned suggestions into a compact action plan while preserving the API's order:
|
|
110
|
+
## Resolve supported work and navigation
|
|
79
111
|
|
|
80
|
-
|
|
112
|
+
The navigation block is part of each batch, including when the user supplied or paraphrased the recommendations. Before responding, resolve only the destinations required by the visible batch and appropriate at that point in the flow. Resolving navigation is read-only and does not require approval, including when the user says not to change anything yet.
|
|
81
113
|
|
|
82
|
-
|
|
83
|
-
2. One grouped offer for the supported work the agent can perform after approval.
|
|
84
|
-
3. A **Next actions** block after the complete suggestion list and offer, containing each relevant destination link exactly once.
|
|
114
|
+
Use the selected site's `id` and `editUrl` from available site context first. If the current-site ID is known but `editUrl` is absent and a read-only site-listing capability is available, make at most one lookup using [Query Sites](../sites/query-sites.md). Query that exact ID with the verified REST filter below:
|
|
85
115
|
|
|
86
|
-
|
|
116
|
+
```bash
|
|
117
|
+
curl -X POST 'https://www.wixapis.com/site-list/v2/sites/query' \
|
|
118
|
+
-H 'Authorization: <ACCOUNT_AUTH>' \
|
|
119
|
+
-H 'Content-Type: application/json' \
|
|
120
|
+
-d '{
|
|
121
|
+
"query": {
|
|
122
|
+
"filter": {
|
|
123
|
+
"id": {
|
|
124
|
+
"$in": ["<metaSiteId>"]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"cursorPaging": {
|
|
128
|
+
"limit": 1
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}'
|
|
132
|
+
```
|
|
87
133
|
|
|
88
|
-
|
|
89
|
-
2. For every returned suggestion, show its user-facing label, tracking status (`Pending` for `OPEN`, `Marked complete` for `COMPLETED`), and one concrete next step. Do not show enum values unless they help resolve an ambiguity.
|
|
90
|
-
3. For each `OPEN` item, distinguish work the agent can help perform from work the user must finish in Wix. Prefer an offer to do supported work over instructions that make the user do the same operation manually.
|
|
91
|
-
4. Do not offer work for `COMPLETED` items unless the user asks to reopen them.
|
|
92
|
-
5. Put each unique navigation link after the suggestions as a destination-specific CTA. Do not group every URL under a generic **Open in Wix** label or reuse that label for unrelated destinations. Name the actual page or action—for example, **Go to Editor**, **Go to Google Ads**, or **Connect Google Business Profile**. Deduplicate by destination: if two or ten tasks require the Editor, include the Editor CTA **once**, at the bottom, and never repeat it beside individual tasks. Apply the same deduplication to the Google Ads dashboard or any other shared destination.
|
|
134
|
+
The `id` filter requires the Wix Query Language operator object shown above. Do not send primitive equality such as `"id": "<metaSiteId>"`; the endpoint rejects that shape as a malformed filter. Read `editUrl` and `editorType` only from the returned site whose `id` exactly matches the current-site ID. This is the only navigation lookup: do not count or paginate sites, search by name, inspect other sites for campaigns, read alternative navigation docs, or try another endpoint. If the lookup is unavailable, returns no exact site, or returns no usable Editor URL, continue with plain **Go to the Editor** guidance instead of doing more discovery.
|
|
93
135
|
|
|
94
|
-
|
|
136
|
+
When no current-site ID is known, present the tasks that do not require navigation immediately and ask which site's CTA to add. Do not enumerate an account to guess the site.
|
|
95
137
|
|
|
96
138
|
### Which action to offer
|
|
97
139
|
|
|
98
140
|
| Suggestion types | Response behavior |
|
|
99
141
|
| --- | --- |
|
|
100
|
-
| `CLEAR_CTA_COPY`, `ABOVE_THE_FOLD_CTA`, `HEADER_MATCH`, `CONVERSION_POINT`, `GOOGLE_REVIEWS`, `TESTIMONIAL`, `CONTACT_AND_CREDIBILITY`, `FAQ_SECTION`, `MINIMIZE_FORM_FIELDS`, `SOCIAL_CHANNELS` | These change visible landing-page content. Briefly describe the edit and point to the single **Go to Editor** CTA after the suggestions.
|
|
101
|
-
| `MOBILE_OPTIMIZATION`, `SITE_SPEED` | Offer to inspect the problem and recommend a concrete fix first
|
|
102
|
-
| `GOOGLE_ADS_SEARCH_THEMES` | Offer to generate relevant search themes, show the proposed set, and apply the approved set to the existing campaign by following [Get AI Campaign Suggestions](get-campaign-suggestions.md) and [Manage Campaign Lifecycle](manage-campaign-lifecycle.md). Updating the campaign is a mutation, so
|
|
142
|
+
| `CLEAR_CTA_COPY`, `ABOVE_THE_FOLD_CTA`, `HEADER_MATCH`, `CONVERSION_POINT`, `GOOGLE_REVIEWS`, `TESTIMONIAL`, `CONTACT_AND_CREDIBILITY`, `FAQ_SECTION`, `MINIMIZE_FORM_FIELDS`, `SOCIAL_CHANNELS` | These change visible landing-page content. Briefly describe the edit and point to the single **Go to Editor** CTA after the suggestions. When the agent can safely prepare useful material such as FAQ content, CTA copy, or a heading, offer to draft it after approval and explain that the user applies the final change in the Editor. Do not imply that marking the suggestion complete will edit the page. |
|
|
143
|
+
| `MOBILE_OPTIMIZATION`, `SITE_SPEED` | Offer to inspect the problem and recommend a concrete fix first, then explain that the user applies the resulting site change. These broad findings are not safe one-click mutations. Include the single Editor destination when the resulting work belongs there. Do not promise an improvement before identifying the actual cause. |
|
|
144
|
+
| `GOOGLE_ADS_SEARCH_THEMES` | Offer first to generate relevant search themes, show the proposed set, and apply the approved set to the existing campaign by following [Get AI Campaign Suggestions](get-campaign-suggestions.md) and [Manage Campaign Lifecycle](manage-campaign-lifecycle.md). Updating the campaign is a mutation, so wait for approval of the proposed set. Do not show a navigation link while this agent-performed offer is pending. If the user explicitly prefers to add the themes manually, provide the campaign-scoped **Add Search Themes** link described below instead. |
|
|
103
145
|
| `GOOGLE_MERCHANT_CENTER_CONNECTION` | Offer to link the Merchant Center account using the account flow below. Reuse an already-linked Merchant Center account ID when present; otherwise ask the user for the ID. Get approval before the account update. Explain that the link begins as `PENDING` and its owner may still need to approve it in Google. |
|
|
104
146
|
| `GOOGLE_BUSINESS_PROFILE_CONNECTION` | Offer to check the connection and start it by following [Connect a Wix Site to Google Business Profile](../google-business-profile/connect-google-business-profile.md). Be explicit that the agent can initiate the flow and provide its authorization URL, but the site owner must finish Google's consent in their browser. |
|
|
105
147
|
|
|
106
|
-
After the tasks, make one closing offer that groups the supported actions you can take; do not append a separate approval question to every item.
|
|
148
|
+
After the tasks, make one closing offer that groups the supported actions you can take; do not append a separate approval question to every item or turn every suggestion into a follow-up action.
|
|
107
149
|
|
|
108
150
|
For a Merchant Center connection, first read the selected site's Google Ads account:
|
|
109
151
|
|
|
@@ -116,32 +158,36 @@ Read `account.id`, `account.merchantCenterAccountId`, and `account.merchantCente
|
|
|
116
158
|
|
|
117
159
|
### Build destination-specific CTAs
|
|
118
160
|
|
|
119
|
-
- **Editor:** Include this only when at least one
|
|
120
|
-
- **
|
|
121
|
-
- **Other destinations:** Name the
|
|
122
|
-
-
|
|
161
|
+
- **Editor:** Include this only when at least one suggestion in the visible batch requires landing-page or mobile editing. Use the exact `editUrl` from the selected site context or the single matching result from the site-navigation lookup described above; prefix a relative value with `https://manage.wix.com`. Never construct or guess an Editor URL, substitute the public landing-page URL, or attach a loosely related Help Center article. If the single lookup is unavailable, returns no exact match, or returns `EDITORLESS` or no `editUrl`, write **Go to the Editor** once as plain text in **Next actions**. Do not say that the link is unavailable, retry, or keep searching. Label a resolved link **Go to Editor** or name the more specific editing action; do not label it **Open in Wix**.
|
|
162
|
+
- **Search Themes:** Do not add a Google Ads link merely because `GOOGLE_ADS_SEARCH_THEMES` is open. Offer the agent-performed update first. Only after the user explicitly chooses the manual path, follow [Google Ads Dashboard Navigation](google-ads-dashboard-navigation.md) to resolve and link the campaign's Keywords Manager. Reuse the campaign ID already established in the Success Guide conversation. Label the link **Add Search Themes**. If the user states that manual preference in the initial request, include the link in that batch; if they choose it later, return the link then.
|
|
163
|
+
- **Other destinations:** Include a destination only when an `OPEN` item has a verified existing URL. Name the page or action precisely, such as **Open Forms dashboard** or **Review site speed**. Never make unrelated links look like the same generic action.
|
|
164
|
+
- **Connection flows:** Google Business Profile and Merchant Center recommendations create an offer in **I can help**, not an initial navigation link. Return a task-specific authorization URL only after the user accepts the offer and the connection flow creates it.
|
|
165
|
+
- Include only destinations appropriate for suggestions in the visible batch and list each URL once.
|
|
123
166
|
|
|
124
|
-
Example
|
|
167
|
+
Example with several Editor tasks, supported connection work, and a completed campaign task:
|
|
125
168
|
|
|
126
169
|
```markdown
|
|
127
|
-
## Campaign success guide
|
|
170
|
+
## Campaign success guide — Request a Quote campaign
|
|
128
171
|
Landing page: [Request a quote](https://www.example.com/request-a-quote)
|
|
129
172
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
173
|
+
### Start here
|
|
174
|
+
1. **Add contact details**
|
|
175
|
+
Show a phone number and email address where visitors can easily find them.
|
|
176
|
+
2. **Add an FAQ section**
|
|
177
|
+
Answer the questions prospective customers ask before contacting you.
|
|
178
|
+
3. **Connect Google Business Profile**
|
|
179
|
+
Link the profile so campaign and business signals stay connected.
|
|
136
180
|
|
|
137
|
-
I can
|
|
181
|
+
### I can help
|
|
182
|
+
I can draft the FAQ content and check and start the Business Profile connection after you approve. You will need to finish Google's consent in your browser. I can start with the FAQ draft.
|
|
138
183
|
|
|
139
184
|
### Next actions
|
|
140
|
-
- [Go to Editor]({
|
|
141
|
-
|
|
185
|
+
- [Go to Editor]({absoluteEditUrl})
|
|
186
|
+
|
|
187
|
+
These are the highest-priority open tasks. Would you like to see the next batch?
|
|
142
188
|
```
|
|
143
189
|
|
|
144
|
-
|
|
190
|
+
The Editor URL appears once even though several recommendations use it. If the exact URL cannot be resolved in one attempt, replace that linked line with plain **Go to the Editor** guidance. Merchant Center is deferred to the next batch, the completed Search Themes item is hidden, and the Business Profile recommendation creates an agent offer rather than an unverified navigation link.
|
|
145
191
|
|
|
146
192
|
## Translate suggestion types for the user
|
|
147
193
|
|
|
@@ -215,7 +261,7 @@ Reopen the same item by sending:
|
|
|
215
261
|
}
|
|
216
262
|
```
|
|
217
263
|
|
|
218
|
-
The response wraps the updated guide as `{ "campaignSuccessGuide": { ... } }`. Treat that returned guide as the new source of truth:
|
|
264
|
+
The response wraps the updated guide as `{ "campaignSuccessGuide": { ... } }`. Treat that returned guide as the new source of truth: confirm the changed tracking status in plain language, hide completed items from the task list, and present up to the next three not-yet-shown `OPEN` suggestions in priority order. Treat a reopened item as unshown so it can appear again. Do not claim the underlying recommendation was implemented. Do not update multiple items unless the user's wording clearly identifies all of them.
|
|
219
265
|
|
|
220
266
|
If a mutation times out with an unknown outcome, do not retry automatically. Retrieve the guide later to determine the current status first.
|
|
221
267
|
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
// Fast path for a managed CREATE run — one deterministic call from "plan exists" to
|
|
2
|
-
// "brand layer can start". Composes the pieces that also remain individually runnable
|
|
3
|
-
// (deploy.mjs, the vertical's seed module); use those directly to recover a failed step,
|
|
4
|
-
// or for connect/iterate runs (which must NOT scaffold and don't use this script).
|
|
5
|
-
//
|
|
6
|
-
// node <SKILL_ROOT>/install/fast-path.mjs --business-name "<Brand>" --plan plan.json \
|
|
7
|
-
// --vertical <storefront|bookings|…> [--stack astro] [--subfolder [--folder-name <npm-safe-name>]]
|
|
8
|
-
//
|
|
9
|
-
// The project is created in the CURRENT DIRECTORY — the folder the entry had the agent work from,
|
|
10
|
-
// which already holds the installed skills (`.agents/skills/`), so the project is self-contained
|
|
11
|
-
// and a later session opened in it finds them. `--subfolder` (opt-in) leaves it in a new folder
|
|
12
|
-
// named after the business instead, for a current folder that must stay as it is.
|
|
13
|
-
//
|
|
14
|
-
// It emits ONE JSON event per line and exits in ~35s with BOTH long steps — the dependency
|
|
15
|
-
// install AND the seed — running detached in the background (logs + completion markers
|
|
16
|
-
// reported in the final event), so the caller can build the brand layer while they finish.
|
|
17
|
-
// Steps: scaffold (Wix CLI; requires a logged-in session) → deploy shipped code + deps +
|
|
18
|
-
// lockfile → start `npm ci || npm install` detached → start the seed detached.
|
|
19
|
-
import { spawn, spawnSync } from "node:child_process";
|
|
20
|
-
import { existsSync, openSync, readFileSync, readdirSync, renameSync, rmSync } from "node:fs";
|
|
21
|
-
import { dirname, join, resolve } from "node:path";
|
|
22
|
-
import { fileURLToPath } from "node:url";
|
|
23
|
-
|
|
24
|
-
const SKILL_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
25
|
-
|
|
26
|
-
const emit = (event, extra = {}) => console.log(JSON.stringify({ event, ...extra }));
|
|
27
|
-
const fail = (step, detail) => {
|
|
28
|
-
emit("error", { step, detail: String(detail).slice(0, 600) });
|
|
29
|
-
process.exit(1);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// ---- args ---------------------------------------------------------------------------------------
|
|
33
|
-
const argv = process.argv.slice(2);
|
|
34
|
-
const flag = (name) => {
|
|
35
|
-
const i = argv.indexOf(`--${name}`);
|
|
36
|
-
return i !== -1 && argv[i + 1] && !argv[i + 1].startsWith("--") ? argv[i + 1] : null;
|
|
37
|
-
};
|
|
38
|
-
const businessName = flag("business-name");
|
|
39
|
-
const planPath = flag("plan");
|
|
40
|
-
const vertical = flag("vertical");
|
|
41
|
-
const stack = flag("stack") ?? "astro";
|
|
42
|
-
// Opt-in: keep the project in a subfolder instead of the current directory.
|
|
43
|
-
const subfolder = argv.includes("--subfolder");
|
|
44
|
-
// --vertical is REQUIRED: a defaulted vertical deploys the wrong code and runs the wrong
|
|
45
|
-
// seed against the plan — fail loudly with the discovered choices instead.
|
|
46
|
-
const knownVerticals = readdirSync(join(SKILL_ROOT, "references"), { withFileTypes: true })
|
|
47
|
-
.filter((d) => d.isDirectory() && d.name !== "shared" && existsSync(join(SKILL_ROOT, "references", d.name, "app")))
|
|
48
|
-
.map((d) => d.name);
|
|
49
|
-
if (!businessName || !planPath || !vertical) {
|
|
50
|
-
fail("args", `usage: fast-path.mjs --business-name "<Brand>" --plan plan.json --vertical <${knownVerticals.join("|")}> [--stack astro]`);
|
|
51
|
-
}
|
|
52
|
-
if (!knownVerticals.includes(vertical)) {
|
|
53
|
-
fail("args", `unknown vertical "${vertical}" — shipped verticals: ${knownVerticals.join(", ")}`);
|
|
54
|
-
}
|
|
55
|
-
if (!existsSync(planPath)) fail("args", `plan file not found: ${planPath}`);
|
|
56
|
-
const plan = JSON.parse(readFileSync(planPath, "utf8"));
|
|
57
|
-
|
|
58
|
-
const folderName =
|
|
59
|
-
flag("folder-name") ??
|
|
60
|
-
businessName.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
|
|
61
|
-
// `let`: the Wix CLI can only scaffold into a subfolder; by default we then move the scaffold up
|
|
62
|
-
// into the current directory and repoint projectDir there, so the detached install/seed and every
|
|
63
|
-
// reported path use the final location.
|
|
64
|
-
let projectDir = resolve(process.cwd(), folderName);
|
|
65
|
-
|
|
66
|
-
// ---- 1 · scaffold -------------------------------------------------------------------------------
|
|
67
|
-
if (existsSync(join(process.cwd(), "wix.config.json"))) {
|
|
68
|
-
fail("scaffold", "the current directory is already a Wix project — this script is for CREATE runs only; use deploy.mjs + the seed module directly");
|
|
69
|
-
}
|
|
70
|
-
if (existsSync(join(projectDir, "wix.config.json"))) {
|
|
71
|
-
emit("scaffold_skipped", { reason: "project already exists", folder: folderName });
|
|
72
|
-
} else {
|
|
73
|
-
emit("scaffolding", { folder: folderName });
|
|
74
|
-
const scaffold = spawnSync(
|
|
75
|
-
"npm",
|
|
76
|
-
// --skip-git: this wrapper composes its own steps and leaves version control to
|
|
77
|
-
// the caller / the enclosing repo; the scaffold's own `git init` + "Initial
|
|
78
|
-
// commit" is noise here, and becomes a nested-repo (submodule gitlink) hazard
|
|
79
|
-
// if the project is later placed inside an existing repo. --skip-install for the
|
|
80
|
-
// same reason: deps install in a detached step below.
|
|
81
|
-
["create", "@wix/new@latest", "--", "headless",
|
|
82
|
-
"--folder-name", folderName, "--business-name", businessName,
|
|
83
|
-
"--site-template", "--skip-install", "--skip-git", "--no-publish"],
|
|
84
|
-
{ env: { ...process.env, CI: "1" }, encoding: "utf8", timeout: 300_000 },
|
|
85
|
-
);
|
|
86
|
-
if (scaffold.status !== 0 || !existsSync(join(projectDir, "wix.config.json"))) {
|
|
87
|
-
fail("scaffold", (scaffold.stderr || scaffold.stdout || "scaffold produced no wix.config.json — is the Wix CLI logged in? (npx @wix/cli@latest whoami)").slice(-600));
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
const wixConfig = JSON.parse(readFileSync(join(projectDir, "wix.config.json"), "utf8"));
|
|
91
|
-
const siteId = wixConfig.siteId ?? wixConfig.projectId;
|
|
92
|
-
emit("scaffolded", { folder: folderName, siteId });
|
|
93
|
-
|
|
94
|
-
// ---- 2 · deploy shipped code + deps + lockfile ---------------------------------------------------
|
|
95
|
-
const deploy = spawnSync(
|
|
96
|
-
"node",
|
|
97
|
-
[
|
|
98
|
-
join(SKILL_ROOT, "install", "deploy.mjs"),
|
|
99
|
-
vertical,
|
|
100
|
-
"--stack",
|
|
101
|
-
stack,
|
|
102
|
-
"--plan",
|
|
103
|
-
resolve(planPath),
|
|
104
|
-
],
|
|
105
|
-
{ cwd: projectDir, encoding: "utf8", timeout: 60_000 },
|
|
106
|
-
);
|
|
107
|
-
if (deploy.status !== 0) fail("deploy", deploy.stderr || deploy.stdout);
|
|
108
|
-
let deployResult = {};
|
|
109
|
-
try { deployResult = JSON.parse(deploy.stdout); } catch { /* keep going with raw output below */ }
|
|
110
|
-
if (deployResult.error) fail("deploy", deployResult.error);
|
|
111
|
-
emit("deployed", deployResult);
|
|
112
|
-
|
|
113
|
-
// ---- 2c · place the project in the current directory --------------------------------------------
|
|
114
|
-
// The default. The Wix CLI scaffolds into a subfolder, so the scaffold is moved up into the current
|
|
115
|
-
// directory — the folder that already holds the installed skills — and the subfolder removed. Done
|
|
116
|
-
// HERE, before the detached install below, on purpose: no node_modules exists yet, so the move is
|
|
117
|
-
// instant and cannot collide with a running install. A pure move: the scaffold was created with
|
|
118
|
-
// --skip-git, so there is no nested repo to reconcile — git is whatever the folder already is.
|
|
119
|
-
// Refuses rather than overwrite: an entry that already exists in the current directory stops the
|
|
120
|
-
// move before anything is touched. `--subfolder` skips this step.
|
|
121
|
-
const targetDir = process.cwd();
|
|
122
|
-
if (!subfolder && projectDir !== targetDir) {
|
|
123
|
-
const entries = readdirSync(projectDir);
|
|
124
|
-
const clashes = entries.filter((e) => existsSync(join(targetDir, e)));
|
|
125
|
-
if (clashes.length) {
|
|
126
|
-
fail("place", `the current directory already has: ${clashes.join(", ")} — run with --subfolder to keep the project in ${folderName}/, or start in an empty folder`);
|
|
127
|
-
}
|
|
128
|
-
try {
|
|
129
|
-
for (const entry of entries) renameSync(join(projectDir, entry), join(targetDir, entry));
|
|
130
|
-
rmSync(projectDir, { recursive: true, force: true });
|
|
131
|
-
projectDir = targetDir;
|
|
132
|
-
emit("project_placed", { into: targetDir });
|
|
133
|
-
} catch (e) {
|
|
134
|
-
fail("place", e?.stack || e);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// ---- 3 · start the dependency install, detached --------------------------------------------------
|
|
139
|
-
const installLog = join(projectDir, "npm-install.log");
|
|
140
|
-
const logFd = openSync(installLog, "a");
|
|
141
|
-
const install = spawn("sh", ["-c", "npm ci --ignore-scripts || npm install --ignore-scripts"], {
|
|
142
|
-
cwd: projectDir,
|
|
143
|
-
detached: true,
|
|
144
|
-
stdio: ["ignore", logFd, logFd],
|
|
145
|
-
});
|
|
146
|
-
install.unref();
|
|
147
|
-
emit("install_started", { log: installLog, doneMarker: "node_modules/.package-lock.json" });
|
|
148
|
-
|
|
149
|
-
// ---- 4 · start the seed, detached ----------------------------------------------------------------
|
|
150
|
-
// The seed includes a Wix-side provisioning wait of unpredictable length (10-80s); running it
|
|
151
|
-
// in the caller's foreground would idle the agent for exactly that long. Detach it like the
|
|
152
|
-
// install: result JSON + exit-code marker land as files the caller syncs on before release.
|
|
153
|
-
const seedDir = join(SKILL_ROOT, "references", vertical, "seed");
|
|
154
|
-
const seedName = existsSync(seedDir)
|
|
155
|
-
? readdirSync(seedDir).find((f) => f.startsWith("seed-") && f.endsWith(".mjs"))
|
|
156
|
-
: undefined;
|
|
157
|
-
const seedFile = seedName ? join(seedDir, seedName) : null;
|
|
158
|
-
if (!seedFile) fail("seed", `no seed module found under ${seedDir}`);
|
|
159
|
-
const seedResultFile = join(projectDir, "seed-result.json");
|
|
160
|
-
const seedLog = join(projectDir, "seed.log");
|
|
161
|
-
const seedDoneMarker = join(projectDir, ".seed-exit");
|
|
162
|
-
const planAbs = resolve(planPath);
|
|
163
|
-
const seedChild = spawn(
|
|
164
|
-
"sh",
|
|
165
|
-
["-c", `node "${seedFile}" "${planAbs}" > seed-result.json 2> seed.log; echo $? > .seed-exit`],
|
|
166
|
-
{ cwd: projectDir, detached: true, stdio: "ignore" },
|
|
167
|
-
);
|
|
168
|
-
seedChild.unref();
|
|
169
|
-
emit("seeding_started", { vertical, resultFile: seedResultFile, log: seedLog, doneMarker: seedDoneMarker });
|
|
170
|
-
|
|
171
|
-
// ---- done ----------------------------------------------------------------------------------------
|
|
172
|
-
emit("ready_for_brand_layer", {
|
|
173
|
-
projectDir,
|
|
174
|
-
siteId,
|
|
175
|
-
dashboardUrl: deployResult.dashboardUrl,
|
|
176
|
-
productsUrl: deployResult.productsUrl,
|
|
177
|
-
categoriesUrl: deployResult.categoriesUrl,
|
|
178
|
-
install: { log: installLog, doneMarker: "node_modules/.package-lock.json" },
|
|
179
|
-
seed: { resultFile: "seed-result.json", log: "seed.log", doneMarker: ".seed-exit", success: "file contains 0" },
|
|
180
|
-
next: "theme SiteLayout + write the home page; then wait for BOTH done markers, verify .seed-exit is 0 (else read seed.log and re-run the seed module), build, release",
|
|
181
|
-
});
|