@wix/agent-skills 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +4 -1
- package/skills/wix-app/references/APP_TOOLS.md +134 -0
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +1 -1
- package/skills/wix-app/references/DASHBOARD_PAGE.md +0 -10
- package/skills/wix-app/references/DATA_COLLECTION.md +6 -4
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +28 -7
- package/skills/wix-app/references/SERVICE_PLUGIN.md +12 -10
- package/skills/wix-app/references/STORES_VERSIONING.md +9 -211
- package/skills/wix-app/references/app-tools/TOOLS.md +75 -0
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +5 -0
- package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +2 -2
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +172 -0
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +138 -0
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +172 -0
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +29 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +57 -0
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +33 -2
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +5 -3
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +18 -1
- package/skills/wix-app/references/editor-react-component/PARTS.md +15 -2
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +4 -3
- package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +13 -9
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +4 -0
- package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
- package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +3 -1
- package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +4 -0
- package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +54 -0
- package/skills/wix-app/references/stores/CATEGORIES.md +22 -0
- package/skills/wix-app/references/stores/GET_PRODUCT.md +99 -0
- package/skills/wix-app/references/stores/INVENTORY.md +37 -0
- package/skills/wix-app/references/stores/QUERY.md +119 -0
- package/skills/wix-app/references/stores/WRITE.md +55 -0
- package/skills/wix-docs/SKILL.md +35 -3
- package/skills/wix-headless/SKILL.md +9 -2
- package/skills/wix-headless/entry/bootstrap.mjs +2 -2
- package/skills/wix-headless/entry/skill.md +0 -2
- package/skills/wix-headless/references/CAPABILITIES.md +6 -4
- package/skills/wix-headless/references/CONTENT.md +36 -0
- package/skills/wix-headless/references/DESIGN.md +54 -0
- package/skills/wix-headless/references/DISCOVERY.md +25 -1
- package/skills/wix-headless/references/FEEDBACK.md +16 -5
- package/skills/wix-headless/references/IMAGE_GENERATION.md +10 -0
- package/skills/wix-headless/references/SDK_HANDOFF.md +2 -0
- package/skills/wix-headless/references/SEED.md +3 -1
- package/skills/wix-headless/references/SETUP.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +3 -2
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +42 -2
- package/skills/wix-headless/references/inline-recipes/setup-bookings.md +5 -1
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +1 -1
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +33 -8
- package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +3 -1
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +73 -0
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +38 -2
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +20 -1
- package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +1 -1
- package/skills/wix-headless/references/managed/CONNECT.md +2 -2
- package/skills/wix-headless/references/managed/CREATE.md +15 -1
- package/skills/wix-headless/references/managed/DEPLOYMENT.md +47 -0
- package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +8 -0
- package/skills/wix-headless/references/stripe/DEPLOYMENT.md +8 -0
- package/skills/wix-manage/SKILL.md +131 -12
- package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +41 -0
- package/skills/wix-manage/references/analytics/query-site-analytics.md +66 -9
- package/skills/wix-manage/references/app-installation/app-installation-dashboard-navigation.md +28 -0
- package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -0
- package/skills/wix-manage/references/blog/blog-dashboard-navigation.md +56 -0
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +31 -6
- package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -1
- package/skills/wix-manage/references/bookings/bookings-dashboard-navigation.md +63 -0
- package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +6 -5
- package/skills/wix-manage/references/bookings/create-course-service.md +30 -5
- package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +85 -42
- package/skills/wix-manage/references/cms/cms-dashboard-navigation.md +44 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +31 -3
- package/skills/wix-manage/references/cms/cms-publishing-flow.md +287 -0
- package/skills/wix-manage/references/cms/cms-schema-management.md +33 -1
- package/skills/wix-manage/references/contacts/contacts-dashboard-navigation.md +46 -0
- package/skills/wix-manage/references/contacts/create-a-contact.md +82 -0
- package/skills/wix-manage/references/contacts/update-a-contact.md +119 -0
- package/skills/wix-manage/references/dashboard-navigation/dashboard-navigation.md +82 -0
- package/skills/wix-manage/references/dashboard-navigation/routes.json +1733 -0
- package/skills/wix-manage/references/domains/domains-dashboard-navigation.md +32 -0
- package/skills/wix-manage/references/ecommerce/ecom-pricing.md +4 -4
- package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
- package/skills/wix-manage/references/ecommerce/gift-cards/ecom-gift-cards-goal-sell-gift-cards.md +338 -0
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-discount-rule.md +42 -78
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-bundle-and-save.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md +1 -1
- package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +90 -92
- package/skills/wix-manage/references/events/create-wix-event.md +176 -0
- package/skills/wix-manage/references/events/manage-wix-events.md +174 -0
- package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +44 -0
- package/skills/wix-manage/references/get-paid/get-paid-dashboard-navigation.md +52 -0
- package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +30 -7
- package/skills/wix-manage/references/google-ads/billing-and-payment.md +80 -0
- package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +212 -0
- package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +110 -0
- package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +25 -0
- package/skills/wix-manage/references/google-ads/install-and-create-account.md +155 -0
- package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +63 -0
- package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +155 -0
- package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +225 -144
- package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +19 -10
- package/skills/wix-manage/references/marketing/marketing-dashboard-navigation.md +52 -0
- package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +99 -1
- package/skills/wix-manage/references/pricing-plans/pricing-plans-dashboard-navigation.md +45 -0
- package/skills/wix-manage/references/restaurants/restaurants-dashboard-navigation.md +68 -0
- package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +94 -125
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +48 -9
- package/skills/wix-manage/references/site-properties/site-properties-dashboard-navigation.md +31 -0
- package/skills/wix-manage/references/sites/create-headless-site.md +52 -0
- package/skills/wix-manage/references/sites/create-site-from-template.md +2 -25
- package/skills/wix-manage/references/sites/site-import.md +243 -0
- package/skills/wix-manage/references/sites/sites-dashboard-navigation.md +29 -0
- package/skills/wix-manage/references/stores/add-store-pages-to-site.md +17 -1
- package/skills/wix-manage/references/stores/create-product-from-image.md +8 -6
- package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +16 -10
- package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +26 -8
- package/skills/wix-manage/references/stores/stores-dashboard-navigation.md +65 -0
- package/skills/wix-manage/references/stores/update-product-with-options.md +39 -7
- package/skills/wix-replatform/.publish-manifest.json +8 -0
- package/skills/wix-replatform/SKILL.md +693 -0
- package/skills/wix-replatform/lib/artifact-freshness.js +215 -0
- package/skills/wix-replatform/lib/completion-report.js +200 -0
- package/skills/wix-replatform/lib/config-env.js +59 -0
- package/skills/wix-replatform/lib/execution-manifest.js +185 -0
- package/skills/wix-replatform/lib/execution-state.js +173 -0
- package/skills/wix-replatform/lib/import-recovery.js +313 -0
- package/skills/wix-replatform/lib/local-state.js +642 -0
- package/skills/wix-replatform/lib/orchestration-preflight.js +143 -0
- package/skills/wix-replatform/lib/orchestration-router.js +122 -0
- package/skills/wix-replatform/lib/orchestration-state.js +455 -0
- package/skills/wix-replatform/lib/progress-log.js +224 -0
- package/skills/wix-replatform/lib/progress-log.sh +140 -0
- package/skills/wix-replatform/lib/url-preservation-state.js +391 -0
- package/skills/wix-replatform/resources/rp-discovery/SKILL.md +184 -0
- package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +529 -0
- package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +316 -0
- package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +64 -0
- package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +1114 -0
- package/skills/wix-replatform/resources/rp-mapper/SKILL.md +430 -0
- package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +217 -0
- package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +148 -0
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +378 -0
- package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +183 -0
- package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +478 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +136 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fingerprint.js +310 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +1081 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +618 -0
- package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +949 -0
- package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +196 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +66 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +60 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +95 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +82 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +256 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +249 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +444 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +774 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +71 -0
- package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +632 -0
- package/skills/wix-replatform/resources/rp-target-wix/SPEC-product-reviews-and-blog-authorship.md +330 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +21 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +19 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +39 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +36 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +131 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +21 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +97 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +528 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +13 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +53 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +84 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +25 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +90 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +64 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +141 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +384 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +260 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +238 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +237 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +238 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +2219 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +31 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +100 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +107 -0
- package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +344 -0
- package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +250 -0
- package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +1927 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +83 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +141 -0
- package/skills/wix-replatform/scripts/artifact-freshness.js +76 -0
- package/skills/wix-replatform/scripts/execution-manifest-validate.js +43 -0
- package/skills/wix-replatform/scripts/execution-state-prepare.js +128 -0
- package/skills/wix-replatform/scripts/orchestration-preflight.js +48 -0
- package/skills/wix-replatform/scripts/orchestration-route.js +46 -0
- package/skills/wix-replatform/scripts/orchestration-state.js +245 -0
- package/skills/wix-vibe-headless/SKILL.md +54 -25
- package/skills/wix-vibe-headless/install/deploy.cjs +95 -0
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +34 -0
- package/skills/wix-vibe-headless/platforms/README.md +26 -0
- package/skills/wix-vibe-headless/platforms/base44.md +177 -0
- package/skills/wix-vibe-headless/platforms/generic.md +122 -0
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +230 -119
- package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +43 -0
- package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +25 -0
- package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +35 -0
- package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +38 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +40 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +54 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +65 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +50 -0
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +103 -0
- package/skills/wix-vibe-headless/references/blog/seed/seed-blog.js +270 -0
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +260 -145
- package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +65 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +47 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +13 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +126 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +108 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +58 -0
- package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +95 -0
- package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +94 -0
- package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +89 -0
- package/skills/wix-vibe-headless/references/bookings/{wix-bookings-checkout.js → app/rest/wix-bookings-checkout.js} +1 -1
- package/skills/wix-vibe-headless/references/bookings/{wix-bookings-services.js → app/rest/wix-bookings-services.js} +90 -12
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +117 -0
- package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.js +333 -0
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +169 -147
- package/skills/wix-vibe-headless/references/cms/app/collection.config.js +31 -0
- package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +18 -0
- package/skills/wix-vibe-headless/references/cms/{wix-cms.js → app/rest/wix-cms.js} +47 -2
- package/skills/wix-vibe-headless/references/cms/seed/SEED.md +145 -0
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +228 -131
- package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +23 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +43 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +13 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +29 -0
- package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +57 -0
- package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +78 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +27 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +54 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +40 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +81 -0
- package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +48 -0
- package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +36 -0
- package/skills/wix-vibe-headless/references/events/{wix-events-browse.js → app/rest/wix-events-browse.js} +3 -2
- package/skills/wix-vibe-headless/references/events/seed/SEED.md +107 -0
- package/skills/wix-vibe-headless/references/events/seed/seed-events.js +251 -0
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +276 -188
- package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +101 -0
- package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +33 -0
- package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +21 -0
- package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +29 -0
- package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +54 -0
- package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +77 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +36 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +32 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +35 -0
- package/skills/wix-vibe-headless/references/members/{wix-members-auth.js → app/rest/wix-members-auth.js} +6 -3
- package/skills/wix-vibe-headless/references/members/install/Register.jsx +22 -0
- package/skills/wix-vibe-headless/references/members/seed/SEED.md +22 -0
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +233 -104
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +31 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +39 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +29 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +35 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +27 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +25 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +39 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +27 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +60 -0
- package/skills/wix-vibe-headless/references/portfolio/{wix-portfolio.js → app/rest/wix-portfolio.js} +84 -55
- package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +94 -0
- package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.js +236 -0
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +240 -117
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +35 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +48 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +16 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +35 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +25 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +28 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +30 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +30 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +53 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +28 -0
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +86 -0
- package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.js +251 -0
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +248 -124
- package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +81 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +71 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +43 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +21 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +60 -0
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +63 -0
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +32 -0
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +73 -0
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +28 -0
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +102 -0
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +180 -0
- package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js +452 -0
- package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +56 -0
- package/skills/wix-vibe-headless/references/shared/{wix-client.js → app/rest/wix-client.js} +6 -8
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +6 -0
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +263 -148
- package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +20 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +150 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +167 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +51 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +54 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +119 -0
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +71 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +109 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +98 -0
- package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +27 -0
- package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +139 -0
- package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +75 -0
- package/skills/wix-vibe-headless/references/storefront/{wix-store-cart.js → app/rest/wix-store-cart.js} +1 -1
- package/skills/wix-vibe-headless/references/storefront/{wix-store-catalog.js → app/rest/wix-store-catalog.js} +25 -2
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +111 -0
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +299 -0
- /package/skills/wix-vibe-headless/references/blog/{wix-blog.js → app/rest/wix-blog.js} +0 -0
- /package/skills/wix-vibe-headless/references/events/{wix-events-registration.js → app/rest/wix-events-registration.js} +0 -0
- /package/skills/wix-vibe-headless/references/pricing-plans/{wix-pricing-plans.js → app/rest/wix-pricing-plans.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-menu.js → app/rest/wix-restaurants-menu.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-ordering.js → app/rest/wix-restaurants-ordering.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-reservations.js → app/rest/wix-restaurants-reservations.js} +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// Derive MEASURED api_ms / api_calls / api_retries from a generated import's audit log, and emit
|
|
5
|
+
// them as a `meter` call. This exists so the API half of the latency split is populated
|
|
6
|
+
// mechanically rather than depending on anyone remembering to report it.
|
|
7
|
+
//
|
|
8
|
+
// node scripts/meter-from-audit.js --project <migration dir> [--stage import] [--dry-run]
|
|
9
|
+
//
|
|
10
|
+
// TRAP this deliberately handles: a bulk write logs ONE audit row PER ITEM, each carrying the
|
|
11
|
+
// BATCH's total latency. Summing `latencyMs` across rows therefore multiplies one call's latency by
|
|
12
|
+
// its item count — on a real run that turned 346s of elapsed import into 1,050,992ms of "API time",
|
|
13
|
+
// three times longer than the stage existed. Rows are collapsed per distinct
|
|
14
|
+
// (runId, endpoint, batch, latencyMs) so a batch counts once, while genuinely separate calls
|
|
15
|
+
// (category creates, link calls) each count individually.
|
|
16
|
+
|
|
17
|
+
const fs = require('node:fs');
|
|
18
|
+
const path = require('node:path');
|
|
19
|
+
const recorder = require('../lib/telemetry-recorder.js');
|
|
20
|
+
|
|
21
|
+
function parseArgs(argv) {
|
|
22
|
+
const args = { project: process.cwd(), stage: 'import', auditFile: null, dryRun: false };
|
|
23
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
24
|
+
if (argv[i] === '--project') { args.project = argv[i + 1]; i += 1; }
|
|
25
|
+
else if (argv[i] === '--stage') { args.stage = argv[i + 1]; i += 1; }
|
|
26
|
+
else if (argv[i] === '--audit') { args.auditFile = argv[i + 1]; i += 1; }
|
|
27
|
+
else if (argv[i] === '--dry-run') args.dryRun = true;
|
|
28
|
+
}
|
|
29
|
+
return args;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function deriveFromAudit(records) {
|
|
33
|
+
const calls = new Map();
|
|
34
|
+
let retries = 0;
|
|
35
|
+
for (const row of records) {
|
|
36
|
+
if (typeof row.latencyMs !== 'number') continue;
|
|
37
|
+
// `batch` present => a bulk call fanned out across one row per item. Collapse on the batch's
|
|
38
|
+
// identity PLUS the latency, because a single logical batch number can cover more than one
|
|
39
|
+
// physical request (a contract probe followed by the remainder).
|
|
40
|
+
const key = row.batch === undefined
|
|
41
|
+
? `single|${row.runId}|${row.endpoint || row.operation}|${row.ts}`
|
|
42
|
+
: `bulk|${row.runId}|${row.endpoint || row.operation}|${row.batch}|${row.latencyMs}`;
|
|
43
|
+
if (!calls.has(key)) calls.set(key, row.latencyMs);
|
|
44
|
+
if (typeof row.retryCount === 'number') retries += row.retryCount;
|
|
45
|
+
}
|
|
46
|
+
const apiMs = [...calls.values()].reduce((sum, ms) => sum + ms, 0);
|
|
47
|
+
return { api_ms: Math.round(apiMs), api_calls: calls.size, api_retries: retries };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function main() {
|
|
51
|
+
const args = parseArgs(process.argv.slice(2));
|
|
52
|
+
const auditFile = args.auditFile || path.join(args.project, 'logs', 'import-audit.ndjson');
|
|
53
|
+
if (!fs.existsSync(auditFile)) {
|
|
54
|
+
process.stdout.write(`${JSON.stringify({ ok: false, errors: [`audit log not found: ${auditFile}`] })}\n`);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
const records = fs
|
|
58
|
+
.readFileSync(auditFile, 'utf8')
|
|
59
|
+
.split('\n')
|
|
60
|
+
.filter(Boolean)
|
|
61
|
+
.map((line) => { try { return JSON.parse(line); } catch { return null; } })
|
|
62
|
+
.filter(Boolean);
|
|
63
|
+
|
|
64
|
+
const derived = deriveFromAudit(records);
|
|
65
|
+
if (args.dryRun) {
|
|
66
|
+
process.stdout.write(`${JSON.stringify({ ok: true, dryRun: true, auditRecords: records.length, ...derived })}\n`);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const result = recorder.meter(args.project, { ...derived, stage: args.stage });
|
|
70
|
+
process.stdout.write(`${JSON.stringify({ ok: true, auditRecords: records.length, ...derived, ...result })}\n`);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (require.main === module) {
|
|
74
|
+
try {
|
|
75
|
+
main();
|
|
76
|
+
} catch (error) {
|
|
77
|
+
const errors = error instanceof recorder.ValidationError ? error.errors : [error.message || String(error)];
|
|
78
|
+
process.stdout.write(`${JSON.stringify({ ok: false, errors })}\n`);
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
module.exports = { deriveFromAudit };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// CLI for the RePlatform run-telemetry recorder. The rp-telemetry companion
|
|
5
|
+
// skill invokes this via bash; the agent never hand-writes the signal layer.
|
|
6
|
+
//
|
|
7
|
+
// Usage (run against the active migration project via --project or cwd):
|
|
8
|
+
// node scripts/rp-telemetry.js start '<dims-json>' [--project <dir>]
|
|
9
|
+
// node scripts/rp-telemetry.js dims '<dims-json>'
|
|
10
|
+
// node scripts/rp-telemetry.js record '<event-json>'
|
|
11
|
+
// node scripts/rp-telemetry.js stage start <stage>
|
|
12
|
+
// node scripts/rp-telemetry.js stage end <stage> [--outcome <outcome>]
|
|
13
|
+
// node scripts/rp-telemetry.js meter --api-ms 1234 --api-calls 73 [--stage <stage>]
|
|
14
|
+
// node scripts/rp-telemetry.js meter '{"model_ms":42000,"output_tokens":18000}'
|
|
15
|
+
// node scripts/rp-telemetry.js wait start [--halt <subtype> --skill <s> [--what '<text>']]
|
|
16
|
+
// node scripts/rp-telemetry.js wait end
|
|
17
|
+
// node scripts/rp-telemetry.js finalize '<rollup-json>'
|
|
18
|
+
// node scripts/rp-telemetry.js rebuild [--attempt <n>] [--push]
|
|
19
|
+
// node scripts/rp-telemetry.js status
|
|
20
|
+
//
|
|
21
|
+
// Output: one JSON object on stdout. {"ok":true,...} on success; on rejection
|
|
22
|
+
// {"ok":false,"errors":[...],"hint":...} with exit code 1 — fix and retry.
|
|
23
|
+
|
|
24
|
+
const fs = require('node:fs');
|
|
25
|
+
const recorder = require('../lib/telemetry-recorder.js');
|
|
26
|
+
|
|
27
|
+
const VALUE_FLAGS = new Set(['--project', '--outcome', '--halt', '--skill', '--what', '--attempt', '--stage']);
|
|
28
|
+
// Meter measurements are accepted as kebab-case flags so a shell script can report its own timing
|
|
29
|
+
// without composing JSON: --api-ms 1234 --api-calls 73.
|
|
30
|
+
const METER_FLAGS = new Map(
|
|
31
|
+
['model_ms', 'api_ms', 'script_ms', 'input_tokens', 'output_tokens', 'cache_read_tokens', 'cache_write_tokens', 'api_calls', 'api_retries']
|
|
32
|
+
.map((key) => [`--${key.replace(/_/g, '-')}`, key]),
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
function parseArgs(argv) {
|
|
36
|
+
const positional = [];
|
|
37
|
+
const flags = {};
|
|
38
|
+
const meter = {};
|
|
39
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
40
|
+
const arg = argv[i];
|
|
41
|
+
if (VALUE_FLAGS.has(arg)) {
|
|
42
|
+
flags[arg.slice(2)] = argv[i + 1];
|
|
43
|
+
i += 1;
|
|
44
|
+
} else if (METER_FLAGS.has(arg)) {
|
|
45
|
+
const raw = argv[i + 1];
|
|
46
|
+
const value = Number(raw);
|
|
47
|
+
if (!Number.isFinite(value)) fail([`${arg} expects a number (got: ${raw === undefined ? '(none)' : raw})`]);
|
|
48
|
+
meter[METER_FLAGS.get(arg)] = value;
|
|
49
|
+
i += 1;
|
|
50
|
+
} else if (arg === '--push') {
|
|
51
|
+
flags.push = true;
|
|
52
|
+
} else if (arg.startsWith('--')) {
|
|
53
|
+
fail([`unknown flag: ${arg}`]);
|
|
54
|
+
} else {
|
|
55
|
+
positional.push(arg);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return { positional, flags, meter };
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function fail(errors, hint) {
|
|
62
|
+
process.stdout.write(`${JSON.stringify({ ok: false, errors, ...(hint ? { hint } : {}) })}\n`);
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function parseJsonArg(raw, label) {
|
|
67
|
+
if (raw === undefined) fail([`missing ${label} JSON argument`]);
|
|
68
|
+
try {
|
|
69
|
+
return JSON.parse(raw);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
fail([`${label} is not valid JSON: ${error.message}`]);
|
|
72
|
+
}
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async function main() {
|
|
77
|
+
const { positional, flags, meter } = parseArgs(process.argv.slice(2));
|
|
78
|
+
const [command, ...rest] = positional;
|
|
79
|
+
const projectDir = flags.project || process.cwd();
|
|
80
|
+
if (!fs.existsSync(projectDir) || !fs.statSync(projectDir).isDirectory()) {
|
|
81
|
+
fail([`project directory not found: ${projectDir}`], 'pass --project <migration project dir>');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
let result;
|
|
85
|
+
switch (command) {
|
|
86
|
+
case 'start':
|
|
87
|
+
result = await recorder.start(projectDir, rest[0] === undefined ? {} : parseJsonArg(rest[0], 'dims'));
|
|
88
|
+
break;
|
|
89
|
+
case 'dims':
|
|
90
|
+
result = await recorder.dims(projectDir, parseJsonArg(rest[0], 'dims'));
|
|
91
|
+
break;
|
|
92
|
+
case 'record':
|
|
93
|
+
result = await recorder.record(projectDir, parseJsonArg(rest[0], 'event'));
|
|
94
|
+
break;
|
|
95
|
+
case 'stage':
|
|
96
|
+
result = recorder.stage(projectDir, rest[0], rest[1], { outcome: flags.outcome });
|
|
97
|
+
break;
|
|
98
|
+
case 'meter': {
|
|
99
|
+
// Flags and a JSON payload both work; flags win on conflict so a wrapper script can override
|
|
100
|
+
// a template payload without rebuilding the JSON.
|
|
101
|
+
const fromJson = rest[0] === undefined ? {} : parseJsonArg(rest[0], 'meter');
|
|
102
|
+
const payload = { ...fromJson, ...meter };
|
|
103
|
+
if (flags.stage) payload.stage = flags.stage;
|
|
104
|
+
result = recorder.meter(projectDir, payload);
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
case 'wait':
|
|
108
|
+
result = await recorder.wait(projectDir, rest[0], {
|
|
109
|
+
haltSubtype: flags.halt,
|
|
110
|
+
skill: flags.skill,
|
|
111
|
+
what: flags.what,
|
|
112
|
+
});
|
|
113
|
+
break;
|
|
114
|
+
case 'finalize':
|
|
115
|
+
result = await recorder.finalize(projectDir, parseJsonArg(rest[0], 'rollup'));
|
|
116
|
+
break;
|
|
117
|
+
case 'rebuild':
|
|
118
|
+
result = await recorder.rebuild(projectDir, {
|
|
119
|
+
attempt: flags.attempt === undefined ? undefined : Number(flags.attempt),
|
|
120
|
+
push: flags.push === true,
|
|
121
|
+
});
|
|
122
|
+
break;
|
|
123
|
+
case 'status':
|
|
124
|
+
result = recorder.status(projectDir);
|
|
125
|
+
break;
|
|
126
|
+
default:
|
|
127
|
+
fail(
|
|
128
|
+
[`unknown command: ${command || '(none)'}`],
|
|
129
|
+
'commands: start, dims, record, stage start|end, meter, wait start|end, finalize, rebuild, status',
|
|
130
|
+
);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
process.stdout.write(`${JSON.stringify({ ok: true, ...result })}\n`);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
main().catch((error) => {
|
|
137
|
+
if (error instanceof recorder.ValidationError) {
|
|
138
|
+
fail(error.errors, error.hint || undefined);
|
|
139
|
+
}
|
|
140
|
+
fail([error && error.message ? error.message : String(error)]);
|
|
141
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
const {
|
|
6
|
+
createFreshnessMetadata,
|
|
7
|
+
validateImportPlanFreshness,
|
|
8
|
+
writeFreshnessMetadata,
|
|
9
|
+
writeImportPlanDelta,
|
|
10
|
+
} = require('../lib/artifact-freshness.js');
|
|
11
|
+
|
|
12
|
+
function parseArgs(argv) {
|
|
13
|
+
const args = { _: [] };
|
|
14
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
15
|
+
const arg = argv[i];
|
|
16
|
+
if (arg.startsWith('--')) {
|
|
17
|
+
const key = arg.slice(2).replace(/-([a-z])/g, (_, char) => char.toUpperCase());
|
|
18
|
+
const next = argv[i + 1];
|
|
19
|
+
if (!next || next.startsWith('--')) {
|
|
20
|
+
args[key] = true;
|
|
21
|
+
} else {
|
|
22
|
+
args[key] = next;
|
|
23
|
+
i += 1;
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
args._.push(arg);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return args;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function usage() {
|
|
33
|
+
return [
|
|
34
|
+
'Usage:',
|
|
35
|
+
' node scripts/artifact-freshness.js write <projectDir> --domains-dir <domainsDir> [--metadata <path>]',
|
|
36
|
+
' node scripts/artifact-freshness.js check <projectDir> --domains-dir <domainsDir> [--metadata <path>] [--delta <path>]',
|
|
37
|
+
].join('\n');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function main() {
|
|
41
|
+
const args = parseArgs(process.argv.slice(2));
|
|
42
|
+
const command = args._[0];
|
|
43
|
+
const projectDir = args._[1] ? path.resolve(args._[1]) : null;
|
|
44
|
+
if (args.help) {
|
|
45
|
+
process.stderr.write(`${usage()}\n`);
|
|
46
|
+
process.exit(0);
|
|
47
|
+
}
|
|
48
|
+
if (!command || !projectDir || args.help) {
|
|
49
|
+
process.stderr.write(`${usage()}\n`);
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
const domainsDir = args.domainsDir ? path.resolve(args.domainsDir) : null;
|
|
53
|
+
const metadataPath = args.metadata || 'execution/review/import-plan.freshness.json';
|
|
54
|
+
if (command === 'write') {
|
|
55
|
+
const metadata = createFreshnessMetadata({ projectDir, domainsDir });
|
|
56
|
+
writeFreshnessMetadata(path.resolve(projectDir, metadataPath), metadata);
|
|
57
|
+
process.stdout.write(`${JSON.stringify({ ok: true, metadataPath }, null, 2)}\n`);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (command === 'check') {
|
|
61
|
+
const result = validateImportPlanFreshness({ projectDir, domainsDir, metadataPath });
|
|
62
|
+
if (!result.ok && args.delta) {
|
|
63
|
+
writeImportPlanDelta(path.resolve(projectDir, args.delta), result);
|
|
64
|
+
}
|
|
65
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
66
|
+
process.exit(result.ok ? 0 : 1);
|
|
67
|
+
}
|
|
68
|
+
throw new Error(`Unknown command: ${command}\n${usage()}`);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
try {
|
|
72
|
+
main();
|
|
73
|
+
} catch (error) {
|
|
74
|
+
process.stderr.write(`${error.message}\n`);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('node:fs/promises');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
const { validateManifest } = require('../lib/execution-manifest.js');
|
|
7
|
+
const { createProgressLogger, parseProgressArgs } = require('../lib/progress-log.js');
|
|
8
|
+
|
|
9
|
+
let progress;
|
|
10
|
+
|
|
11
|
+
async function main() {
|
|
12
|
+
const parsed = parseProgressArgs(process.argv.slice(2));
|
|
13
|
+
progress = createProgressLogger({
|
|
14
|
+
script: 'skills/replatform/scripts/execution-manifest-validate.js',
|
|
15
|
+
...parsed.progress,
|
|
16
|
+
});
|
|
17
|
+
progress.start('Execution manifest validation started', { phase: 'validation' });
|
|
18
|
+
|
|
19
|
+
const manifestPathArg = parsed.args[0];
|
|
20
|
+
if (!manifestPathArg) {
|
|
21
|
+
console.error('Usage: node scripts/execution-manifest-validate.js <manifestPath> [--progress-log <path>]');
|
|
22
|
+
progress.error('Missing manifest path', { phase: 'validation' });
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
const manifestPath = path.resolve(manifestPathArg);
|
|
26
|
+
const manifest = JSON.parse(await fs.readFile(manifestPath, 'utf8'));
|
|
27
|
+
const result = validateManifest(manifest);
|
|
28
|
+
console.log(JSON.stringify(result, null, 2));
|
|
29
|
+
if (result.ok) {
|
|
30
|
+
progress.complete('Execution manifest validation completed', { phase: 'validation', artifact: manifestPath });
|
|
31
|
+
} else {
|
|
32
|
+
progress.error('Execution manifest validation failed', { phase: 'validation', artifact: manifestPath, count: result.errors.length, unit: 'errors' });
|
|
33
|
+
}
|
|
34
|
+
process.exit(result.ok ? 0 : 1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
main().catch((error) => {
|
|
38
|
+
if (progress) {
|
|
39
|
+
progress.error(error && error.message ? error.message : 'Execution manifest validation failed', { phase: 'validation' });
|
|
40
|
+
}
|
|
41
|
+
console.error(error && error.message ? error.message : error);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
});
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('node:fs/promises');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
const { prepareExecutionState } = require('../lib/execution-state.js');
|
|
7
|
+
const { createProgressLogger, parseProgressArgs } = require('../lib/progress-log.js');
|
|
8
|
+
|
|
9
|
+
let progress;
|
|
10
|
+
|
|
11
|
+
function usage() {
|
|
12
|
+
console.error(`Usage:
|
|
13
|
+
node scripts/execution-state-prepare.js <projectDir> [--manifest <path>] [--cms-mirror-file <taskId:path>] [--progress-log <path>]
|
|
14
|
+
|
|
15
|
+
CMS mirror files may be NDJSON or JSON arrays of crosswalk rows. Use one --cms-mirror-file
|
|
16
|
+
per import task that has cmsMirror.mode download/download-and-upload.
|
|
17
|
+
`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function parseArgs(argv) {
|
|
21
|
+
const args = { cmsMirrorFiles: [] };
|
|
22
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
23
|
+
const token = argv[i];
|
|
24
|
+
if (token === '--manifest') {
|
|
25
|
+
args.manifest = argv[i + 1];
|
|
26
|
+
i += 1;
|
|
27
|
+
} else if (token === '--cms-mirror-file') {
|
|
28
|
+
args.cmsMirrorFiles.push(argv[i + 1]);
|
|
29
|
+
i += 1;
|
|
30
|
+
} else if (!args.projectDir) {
|
|
31
|
+
args.projectDir = token;
|
|
32
|
+
} else {
|
|
33
|
+
throw new Error(`unknown argument: ${token}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return args;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async function readRows(filePath) {
|
|
40
|
+
const raw = await fs.readFile(filePath, 'utf8');
|
|
41
|
+
const trimmed = raw.trim();
|
|
42
|
+
if (!trimmed) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
if (trimmed.startsWith('[')) {
|
|
46
|
+
const parsed = JSON.parse(trimmed);
|
|
47
|
+
if (!Array.isArray(parsed)) {
|
|
48
|
+
throw new Error(`${filePath} must contain a JSON array when using JSON format`);
|
|
49
|
+
}
|
|
50
|
+
return parsed;
|
|
51
|
+
}
|
|
52
|
+
return trimmed.split(/\r?\n/).filter(Boolean).map((line, index) => {
|
|
53
|
+
try {
|
|
54
|
+
return JSON.parse(line);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
throw new Error(`${filePath}:${index + 1} invalid NDJSON: ${error.message}`);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function readMirrorRows(projectDir, specs) {
|
|
62
|
+
const rowsByTaskId = {};
|
|
63
|
+
for (const spec of specs) {
|
|
64
|
+
const separator = spec.indexOf(':');
|
|
65
|
+
if (separator <= 0) {
|
|
66
|
+
throw new Error(`--cms-mirror-file must be <taskId:path>, got: ${spec}`);
|
|
67
|
+
}
|
|
68
|
+
const taskId = spec.slice(0, separator);
|
|
69
|
+
const filePath = path.resolve(projectDir, spec.slice(separator + 1));
|
|
70
|
+
rowsByTaskId[taskId] = await readRows(filePath);
|
|
71
|
+
}
|
|
72
|
+
return rowsByTaskId;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function main() {
|
|
76
|
+
const parsed = parseProgressArgs(process.argv.slice(2));
|
|
77
|
+
progress = createProgressLogger({
|
|
78
|
+
script: 'skills/replatform/scripts/execution-state-prepare.js',
|
|
79
|
+
...parsed.progress,
|
|
80
|
+
});
|
|
81
|
+
progress.start('Execution state preparation started', { phase: 'execution', step: 'prepare-state' });
|
|
82
|
+
|
|
83
|
+
const args = parseArgs(parsed.args);
|
|
84
|
+
if (!args.projectDir) {
|
|
85
|
+
usage();
|
|
86
|
+
progress.error('Missing project directory', { phase: 'execution', step: 'prepare-state' });
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const projectDir = path.resolve(args.projectDir);
|
|
91
|
+
const manifestPath = args.manifest
|
|
92
|
+
? path.resolve(projectDir, args.manifest)
|
|
93
|
+
: path.join(projectDir, 'execution', 'execution-manifest.json');
|
|
94
|
+
const manifest = JSON.parse(await fs.readFile(manifestPath, 'utf8'));
|
|
95
|
+
const cmsMirrorRowsByTaskId = await readMirrorRows(projectDir, args.cmsMirrorFiles);
|
|
96
|
+
|
|
97
|
+
const result = await prepareExecutionState(projectDir, manifest, { cmsMirrorRowsByTaskId });
|
|
98
|
+
console.log(JSON.stringify(result, null, 2));
|
|
99
|
+
if (result.ok) {
|
|
100
|
+
progress.complete('Execution state preparation completed', {
|
|
101
|
+
phase: 'execution',
|
|
102
|
+
step: 'prepare-state',
|
|
103
|
+
artifact: projectDir,
|
|
104
|
+
count: result.actions.length,
|
|
105
|
+
unit: 'actions',
|
|
106
|
+
});
|
|
107
|
+
} else {
|
|
108
|
+
progress.error('Execution state preparation blocked', {
|
|
109
|
+
phase: 'execution',
|
|
110
|
+
step: 'prepare-state',
|
|
111
|
+
artifact: projectDir,
|
|
112
|
+
count: result.errors.length,
|
|
113
|
+
unit: 'errors',
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
process.exit(result.ok ? 0 : 1);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
main().catch((error) => {
|
|
120
|
+
if (progress) {
|
|
121
|
+
progress.error(error && error.message ? error.message : 'Execution state preparation failed', {
|
|
122
|
+
phase: 'execution',
|
|
123
|
+
step: 'prepare-state',
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
console.error(error && error.message ? error.message : error);
|
|
127
|
+
process.exit(1);
|
|
128
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
const { loadArtifacts, writeJsonAtomic } = require('../lib/orchestration-state.js');
|
|
6
|
+
const { runPreflight } = require('../lib/orchestration-preflight.js');
|
|
7
|
+
const { createProgressLogger, parseProgressArgs } = require('../lib/progress-log.js');
|
|
8
|
+
|
|
9
|
+
let progress;
|
|
10
|
+
|
|
11
|
+
async function main() {
|
|
12
|
+
const parsed = parseProgressArgs(process.argv.slice(2));
|
|
13
|
+
progress = createProgressLogger({
|
|
14
|
+
script: 'skills/replatform/scripts/orchestration-preflight.js',
|
|
15
|
+
...parsed.progress,
|
|
16
|
+
});
|
|
17
|
+
progress.start('Orchestration preflight started', { phase: 'preflight' });
|
|
18
|
+
|
|
19
|
+
const projectDirArg = parsed.args[0];
|
|
20
|
+
if (!projectDirArg) {
|
|
21
|
+
console.error('Usage: node scripts/orchestration-preflight.js <projectDir> [--progress-log <path>]');
|
|
22
|
+
progress.error('Missing project directory', { phase: 'preflight' });
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
const projectDir = path.resolve(projectDirArg);
|
|
26
|
+
const artifacts = await loadArtifacts(projectDir);
|
|
27
|
+
if (!artifacts.run) {
|
|
28
|
+
throw new Error(`orchestration artifacts not initialized under ${projectDir}`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const result = await runPreflight(projectDir, artifacts, { progress });
|
|
32
|
+
await writeJsonAtomic(path.join(projectDir, 'orchestration', 'preflight.json'), result);
|
|
33
|
+
console.log(JSON.stringify(result, null, 2));
|
|
34
|
+
if (result.status === 'pass') {
|
|
35
|
+
progress.complete('Orchestration preflight completed', { phase: 'preflight', artifact: projectDir });
|
|
36
|
+
} else {
|
|
37
|
+
progress.error('Orchestration preflight did not pass', { phase: 'preflight', artifact: projectDir, status: result.status });
|
|
38
|
+
}
|
|
39
|
+
process.exit(result.status === 'pass' ? 0 : 1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
main().catch((error) => {
|
|
43
|
+
if (progress) {
|
|
44
|
+
progress.error(error && error.message ? error.message : 'Orchestration preflight failed', { phase: 'preflight' });
|
|
45
|
+
}
|
|
46
|
+
console.error(error && error.message ? error.message : error);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
const { loadArtifacts } = require('../lib/orchestration-state.js');
|
|
6
|
+
const { determineNextStep } = require('../lib/orchestration-router.js');
|
|
7
|
+
const { createProgressLogger, parseProgressArgs } = require('../lib/progress-log.js');
|
|
8
|
+
|
|
9
|
+
let progress;
|
|
10
|
+
|
|
11
|
+
async function main() {
|
|
12
|
+
const parsed = parseProgressArgs(process.argv.slice(2));
|
|
13
|
+
progress = createProgressLogger({
|
|
14
|
+
script: 'skills/replatform/scripts/orchestration-route.js',
|
|
15
|
+
...parsed.progress,
|
|
16
|
+
});
|
|
17
|
+
progress.start('Orchestration route started', { phase: 'orchestration' });
|
|
18
|
+
|
|
19
|
+
const projectDirArg = parsed.args[0];
|
|
20
|
+
if (!projectDirArg) {
|
|
21
|
+
console.error('Usage: node scripts/orchestration-route.js <projectDir> [--progress-log <path>]');
|
|
22
|
+
progress.error('Missing project directory', { phase: 'orchestration' });
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
const projectDir = path.resolve(projectDirArg);
|
|
26
|
+
const artifacts = await loadArtifacts(projectDir);
|
|
27
|
+
if (!artifacts.run) {
|
|
28
|
+
throw new Error(`orchestration artifacts not initialized under ${projectDir}`);
|
|
29
|
+
}
|
|
30
|
+
const result = await determineNextStep(projectDir, artifacts);
|
|
31
|
+
console.log(JSON.stringify(result, null, 2));
|
|
32
|
+
if (result.ok) {
|
|
33
|
+
progress.complete('Orchestration route completed', { phase: 'orchestration', artifact: projectDir });
|
|
34
|
+
} else {
|
|
35
|
+
progress.error('Orchestration route failed', { phase: 'orchestration', artifact: projectDir });
|
|
36
|
+
}
|
|
37
|
+
process.exit(result.ok ? 0 : 1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
main().catch((error) => {
|
|
41
|
+
if (progress) {
|
|
42
|
+
progress.error(error && error.message ? error.message : 'Orchestration route failed', { phase: 'orchestration' });
|
|
43
|
+
}
|
|
44
|
+
console.error(error && error.message ? error.message : error);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
});
|