@wix/agent-skills 1.35.1 → 1.36.1
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 +8 -3
- package/skills/wix-app/references/CODE_QUALITY.md +1 -1
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +27 -29
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +1 -1
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +26 -25
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +12 -42
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +9 -20
- package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +5 -4
- package/skills/wix-app/references/editor-react-component/PARTS.md +1 -1
- package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +1 -1
- package/skills/wix-app/references/editor-react-component/VECTOR-ART.md +95 -0
- package/skills/wix-app/references/editor-react-component/VISUAL-QUALITY.md +39 -0
- package/skills/wix-docs/references/CALLING.md +1 -1
- package/skills/wix-headless-kit/guides/api-run.md +1 -1
- package/skills/wix-headless-kit/install/pins.json +1 -1
- package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +1 -1
- package/skills/wix-headless-templates/donations/app/wix/donations/campaigns.ts +0 -1
- package/skills/wix-headless-templates/donations/app/wix/donations/donate.ts +1 -1
- package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns.ts +0 -1
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donate.ts +1 -1
- package/skills/wix-headless-templates/donations/rest/campaigns.ts +0 -1
- package/skills/wix-headless-templates/donations/rest/donate.ts +1 -1
- package/skills/wix-headless-templates/events/seed/seed-events.mjs +1 -1
- package/skills/wix-headless-templates/faq/INSTRUCTIONS.md +1 -1
- package/skills/wix-headless-templates/faq/app/wix/faq/faq.ts +2 -2
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq.ts +2 -2
- package/skills/wix-headless-templates/faq/rest/faq.ts +2 -2
- package/skills/wix-headless-templates/faq/seed/SEED.md +1 -1
- package/skills/wix-headless-templates/faq/seed/read-site.mjs +1 -1
- package/skills/wix-headless-templates/faq/seed/seed-faq.mjs +5 -5
- package/skills/wix-headless-templates/forms/app/wix/forms/forms.ts +2 -2
- package/skills/wix-headless-templates/forms/app/wix/forms/submissions.ts +2 -2
- package/skills/wix-headless-templates/forms/project/src/wix/forms/forms.ts +2 -2
- package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions.ts +2 -2
- package/skills/wix-headless-templates/members/seed/read-site.mjs +1 -1
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access.ts +1 -1
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access.ts +1 -1
- package/skills/wix-headless-templates/pricing-plans/rest/plan-access.ts +1 -1
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu.ts +0 -1
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu.ts +0 -1
- package/skills/wix-headless-templates/restaurants/rest/menu.ts +0 -1
- package/skills/wix-headless-templates/shared/rest/client.ts +1 -1
- package/skills/wix-headless-templates/shared/seed/site.mjs +2 -1
- package/skills/wix-manage/SKILL.md +3 -3
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +78 -1
- package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +11 -11
- package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +0 -1
- package/skills/wix-manage/references/google-ads/install-and-create-account.md +0 -1
- package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +20 -51
- package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +4 -4
- package/skills/wix-manage/references/rich-content/ricos-converter-service.md +1 -1
- package/skills/wix-base44-connector/SKILL.md +0 -437
- package/skills/wix-base44-connector/references/CAPABILITY_MAP.md +0 -78
- package/skills/wix-base44-connector/scripts/utils.cjs +0 -466
- package/skills/wix-export/SKILL.md +0 -83
- package/skills/wix-harmony-editor/.publish-manifest.json +0 -8
- package/skills/wix-harmony-editor/COPY-SITE.md +0 -494
- package/skills/wix-harmony-editor/SKILL.md +0 -317
- package/skills/wix-harmony-editor/scripts/copy/build-description.mjs +0 -249
- package/skills/wix-harmony-editor/scripts/copy/check-description.mjs +0 -225
- package/skills/wix-harmony-editor/scripts/copy/check-mirror.mjs +0 -89
- package/skills/wix-harmony-editor/scripts/copy/compare-preview.mjs +0 -76
- package/skills/wix-harmony-editor/scripts/copy/deploy-description.mjs +0 -212
- package/skills/wix-harmony-editor/scripts/copy/desc-hash.mjs +0 -44
- package/skills/wix-harmony-editor/scripts/copy/editor-run.mjs +0 -45
- package/skills/wix-harmony-editor/scripts/copy/export-page.mjs +0 -53
- package/skills/wix-harmony-editor/scripts/copy/find-interactions.mjs +0 -76
- package/skills/wix-harmony-editor/scripts/copy/hide-scrollbars.mjs +0 -16
- package/skills/wix-harmony-editor/scripts/copy/import-media.mjs +0 -150
- package/skills/wix-harmony-editor/scripts/copy/link-url.mjs +0 -27
- package/skills/wix-harmony-editor/scripts/copy/lint-api.mjs +0 -56
- package/skills/wix-harmony-editor/scripts/copy/measure-source.mjs +0 -211
- package/skills/wix-harmony-editor/scripts/copy/merge-mirrors.mjs +0 -29
- package/skills/wix-harmony-editor/scripts/copy/mirror-site.mjs +0 -92
- package/skills/wix-harmony-editor/scripts/copy/mobile-stage.mjs +0 -56
- package/skills/wix-harmony-editor/scripts/copy/preview-widths.mjs +0 -73
- package/skills/wix-harmony-editor/scripts/copy/render-plate.mjs +0 -67
- package/skills/wix-harmony-editor/scripts/copy/serve-mirror.mjs +0 -102
- package/skills/wix-harmony-editor/scripts/copy/snapshot-capabilities.mjs +0 -40
- package/skills/wix-harmony-editor/scripts/copy/split-sections.mjs +0 -191
- package/skills/wix-harmony-editor/scripts/copy/upload-media-manager.mjs +0 -61
- package/skills/wix-harmony-editor/scripts/launch.sh +0 -359
- package/skills/wix-headless/SKILL.md +0 -151
- package/skills/wix-headless/references/AI_FEATURES.md +0 -178
- package/skills/wix-headless/references/CAPABILITIES.md +0 -117
- package/skills/wix-headless/references/CONTENT.md +0 -36
- package/skills/wix-headless/references/DESIGN.md +0 -55
- package/skills/wix-headless/references/DISCOVERY.md +0 -80
- package/skills/wix-headless/references/DOC_DISCOVERY.md +0 -43
- package/skills/wix-headless/references/FEEDBACK.md +0 -129
- package/skills/wix-headless/references/IMAGE_GENERATION.md +0 -80
- package/skills/wix-headless/references/SDK_HANDOFF.md +0 -108
- package/skills/wix-headless/references/SEED.md +0 -74
- package/skills/wix-headless/references/SETUP.md +0 -60
- package/skills/wix-headless/references/astro.md +0 -98
- package/skills/wix-headless/references/inline-recipes/experience-donations.md +0 -102
- package/skills/wix-headless/references/inline-recipes/experience-store.md +0 -49
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-blog.md +0 -196
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +0 -590
- package/skills/wix-headless/references/inline-recipes/how-to-code-bookings.md +0 -279
- package/skills/wix-headless/references/inline-recipes/how-to-code-cms.md +0 -163
- package/skills/wix-headless/references/inline-recipes/how-to-code-donations.md +0 -146
- package/skills/wix-headless/references/inline-recipes/how-to-code-events.md +0 -203
- package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +0 -696
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +0 -124
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-custom-login.md +0 -160
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-non-astro.md +0 -118
- package/skills/wix-headless/references/inline-recipes/how-to-code-portfolio.md +0 -132
- package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +0 -126
- package/skills/wix-headless/references/inline-recipes/how-to-code-rentals.md +0 -254
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +0 -191
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +0 -213
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurants.md +0 -161
- package/skills/wix-headless/references/inline-recipes/setup-blog.md +0 -175
- package/skills/wix-headless/references/inline-recipes/setup-bookings.md +0 -232
- package/skills/wix-headless/references/inline-recipes/setup-cms.md +0 -200
- package/skills/wix-headless/references/inline-recipes/setup-donations.md +0 -15
- package/skills/wix-headless/references/inline-recipes/setup-events.md +0 -196
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +0 -288
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +0 -214
- package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +0 -155
- package/skills/wix-headless/references/inline-recipes/setup-pricing-plans.md +0 -229
- package/skills/wix-headless/references/inline-recipes/setup-rentals.md +0 -254
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +0 -73
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +0 -197
- package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +0 -136
- package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +0 -152
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +0 -71
- package/skills/wix-headless/references/managed/CONNECT.md +0 -74
- package/skills/wix-headless/references/managed/CREATE.md +0 -149
- package/skills/wix-headless/references/managed/DEPLOYMENT.md +0 -104
- package/skills/wix-headless/references/non-astro.md +0 -59
- package/skills/wix-headless/references/self-managed/AUTHENTICATION.md +0 -22
- package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +0 -15
- package/skills/wix-headless/references/stripe/AUTHENTICATION.md +0 -55
- package/skills/wix-headless/references/stripe/DEPLOYMENT.md +0 -71
- package/skills/wix-headless/scripts/bootstrap.mjs +0 -156
- package/skills/wix-headless-replatform/.publish-manifest.json +0 -8
- package/skills/wix-headless-replatform/SKILL.md +0 -116
- package/skills/wix-headless-replatform/agents/openai.yaml +0 -6
- package/skills/wix-headless-replatform/references/control-and-visual-fidelity-contract.md +0 -43
- package/skills/wix-headless-replatform/references/extraction-schema.md +0 -187
- package/skills/wix-headless-replatform/references/interaction-runtime-contract.md +0 -137
- package/skills/wix-headless-replatform/references/layout-blueprint-contract.md +0 -41
- package/skills/wix-headless-replatform/references/output-contract.md +0 -93
- package/skills/wix-headless-replatform/references/post-build-gap-contract.md +0 -125
- package/skills/wix-headless-replatform/references/qa-checklist.md +0 -83
- package/skills/wix-headless-replatform/references/safety.md +0 -19
- package/skills/wix-headless-replatform/references/ui-normalization-contract.md +0 -70
- package/skills/wix-headless-replatform/references/workflow.md +0 -157
- package/skills/wix-headless-replatform/registry/README.md +0 -20
- package/skills/wix-headless-replatform/registry/approvals/button/shadcn-default-ac60ef5.json +0 -28
- package/skills/wix-headless-replatform/registry/items/button/shadcn-default-ac60ef5/button.tsx +0 -54
- package/skills/wix-headless-replatform/registry/items/button/shadcn-default-ac60ef5/capabilities.json +0 -60
- package/skills/wix-headless-replatform/registry/items/button/shadcn-default-ac60ef5/contract.md +0 -48
- package/skills/wix-headless-replatform/registry/licenses/shadcn-ui-ac60ef5-MIT.txt +0 -21
- package/skills/wix-headless-replatform/registry/registry.json +0 -36
- package/skills/wix-headless-replatform/resources/rp-facelift/SKILL.md +0 -32
- package/skills/wix-headless-replatform/resources/rp-project-context/SKILL.md +0 -62
- package/skills/wix-headless-replatform/resources/rp-qa-gap-loop/SKILL.md +0 -64
- package/skills/wix-headless-replatform/resources/rp-source-evidence/SKILL.md +0 -42
- package/skills/wix-headless-replatform/resources/rp-ui-implementation/SKILL.md +0 -73
- package/skills/wix-headless-replatform/schemas/build-plan.schema.json +0 -10
- package/skills/wix-headless-replatform/schemas/candidate.schema.json +0 -19
- package/skills/wix-headless-replatform/schemas/common.schema.json +0 -33
- package/skills/wix-headless-replatform/schemas/decision-patch.schema.json +0 -10
- package/skills/wix-headless-replatform/schemas/decision-request.schema.json +0 -10
- package/skills/wix-headless-replatform/schemas/extraction-gap.schema.json +0 -28
- package/skills/wix-headless-replatform/schemas/extraction-manifest.schema.json +0 -34
- package/skills/wix-headless-replatform/schemas/final-report.schema.json +0 -10
- package/skills/wix-headless-replatform/schemas/foundation.schema.json +0 -11
- package/skills/wix-headless-replatform/schemas/metadata.schema.json +0 -11
- package/skills/wix-headless-replatform/schemas/observation-packet.schema.json +0 -17
- package/skills/wix-headless-replatform/schemas/page-capture.schema.json +0 -11
- package/skills/wix-headless-replatform/schemas/page-resolution.schema.json +0 -33
- package/skills/wix-headless-replatform/schemas/shared-chrome.schema.json +0 -11
- package/skills/wix-headless-replatform/schemas/unit.schema.json +0 -40
- package/skills/wix-headless-replatform/scripts/assemble-extraction.mjs +0 -844
- package/skills/wix-headless-replatform/scripts/benchmark-extraction.mjs +0 -163
- package/skills/wix-headless-replatform/scripts/browser-extraction-preflight.mjs +0 -42
- package/skills/wix-headless-replatform/scripts/build-extracted-homepage.mjs +0 -228
- package/skills/wix-headless-replatform/scripts/clear-wix-starter.mjs +0 -87
- package/skills/wix-headless-replatform/scripts/create-wix-project.mjs +0 -505
- package/skills/wix-headless-replatform/scripts/discover-urls.mjs +0 -142
- package/skills/wix-headless-replatform/scripts/extract-assets.mjs +0 -140
- package/skills/wix-headless-replatform/scripts/extract-design-system.mjs +0 -637
- package/skills/wix-headless-replatform/scripts/extract-interactions.mjs +0 -1903
- package/skills/wix-headless-replatform/scripts/extract-page.mjs +0 -2461
- package/skills/wix-headless-replatform/scripts/extract-seo.mjs +0 -25
- package/skills/wix-headless-replatform/scripts/extract-tokens.mjs +0 -63
- package/skills/wix-headless-replatform/scripts/finalize-extraction-report.mjs +0 -126
- package/skills/wix-headless-replatform/scripts/finalize-gap-review.mjs +0 -180
- package/skills/wix-headless-replatform/scripts/finalize-gap-review.test.mjs +0 -98
- package/skills/wix-headless-replatform/scripts/finalize-migration-website.mjs +0 -103
- package/skills/wix-headless-replatform/scripts/generate-control-state-contract.mjs +0 -176
- package/skills/wix-headless-replatform/scripts/generate-design-md.mjs +0 -261
- package/skills/wix-headless-replatform/scripts/generate-extraction-validators.mjs +0 -25
- package/skills/wix-headless-replatform/scripts/generate-invoice-download-backend.mjs +0 -342
- package/skills/wix-headless-replatform/scripts/generate-layout-blueprint.mjs +0 -140
- package/skills/wix-headless-replatform/scripts/generate-repeater-cms.mjs +0 -22
- package/skills/wix-headless-replatform/scripts/generate-route-plan.mjs +0 -143
- package/skills/wix-headless-replatform/scripts/generate-scene-contract.mjs +0 -288
- package/skills/wix-headless-replatform/scripts/generate-ui-normalization.mjs +0 -266
- package/skills/wix-headless-replatform/scripts/generate-visual-assets.mjs +0 -111
- package/skills/wix-headless-replatform/scripts/lib/browser-tooling.mjs +0 -570
- package/skills/wix-headless-replatform/scripts/lib/common.mjs +0 -329
- package/skills/wix-headless-replatform/scripts/lib/component-capabilities.mjs +0 -121
- package/skills/wix-headless-replatform/scripts/lib/component-registry.mjs +0 -282
- package/skills/wix-headless-replatform/scripts/lib/content-boundary.mjs +0 -61
- package/skills/wix-headless-replatform/scripts/lib/extraction-contract.mjs +0 -374
- package/skills/wix-headless-replatform/scripts/lib/extraction-detectors.mjs +0 -243
- package/skills/wix-headless-replatform/scripts/lib/extraction-validators.generated.mjs +0 -1139
- package/skills/wix-headless-replatform/scripts/lib/font-contract.mjs +0 -326
- package/skills/wix-headless-replatform/scripts/lib/frontend-automation-state.mjs +0 -184
- package/skills/wix-headless-replatform/scripts/lib/gap-analysis.mjs +0 -396
- package/skills/wix-headless-replatform/scripts/lib/html-extract.mjs +0 -168
- package/skills/wix-headless-replatform/scripts/lib/interaction-bootstrap.mjs +0 -10
- package/skills/wix-headless-replatform/scripts/lib/interaction-runtime.mjs +0 -194
- package/skills/wix-headless-replatform/scripts/lib/interaction-timeline.mjs +0 -348
- package/skills/wix-headless-replatform/scripts/lib/layout-blueprint/classifiers.mjs +0 -141
- package/skills/wix-headless-replatform/scripts/lib/layout-blueprint/geometry.mjs +0 -43
- package/skills/wix-headless-replatform/scripts/lib/layout-blueprint/vocabulary.mjs +0 -18
- package/skills/wix-headless-replatform/scripts/lib/ui-normalization.css +0 -64
- package/skills/wix-headless-replatform/scripts/optimize-svg.mjs +0 -31
- package/skills/wix-headless-replatform/scripts/post-build-gap.mjs +0 -358
- package/skills/wix-headless-replatform/scripts/provision-repeater-cms.mjs +0 -25
- package/skills/wix-headless-replatform/scripts/record-gap-decision.mjs +0 -39
- package/skills/wix-headless-replatform/scripts/replay-extraction.mjs +0 -107
- package/skills/wix-headless-replatform/scripts/resolve-home-page.mjs +0 -96
- package/skills/wix-headless-replatform/scripts/site-clone.mjs +0 -658
- package/skills/wix-headless-replatform/scripts/validate-font-contract.mjs +0 -29
- package/skills/wix-headless-replatform/scripts/verify-interactions.mjs +0 -669
- package/skills/wix-headless-replatform/scripts/visual-qa.mjs +0 -370
- package/skills/wix-import/SKILL.md +0 -90
- package/skills/wix-replatform/.publish-manifest.json +0 -8
- package/skills/wix-replatform/CLI.md +0 -162
- package/skills/wix-replatform/README.md +0 -52
- package/skills/wix-replatform/SKILL.md +0 -238
- package/skills/wix-replatform/console/account.css +0 -1
- package/skills/wix-replatform/console/app.css +0 -1
- package/skills/wix-replatform/console/app.js +0 -117
- package/skills/wix-replatform/console/index.html +0 -4
- package/skills/wix-replatform/console/json.css +0 -11
- package/skills/wix-replatform/lib/agent-adapters/index.js +0 -71
- package/skills/wix-replatform/lib/app-page-routing.js +0 -75
- package/skills/wix-replatform/lib/artifact-freshness.js +0 -225
- package/skills/wix-replatform/lib/blocked-data-requests.js +0 -427
- package/skills/wix-replatform/lib/census-reconciliation.js +0 -426
- package/skills/wix-replatform/lib/completion-report.js +0 -1580
- package/skills/wix-replatform/lib/config-env.js +0 -133
- package/skills/wix-replatform/lib/confirmed-pictures.js +0 -212
- package/skills/wix-replatform/lib/dependency-readiness.js +0 -423
- package/skills/wix-replatform/lib/dependency-recovery.js +0 -21
- package/skills/wix-replatform/lib/destination-choice.js +0 -163
- package/skills/wix-replatform/lib/destination-handoff.js +0 -62
- package/skills/wix-replatform/lib/destination-http.js +0 -81
- package/skills/wix-replatform/lib/destination-route.js +0 -98
- package/skills/wix-replatform/lib/destination.js +0 -919
- package/skills/wix-replatform/lib/discovered-census.js +0 -231
- package/skills/wix-replatform/lib/discovered-set-status.js +0 -255
- package/skills/wix-replatform/lib/document-url-guard.js +0 -203
- package/skills/wix-replatform/lib/entity-qa-attestation.js +0 -339
- package/skills/wix-replatform/lib/entity-verification.js +0 -18
- package/skills/wix-replatform/lib/execution-capability.js +0 -120
- package/skills/wix-replatform/lib/execution-log.js +0 -170
- package/skills/wix-replatform/lib/execution-manifest.js +0 -203
- package/skills/wix-replatform/lib/execution-state.js +0 -195
- package/skills/wix-replatform/lib/expectations-ledger.js +0 -96
- package/skills/wix-replatform/lib/generated-plugin-handoff.js +0 -140
- package/skills/wix-replatform/lib/import-readiness-contract.js +0 -23
- package/skills/wix-replatform/lib/import-recovery.js +0 -1107
- package/skills/wix-replatform/lib/imported-redirect-targets.js +0 -608
- package/skills/wix-replatform/lib/internal-link-reconciliation.js +0 -166
- package/skills/wix-replatform/lib/link-audit.js +0 -173
- package/skills/wix-replatform/lib/link-census.js +0 -194
- package/skills/wix-replatform/lib/link-plan.js +0 -148
- package/skills/wix-replatform/lib/link-verification.js +0 -274
- package/skills/wix-replatform/lib/link-write-journal.js +0 -42
- package/skills/wix-replatform/lib/local-state.js +0 -1481
- package/skills/wix-replatform/lib/member-completion.js +0 -658
- package/skills/wix-replatform/lib/member-crosswalk.js +0 -69
- package/skills/wix-replatform/lib/member-outcome-registry.js +0 -265
- package/skills/wix-replatform/lib/migration-completion.js +0 -311
- package/skills/wix-replatform/lib/operator-identity.js +0 -47
- package/skills/wix-replatform/lib/orchestration-decisions.js +0 -248
- package/skills/wix-replatform/lib/orchestration-preflight.js +0 -525
- package/skills/wix-replatform/lib/orchestration-router.js +0 -698
- package/skills/wix-replatform/lib/orchestration-state.js +0 -631
- package/skills/wix-replatform/lib/order-reference-readiness.js +0 -30
- package/skills/wix-replatform/lib/payments-outcome-registry.js +0 -200
- package/skills/wix-replatform/lib/plugin-cms-fallback.js +0 -618
- package/skills/wix-replatform/lib/preservation-approval-stamp.js +0 -54
- package/skills/wix-replatform/lib/product-media-deferral.js +0 -96
- package/skills/wix-replatform/lib/progress-log.js +0 -240
- package/skills/wix-replatform/lib/progress-log.sh +0 -140
- package/skills/wix-replatform/lib/read-back-approval.js +0 -184
- package/skills/wix-replatform/lib/read-back-comparison.js +0 -136
- package/skills/wix-replatform/lib/read-back-contract.js +0 -243
- package/skills/wix-replatform/lib/read-back-extract.js +0 -118
- package/skills/wix-replatform/lib/read-back-gate.js +0 -734
- package/skills/wix-replatform/lib/read-back-reads.js +0 -94
- package/skills/wix-replatform/lib/read-back-state.js +0 -107
- package/skills/wix-replatform/lib/read-back-summary.js +0 -81
- package/skills/wix-replatform/lib/rerun-conflicts.js +0 -334
- package/skills/wix-replatform/lib/run-controller.js +0 -401
- package/skills/wix-replatform/lib/seo-outcome-registry.js +0 -45
- package/skills/wix-replatform/lib/setup-verification.js +0 -148
- package/skills/wix-replatform/lib/source-access.js +0 -231
- package/skills/wix-replatform/lib/source-coverage.js +0 -1130
- package/skills/wix-replatform/lib/source-secrets.js +0 -277
- package/skills/wix-replatform/lib/structured-link-patch.js +0 -59
- package/skills/wix-replatform/lib/task-state.js +0 -110
- package/skills/wix-replatform/lib/url-preservation-report.js +0 -319
- package/skills/wix-replatform/lib/url-preservation-state.js +0 -739
- package/skills/wix-replatform/lib/url-redirect-plan.js +0 -728
- package/skills/wix-replatform/lib/url-verification.js +0 -315
- package/skills/wix-replatform/lib/user-action-effects.js +0 -42
- package/skills/wix-replatform/lib/user-actions.js +0 -264
- package/skills/wix-replatform/lib/website-handoff.js +0 -1220
- package/skills/wix-replatform/lib/wix-client-callers.js +0 -54
- package/skills/wix-replatform/lib/wix-dashboard-url.js +0 -35
- package/skills/wix-replatform/lib/write-verification-state.js +0 -92
- package/skills/wix-replatform/lib/write-verification.js +0 -274
- package/skills/wix-replatform/resources/rp-destination/SKILL.md +0 -137
- package/skills/wix-replatform/resources/rp-discovery/SKILL.md +0 -357
- package/skills/wix-replatform/resources/rp-discovery/scripts/promote-source-coverage.js +0 -47
- package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +0 -1369
- package/skills/wix-replatform/resources/rp-execute-import/scripts/shipping-estimate-audit.js +0 -70
- package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +0 -482
- package/skills/wix-replatform/resources/rp-execute-setup/scripts/execute-setup.js +0 -442
- package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +0 -64
- package/skills/wix-replatform/resources/rp-execution-policy/SKILL.md +0 -112
- package/skills/wix-replatform/resources/rp-execution-policy/lib/coupon-currency-plan-report.js +0 -143
- package/skills/wix-replatform/resources/rp-execution-policy/lib/payments-report.js +0 -244
- package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +0 -3158
- package/skills/wix-replatform/resources/rp-mapper/SKILL.md +0 -947
- package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +0 -217
- package/skills/wix-replatform/resources/rp-mapper/lib/structure-bridge-planning.js +0 -303
- package/skills/wix-replatform/resources/rp-mapper/scripts/coverage-reconcile.js +0 -88
- package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +0 -148
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +0 -378
- package/skills/wix-replatform/resources/rp-preflight/SKILL.md +0 -40
- package/skills/wix-replatform/resources/rp-project-intake/SKILL.md +0 -55
- package/skills/wix-replatform/resources/rp-quick-runtime/SKILL.md +0 -60
- package/skills/wix-replatform/resources/rp-quick-runtime/lib/import-progress.js +0 -89
- package/skills/wix-replatform/resources/rp-quick-runtime/lib/limit-recovery.js +0 -36
- package/skills/wix-replatform/resources/rp-quick-shopify/SKILL.md +0 -123
- package/skills/wix-replatform/resources/rp-quick-shopify/quick-mode.json +0 -124
- package/skills/wix-replatform/resources/rp-quick-shopify/scripts/quick-mode.js +0 -522
- package/skills/wix-replatform/resources/rp-quick-woocommerce/SKILL.md +0 -56
- package/skills/wix-replatform/resources/rp-quick-woocommerce/quick-mode.json +0 -91
- package/skills/wix-replatform/resources/rp-quick-woocommerce/scripts/quick-mode.js +0 -255
- package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +0 -253
- package/skills/wix-replatform/resources/rp-setup-discovery/scripts/quick-setup-plan.js +0 -44
- package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +0 -481
- package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +0 -136
- 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 +0 -310
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +0 -1081
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +0 -618
- package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +0 -969
- package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +0 -196
- package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +0 -66
- package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +0 -60
- package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +0 -95
- package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +0 -82
- package/skills/wix-replatform/resources/rp-source-inputs/SKILL.md +0 -66
- package/skills/wix-replatform/resources/rp-source-sfcc/SKILL.md +0 -153
- package/skills/wix-replatform/resources/rp-source-shopify/SKILL.md +0 -394
- package/skills/wix-replatform/resources/rp-source-shopify/lib/discovery-reads.js +0 -200
- package/skills/wix-replatform/resources/rp-source-shopify/lib/import-findings.js +0 -34
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-bulk-sqlite-worker.js +0 -44
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-bulk.js +0 -1470
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-cli.js +0 -446
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-gift-cards.js +0 -474
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-protected-fields.js +0 -879
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-session.js +0 -426
- package/skills/wix-replatform/resources/rp-source-shopify/queries/articles.graphql +0 -24
- package/skills/wix-replatform/resources/rp-source-shopify/queries/blogs.graphql +0 -18
- package/skills/wix-replatform/resources/rp-source-shopify/queries/collections.graphql +0 -40
- package/skills/wix-replatform/resources/rp-source-shopify/queries/customers.graphql +0 -76
- package/skills/wix-replatform/resources/rp-source-shopify/queries/delivery-profiles.graphql +0 -51
- package/skills/wix-replatform/resources/rp-source-shopify/queries/discounts.graphql +0 -35
- package/skills/wix-replatform/resources/rp-source-shopify/queries/files.graphql +0 -20
- package/skills/wix-replatform/resources/rp-source-shopify/queries/gift-cards.graphql +0 -18
- package/skills/wix-replatform/resources/rp-source-shopify/queries/inventory.graphql +0 -31
- package/skills/wix-replatform/resources/rp-source-shopify/queries/locations.graphql +0 -21
- package/skills/wix-replatform/resources/rp-source-shopify/queries/menus.graphql +0 -21
- package/skills/wix-replatform/resources/rp-source-shopify/queries/metaobjects.graphql +0 -30
- package/skills/wix-replatform/resources/rp-source-shopify/queries/orders-core.graphql +0 -150
- package/skills/wix-replatform/resources/rp-source-shopify/queries/orders-fulfillments.graphql +0 -36
- package/skills/wix-replatform/resources/rp-source-shopify/queries/orders-refunds.graphql +0 -48
- package/skills/wix-replatform/resources/rp-source-shopify/queries/pages.graphql +0 -20
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-address.graphql +0 -8
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-email.graphql +0 -6
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-name.graphql +0 -8
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-phone.graphql +0 -8
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-address.graphql +0 -12
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-email.graphql +0 -6
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-name.graphql +0 -13
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-phone.graphql +0 -13
- package/skills/wix-replatform/resources/rp-source-shopify/queries/products.graphql +0 -73
- package/skills/wix-replatform/resources/rp-source-shopify/queries/url-redirects.graphql +0 -13
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-discovery.js +0 -693
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-extract.js +0 -283
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-gift-card-remedy.js +0 -191
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-session-check.js +0 -115
- package/skills/wix-replatform/resources/rp-source-shopify/source-schema.example.json +0 -201
- package/skills/wix-replatform/resources/rp-source-wordpress/PLUGIN-READ-PLANS.md +0 -146
- package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +0 -970
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/blocked-data-handlers.js +0 -73
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/checkout-field-csv-parser.js +0 -115
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/checkout-field-csv-parser.test-fixture.js +0 -91
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/coupon-discovery.js +0 -440
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/currency-gate.js +0 -125
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/gateway-source-keys.js +0 -252
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/gateway-source-keys.json +0 -183
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/gateway-summary.mjs +0 -333
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/invoice-discovery.js +0 -426
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/plugin-disposition.js +0 -400
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/plugin-entity-read-plan.js +0 -633
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/plugin-knowledge.js +0 -1127
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/refund-corroboration.js +0 -194
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/refund-corroboration.json +0 -100
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/sampled-ids-batch.js +0 -157
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/secret-value-guard.js +0 -234
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/store-currency.js +0 -101
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/structure-bridge-reader.js +0 -755
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wix-wp-plugin-v2-client.js +0 -1074
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wix-wp-plugin-v2-client.test-fixture.js +0 -149
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/woo-inventory.js +0 -25
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +0 -444
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-image-url.js +0 -186
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-plugin-detect.js +0 -1422
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-redirect-sources.js +0 -343
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +0 -680
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/yoast-product-seo-evidence.js +0 -272
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/README.md +0 -373
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/advanced-custom-fields.json +0 -101
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/back-in-stock-notifier-for-woocommerce.json +0 -81
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/capabilities-pending-decision.json +0 -128
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/cms-fallback-eligible.json +0 -18
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/contact-form-7.json +0 -104
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/facebook-for-woocommerce.json +0 -44
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/fingerprint-aliases.json +0 -49
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/free-gifts-for-woocommerce.json +0 -94
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/index.json +0 -863
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/mailpoet.json +0 -52
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/membership-for-woocommerce.json +0 -161
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/mwb-bookings-for-woocommerce.json +0 -180
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/no-migration-needed.json +0 -286
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/pricing-deals-for-woocommerce.json +0 -79
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/product-extras-for-woocommerce.json +0 -120
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/pw-woocommerce-gift-cards.json +0 -128
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/requires-development.json +0 -88
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/seo-by-rank-math.json +0 -80
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/seriously-simple-podcasting.json +0 -46
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/strong-testimonials.json +0 -55
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/subscriptions-for-woocommerce.json +0 -99
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/tablepress.json +0 -55
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/the-events-calendar.json +0 -160
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/ti-woocommerce-wishlist.json +0 -81
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woo-checkout-field-editor-pro.json +0 -60
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woo-discount-rules.json +0 -74
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woo-product-bundle.json +0 -75
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-gift-cards.json +0 -60
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-other-payment-gateway.json +0 -44
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-pdf-invoices-packing-slips.json +0 -57
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-product-addon.json +0 -141
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-progressive-discounts.json +0 -54
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/wordpress-seo.json +0 -158
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/wpc-composite-products.json +0 -97
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/wpforms-lite.json +0 -86
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/capture-store-settings.js +0 -90
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/plugin-knowledge-validate.js +0 -51
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/plugin-knowledge.js +0 -103
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +0 -2409
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-plugin-inventory.js +0 -273
- package/skills/wix-replatform/resources/rp-source-wordpress/secret-value-patterns.v1.json +0 -11
- package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +0 -71
- package/skills/wix-replatform/resources/rp-source-wordpress/sub-parts.json +0 -13
- package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +0 -1046
- package/skills/wix-replatform/resources/rp-target-wix/app-page-routing-capabilities.json +0 -36
- package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +0 -57
- package/skills/wix-replatform/resources/rp-target-wix/domains/SERVICE-PLUGINS.md +0 -322
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/docs-survey.json +0 -70
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +0 -29
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +0 -71
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +0 -83
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +0 -95
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +0 -66
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/docs-survey.json +0 -332
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/domain.json +0 -75
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/entities/booking.json +0 -181
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/entities/service-add-on.json +0 -130
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/entities/service.json +0 -180
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/docs-survey.json +0 -161
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +0 -25
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +0 -67
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +0 -75
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +0 -41
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/docs-survey.json +0 -204
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +0 -27
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +0 -275
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +0 -105
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +0 -77
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/docs-survey.json +0 -306
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +0 -44
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/delivery-profile.json +0 -171
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/discount-rule.json +0 -182
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-applied-discount.json +0 -129
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-invoice-document.json +0 -192
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item-options.json +0 -123
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +0 -85
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-merchant-note.json +0 -112
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-payment.json +0 -191
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +0 -164
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +0 -462
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/pickup-location.json +0 -122
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/shipping-option.json +0 -98
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/wishlist-item.json +0 -86
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/docs-survey.json +0 -128
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/domain.json +0 -38
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/category.json +0 -73
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/event.json +0 -107
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/registration-form.json +0 -89
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/rsvp.json +0 -118
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/ticket-definition.json +0 -93
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/docs-survey.json +0 -86
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/domain.json +0 -56
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/entities/form-submission.json +0 -121
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/entities/form.json +0 -134
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/docs-survey.json +0 -41
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/domain.json +0 -50
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/entities/gift-card-product.json +0 -87
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/entities/gift-card.json +0 -130
- package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +0 -1418
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/docs-survey.json +0 -41
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +0 -24
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +0 -75
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +0 -71
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/docs-survey.json +0 -119
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +0 -23
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +0 -71
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/custom-field.json +0 -82
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member-about.json +0 -77
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +0 -205
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/docs-survey.json +0 -41
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/domain.json +0 -46
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/entities/plan-order.json +0 -137
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/entities/plan.json +0 -133
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/docs-survey.json +0 -7
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/domain.json +0 -36
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/amazon-shop-connect.json +0 -71
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/ebay-shop-connect.json +0 -67
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/google-youtube-connect.json +0 -72
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/meta-catalog-connect.json +0 -74
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/pinterest-catalog-connect.json +0 -69
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/tiktok-catalog-connect.json +0 -61
- package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +0 -111
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/docs-survey.json +0 -109
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/domain.json +0 -73
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/entities/item-seo-tags.json +0 -148
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/entities/seo-pattern.json +0 -91
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/entities/site-seo-tags.json +0 -79
- package/skills/wix-replatform/resources/rp-target-wix/domains/site/docs-survey.json +0 -32
- package/skills/wix-replatform/resources/rp-target-wix/domains/site/domain.json +0 -49
- package/skills/wix-replatform/resources/rp-target-wix/domains/site/entities/business-contact.json +0 -103
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/docs-survey.json +0 -203
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +0 -42
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/back-in-stock-request.json +0 -119
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/brand.json +0 -111
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +0 -81
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +0 -241
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +0 -118
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-customization.json +0 -111
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +0 -79
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +0 -221
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/promotion.json +0 -84
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/review.json +0 -178
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/subscription-product.json +0 -87
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/docs-survey.json +0 -106
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/domain.json +0 -64
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/manual-tax-mapping.json +0 -119
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/tax-group.json +0 -94
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/tax-region.json +0 -113
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/tax-settings.json +0 -65
- package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +0 -64
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-author-attribution.js +0 -165
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-client.js +0 -60
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-duplicates.js +0 -201
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-ledger.js +0 -306
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-report.js +0 -229
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-stage.js +0 -55
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build.js +0 -715
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-media.js +0 -567
- package/skills/wix-replatform/resources/rp-target-wix/lib/bulk-results.js +0 -73
- package/skills/wix-replatform/resources/rp-target-wix/lib/contact-extended-fields.js +0 -194
- package/skills/wix-replatform/resources/rp-target-wix/lib/contact-import.js +0 -133
- package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +0 -150
- package/skills/wix-replatform/resources/rp-target-wix/lib/coupon-redemption-drift.js +0 -491
- package/skills/wix-replatform/resources/rp-target-wix/lib/customer-member.js +0 -104
- package/skills/wix-replatform/resources/rp-target-wix/lib/data-extension-schema.js +0 -673
- package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +0 -835
- package/skills/wix-replatform/resources/rp-target-wix/lib/gift-card-balance-reconciliation.js +0 -119
- package/skills/wix-replatform/resources/rp-target-wix/lib/gift-card-build.js +0 -566
- package/skills/wix-replatform/resources/rp-target-wix/lib/gift-card-redemption-build.js +0 -249
- package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +0 -260
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-applied-discount-build.js +0 -63
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-buyer.js +0 -187
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-channel-build.js +0 -64
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-history.js +0 -1027
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-invoice-contract.js +0 -90
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-payment-mapping.js +0 -420
- package/skills/wix-replatform/resources/rp-target-wix/lib/pricing-plan-definition.js +0 -177
- package/skills/wix-replatform/resources/rp-target-wix/lib/product-import.js +0 -151
- package/skills/wix-replatform/resources/rp-target-wix/lib/product-seo.js +0 -723
- package/skills/wix-replatform/resources/rp-target-wix/lib/seo-redirects.js +0 -353
- package/skills/wix-replatform/resources/rp-target-wix/lib/shipping-build.js +0 -1437
- package/skills/wix-replatform/resources/rp-target-wix/lib/shipping-option-stage.js +0 -354
- package/skills/wix-replatform/resources/rp-target-wix/lib/store-config-build.js +0 -134
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-category-attach.js +0 -221
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-inventory.js +0 -248
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +0 -321
- package/skills/wix-replatform/resources/rp-target-wix/lib/tax-build.js +0 -231
- package/skills/wix-replatform/resources/rp-target-wix/lib/url-mapper-transport.js +0 -28
- package/skills/wix-replatform/resources/rp-target-wix/lib/value-utils.js +0 -14
- package/skills/wix-replatform/resources/rp-target-wix/lib/variant-correlation.js +0 -34
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +0 -388
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +0 -255
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +0 -6041
- package/skills/wix-replatform/resources/rp-target-wix/lib/write-verification.js +0 -3
- package/skills/wix-replatform/resources/rp-target-wix/scripts/docs-survey-sync.js +0 -150
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +0 -69
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +0 -100
- package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +0 -112
- package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +0 -484
- package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +0 -318
- package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +0 -2831
- package/skills/wix-replatform/resources/rp-telemetry/lib/transcript-digest.js +0 -318
- package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +0 -83
- package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +0 -243
- package/skills/wix-replatform/resources/rp-website-continuation/SKILL.md +0 -94
- package/skills/wix-replatform/scripts/artifact-freshness.js +0 -76
- package/skills/wix-replatform/scripts/census-reconciliation.js +0 -25
- package/skills/wix-replatform/scripts/cms-fallback.js +0 -89
- package/skills/wix-replatform/scripts/discovered-census.js +0 -26
- package/skills/wix-replatform/scripts/discovered-set-status.js +0 -33
- package/skills/wix-replatform/scripts/entity-qa-attestation.js +0 -130
- package/skills/wix-replatform/scripts/execution-health-check.js +0 -415
- package/skills/wix-replatform/scripts/execution-manifest-validate.js +0 -43
- package/skills/wix-replatform/scripts/execution-state-prepare.js +0 -128
- package/skills/wix-replatform/scripts/expectations-ledger.js +0 -44
- package/skills/wix-replatform/scripts/import-contract-verify.js +0 -183
- package/skills/wix-replatform/scripts/internal-link-audit.js +0 -90
- package/skills/wix-replatform/scripts/item-seo-tags-verify.js +0 -205
- package/skills/wix-replatform/scripts/migration-completion.js +0 -76
- package/skills/wix-replatform/scripts/orchestration-preflight.js +0 -67
- package/skills/wix-replatform/scripts/orchestration-route.js +0 -77
- package/skills/wix-replatform/scripts/orchestration-state.js +0 -381
- package/skills/wix-replatform/scripts/read-back-gate.js +0 -175
- package/skills/wix-replatform/scripts/replatform-console.js +0 -146
- package/skills/wix-replatform/scripts/replatform.js +0 -436
- package/skills/wix-replatform/scripts/source-secrets.js +0 -77
- package/skills/wix-replatform/scripts/url-redirects.js +0 -286
- package/skills/wix-replatform/scripts/user-action.js +0 -58
- package/skills/wix-replatform/scripts/website-handoff-generate.js +0 -64
- package/skills/wix-replatform/scripts/wix-dashboard-url.js +0 -54
- package/skills/wix-replatform/scripts/wix-destination.js +0 -143
- package/skills/wix-replatform/scripts/wix-headless-scaffold.js +0 -762
- package/skills/wix-vibe-headless/SKILL.md +0 -183
- package/skills/wix-vibe-headless/install/deploy.cjs +0 -221
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +0 -35
- package/skills/wix-vibe-headless/platforms/README.md +0 -26
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +0 -127
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +0 -121
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +0 -87
- package/skills/wix-vibe-headless/platforms/base44.md +0 -148
- package/skills/wix-vibe-headless/platforms/generic.md +0 -132
- package/skills/wix-vibe-headless/references/_shared/nav/nav.tanstack.js +0 -30
- package/skills/wix-vibe-headless/references/_shared/routing.md +0 -86
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +0 -270
- package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +0 -43
- package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +0 -25
- package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +0 -15
- package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +0 -35
- package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +0 -38
- package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +0 -40
- package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +0 -54
- package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +0 -65
- package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +0 -50
- package/skills/wix-vibe-headless/references/blog/app/rest/wix-blog.js +0 -217
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +0 -99
- package/skills/wix-vibe-headless/references/blog/seed/seed-blog.cjs +0 -269
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +0 -342
- package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +0 -65
- package/skills/wix-vibe-headless/references/bookings/app/components/RentalDurationPicker.jsx +0 -67
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +0 -47
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +0 -13
- package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +0 -126
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useRentalDuration.js +0 -128
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +0 -110
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +0 -58
- package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +0 -95
- package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +0 -94
- package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +0 -89
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-checkout.js +0 -148
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-rentals.js +0 -250
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-services.js +0 -300
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +0 -154
- package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.cjs +0 -333
- package/skills/wix-vibe-headless/references/bookings/seed/seed-rentals.cjs +0 -267
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +0 -178
- package/skills/wix-vibe-headless/references/cms/app/collection.config.js +0 -31
- package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +0 -18
- package/skills/wix-vibe-headless/references/cms/app/rest/wix-cms.js +0 -231
- package/skills/wix-vibe-headless/references/cms/seed/SEED.md +0 -145
- package/skills/wix-vibe-headless/references/donations/INSTRUCTIONS.md +0 -88
- package/skills/wix-vibe-headless/references/donations/app/rest/wix-donations.js +0 -112
- package/skills/wix-vibe-headless/references/donations/seed/SEED.md +0 -11
- package/skills/wix-vibe-headless/references/donations/tests/donations.test.mjs +0 -258
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +0 -267
- package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +0 -23
- package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +0 -43
- package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +0 -13
- package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +0 -29
- package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +0 -57
- package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +0 -78
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +0 -27
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +0 -54
- package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +0 -40
- package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +0 -81
- package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +0 -48
- package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +0 -36
- package/skills/wix-vibe-headless/references/events/app/rest/wix-events-browse.js +0 -136
- package/skills/wix-vibe-headless/references/events/app/rest/wix-events-registration.js +0 -187
- package/skills/wix-vibe-headless/references/events/seed/SEED.md +0 -103
- package/skills/wix-vibe-headless/references/events/seed/seed-events.cjs +0 -251
- package/skills/wix-vibe-headless/references/forms/INSTRUCTIONS.md +0 -487
- package/skills/wix-vibe-headless/references/forms/app/hooks/useWixForm.js +0 -425
- package/skills/wix-vibe-headless/references/forms/app/lib/wix-form-schema-utils.js +0 -187
- package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms-submissions.js +0 -238
- package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms.js +0 -108
- package/skills/wix-vibe-headless/references/forms/seed/SEED.md +0 -1836
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +0 -328
- package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +0 -101
- package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +0 -33
- package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +0 -21
- package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +0 -29
- package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +0 -54
- package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +0 -77
- package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +0 -36
- package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +0 -32
- package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +0 -35
- package/skills/wix-vibe-headless/references/members/app/rest/wix-members-auth.js +0 -390
- package/skills/wix-vibe-headless/references/members/install/Register.jsx +0 -22
- package/skills/wix-vibe-headless/references/members/seed/SEED.md +0 -21
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +0 -270
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +0 -31
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +0 -15
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +0 -39
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +0 -15
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +0 -29
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +0 -35
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +0 -27
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +0 -25
- package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +0 -39
- package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +0 -27
- package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +0 -60
- package/skills/wix-vibe-headless/references/portfolio/app/rest/wix-portfolio.js +0 -223
- package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +0 -90
- package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.cjs +0 -236
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +0 -280
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +0 -35
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +0 -48
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +0 -16
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +0 -35
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +0 -25
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +0 -28
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +0 -30
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +0 -30
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +0 -53
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +0 -28
- package/skills/wix-vibe-headless/references/pricing-plans/app/rest/wix-pricing-plans.js +0 -157
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +0 -82
- package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.cjs +0 -251
- package/skills/wix-vibe-headless/references/rentals/INSTRUCTIONS.md +0 -13
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +0 -290
- package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +0 -81
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +0 -71
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +0 -43
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +0 -21
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +0 -72
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +0 -66
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +0 -32
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +0 -73
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +0 -28
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +0 -102
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-menu.js +0 -224
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +0 -218
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-reservations.js +0 -107
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +0 -176
- package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.cjs +0 -452
- package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +0 -56
- package/skills/wix-vibe-headless/references/shared/app/lib/nav.js +0 -9
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-client.js +0 -185
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +0 -8
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +0 -471
- package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +0 -20
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +0 -167
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +0 -83
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +0 -104
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +0 -163
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +0 -83
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useVariantOptions.js +0 -76
- package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +0 -64
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +0 -176
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +0 -218
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +0 -174
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.cjs +0 -546
|
@@ -1,1107 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const { verificationKind } = require('./entity-verification');
|
|
4
|
-
const crypto = require('node:crypto');
|
|
5
|
-
const fs = require('node:fs/promises');
|
|
6
|
-
const path = require('node:path');
|
|
7
|
-
const {
|
|
8
|
-
UNRESOLVED_ATTEMPT_STATUSES,
|
|
9
|
-
loadAttemptJournal,
|
|
10
|
-
loadCrosswalk,
|
|
11
|
-
rerunDecision,
|
|
12
|
-
attemptJournalPath,
|
|
13
|
-
readAttemptJournalSince,
|
|
14
|
-
foldAttemptsBySourceKey,
|
|
15
|
-
} = require('./local-state.js');
|
|
16
|
-
const { updateSupportFor } = require('./rerun-conflicts.js');
|
|
17
|
-
const { appendExecutionLog } = require('./execution-log.js');
|
|
18
|
-
|
|
19
|
-
const RECOVERY_SCHEMA_VERSION = 1;
|
|
20
|
-
const RECOVERY_MODES = ['partial', 'missing-only', 'failed-only', 'deferred-only', 'unresolved-only', 'resumed', 'rerun'];
|
|
21
|
-
const RECOVERY_STATUSES = ['complete', 'partial', 'failed', 'blocked'];
|
|
22
|
-
const DEFERRED_ATTEMPT_STATUSES = new Set(['deferred', 'needs_verification']);
|
|
23
|
-
// A missing crosswalk link uses existing source-marker/natural-key checks and
|
|
24
|
-
// attempt-journal reconciliation before create. These statuses mean a previous write MIGHT have
|
|
25
|
-
// landed without being confirmed into the crosswalk, so creating again risks a duplicate.
|
|
26
|
-
const UNCERTAIN_ATTEMPT_STATUSES = new Set(['deferred', 'needs_verification', 'succeeded_unverified', 'started']);
|
|
27
|
-
// The three terminal `skipped_*` statuses
|
|
28
|
-
// `coverageStatusCounts` deliberately never buckets (it has no branch for any of them) make no
|
|
29
|
-
// journal-count claim at all -- there is nothing an importer could even report a disagreeing
|
|
30
|
-
// number for. A target type whose journal rows are ENTIRELY one or more of these is therefore not
|
|
31
|
-
// "unreported journal activity"; it is a type nothing was ever attempted, deferred, or failed for.
|
|
32
|
-
// Before this fix, the reverse journal->summary check (`unmatchedJournalEntities` below) counted
|
|
33
|
-
// ALL rows for a target type, including these, so a type whose only rows were e.g.
|
|
34
|
-
// `skipped_out_of_scope` was never named by any ordinary or naming-only summary bucket (nothing
|
|
35
|
-
// was imported/deferred/failed/attempted/already-present for it) and fell into
|
|
36
|
-
// `unmatchedJournalEntities` permanently -- for example a journal whose only row for
|
|
37
|
-
// a target type (`ecom/shipping-option`) is a single `skipped_out_of_scope` row. Excluding these statuses from the "claiming" row count used by
|
|
38
|
-
// that check -- and from `coverageByType`'s cumulative high-water mark itself,
|
|
39
|
-
// so the mark and the check it feeds always measure the same thing -- fixes this without making
|
|
40
|
-
// skipped_out_of_scope a journal-count claim anywhere else.
|
|
41
|
-
const NON_CLAIMING_ATTEMPT_STATUSES = new Set(['skipped_already_imported', 'skipped_safe_mode_blocked', 'skipped_out_of_scope']);
|
|
42
|
-
|
|
43
|
-
function executionDir(projectDir) {
|
|
44
|
-
return path.join(projectDir, 'execution');
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function recoveryLogPath(projectDir) {
|
|
48
|
-
return path.join(executionDir(projectDir), 'recovery-log.json');
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function liveImportSummaryPath(projectDir) {
|
|
52
|
-
return path.join(executionDir(projectDir), 'live-import-summary.json');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
async function pathExists(filePath) {
|
|
56
|
-
try {
|
|
57
|
-
await fs.access(filePath);
|
|
58
|
-
return true;
|
|
59
|
-
} catch (error) {
|
|
60
|
-
if (error && error.code === 'ENOENT') {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
throw error;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
async function writeJsonAtomic(filePath, data) {
|
|
68
|
-
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
69
|
-
const tempPath = `${filePath}.${process.pid}.${Date.now()}.tmp`;
|
|
70
|
-
await fs.writeFile(tempPath, `${JSON.stringify(data, null, 2)}\n`, 'utf8');
|
|
71
|
-
await fs.rename(tempPath, filePath);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
async function readJsonIfExists(filePath, fallback) {
|
|
75
|
-
if (!(await pathExists(filePath))) {
|
|
76
|
-
return fallback;
|
|
77
|
-
}
|
|
78
|
-
return JSON.parse(await fs.readFile(filePath, 'utf8'));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function requireString(value, field) {
|
|
82
|
-
if (!value || typeof value !== 'string') {
|
|
83
|
-
throw new Error(`${field} must be a non-empty string`);
|
|
84
|
-
}
|
|
85
|
-
return value;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function count(value, field) {
|
|
89
|
-
if (value === undefined || value === null) {
|
|
90
|
-
return 0;
|
|
91
|
-
}
|
|
92
|
-
if (!Number.isInteger(value) || value < 0) {
|
|
93
|
-
throw new Error(`${field} must be a non-negative integer`);
|
|
94
|
-
}
|
|
95
|
-
return value;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function sourceStableKey(sourceSystem, sourceEntityType, sourceId) {
|
|
99
|
-
return `${sourceSystem}:${sourceEntityType}:${sourceId}`;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function defaultSourceId(record) {
|
|
103
|
-
return record && (record.id ?? record.ID ?? record.sourceId);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function defaultSourceType(record) {
|
|
107
|
-
return record && (record.sourceType ?? record.subtype ?? record.type);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function normalizeSelectionFilters(input = {}) {
|
|
111
|
-
const filters = {
|
|
112
|
-
entity: input.entity || input.sourceEntityType || null,
|
|
113
|
-
sourceType: input.sourceType || input.source_type || null,
|
|
114
|
-
missingOnly: Boolean(input.missingOnly || input['missing-only']),
|
|
115
|
-
failedOnly: Boolean(input.failedOnly || input['failed-only']),
|
|
116
|
-
deferredOnly: Boolean(input.deferredOnly || input['deferred-only']),
|
|
117
|
-
// Unresolved gets its own selection mode because its next action differs:
|
|
118
|
-
// read the target back, never re-send. Re-sending an uncertain write is how a recovery
|
|
119
|
-
// pass creates a duplicate on a live store.
|
|
120
|
-
unresolvedOnly: Boolean(input.unresolvedOnly || input['unresolved-only']),
|
|
121
|
-
};
|
|
122
|
-
const exclusive = [filters.missingOnly, filters.failedOnly, filters.deferredOnly, filters.unresolvedOnly].filter(Boolean);
|
|
123
|
-
if (exclusive.length > 1) {
|
|
124
|
-
throw new Error('--missing-only, --failed-only, --deferred-only, and --unresolved-only are mutually exclusive');
|
|
125
|
-
}
|
|
126
|
-
return filters;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// A rerun buckets the refreshed scope into create / update / unchanged
|
|
130
|
-
// / unknown against the crosswalk baseline. It is deliberately NOT expressible as the existing
|
|
131
|
-
// filters: `missingOnly` excludes every crosswalk hit (so no changed record is ever seen) and
|
|
132
|
-
// `failedOnly` only revisits what was already attempted (so a change nobody attempted is
|
|
133
|
-
// missed). A regression check exists because an importer built from those two filters looks
|
|
134
|
-
// like a delta and silently is not.
|
|
135
|
-
//
|
|
136
|
-
// `unknown` is a first-class outcome, never folded into unchanged: see rerunDecision.
|
|
137
|
-
function selectRerunRecords(records, options = {}) {
|
|
138
|
-
if (!Array.isArray(records)) {
|
|
139
|
-
throw new Error('records must be an array');
|
|
140
|
-
}
|
|
141
|
-
const sourceSystem = options.sourceSystem || 'wordpress';
|
|
142
|
-
const sourceEntityType = requireString(
|
|
143
|
-
options.entity || options.sourceEntityType,
|
|
144
|
-
'rerun selection entity',
|
|
145
|
-
);
|
|
146
|
-
const getSourceId = options.getSourceId || defaultSourceId;
|
|
147
|
-
const crosswalkBySource = options.crosswalkBySource || {};
|
|
148
|
-
const attemptsBySource = options.attemptsBySource || foldAttemptsBySource(options.attemptRows || []);
|
|
149
|
-
// How to read this entity's version off a refreshed source record. Declared by the adapter,
|
|
150
|
-
// never guessed here — an object id or capture time must never be treated as a record version an object id or capture time as a record version.
|
|
151
|
-
const sourceVersionField = options.sourceVersionField || null;
|
|
152
|
-
const getSourceVersion = options.getSourceVersion
|
|
153
|
-
|| ((record) => (sourceVersionField ? record?.[sourceVersionField] : undefined));
|
|
154
|
-
const getSourceHash = options.getSourceHash || (() => undefined);
|
|
155
|
-
const sourceHashDefinition = options.sourceHashDefinition || null;
|
|
156
|
-
// Excluded history and deletions stay out. The accepted scope is enforced HERE
|
|
157
|
-
// rather than deferred to a generated importer: `inScope(record)` returns false for anything
|
|
158
|
-
// the approved plan excluded, and those records are reported as out-of-scope, never actioned.
|
|
159
|
-
// Deletions need no rule beyond this loop: a record absent from the refreshed source is simply
|
|
160
|
-
// never iterated, so absence can never become a delete instruction.
|
|
161
|
-
const inScope = typeof options.inScope === 'function' ? options.inScope : null;
|
|
162
|
-
// Per-entity update capability, so a changed record for an entity with no verified
|
|
163
|
-
// revision-protected writer is reported for review instead of being routed to an update.
|
|
164
|
-
const entityRef = options.targetEntityRef || null;
|
|
165
|
-
const declaredUpdateWriters = options.declaredUpdateWriters || {};
|
|
166
|
-
// FAIL CLOSED. An undeclared entity used to default to supported:true, which bypassed BOTH the
|
|
167
|
-
// order ban and the verified-writer requirement — an order with no targetEntityRef went
|
|
168
|
-
// straight to `update`. Absence of a declaration is not evidence that an update is safe, so
|
|
169
|
-
// the missing declaration is itself a review outcome.
|
|
170
|
-
const updateSupport = updateSupportFor(entityRef, { declaredUpdateWriters });
|
|
171
|
-
|
|
172
|
-
const create = [];
|
|
173
|
-
const update = [];
|
|
174
|
-
const unchanged = [];
|
|
175
|
-
const unknown = [];
|
|
176
|
-
const excluded = [];
|
|
177
|
-
const outOfScope = [];
|
|
178
|
-
const needsReconciliation = [];
|
|
179
|
-
const reportForReview = [];
|
|
180
|
-
|
|
181
|
-
for (const record of records) {
|
|
182
|
-
const sourceId = getSourceId(record);
|
|
183
|
-
if (sourceId === undefined || sourceId === null || sourceId === '') {
|
|
184
|
-
excluded.push({ record, reason: 'missing_source_id' });
|
|
185
|
-
continue;
|
|
186
|
-
}
|
|
187
|
-
const stableKey = sourceStableKey(sourceSystem, sourceEntityType, String(sourceId));
|
|
188
|
-
if (inScope && !inScope(record)) {
|
|
189
|
-
outOfScope.push({ sourceStableKey: stableKey, reason: 'excluded_by_accepted_scope' });
|
|
190
|
-
continue;
|
|
191
|
-
}
|
|
192
|
-
const crosswalkRow = crosswalkBySource[stableKey] || null;
|
|
193
|
-
const latestAttempt = attemptsBySource[stableKey] || null;
|
|
194
|
-
const decision = rerunDecision({
|
|
195
|
-
crosswalkRow,
|
|
196
|
-
sourceVersion: getSourceVersion(record),
|
|
197
|
-
sourceVersionField,
|
|
198
|
-
sourceHash: getSourceHash(record),
|
|
199
|
-
sourceHashDefinition,
|
|
200
|
-
});
|
|
201
|
-
const entry = {
|
|
202
|
-
record,
|
|
203
|
-
sourceStableKey: stableKey,
|
|
204
|
-
existing: crosswalkRow,
|
|
205
|
-
latestAttempt,
|
|
206
|
-
decision,
|
|
207
|
-
};
|
|
208
|
-
if (decision.action === 'create') {
|
|
209
|
-
// The attempt journal is consulted, not merely carried: an unconfirmed earlier write may
|
|
210
|
-
// already exist on the target, so this reconciles before it creates a second one.
|
|
211
|
-
if (latestAttempt && UNCERTAIN_ATTEMPT_STATUSES.has(latestAttempt.status)) {
|
|
212
|
-
needsReconciliation.push({ ...entry, reason: `uncertain_prior_attempt:${latestAttempt.status}` });
|
|
213
|
-
} else {
|
|
214
|
-
create.push(entry);
|
|
215
|
-
}
|
|
216
|
-
} else if (decision.action === 'update') {
|
|
217
|
-
if (!updateSupport.supported) {
|
|
218
|
-
reportForReview.push({ ...entry, reason: updateSupport.reason, detail: updateSupport.detail || null });
|
|
219
|
-
} else if (latestAttempt && UNCERTAIN_ATTEMPT_STATUSES.has(latestAttempt.status)) {
|
|
220
|
-
// An uncertain attempt is as dangerous on a LINKED record as on a new one, for a
|
|
221
|
-
// different reason: if the previous write actually landed and the process died before
|
|
222
|
-
// saving its baseline, the saved revision is already stale. Re-sending it makes the
|
|
223
|
-
// importer collide with its OWN earlier write and report it to the user as a merchant
|
|
224
|
-
// edit. Reconcile first.
|
|
225
|
-
needsReconciliation.push({ ...entry, reason: `uncertain_prior_attempt:${latestAttempt.status}` });
|
|
226
|
-
} else {
|
|
227
|
-
update.push(entry);
|
|
228
|
-
}
|
|
229
|
-
} else if (decision.action === 'skip') {
|
|
230
|
-
if (verificationKind({ ...options, entity: sourceEntityType }) !== 'none') {
|
|
231
|
-
needsReconciliation.push({ ...entry, reason: 'unchanged_source_requires_target_verification' });
|
|
232
|
-
} else unchanged.push(entry);
|
|
233
|
-
} else {
|
|
234
|
-
unknown.push(entry);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Unknown counts are not zero. The caller reports these four buckets separately; an
|
|
239
|
-
// unresolved record must never be summed into unchanged to make a report look clean.
|
|
240
|
-
return {
|
|
241
|
-
entity: sourceEntityType,
|
|
242
|
-
mode: 'rerun',
|
|
243
|
-
create,
|
|
244
|
-
update,
|
|
245
|
-
unchanged,
|
|
246
|
-
unknown,
|
|
247
|
-
excluded,
|
|
248
|
-
outOfScope,
|
|
249
|
-
needsReconciliation,
|
|
250
|
-
reportForReview,
|
|
251
|
-
updateSupport,
|
|
252
|
-
summary: {
|
|
253
|
-
entity: sourceEntityType,
|
|
254
|
-
recordsRead: records.length,
|
|
255
|
-
toCreate: create.length,
|
|
256
|
-
toUpdate: update.length,
|
|
257
|
-
unchanged: unchanged.length,
|
|
258
|
-
unknown: unknown.length,
|
|
259
|
-
needsReconciliation: needsReconciliation.length,
|
|
260
|
-
reportForReview: reportForReview.length,
|
|
261
|
-
outOfScope: outOfScope.length,
|
|
262
|
-
excluded: excluded.length,
|
|
263
|
-
sourceVersionField: sourceVersionField || null,
|
|
264
|
-
},
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
async function selectRerunRecordsFromState(projectDir, records, options = {}) {
|
|
269
|
-
const crosswalk = await loadCrosswalk(projectDir);
|
|
270
|
-
const attempts = await loadAttemptJournal(projectDir);
|
|
271
|
-
return selectRerunRecords(records, {
|
|
272
|
-
...options,
|
|
273
|
-
crosswalkBySource: crosswalk.bySource,
|
|
274
|
-
attemptRows: attempts.rows,
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
function foldAttemptsBySource(attemptRows = []) {
|
|
279
|
-
const bySource = {};
|
|
280
|
-
for (const row of attemptRows) {
|
|
281
|
-
if (!row || !row.sourceStableKey) {
|
|
282
|
-
continue;
|
|
283
|
-
}
|
|
284
|
-
bySource[row.sourceStableKey] = row;
|
|
285
|
-
}
|
|
286
|
-
return bySource;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
function selectImportRecords(records, options = {}) {
|
|
290
|
-
if (!Array.isArray(records)) {
|
|
291
|
-
throw new Error('records must be an array');
|
|
292
|
-
}
|
|
293
|
-
const filters = normalizeSelectionFilters(options.filters || options);
|
|
294
|
-
const sourceSystem = options.sourceSystem || 'wordpress';
|
|
295
|
-
const sourceEntityType = requireString(filters.entity || options.sourceEntityType, 'selection entity');
|
|
296
|
-
const getSourceId = options.getSourceId || defaultSourceId;
|
|
297
|
-
const getSourceType = options.getSourceType || defaultSourceType;
|
|
298
|
-
const crosswalkBySource = options.crosswalkBySource || {};
|
|
299
|
-
const attemptsBySource = options.attemptsBySource || foldAttemptsBySource(options.attemptRows || []);
|
|
300
|
-
|
|
301
|
-
const selected = [];
|
|
302
|
-
const alreadyPresent = [];
|
|
303
|
-
const excluded = [];
|
|
304
|
-
const failed = [];
|
|
305
|
-
const deferred = [];
|
|
306
|
-
const unresolved = [];
|
|
307
|
-
|
|
308
|
-
for (const record of records) {
|
|
309
|
-
const sourceId = getSourceId(record);
|
|
310
|
-
if (sourceId === undefined || sourceId === null || sourceId === '') {
|
|
311
|
-
excluded.push({ record, reason: 'missing_source_id' });
|
|
312
|
-
continue;
|
|
313
|
-
}
|
|
314
|
-
const stableKey = sourceStableKey(sourceSystem, sourceEntityType, String(sourceId));
|
|
315
|
-
const sourceType = getSourceType(record);
|
|
316
|
-
const existing = crosswalkBySource[stableKey] || null;
|
|
317
|
-
const latestAttempt = attemptsBySource[stableKey] || null;
|
|
318
|
-
|
|
319
|
-
if (filters.sourceType && String(sourceType) !== String(filters.sourceType)) {
|
|
320
|
-
excluded.push({ sourceStableKey: stableKey, sourceType, reason: 'source_type_filter' });
|
|
321
|
-
continue;
|
|
322
|
-
}
|
|
323
|
-
const identityRequired = verificationKind({ ...options, entity: sourceEntityType, targetEntityType: existing?.targetEntityType }) !== 'none';
|
|
324
|
-
if (filters.missingOnly && existing && !identityRequired) {
|
|
325
|
-
alreadyPresent.push({ sourceStableKey: stableKey, targetId: existing.targetId, reason: 'crosswalk' });
|
|
326
|
-
continue;
|
|
327
|
-
}
|
|
328
|
-
if (filters.failedOnly && (!latestAttempt || !String(latestAttempt.status).startsWith('failed'))) {
|
|
329
|
-
excluded.push({ sourceStableKey: stableKey, reason: 'not_failed' });
|
|
330
|
-
continue;
|
|
331
|
-
}
|
|
332
|
-
if (filters.deferredOnly && (!latestAttempt || !DEFERRED_ATTEMPT_STATUSES.has(latestAttempt.status))) {
|
|
333
|
-
excluded.push({ sourceStableKey: stableKey, reason: 'not_deferred' });
|
|
334
|
-
continue;
|
|
335
|
-
}
|
|
336
|
-
if (filters.unresolvedOnly && (!latestAttempt || !UNRESOLVED_ATTEMPT_STATUSES.has(latestAttempt.status))) {
|
|
337
|
-
excluded.push({ sourceStableKey: stableKey, reason: 'not_unresolved' });
|
|
338
|
-
continue;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
if (latestAttempt && String(latestAttempt.status).startsWith('failed')) {
|
|
342
|
-
failed.push(stableKey);
|
|
343
|
-
}
|
|
344
|
-
if (latestAttempt && DEFERRED_ATTEMPT_STATUSES.has(latestAttempt.status)) {
|
|
345
|
-
deferred.push(stableKey);
|
|
346
|
-
}
|
|
347
|
-
// Never also counted in `failed`: the two sets are disjoint by construction, and an
|
|
348
|
-
// uncertain write summed into a failure count produces a report that reconciles
|
|
349
|
-
// arithmetically and is wrong.
|
|
350
|
-
if (latestAttempt && UNRESOLVED_ATTEMPT_STATUSES.has(latestAttempt.status)) {
|
|
351
|
-
unresolved.push(stableKey);
|
|
352
|
-
}
|
|
353
|
-
selected.push({ record, sourceStableKey: stableKey, sourceType, existing, latestAttempt });
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
return {
|
|
357
|
-
filters,
|
|
358
|
-
entity: sourceEntityType,
|
|
359
|
-
selected,
|
|
360
|
-
alreadyPresent,
|
|
361
|
-
excluded,
|
|
362
|
-
unresolved,
|
|
363
|
-
summary: {
|
|
364
|
-
entity: sourceEntityType,
|
|
365
|
-
sourceType: filters.sourceType || 'all',
|
|
366
|
-
recordsRead: records.length,
|
|
367
|
-
recordsSelected: selected.length,
|
|
368
|
-
alreadyPresent: alreadyPresent.length,
|
|
369
|
-
excluded: excluded.length,
|
|
370
|
-
failedCandidates: failed.length,
|
|
371
|
-
deferredCandidates: deferred.length,
|
|
372
|
-
unresolvedCandidates: unresolved.length,
|
|
373
|
-
},
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
async function selectImportRecordsFromState(projectDir, records, options = {}) {
|
|
378
|
-
const crosswalk = await loadCrosswalk(projectDir);
|
|
379
|
-
const attempts = await loadAttemptJournal(projectDir);
|
|
380
|
-
return selectImportRecords(records, {
|
|
381
|
-
...options,
|
|
382
|
-
crosswalkBySource: crosswalk.bySource,
|
|
383
|
-
attemptRows: attempts.rows,
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
function recoveryIdFor(entry) {
|
|
388
|
-
if (entry.recoveryId) {
|
|
389
|
-
return entry.recoveryId;
|
|
390
|
-
}
|
|
391
|
-
const hash = crypto.createHash('sha256')
|
|
392
|
-
.update(JSON.stringify({
|
|
393
|
-
timestamp: entry.timestamp,
|
|
394
|
-
selectionFilters: entry.selectionFilters,
|
|
395
|
-
reason: entry.reason,
|
|
396
|
-
recordsSelected: entry.recordsSelected,
|
|
397
|
-
recordsAttempted: entry.recordsAttempted,
|
|
398
|
-
}))
|
|
399
|
-
.digest('hex')
|
|
400
|
-
.slice(0, 12);
|
|
401
|
-
const stamp = String(entry.timestamp || new Date().toISOString()).replace(/[^0-9TZ]/g, '').slice(0, 15);
|
|
402
|
-
return `recovery-${stamp}-${hash}`;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
function normalizeRecoveryEntry(input = {}) {
|
|
406
|
-
const mode = input.mode || (input.selectionFilters && (
|
|
407
|
-
input.selectionFilters.missingOnly ? 'missing-only' :
|
|
408
|
-
input.selectionFilters.failedOnly ? 'failed-only' :
|
|
409
|
-
input.selectionFilters.deferredOnly ? 'deferred-only' :
|
|
410
|
-
input.selectionFilters.unresolvedOnly ? 'unresolved-only' : 'partial'
|
|
411
|
-
));
|
|
412
|
-
if (!RECOVERY_MODES.includes(mode)) {
|
|
413
|
-
throw new Error(`recovery mode must be one of: ${RECOVERY_MODES.join(', ')}`);
|
|
414
|
-
}
|
|
415
|
-
const status = input.status || 'partial';
|
|
416
|
-
if (!RECOVERY_STATUSES.includes(status)) {
|
|
417
|
-
throw new Error(`recovery status must be one of: ${RECOVERY_STATUSES.join(', ')}`);
|
|
418
|
-
}
|
|
419
|
-
const timestamp = input.timestamp || new Date().toISOString();
|
|
420
|
-
if (Number.isNaN(Date.parse(timestamp))) {
|
|
421
|
-
throw new Error('recovery timestamp must be an ISO timestamp');
|
|
422
|
-
}
|
|
423
|
-
// `unresolved` must be stated, not defaulted: an entry that omits it is an
|
|
424
|
-
// entry whose author never decided where its uncertain writes went, and `count()` would
|
|
425
|
-
// silently read that as zero.
|
|
426
|
-
if (input.unresolved === undefined || input.unresolved === null) {
|
|
427
|
-
throw new Error('recovery unresolved count must be stated explicitly — uncertain writes are never folded into failed');
|
|
428
|
-
}
|
|
429
|
-
const entry = {
|
|
430
|
-
schemaVersion: RECOVERY_SCHEMA_VERSION,
|
|
431
|
-
recoveryId: input.recoveryId || null,
|
|
432
|
-
timestamp,
|
|
433
|
-
// This entry is built field by field, so anything not named here is
|
|
434
|
-
// dropped silently — which is why both of these are added explicitly.
|
|
435
|
-
runId: requireString(input.runId, 'recovery runId'),
|
|
436
|
-
mode,
|
|
437
|
-
selectionFilters: input.selectionFilters || {},
|
|
438
|
-
reason: requireString(input.reason || 'operator_requested_recovery', 'recovery reason'),
|
|
439
|
-
recordsSelected: count(input.recordsSelected, 'recordsSelected'),
|
|
440
|
-
recordsAttempted: count(input.recordsAttempted, 'recordsAttempted'),
|
|
441
|
-
imported: count(input.imported, 'imported'),
|
|
442
|
-
alreadyPresent: count(input.alreadyPresent, 'alreadyPresent'),
|
|
443
|
-
failed: count(input.failed, 'failed'),
|
|
444
|
-
deferred: count(input.deferred, 'deferred'),
|
|
445
|
-
// Its own count, never summed into `failed`. A recovery record whose failed count silently
|
|
446
|
-
// includes uncertain writes reconciles arithmetically and is wrong, which is the worst
|
|
447
|
-
// combination available.
|
|
448
|
-
unresolved: count(input.unresolved, 'unresolved'),
|
|
449
|
-
crosswalkChanges: input.crosswalkChanges || { before: 0, after: 0, added: 0, updated: 0 },
|
|
450
|
-
summaryChanges: input.summaryChanges || {},
|
|
451
|
-
outcome: requireString(input.outcome || status, 'recovery outcome'),
|
|
452
|
-
status,
|
|
453
|
-
logs: Array.isArray(input.logs) ? input.logs : [],
|
|
454
|
-
// A keep-Wix answer has to survive a reload, or the next rerun re-asks a
|
|
455
|
-
// question the user already answered — or worse, silently overwrites what they chose to
|
|
456
|
-
// keep. This entry is built field-by-field, so anything not named here is dropped; before
|
|
457
|
-
// this, passing a recordConflictDecision() result through lost choice, record identity,
|
|
458
|
-
// versions and the binding fingerprint without erroring.
|
|
459
|
-
conflictDecisions: normalizeConflictDecisions(input.conflictDecisions),
|
|
460
|
-
};
|
|
461
|
-
entry.recoveryId = recoveryIdFor(entry);
|
|
462
|
-
return entry;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
// Each decision keeps exactly the fields keepDecisionApplies()/approvalApplies() need to judge
|
|
466
|
-
// whether it still applies. A decision missing any of them cannot be matched later, so it is
|
|
467
|
-
// rejected at write time rather than silently stored as unusable.
|
|
468
|
-
const CONFLICT_DECISION_FIELDS = [
|
|
469
|
-
'choice', 'sourceStableKey', 'targetId', 'entity',
|
|
470
|
-
'sourceVersion', 'sourceHash', 'reviewedTargetRevision', 'bindingFingerprint',
|
|
471
|
-
'decidedBy', 'decidedAt',
|
|
472
|
-
];
|
|
473
|
-
|
|
474
|
-
function normalizeConflictDecisions(input) {
|
|
475
|
-
if (input === undefined || input === null) {
|
|
476
|
-
return [];
|
|
477
|
-
}
|
|
478
|
-
if (!Array.isArray(input)) {
|
|
479
|
-
throw new Error('conflictDecisions must be an array');
|
|
480
|
-
}
|
|
481
|
-
return input.map((d, i) => {
|
|
482
|
-
if (!d || typeof d !== 'object') {
|
|
483
|
-
throw new Error(`conflictDecisions[${i}] must be an object`);
|
|
484
|
-
}
|
|
485
|
-
for (const required of ['choice', 'sourceStableKey', 'targetId', 'bindingFingerprint']) {
|
|
486
|
-
if (!d[required] || typeof d[required] !== 'string') {
|
|
487
|
-
throw new Error(`conflictDecisions[${i}].${required} must be a non-empty string — a decision that cannot be matched to a record is not reusable`);
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
if (!['override', 'keep'].includes(d.choice)) {
|
|
491
|
-
throw new Error(`conflictDecisions[${i}].choice must be override or keep`);
|
|
492
|
-
}
|
|
493
|
-
const out = {};
|
|
494
|
-
for (const f of CONFLICT_DECISION_FIELDS) {
|
|
495
|
-
out[f] = d[f] === undefined ? null : d[f];
|
|
496
|
-
}
|
|
497
|
-
return out;
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
// Reads every conflict decision recorded across the whole recovery log, newest last, so a rerun
|
|
502
|
-
// can ask "did the user already answer for this record?" without replaying the log itself.
|
|
503
|
-
function recoveryEntriesOf(recoveryLog) {
|
|
504
|
-
// loadRecoveryLog() returns an ARRAY. Reading `.entries` off it yields
|
|
505
|
-
// Array.prototype.entries -- a function, which a for-of then rejects with a bare
|
|
506
|
-
// "entries is not iterable". Accept the array (the real shape on disk) and the
|
|
507
|
-
// `{ entries: [...] }` wrapper, and treat anything else as empty.
|
|
508
|
-
if (Array.isArray(recoveryLog)) {
|
|
509
|
-
return recoveryLog;
|
|
510
|
-
}
|
|
511
|
-
if (recoveryLog && Array.isArray(recoveryLog.entries)) {
|
|
512
|
-
return recoveryLog.entries;
|
|
513
|
-
}
|
|
514
|
-
return [];
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
function loadConflictDecisions(recoveryLog) {
|
|
518
|
-
const entries = recoveryEntriesOf(recoveryLog);
|
|
519
|
-
const out = [];
|
|
520
|
-
for (const entry of entries) {
|
|
521
|
-
for (const d of (entry.conflictDecisions || [])) {
|
|
522
|
-
out.push({ ...d, recoveryId: entry.recoveryId || null, timestamp: entry.timestamp || null });
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
return out;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
// The newest decision for one record, which is the only one that can still apply.
|
|
529
|
-
function latestConflictDecisionFor(recoveryLog, sourceStableKey) {
|
|
530
|
-
const all = loadConflictDecisions(recoveryLog).filter((d) => d.sourceStableKey === sourceStableKey);
|
|
531
|
-
return all.length ? all[all.length - 1] : null;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
async function loadRecoveryLog(projectDir) {
|
|
535
|
-
const rows = await readJsonIfExists(recoveryLogPath(projectDir), []);
|
|
536
|
-
if (!Array.isArray(rows)) {
|
|
537
|
-
throw new Error('execution/recovery-log.json must contain a JSON array');
|
|
538
|
-
}
|
|
539
|
-
return rows.map((row) => normalizeRecoveryEntry(row));
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
async function appendRecoveryLogEntry(projectDir, entry) {
|
|
543
|
-
const existing = await loadRecoveryLog(projectDir);
|
|
544
|
-
const normalized = normalizeRecoveryEntry(entry);
|
|
545
|
-
if (existing.some((row) => row.recoveryId === normalized.recoveryId)) {
|
|
546
|
-
throw new Error(`duplicate recoveryId: ${normalized.recoveryId}`);
|
|
547
|
-
}
|
|
548
|
-
const next = [...existing, normalized];
|
|
549
|
-
await writeJsonAtomic(recoveryLogPath(projectDir), next);
|
|
550
|
-
return normalized;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
function diffCounts(before = {}, after = {}) {
|
|
554
|
-
before = before || {};
|
|
555
|
-
after = after || {};
|
|
556
|
-
const keys = new Set([...Object.keys(before || {}), ...Object.keys(after || {})]);
|
|
557
|
-
const diff = {};
|
|
558
|
-
for (const key of keys) {
|
|
559
|
-
if (Number.isInteger(before[key]) || Number.isInteger(after[key])) {
|
|
560
|
-
diff[key] = (after[key] || 0) - (before[key] || 0);
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
return diff;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
// ---------------------------------------------------------------------------
|
|
567
|
-
// The live import summary checks its held counters against the attempt journal for
|
|
568
|
-
// the same run, instead of trusting them on faith. This cache keeps that check cheap and isolated per run.
|
|
569
|
-
// ---------------------------------------------------------------------------
|
|
570
|
-
|
|
571
|
-
const COVERAGE_JOURNAL_REL_PATH = 'state/attempts/write-attempts.ndjson';
|
|
572
|
-
const COVERAGE_ORDINARY_BUCKETS = ['imported', 'deferred', 'failed', 'attempted'];
|
|
573
|
-
// A flush can legitimately name an entity ONLY through a
|
|
574
|
-
// non-coverage-bucket counter -- `alreadyPresentByCrosswalk` records what a re-run pass found
|
|
575
|
-
// already linked, with nothing attempted this run and so no journal status to compare it
|
|
576
|
-
// against (the `imported + alreadyPresentByCrosswalk + deferred + failed == inScope` identity
|
|
577
|
-
// this repo's entityCompleteness accounting already protects). A flush naming only this
|
|
578
|
-
// counter for an entity is still reporting on that entity: it must count toward "this flush named
|
|
579
|
-
// it" for the reverse-direction match, the same way an ordinary bucket does, or a correct re-run
|
|
580
|
-
// pass reporting solely `alreadyPresentByCrosswalk` gets the same false `unmatchedJournalEntities`
|
|
581
|
-
// mismatch an ordinary bucket's absence would produce if it were mistaken for silence.
|
|
582
|
-
const COVERAGE_NAMING_ONLY_BUCKETS = ['alreadyPresentByCrosswalk'];
|
|
583
|
-
|
|
584
|
-
// Keyed by the absolute live-journal path, so distinct project directories (or a test's many temp
|
|
585
|
-
// dirs) never share state. Each entry's `offset` is the end of the last complete line read; `runs`
|
|
586
|
-
// holds one folded Map<sourceStableKey, latestRow> PER RUN ID seen in the journal so far -- not
|
|
587
|
-
// only the run currently flushing -- so switching from run A to run B and back never carries A's
|
|
588
|
-
// rows into B's map and never misses a row written while the other run was flushing. Memory is
|
|
589
|
-
// O(unique records across runs in the journal); work per flush is O(new bytes read).
|
|
590
|
-
//
|
|
591
|
-
// `reportedEntityCoverage` is a SIBLING per-run accumulator, independent of the folded rows: for
|
|
592
|
-
// each resolved target entity type some flush of this run has named a summary key for (ever, not
|
|
593
|
-
// only the flush currently running), it keeps the highest CLAIMING journal row count (never the raw row count -- see `NON_CLAIMING_ATTEMPT_STATUSES` above) that was true for
|
|
594
|
-
// that entity AT THE TIME it was last named -- not just a boolean "was it ever named". The journal fold
|
|
595
|
-
// is deliberately cumulative across the whole run (so a later flush sees everything an earlier one
|
|
596
|
-
// did -- that is the point of this cache), but `live-import-summary.json` is fully overwritten on
|
|
597
|
-
// every flush and a real multi-entity importer flushes one entity at a time (the only documented
|
|
598
|
-
// caller shape, rp-import-codegen/SKILL.md's contacts wrapper). Comparing the CURRENT flush's
|
|
599
|
-
// summary keys against the FULL run's cumulative journal entity types would then flag every entity
|
|
600
|
-
// reported by an earlier flush of the SAME run as "journal has rows, no summary key names it" the
|
|
601
|
-
// moment a later flush reports a different entity -- a false mismatch on every correctly-behaving
|
|
602
|
-
// multi-entity run. Tracking what has EVER been named across
|
|
603
|
-
// the run's own flushes, instead of only the current one, keeps a truly never-reported entity type
|
|
604
|
-
// detectable (it is never added) while an entity named by an earlier flush of this same run is
|
|
605
|
-
// correctly recognized as reported, not re-flagged by a later, different flush -- AS LONG AS the
|
|
606
|
-
// journal has not grown new rows for that entity since the last time it was named.
|
|
607
|
-
//
|
|
608
|
-
// A plain per-entity boolean
|
|
609
|
-
// is wrong, because "named once" is not the same thing as "accounts for the journal's current
|
|
610
|
-
// state". A flush naming an entity ONLY via a naming-only bucket (`alreadyPresentByCrosswalk`)
|
|
611
|
-
// while that entity had zero matching journal rows at that moment legitimately agrees -- but if the journal LATER accrues real, ordinary-status rows for that same entity type,
|
|
612
|
-
// and no later flush of the run ever names it again (via any bucket), a permanent boolean would
|
|
613
|
-
// keep calling that entity "reported" forever, hiding genuinely unreported journal activity from
|
|
614
|
-
// the reverse-direction (journal -> summary) check this check exists to provide. Storing the ROW
|
|
615
|
-
// COUNT that was true at the moment of naming, instead of a bare boolean, and re-comparing it
|
|
616
|
-
// against the journal's CURRENT row count on every subsequent flush, fixes this without reopening
|
|
617
|
-
// either case: an entity whose journal rows have not grown past what was already named stays correctly
|
|
618
|
-
// exempt (the legitimate "nothing new happened" cases both look like this), while new,
|
|
619
|
-
// never-claimed rows past that high-water mark are caught the same way a never-named entity is.
|
|
620
|
-
//
|
|
621
|
-
// This whole cache, including `reportedEntityCoverage`, is
|
|
622
|
-
// process-local (in-memory) and is NOT persisted across a process restart. That is intentional,
|
|
623
|
-
// not an oversight: a run id's entire lifetime is confined to one process by a GATE-ENFORCED
|
|
624
|
-
// contract, not merely a convention. Every generated importer must self-describe
|
|
625
|
-
// `runIdSource: "process-start"` (`assertGeneratedImporterContract` below rejects anything else;
|
|
626
|
-
// `rp-import-codegen/SKILL.md`'s "runId is the id the importer mints at process start" and
|
|
627
|
-
// `rp-execute-import/SKILL.md`'s recovery-log contract, "the id the importer minted at process
|
|
628
|
-
// start, so the entry is attributable to a pass", restate the same rule). So a genuinely resumed
|
|
629
|
-
// or recovery pass is a NEW process that mints a NEW run id -- it is correct, not a loss of state,
|
|
630
|
-
// for that new run id's `reportedEntityCoverage` to start empty, because no flush has ever happened
|
|
631
|
-
// under it. This reasoning does NOT cover a caller outside that gated contract that manually
|
|
632
|
-
// reuses an old run id across a process restart (for example an ad hoc recovery script bypassing
|
|
633
|
-
// codegen); that usage is unsupported today and would resurface the false-mismatch pattern on
|
|
634
|
-
// its first post-restart flush.
|
|
635
|
-
const coverageJournalCache = new Map();
|
|
636
|
-
|
|
637
|
-
function emptyCoverageCacheEntry() {
|
|
638
|
-
return { offset: 0, runs: new Map(), reportedEntityCoverage: new Map() };
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
// Reuses `foldAttemptsBySourceKey` (local-state.js) on just the newly read rows, grouped by run,
|
|
642
|
-
// then merges each run's folded result into that run's cached map -- `Map.set` overwrites, and the
|
|
643
|
-
// new rows are strictly later in file order than whatever is already cached, so this reproduces
|
|
644
|
-
// exactly what folding the whole run's rows from scratch would produce.
|
|
645
|
-
function mergeRowsIntoCoverageCache(entry, rows) {
|
|
646
|
-
const byRun = new Map();
|
|
647
|
-
for (const row of rows) {
|
|
648
|
-
if (!row || !row.runId || !row.sourceStableKey) {
|
|
649
|
-
continue;
|
|
650
|
-
}
|
|
651
|
-
if (!byRun.has(row.runId)) {
|
|
652
|
-
byRun.set(row.runId, []);
|
|
653
|
-
}
|
|
654
|
-
byRun.get(row.runId).push(row);
|
|
655
|
-
}
|
|
656
|
-
for (const [rowRunId, runRows] of byRun) {
|
|
657
|
-
const folded = foldAttemptsBySourceKey(runRows);
|
|
658
|
-
let runMap = entry.runs.get(rowRunId);
|
|
659
|
-
if (!runMap) {
|
|
660
|
-
runMap = new Map();
|
|
661
|
-
entry.runs.set(rowRunId, runMap);
|
|
662
|
-
}
|
|
663
|
-
for (const [key, row] of folded) {
|
|
664
|
-
runMap.set(key, row);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
// Count buckets, computed directly from the folded rows' latest status -- never derived by summing
|
|
670
|
-
// other held counters. `attempted` matches this repo's documented semantics
|
|
671
|
-
// (rp-import-codegen/SKILL.md:2181-2182): imported or failed, never deferred.
|
|
672
|
-
function coverageStatusCounts(rows) {
|
|
673
|
-
const counts = { imported: 0, deferred: 0, failed: 0, attempted: 0, unexpectedSkipped: 0, unresolved: 0 };
|
|
674
|
-
for (const row of rows) {
|
|
675
|
-
const status = row.status;
|
|
676
|
-
if (status === 'imported') {
|
|
677
|
-
counts.imported += 1;
|
|
678
|
-
counts.attempted += 1;
|
|
679
|
-
} else if (status === 'failed_retryable' || status === 'failed_terminal') {
|
|
680
|
-
counts.failed += 1;
|
|
681
|
-
counts.attempted += 1;
|
|
682
|
-
} else if (DEFERRED_ATTEMPT_STATUSES.has(status)) {
|
|
683
|
-
counts.deferred += 1;
|
|
684
|
-
} else if (status === 'skipped_unexpected') {
|
|
685
|
-
counts.unexpectedSkipped += 1;
|
|
686
|
-
} else if (UNRESOLVED_ATTEMPT_STATUSES.has(status)) {
|
|
687
|
-
counts.unresolved += 1;
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
return counts;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
// A held counter is "carried" only when the summary names it explicitly, including an explicit 0
|
|
694
|
-
// -- `in` rather than a truthiness check, so a real `0` is never mistaken for absence.
|
|
695
|
-
function heldBucketValue(summary, bucket, key) {
|
|
696
|
-
const container = summary && summary[bucket];
|
|
697
|
-
if (!container || typeof container !== 'object' || !(key in container)) {
|
|
698
|
-
return { present: false, value: null };
|
|
699
|
-
}
|
|
700
|
-
return { present: true, value: container[key] };
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
function truncateMessage(message) {
|
|
704
|
-
return typeof message === 'string' && message.length > 300 ? message.slice(0, 300) : message;
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
// Disagreeing `{key, bucket, held, journal}` entries, in entity-then-bucket order -- shared by the
|
|
708
|
-
// execution-log detail text below and by completion-report.js's operator-action text.
|
|
709
|
-
function coverageDisagreements(coverageCheck) {
|
|
710
|
-
const items = [];
|
|
711
|
-
for (const [key, row] of Object.entries((coverageCheck && coverageCheck.entities) || {})) {
|
|
712
|
-
for (const bucket of [...COVERAGE_ORDINARY_BUCKETS, 'unexpectedSkipped']) {
|
|
713
|
-
const counter = row[bucket];
|
|
714
|
-
if (counter && counter.compared && counter.agrees === false) {
|
|
715
|
-
items.push({ key, bucket, held: counter.held, journal: counter.journal });
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
return items;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
function describeCoverageMismatch(coverageCheck) {
|
|
723
|
-
const parts = coverageDisagreements(coverageCheck)
|
|
724
|
-
.map((item) => `${item.key}.${item.bucket} disagrees (held ${item.held}, journal ${item.journal})`);
|
|
725
|
-
for (const key of (coverageCheck && coverageCheck.unmatched) || []) {
|
|
726
|
-
parts.push(`${key} not found in the journal for this run`);
|
|
727
|
-
}
|
|
728
|
-
for (const type of (coverageCheck && coverageCheck.unmatchedJournalEntities) || []) {
|
|
729
|
-
parts.push(`journal has ${type} records not named by any summary key`);
|
|
730
|
-
}
|
|
731
|
-
return parts.join('; ') || 'coverage check mismatch';
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
// Reads (incrementally, via the cache above) the live journal rows for `runId`,
|
|
735
|
-
// folds them, and compares them against `summary`'s held counters. Never throws: every case the
|
|
736
|
-
// check itself cannot complete resolves to `status: "unchecked"` with a named `reason`.
|
|
737
|
-
async function computeCoverageCheck(projectDir, summary, options, runId) {
|
|
738
|
-
const checkedAt = new Date().toISOString();
|
|
739
|
-
const base = { runId: runId || null, checkedAt, journalPath: COVERAGE_JOURNAL_REL_PATH };
|
|
740
|
-
if (!runId) {
|
|
741
|
-
return { ...base, status: 'unchecked', reason: 'no_run_id', rowsRead: 0, entities: {}, unmatched: [], unmatchedJournalEntities: [] };
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
const absPath = path.resolve(attemptJournalPath(projectDir));
|
|
745
|
-
let entry = coverageJournalCache.get(absPath);
|
|
746
|
-
if (!entry) {
|
|
747
|
-
entry = emptyCoverageCacheEntry();
|
|
748
|
-
coverageJournalCache.set(absPath, entry);
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
let readResult;
|
|
752
|
-
try {
|
|
753
|
-
readResult = await readAttemptJournalSince(projectDir, entry.offset);
|
|
754
|
-
} catch (error) {
|
|
755
|
-
if (error && error.code === 'JOURNAL_MISSING') {
|
|
756
|
-
return { ...base, status: 'unchecked', reason: 'journal_missing', rowsRead: 0, entities: {}, unmatched: [], unmatchedJournalEntities: [] };
|
|
757
|
-
}
|
|
758
|
-
if (error && error.code === 'JOURNAL_READ_FAILED') {
|
|
759
|
-
return {
|
|
760
|
-
...base, status: 'unchecked', reason: 'journal_read_failed', rowsRead: 0, entities: {}, unmatched: [], unmatchedJournalEntities: [],
|
|
761
|
-
error: { code: (error.cause && error.cause.code) || null, message: truncateMessage(error.message) },
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
if (error && error.code === 'JOURNAL_INVALID') {
|
|
765
|
-
// Drop the whole cache entry so the next flush retries with a full read.
|
|
766
|
-
coverageJournalCache.delete(absPath);
|
|
767
|
-
return {
|
|
768
|
-
...base, status: 'unchecked', reason: 'journal_invalid', rowsRead: 0, entities: {}, unmatched: [], unmatchedJournalEntities: [],
|
|
769
|
-
error: { line: truncateMessage(error.line), message: truncateMessage(error.message) },
|
|
770
|
-
};
|
|
771
|
-
}
|
|
772
|
-
throw error;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
if (readResult.truncated) {
|
|
776
|
-
entry.runs = new Map();
|
|
777
|
-
entry.reportedEntityCoverage = new Map();
|
|
778
|
-
}
|
|
779
|
-
mergeRowsIntoCoverageCache(entry, readResult.rows);
|
|
780
|
-
entry.offset = readResult.nextOffset;
|
|
781
|
-
|
|
782
|
-
const runMap = entry.runs.get(runId) || new Map();
|
|
783
|
-
const entityTypesOption = (options && options.entityTypes) || {};
|
|
784
|
-
const resolveTargetEntityType = (key) => entityTypesOption[key] || key;
|
|
785
|
-
|
|
786
|
-
// Buckets that merely NAME an entity (for match purposes) vs. buckets whose VALUE is actually
|
|
787
|
-
// compared against the journal. `alreadyPresentByCrosswalk` is in the first set only.
|
|
788
|
-
const summaryKeys = new Set();
|
|
789
|
-
for (const bucket of [...COVERAGE_ORDINARY_BUCKETS, 'unexpectedSkipped', ...COVERAGE_NAMING_ONLY_BUCKETS]) {
|
|
790
|
-
const container = summary && summary[bucket];
|
|
791
|
-
if (container && typeof container === 'object') {
|
|
792
|
-
for (const key of Object.keys(container)) {
|
|
793
|
-
summaryKeys.add(key);
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
const rowsByTargetType = new Map();
|
|
799
|
-
for (const row of runMap.values()) {
|
|
800
|
-
const type = row.targetEntityType;
|
|
801
|
-
if (!rowsByTargetType.has(type)) {
|
|
802
|
-
rowsByTargetType.set(type, []);
|
|
803
|
-
}
|
|
804
|
-
rowsByTargetType.get(type).push(row);
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
const entities = {};
|
|
808
|
-
const unmatched = [];
|
|
809
|
-
const matchedTargetTypes = new Set();
|
|
810
|
-
let anyMismatch = false;
|
|
811
|
-
let anyUnresolved = false;
|
|
812
|
-
|
|
813
|
-
for (const key of summaryKeys) {
|
|
814
|
-
const targetType = resolveTargetEntityType(key);
|
|
815
|
-
const rows = rowsByTargetType.get(targetType) || [];
|
|
816
|
-
// A key named ONLY through a naming-only bucket (e.g. `alreadyPresentByCrosswalk`) makes
|
|
817
|
-
// no claim about journal activity for this entity -- zero matching rows is its expected,
|
|
818
|
-
// unremarkable state (nothing was attempted this run), not an unmatched claim. A key that
|
|
819
|
-
// names at least one ORDINARY bucket (imported/deferred/failed/attempted) is still held to
|
|
820
|
-
// the existing rule: claiming activity with zero matching journal rows is unmatched.
|
|
821
|
-
const namesOrdinaryBucket = COVERAGE_ORDINARY_BUCKETS.some((bucket) => heldBucketValue(summary, bucket, key).present);
|
|
822
|
-
if (rows.length === 0 && namesOrdinaryBucket) {
|
|
823
|
-
// A summary key with no matching rows is reported as unmatched, never as agreement.
|
|
824
|
-
unmatched.push(key);
|
|
825
|
-
anyMismatch = true;
|
|
826
|
-
continue;
|
|
827
|
-
}
|
|
828
|
-
matchedTargetTypes.add(targetType);
|
|
829
|
-
const counts = coverageStatusCounts(rows);
|
|
830
|
-
if (counts.unresolved > 0) {
|
|
831
|
-
anyUnresolved = true;
|
|
832
|
-
}
|
|
833
|
-
const entityRow = { unresolved: counts.unresolved };
|
|
834
|
-
for (const bucket of COVERAGE_ORDINARY_BUCKETS) {
|
|
835
|
-
const held = heldBucketValue(summary, bucket, key);
|
|
836
|
-
if (!held.present) {
|
|
837
|
-
entityRow[bucket] = { held: null, journal: counts[bucket], agrees: null, compared: false };
|
|
838
|
-
} else {
|
|
839
|
-
const agrees = held.value === counts[bucket];
|
|
840
|
-
if (!agrees) {
|
|
841
|
-
anyMismatch = true;
|
|
842
|
-
}
|
|
843
|
-
entityRow[bucket] = { held: held.value, journal: counts[bucket], agrees, compared: true };
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
// `unexpectedSkipped` is deliberately the opposite of the four ordinary buckets: a status
|
|
847
|
-
// nothing should ever reach must not go invisible merely because the importer never named a
|
|
848
|
-
// counter for it, so an absent held value defaults to 0 rather than to "not compared".
|
|
849
|
-
const heldSkipped = heldBucketValue(summary, 'unexpectedSkipped', key);
|
|
850
|
-
const heldSkippedValue = heldSkipped.present ? heldSkipped.value : 0;
|
|
851
|
-
const skippedAgrees = heldSkippedValue === counts.unexpectedSkipped;
|
|
852
|
-
if (!skippedAgrees) {
|
|
853
|
-
anyMismatch = true;
|
|
854
|
-
}
|
|
855
|
-
entityRow.unexpectedSkipped = { held: heldSkippedValue, journal: counts.unexpectedSkipped, agrees: skippedAgrees, compared: true };
|
|
856
|
-
entities[key] = entityRow;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
// Accumulate this flush's matched target types into the run's PERSISTED, cumulative
|
|
860
|
-
// coverage map -- not a bare "was it ever named" boolean, but the CLAIMING journal row count that
|
|
861
|
-
// was true for that entity AT THE TIME it was named. See the cache comment above
|
|
862
|
-
// `coverageJournalCache` for why cumulative tracking across flushes is required at all, and
|
|
863
|
-
// for why a boolean is not enough on its own: a naming-only bucket (or any bucket) can
|
|
864
|
-
// legitimately name an entity while the journal has zero (or fewer) rows for it, and the journal
|
|
865
|
-
// can keep growing afterward without any later flush ever naming that entity again. Storing the
|
|
866
|
-
// row count lets the reverse check keep comparing cumulative reported coverage against the
|
|
867
|
-
// journal's cumulative state on every flush, instead of permanently exempting an entity the
|
|
868
|
-
// moment it is named once.
|
|
869
|
-
//
|
|
870
|
-
// This mark and the reverse-mismatch check below are two
|
|
871
|
-
// halves of one invariant -- "the mark only ever reflects rows that make a journal-count claim" --
|
|
872
|
-
// and must be computed from the SAME per-type claiming count, not two separately-filtered ones.
|
|
873
|
-
// Updating the mark with each type's FULL row count (claiming + non-claiming) while the check below
|
|
874
|
-
// compares it against the claiming-only count let a type matched while it already had non-claiming
|
|
875
|
-
// rows (e.g. `skipped_out_of_scope`) set an inflated mark that could then mask a later genuine,
|
|
876
|
-
// never-renamed claiming row (e.g. a real `imported` row) for that same type -- the mark never
|
|
877
|
-
// dropped, so `covered < claimingRowCount` stayed false even though the claim was real. Computing
|
|
878
|
-
// `claimingRowCountByType` once, up front, and using it for BOTH the mark and the check keeps them
|
|
879
|
-
// structurally unable to drift apart again.
|
|
880
|
-
const claimingRowCountByType = new Map();
|
|
881
|
-
for (const [targetType, rowsForType] of rowsByTargetType) {
|
|
882
|
-
const claimingRowCount = rowsForType.filter((row) => !NON_CLAIMING_ATTEMPT_STATUSES.has(row.status)).length;
|
|
883
|
-
claimingRowCountByType.set(targetType, claimingRowCount);
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
let coverageByType = entry.reportedEntityCoverage.get(runId);
|
|
887
|
-
if (!coverageByType) {
|
|
888
|
-
coverageByType = new Map();
|
|
889
|
-
entry.reportedEntityCoverage.set(runId, coverageByType);
|
|
890
|
-
}
|
|
891
|
-
for (const targetType of matchedTargetTypes) {
|
|
892
|
-
const claimingRowCount = claimingRowCountByType.get(targetType) || 0;
|
|
893
|
-
const previouslyCovered = coverageByType.get(targetType) || 0;
|
|
894
|
-
coverageByType.set(targetType, Math.max(previouslyCovered, claimingRowCount));
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
// Journal -> summary direction: a targetEntityType with real folded CLAIMING rows but no summary
|
|
898
|
-
// key EVER naming it across this run's flushes (directly, or via `entityTypes`) is a counter the
|
|
899
|
-
// importer never reported. "Named" is re-checked against the journal's CURRENT cumulative
|
|
900
|
-
// claiming row count on every flush, not treated as a one-time permanent exemption -- an entity
|
|
901
|
-
// whose claiming row count has grown past what was covered the last time it was named is just as
|
|
902
|
-
// unreported, from this run's own summary, as one that was never named at all.
|
|
903
|
-
//
|
|
904
|
-
// A target type whose ONLY rows are e.g. `skipped_out_of_scope` has zero claiming rows, so
|
|
905
|
-
// `covered` (0, since `coverageByType` only ever accumulates claiming counts too) is never less
|
|
906
|
-
// than 0 and it is correctly never flagged -- it made no claim, so there is nothing to be missing.
|
|
907
|
-
const unmatchedJournalEntities = [];
|
|
908
|
-
for (const [targetType, claimingRowCount] of claimingRowCountByType) {
|
|
909
|
-
const covered = coverageByType.get(targetType) || 0;
|
|
910
|
-
if (covered < claimingRowCount) {
|
|
911
|
-
unmatchedJournalEntities.push(targetType);
|
|
912
|
-
anyMismatch = true;
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
let status;
|
|
917
|
-
let reason;
|
|
918
|
-
if (anyMismatch) {
|
|
919
|
-
status = 'mismatch';
|
|
920
|
-
} else if (anyUnresolved) {
|
|
921
|
-
status = 'unchecked';
|
|
922
|
-
reason = 'has_unresolved';
|
|
923
|
-
} else {
|
|
924
|
-
status = 'agrees';
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
return {
|
|
928
|
-
...base,
|
|
929
|
-
status,
|
|
930
|
-
...(reason ? { reason } : {}),
|
|
931
|
-
rowsRead: readResult.rows.length,
|
|
932
|
-
entities,
|
|
933
|
-
unmatched,
|
|
934
|
-
unmatchedJournalEntities,
|
|
935
|
-
};
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
// This is the PER-BATCH FLUSH POINT, not a recovery-only helper. An
|
|
939
|
-
// importer that holds its counters until the end loses them to any interruption, and a long
|
|
940
|
-
// import redirected to a temp file loses them to the shell. Call it after every batch with the
|
|
941
|
-
// run's own held counters -- never with figures re-derived from the append-only ledger, which
|
|
942
|
-
// folds dry-run rows, retried batches and recovery re-entries into the live total.
|
|
943
|
-
//
|
|
944
|
-
// Durable accounting, not liveness: heartbeat output belongs to `lib/progress-log.js`.
|
|
945
|
-
//
|
|
946
|
-
// When this flush names a run id (its own `options.runId`, else `summary.runId`), the
|
|
947
|
-
// write is also checked against that run's attempt-journal rows. The check never replaces a
|
|
948
|
-
// held counter and never throws for its own sake -- a wrong or uncheckable count is reported, not
|
|
949
|
-
// hidden, and the write still completes normally either way.
|
|
950
|
-
async function writeLiveImportSummary(projectDir, summary, options = {}) {
|
|
951
|
-
const before = await readJsonIfExists(liveImportSummaryPath(projectDir), null);
|
|
952
|
-
const effectiveRunId = options.runId || (summary && summary.runId) || null;
|
|
953
|
-
const coverageCheck = await computeCoverageCheck(projectDir, summary, options, effectiveRunId);
|
|
954
|
-
const next = {
|
|
955
|
-
schemaVersion: 1,
|
|
956
|
-
generatedAt: new Date().toISOString(),
|
|
957
|
-
...(summary || {}),
|
|
958
|
-
coverageCheck,
|
|
959
|
-
};
|
|
960
|
-
await writeJsonAtomic(liveImportSummaryPath(projectDir), next);
|
|
961
|
-
if (options.runId) {
|
|
962
|
-
await appendExecutionLog(projectDir, {
|
|
963
|
-
runId: options.runId,
|
|
964
|
-
phase: options.phase || 'import',
|
|
965
|
-
event: 'batch_flush',
|
|
966
|
-
detail: options.detail || `accounting flushed after batch ${options.batchNumber === undefined ? '(unnumbered)' : options.batchNumber}`,
|
|
967
|
-
artifacts: ['execution/live-import-summary.json'],
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
|
-
if (effectiveRunId && coverageCheck.status === 'mismatch') {
|
|
971
|
-
await appendExecutionLog(projectDir, {
|
|
972
|
-
runId: effectiveRunId,
|
|
973
|
-
phase: options.phase || 'import',
|
|
974
|
-
event: 'coverage_mismatch',
|
|
975
|
-
detail: describeCoverageMismatch(coverageCheck),
|
|
976
|
-
artifacts: ['execution/live-import-summary.json'],
|
|
977
|
-
});
|
|
978
|
-
} else if (effectiveRunId && coverageCheck.status === 'unchecked') {
|
|
979
|
-
await appendExecutionLog(projectDir, {
|
|
980
|
-
runId: effectiveRunId,
|
|
981
|
-
phase: options.phase || 'import',
|
|
982
|
-
event: 'coverage_unchecked',
|
|
983
|
-
detail: `coverage check could not run (reason: ${coverageCheck.reason})`,
|
|
984
|
-
artifacts: ['execution/live-import-summary.json'],
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
return {
|
|
988
|
-
path: 'execution/live-import-summary.json',
|
|
989
|
-
beforeExists: Boolean(before),
|
|
990
|
-
changes: {
|
|
991
|
-
imported: diffCounts(before && before.imported, next.imported),
|
|
992
|
-
deferred: diffCounts(before && before.deferred, next.deferred),
|
|
993
|
-
failed: diffCounts(before && before.failed, next.failed),
|
|
994
|
-
...(options.extraChanges || {}),
|
|
995
|
-
},
|
|
996
|
-
coverageCheck,
|
|
997
|
-
};
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
// ---------------------------------------------------------------------------
|
|
1002
|
-
// The generated importer declares its modes, and the gate checks them.
|
|
1003
|
-
//
|
|
1004
|
-
// Before this, the codegen skill ASKED for selective-recovery flags and nothing anywhere
|
|
1005
|
-
// verified that a generated importer honoured the instruction. A generated importer once
|
|
1006
|
-
// shipped that parsed no command-line arguments at all, exposed none of the modes,
|
|
1007
|
-
// and passed the import gate — a mandatory boundary that existed only as prose.
|
|
1008
|
-
// ---------------------------------------------------------------------------
|
|
1009
|
-
|
|
1010
|
-
const GENERATED_IMPORTER_CONTRACT_VERSION = 1;
|
|
1011
|
-
|
|
1012
|
-
const REQUIRED_SELECTION_MODES = [
|
|
1013
|
-
'entity',
|
|
1014
|
-
'source-type',
|
|
1015
|
-
'missing-only',
|
|
1016
|
-
'failed-only',
|
|
1017
|
-
'deferred-only',
|
|
1018
|
-
'unresolved-only',
|
|
1019
|
-
'rerun',
|
|
1020
|
-
];
|
|
1021
|
-
|
|
1022
|
-
// Project-relative, forward-slashed. These are the paths the shared helpers actually write, so
|
|
1023
|
-
// a descriptor that names something else describes an importer keeping a private ledger.
|
|
1024
|
-
const REQUIRED_LEDGER_PATHS = {
|
|
1025
|
-
attempts: 'state/attempts/write-attempts.ndjson',
|
|
1026
|
-
sampleAttempts: 'state/sample/attempts/write-attempts.ndjson',
|
|
1027
|
-
unresolved: 'execution/unresolved-writes.ndjson',
|
|
1028
|
-
recoveryLog: 'execution/recovery-log.json',
|
|
1029
|
-
};
|
|
1030
|
-
|
|
1031
|
-
// Throws naming EVERY missing mode and EVERY misplaced path at once. One error per run of the
|
|
1032
|
-
// gate would turn a codegen fix into a guessing game.
|
|
1033
|
-
function assertGeneratedImporterContract(descriptor) {
|
|
1034
|
-
const problems = [];
|
|
1035
|
-
if (!descriptor || typeof descriptor !== 'object' || Array.isArray(descriptor)) {
|
|
1036
|
-
throw new Error('generated importer contract: descriptor must be an object — an entrypoint that ignores --describe fails the gate, it never passes by default');
|
|
1037
|
-
}
|
|
1038
|
-
if (descriptor.contractVersion !== GENERATED_IMPORTER_CONTRACT_VERSION) {
|
|
1039
|
-
problems.push(`contractVersion must be ${GENERATED_IMPORTER_CONTRACT_VERSION}, got ${JSON.stringify(descriptor.contractVersion)}`);
|
|
1040
|
-
}
|
|
1041
|
-
if (descriptor.runIdSource !== 'process-start') {
|
|
1042
|
-
problems.push(`runIdSource must be "process-start", got ${JSON.stringify(descriptor.runIdSource)}`);
|
|
1043
|
-
}
|
|
1044
|
-
const modes = Array.isArray(descriptor.selectionModes) ? descriptor.selectionModes : null;
|
|
1045
|
-
if (!modes) {
|
|
1046
|
-
problems.push('selectionModes must be an array of mode names');
|
|
1047
|
-
} else {
|
|
1048
|
-
for (const mode of REQUIRED_SELECTION_MODES) {
|
|
1049
|
-
if (!modes.includes(mode)) {
|
|
1050
|
-
problems.push(`missing selection mode: ${mode}`);
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
const ledger = descriptor.ledger;
|
|
1055
|
-
if (!ledger || typeof ledger !== 'object' || Array.isArray(ledger)) {
|
|
1056
|
-
problems.push('ledger must be an object naming the durable artifact paths');
|
|
1057
|
-
} else {
|
|
1058
|
-
for (const [key, expected] of Object.entries(REQUIRED_LEDGER_PATHS)) {
|
|
1059
|
-
const actual = ledger[key];
|
|
1060
|
-
if (typeof actual !== 'string' || actual.replace(/\\/g, '/') !== expected) {
|
|
1061
|
-
problems.push(`ledger.${key} must be "${expected}", got ${JSON.stringify(actual)}`);
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
// The vendoring escape hatch survives for the helper IMPLEMENTATIONS; it does not survive
|
|
1065
|
-
// for the entry contract, and an append-only ledger is part of that contract.
|
|
1066
|
-
if (ledger.appendOnly !== true) {
|
|
1067
|
-
problems.push('ledger.appendOnly must be true — a per-record log of what we wrote to a merchant store is only ever appended to');
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
if (problems.length) {
|
|
1071
|
-
throw new Error(`generated importer contract violated:\n - ${problems.join('\n - ')}`);
|
|
1072
|
-
}
|
|
1073
|
-
return descriptor;
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
module.exports = {
|
|
1077
|
-
RECOVERY_SCHEMA_VERSION,
|
|
1078
|
-
RECOVERY_MODES,
|
|
1079
|
-
DEFERRED_ATTEMPT_STATUSES,
|
|
1080
|
-
UNCERTAIN_ATTEMPT_STATUSES,
|
|
1081
|
-
GENERATED_IMPORTER_CONTRACT_VERSION,
|
|
1082
|
-
REQUIRED_SELECTION_MODES,
|
|
1083
|
-
REQUIRED_LEDGER_PATHS,
|
|
1084
|
-
assertGeneratedImporterContract,
|
|
1085
|
-
recoveryLogPath,
|
|
1086
|
-
liveImportSummaryPath,
|
|
1087
|
-
normalizeSelectionFilters,
|
|
1088
|
-
foldAttemptsBySource,
|
|
1089
|
-
sourceStableKey,
|
|
1090
|
-
selectImportRecords,
|
|
1091
|
-
selectImportRecordsFromState,
|
|
1092
|
-
selectRerunRecords,
|
|
1093
|
-
selectRerunRecordsFromState,
|
|
1094
|
-
normalizeRecoveryEntry,
|
|
1095
|
-
normalizeConflictDecisions,
|
|
1096
|
-
recoveryEntriesOf,
|
|
1097
|
-
loadConflictDecisions,
|
|
1098
|
-
latestConflictDecisionFor,
|
|
1099
|
-
loadRecoveryLog,
|
|
1100
|
-
appendRecoveryLogEntry,
|
|
1101
|
-
writeLiveImportSummary,
|
|
1102
|
-
// Exported so `completion-report.js`'s operator-action text and `website-handoff.js`'s
|
|
1103
|
-
// rendering can describe the same disagreements the writer computed, without recomputing them.
|
|
1104
|
-
coverageDisagreements,
|
|
1105
|
-
describeCoverageMismatch,
|
|
1106
|
-
COVERAGE_JOURNAL_REL_PATH,
|
|
1107
|
-
};
|