@nextcommerce/campaigns-os 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +204 -0
- package/CHANGELOG.md +5002 -0
- package/CONTEXT.md +685 -0
- package/LICENSE +202 -0
- package/NOTICE +4 -0
- package/README.md +368 -0
- package/agents/claude/CLAUDE.md +32 -0
- package/agents/codex/AGENTS.md +27 -0
- package/agents/copilot/copilot-instructions.md +14 -0
- package/agents/cursor/campaigns-os.mdc +13 -0
- package/bin/campaigns-os.mjs +38 -0
- package/campaign-spec/README.md +138 -0
- package/campaign-spec/dist/analytics-vocabulary.d.ts +47 -0
- package/campaign-spec/dist/analytics-vocabulary.js +74 -0
- package/campaign-spec/dist/index.d.ts +40 -0
- package/campaign-spec/dist/index.js +77 -0
- package/campaign-spec/dist/normalize.d.ts +22 -0
- package/campaign-spec/dist/normalize.js +41 -0
- package/campaign-spec/dist/routing.d.ts +190 -0
- package/campaign-spec/dist/routing.js +263 -0
- package/campaign-spec/dist/rules/analytics-contract-shape.d.ts +42 -0
- package/campaign-spec/dist/rules/analytics-contract-shape.js +303 -0
- package/campaign-spec/dist/rules/assembly-hints-shape.d.ts +42 -0
- package/campaign-spec/dist/rules/assembly-hints-shape.js +191 -0
- package/campaign-spec/dist/rules/campaign-metadata.d.ts +14 -0
- package/campaign-spec/dist/rules/campaign-metadata.js +40 -0
- package/campaign-spec/dist/rules/checkout-has-success-url.d.ts +31 -0
- package/campaign-spec/dist/rules/checkout-has-success-url.js +66 -0
- package/campaign-spec/dist/rules/cycle-detection.d.ts +12 -0
- package/campaign-spec/dist/rules/cycle-detection.js +141 -0
- package/campaign-spec/dist/rules/design-source-shape.d.ts +29 -0
- package/campaign-spec/dist/rules/design-source-shape.js +142 -0
- package/campaign-spec/dist/rules/downsell-without-upsell.d.ts +11 -0
- package/campaign-spec/dist/rules/downsell-without-upsell.js +40 -0
- package/campaign-spec/dist/rules/exit-intent-validation.d.ts +23 -0
- package/campaign-spec/dist/rules/exit-intent-validation.js +147 -0
- package/campaign-spec/dist/rules/funnel-count.d.ts +9 -0
- package/campaign-spec/dist/rules/funnel-count.js +37 -0
- package/campaign-spec/dist/rules/funnel-hypothesis-length.d.ts +22 -0
- package/campaign-spec/dist/rules/funnel-hypothesis-length.js +60 -0
- package/campaign-spec/dist/rules/funnel-identity.d.ts +15 -0
- package/campaign-spec/dist/rules/funnel-identity.js +57 -0
- package/campaign-spec/dist/rules/funnel-weight-sum.d.ts +20 -0
- package/campaign-spec/dist/rules/funnel-weight-sum.js +66 -0
- package/campaign-spec/dist/rules/index.d.ts +69 -0
- package/campaign-spec/dist/rules/index.js +131 -0
- package/campaign-spec/dist/rules/offer-ref-integrity.d.ts +13 -0
- package/campaign-spec/dist/rules/offer-ref-integrity.js +59 -0
- package/campaign-spec/dist/rules/package-pricing-sanity.d.ts +12 -0
- package/campaign-spec/dist/rules/package-pricing-sanity.js +42 -0
- package/campaign-spec/dist/rules/page-count.d.ts +11 -0
- package/campaign-spec/dist/rules/page-count.js +31 -0
- package/campaign-spec/dist/rules/page-id-uniqueness.d.ts +14 -0
- package/campaign-spec/dist/rules/page-id-uniqueness.js +47 -0
- package/campaign-spec/dist/rules/promo-code-input-validation.d.ts +8 -0
- package/campaign-spec/dist/rules/promo-code-input-validation.js +126 -0
- package/campaign-spec/dist/rules/promo-codes-shape.d.ts +30 -0
- package/campaign-spec/dist/rules/promo-codes-shape.js +187 -0
- package/campaign-spec/dist/rules/route-field-ignored-for-page-type.d.ts +33 -0
- package/campaign-spec/dist/rules/route-field-ignored-for-page-type.js +81 -0
- package/campaign-spec/dist/rules/route-target-resolves.d.ts +32 -0
- package/campaign-spec/dist/rules/route-target-resolves.js +112 -0
- package/campaign-spec/dist/rules/schema-version.d.ts +21 -0
- package/campaign-spec/dist/rules/schema-version.js +53 -0
- package/campaign-spec/dist/rules/sdk-version.d.ts +26 -0
- package/campaign-spec/dist/rules/sdk-version.js +96 -0
- package/campaign-spec/dist/rules/shipping-countries-shape.d.ts +10 -0
- package/campaign-spec/dist/rules/shipping-countries-shape.js +30 -0
- package/campaign-spec/dist/rules/shipping-methods-present.d.ts +10 -0
- package/campaign-spec/dist/rules/shipping-methods-present.js +26 -0
- package/campaign-spec/dist/rules/store-profile-shape.d.ts +30 -0
- package/campaign-spec/dist/rules/store-profile-shape.js +127 -0
- package/campaign-spec/dist/rules/thank-you-requirement.d.ts +16 -0
- package/campaign-spec/dist/rules/thank-you-requirement.js +50 -0
- package/campaign-spec/dist/rules/unknown-top-level-fields.d.ts +28 -0
- package/campaign-spec/dist/rules/unknown-top-level-fields.js +114 -0
- package/campaign-spec/dist/rules/upsell-has-packages.d.ts +9 -0
- package/campaign-spec/dist/rules/upsell-has-packages.js +35 -0
- package/campaign-spec/dist/rules/upsell-routing-complete.d.ts +10 -0
- package/campaign-spec/dist/rules/upsell-routing-complete.js +45 -0
- package/campaign-spec/dist/rules/upsell-without-checkout.d.ts +11 -0
- package/campaign-spec/dist/rules/upsell-without-checkout.js +44 -0
- package/campaign-spec/dist/rules/variant-labels-shape.d.ts +28 -0
- package/campaign-spec/dist/rules/variant-labels-shape.js +86 -0
- package/campaign-spec/dist/sdk-version-parse.d.ts +43 -0
- package/campaign-spec/dist/sdk-version-parse.js +62 -0
- package/campaign-spec/dist/types.d.ts +674 -0
- package/campaign-spec/dist/types.js +40 -0
- package/campaign-spec/package.json +12 -0
- package/compatibility.json +25 -0
- package/contracts/agent-relevant-change-policy.v1.json +111 -0
- package/contracts/brand-theme-source-defaults.figma-sections-export.v0.json +32 -0
- package/contracts/brand-theme-target-tokens.next-core.v0.json +65 -0
- package/contracts/campaign-cart-checkout-field-contract.v0.json +45 -0
- package/contracts/campaign-cart-sdk-support-policy.v0.json +11 -0
- package/contracts/commerce-surface-catalog.json +2452 -0
- package/contracts/fixtures/orientation/canonicalization/v1.json +34 -0
- package/contracts/fixtures/orientation/envelope/current.json +95 -0
- package/contracts/fixtures/orientation/envelope/freshness_unknown.json +97 -0
- package/contracts/fixtures/orientation/envelope/legacy_baseline.json +95 -0
- package/contracts/fixtures/orientation/envelope/orientation_available.json +136 -0
- package/contracts/fixtures/orientation/envelope/recovered_interrupted_update.json +136 -0
- package/contracts/fixtures/orientation/envelope/refused.json +100 -0
- package/contracts/fixtures/orientation/envelope/restart_required.json +137 -0
- package/contracts/fixtures/orientation/envelope/updated.json +135 -0
- package/contracts/fixtures/orientation/hostile-target/README.md +61 -0
- package/contracts/fixtures/orientation/hostile-target/manifest.json +82 -0
- package/contracts/fixtures/orientation/hostile-target/repo/CHANGELOG.md +18 -0
- package/contracts/fixtures/orientation/hostile-target/repo/bin/intended.mjs +12 -0
- package/contracts/fixtures/orientation/hostile-target/repo/bin/tripwire.mjs +15 -0
- package/contracts/fixtures/orientation/hostile-target/repo/contracts/release-ledger.json +48 -0
- package/contracts/fixtures/orientation/hostile-target/repo/contracts/supported-surface.json +17 -0
- package/contracts/fixtures/orientation/hostile-target/repo/docs/example-contract.md +13 -0
- package/contracts/fixtures/orientation/hostile-target/repo/hooks/post-checkout +5 -0
- package/contracts/fixtures/orientation/hostile-target/repo/hooks/post-merge +5 -0
- package/contracts/fixtures/orientation/hostile-target/repo/hooks/pre-commit +5 -0
- package/contracts/fixtures/orientation/hostile-target/repo/hostile-dependency-tripwire/package.json +15 -0
- package/contracts/fixtures/orientation/hostile-target/repo/hostile-dependency-tripwire/tripwire.mjs +9 -0
- package/contracts/fixtures/orientation/hostile-target/repo/package.json +20 -0
- package/contracts/fixtures/orientation/hostile-target/repo/schemas/example.v0.schema.json +15 -0
- package/contracts/fixtures/orientation/release-gate/cases.json +1073 -0
- package/contracts/fixtures/runtime-recipe/accept/current.json +299 -0
- package/contracts/fixtures/runtime-recipe/accept/minimal.json +294 -0
- package/contracts/fixtures/runtime-recipe/dist-states.json +51 -0
- package/contracts/fixtures/runtime-recipe/manifest.json +85 -0
- package/contracts/fixtures/runtime-recipe/reject/advisory-enforcement.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/allowlist-without-hosts.json +297 -0
- package/contracts/fixtures/runtime-recipe/reject/committed-output-claim.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/engines-disagreement-warns.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/lifecycle-scripts-enabled.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/missing-required-field.json +251 -0
- package/contracts/fixtures/runtime-recipe/reject/unknown-kind.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/unknown-network-policy.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/unknown-output-check.json +310 -0
- package/contracts/fixtures/runtime-recipe/reject/unknown-revision.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/unknown-step-id.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/unperformable-check-skipped.json +299 -0
- package/contracts/fixtures/runtime-recipe/reject/unpinned-lockfile.json +299 -0
- package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/assembly-report.json +180 -0
- package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/build-context.json +115 -0
- package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/doctor-output.json +29 -0
- package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/qa-verdict.json +27 -0
- package/contracts/fixtures/sidecar-bundle/production-shaped/campaign-runtime.build.json +141 -0
- package/contracts/migration-sidecar-bundle.v0.json +149 -0
- package/contracts/orientation-limits.v1.json +41 -0
- package/contracts/orientation-reason-codes.v1.json +196 -0
- package/contracts/private-template-sources.json +8 -0
- package/contracts/release-ledger.json +4598 -0
- package/contracts/reserved-skill-names.json +13 -0
- package/contracts/runtime-recipe.campaigns-os-node-v1.json +299 -0
- package/contracts/supported-surface.json +180 -0
- package/contracts/template-brand-contract.apollo-mv-single-step.v0.json +27 -0
- package/contracts/template-brand-contract.apollo.v0.json +27 -0
- package/contracts/template-brand-contract.demeter.v0.json +27 -0
- package/contracts/template-brand-contract.olympus-mv-single-step.v0.json +27 -0
- package/contracts/template-brand-contract.olympus-mv-two-step.v0.json +28 -0
- package/contracts/template-brand-contract.olympus.v0.json +27 -0
- package/contracts/template-brand-contract.shared-commerce.v0.json +190 -0
- package/contracts/template-brand-contract.shop-single-step.v0.json +27 -0
- package/contracts/template-brand-contract.shop-three-step.v0.json +29 -0
- package/contracts/template-slot-manifest.apollo-mv-single-step.v0.json +14 -0
- package/contracts/template-slot-manifest.apollo.v0.json +12 -0
- package/contracts/template-slot-manifest.demeter.v0.json +30 -0
- package/contracts/template-slot-manifest.olympus-mv-single-step.v0.json +14 -0
- package/contracts/template-slot-manifest.olympus-mv-two-step.v0.json +15 -0
- package/contracts/template-slot-manifest.olympus.v0.json +12 -0
- package/contracts/template-slot-manifest.shared-content-core.v0.json +4254 -0
- package/contracts/template-slot-manifest.shop-single-step.v0.json +47 -0
- package/contracts/template-slot-manifest.shop-three-step.v0.json +33 -0
- package/docs/brand-theme-bridge.md +159 -0
- package/docs/build-packet.md +1300 -0
- package/docs/campaign-build-brief.md +145 -0
- package/docs/campaign-standardization-report.md +329 -0
- package/docs/campaigns-os-build-flow.md +117 -0
- package/docs/design-source-package.md +784 -0
- package/docs/legacy-migration.md +58 -0
- package/docs/migration-sidecar-bundle.md +139 -0
- package/docs/orientation-contract-reference.md +1220 -0
- package/docs/polish-evidence.md +502 -0
- package/docs/qa-and-test-orders.md +1691 -0
- package/docs/release-ledger-authoring-guide.md +274 -0
- package/docs/runtime-readiness.md +211 -0
- package/docs/supported-surface.md +83 -0
- package/docs/versioning.md +55 -0
- package/docs/workflow-findings-sidecar.md +588 -0
- package/package.json +135 -0
- package/prompts/first-build.md +27 -0
- package/prompts/friction-log.md +30 -0
- package/schemas/campaign-build-brief.v1.schema.json +149 -0
- package/schemas/campaign-design-source-package.v0.schema.json +697 -0
- package/schemas/campaign-runtime-assembly-report.v0.schema.json +390 -0
- package/schemas/campaign-runtime-build-context.v0.schema.json +339 -0
- package/schemas/campaign-runtime-build-packet.v0.schema.json +452 -0
- package/schemas/campaign-spec.v4.schema.json +582 -0
- package/schemas/campaigns-os-doctor-output.v0.schema.json +43 -0
- package/schemas/campaigns-os-legacy-migration-inventory.v0.schema.json +112 -0
- package/schemas/campaigns-os-legacy-provisioning-plan.v0.schema.json +38 -0
- package/schemas/campaigns-os-legacy-provisioning-receipt.v0.schema.json +57 -0
- package/schemas/campaigns-os-qa-verdict-sidecar.v0.schema.json +150 -0
- package/schemas/campaigns-os-qa-verdict.v0.schema.json +438 -0
- package/schemas/campaigns-os-release-ledger.v1.schema.json +162 -0
- package/schemas/campaigns-os-run-record.v0.schema.json +343 -0
- package/schemas/campaigns-os-runtime-recipe.v1.schema.json +313 -0
- package/schemas/campaigns-os-sidecar-bundle-conformance.v0.schema.json +78 -0
- package/schemas/campaigns-os-tooling-orientation.v1.schema.json +381 -0
- package/schemas/campaigns-os-workflow-finding.v0.schema.json +134 -0
- package/schemas/source-html-manifest.v0.schema.json +252 -0
- package/skills/next-campaigns-build/SKILL.md +73 -0
- package/skills/next-campaigns-os/SKILL.md +101 -0
- package/skills/next-campaigns-os/references/session-intake.md +160 -0
- package/skills/next-campaigns-os-setup/SKILL.md +22 -0
- package/skills/next-campaigns-polish/SKILL.md +145 -0
- package/skills/next-campaigns-qa/SKILL.md +92 -0
- package/skills.json +56 -0
- package/skills.sh +64 -0
- package/src/adapter-decision-contract.mjs +333 -0
- package/src/brand-theme.mjs +1151 -0
- package/src/browser-launch.mjs +79 -0
- package/src/build-brief.mjs +781 -0
- package/src/built-site-scope.mjs +312 -0
- package/src/campaign-ecosystem.mjs +734 -0
- package/src/campaign-identity.mjs +405 -0
- package/src/campaign-workspace.mjs +127 -0
- package/src/checkpoint-waiver.mjs +302 -0
- package/src/cli.mjs +13442 -0
- package/src/commercial-journey.mjs +1119 -0
- package/src/commercial-parity.mjs +965 -0
- package/src/consent.mjs +347 -0
- package/src/content-residue.mjs +322 -0
- package/src/deadline.mjs +81 -0
- package/src/design-source-package.mjs +2604 -0
- package/src/deviation.mjs +107 -0
- package/src/doctor-check-registry.mjs +49 -0
- package/src/doctor-sidecar.mjs +106 -0
- package/src/finding-cause.mjs +557 -0
- package/src/findings.mjs +326 -0
- package/src/fs-identity.mjs +68 -0
- package/src/gate-actions.mjs +105 -0
- package/src/html-scan.mjs +53 -0
- package/src/install-mode.mjs +272 -0
- package/src/legacy-migration.d.ts +128 -0
- package/src/legacy-migration.mjs +510 -0
- package/src/lifecycle.mjs +338 -0
- package/src/local-proof.mjs +401 -0
- package/src/map-pin-writeback.mjs +210 -0
- package/src/orchestration-stage-contract.mjs +81 -0
- package/src/package-install-fixture.mjs +33 -0
- package/src/page-kit-build-summary.mjs +175 -0
- package/src/page-kit-campaign-config.mjs +57 -0
- package/src/page-kit-sdk-version.mjs +392 -0
- package/src/page-kit-store-profile.mjs +369 -0
- package/src/page-kit-sync.mjs +162 -0
- package/src/polish-browser.mjs +867 -0
- package/src/polish-capture.mjs +1094 -0
- package/src/polish-deadline.mjs +51 -0
- package/src/polish-gate.mjs +739 -0
- package/src/polish-node.mjs +639 -0
- package/src/polish-page-load.mjs +1100 -0
- package/src/private-template-source.mjs +237 -0
- package/src/proof-policy.mjs +82 -0
- package/src/qa-analytics-correctness.mjs +307 -0
- package/src/qa-analytics-errors.mjs +38 -0
- package/src/qa-analytics-parity.mjs +699 -0
- package/src/qa-binding-evidence.mjs +140 -0
- package/src/qa-browser.mjs +6608 -0
- package/src/qa-cart-entry.mjs +406 -0
- package/src/qa-commercial-parity.mjs +641 -0
- package/src/qa-node.mjs +3620 -0
- package/src/qa-order-bump.mjs +381 -0
- package/src/qa-parity-capture.mjs +428 -0
- package/src/qa-parity-fixture.mjs +359 -0
- package/src/qa-publish.mjs +362 -0
- package/src/qa-purchase-data-layer.mjs +263 -0
- package/src/qa-route-probe.mjs +272 -0
- package/src/qa-sidecar.mjs +188 -0
- package/src/qa-test-order-topology.mjs +207 -0
- package/src/qa-url-privacy.mjs +13 -0
- package/src/qa-verdict-discovery.mjs +192 -0
- package/src/qa-verdict-publish.mjs +105 -0
- package/src/qa-verdict.mjs +287 -0
- package/src/remit.mjs +388 -0
- package/src/repo-scan.mjs +83 -0
- package/src/route-identity.mjs +133 -0
- package/src/run-record-closeout.mjs +229 -0
- package/src/run-record.mjs +839 -0
- package/src/run-session.mjs +226 -0
- package/src/runtime-state-ignore.mjs +113 -0
- package/src/sdk-attribute-index.mjs +212 -0
- package/src/sdk-markup.mjs +358 -0
- package/src/sdk-meta-tags.mjs +52 -0
- package/src/shell-token.mjs +7 -0
- package/src/sidecar-bundle.mjs +399 -0
- package/src/source-asset-crawl.mjs +469 -0
- package/src/source-html-intake.mjs +627 -0
- package/src/source-html-manifest.mjs +276 -0
- package/src/source-prep.mjs +284 -0
- package/src/spec-derive-store.mjs +431 -0
- package/src/spec-derive.mjs +514 -0
- package/src/spec-fetch.mjs +66 -0
- package/src/spec-hash.mjs +48 -0
- package/src/spec-identity.mjs +27 -0
- package/src/stage-ledger.mjs +509 -0
- package/src/standardization-report.mjs +1297 -0
- package/src/template-brand-contract.mjs +473 -0
- package/src/template-freshness.mjs +196 -0
- package/src/template-reference.mjs +81 -0
- package/src/template-slot-manifest.mjs +150 -0
- package/src/text-safety.mjs +62 -0
- package/src/theme-gate.mjs +185 -0
- package/src/upsell-selector-scope.mjs +299 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://nextcommerce.com/schemas/campaigns-os-runtime-recipe.v1.schema.json",
|
|
4
|
+
"title": "Campaigns OS Runtime Recipe v1",
|
|
5
|
+
"description": "Validates a runtime-readiness recipe document: the small, fixed, declarative description of how a checkout of this repository at one commit becomes a usable installed runtime. It is data, never code — a consumer executes only the commands enumerated here, never a free-form command assembled from repository data. A consumer that recognizes v1 accepts and preserves unknown additive properties without interpreting them, while required fields, known types, and safety-critical enums stay strict: an unrecognized recipe_kind, recipe_revision, network policy, output-check kind, or disagreement disposition is a fail-closed refusal, not a value to guess at. recipe_kind names what an installed consumer must already understand in order to execute the document at all, so a new kind requires a consumer release before the recipe is publishable; recipe_revision re-parameterises fields an existing consumer already understands, so a consumer accepts any revision inside the major line its kind declares.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema",
|
|
10
|
+
"recipe_kind",
|
|
11
|
+
"recipe_revision",
|
|
12
|
+
"refusal_reason_code",
|
|
13
|
+
"fail_closed",
|
|
14
|
+
"unperformable_check_disposition",
|
|
15
|
+
"preconditions",
|
|
16
|
+
"tooling",
|
|
17
|
+
"network",
|
|
18
|
+
"steps",
|
|
19
|
+
"inputs",
|
|
20
|
+
"outputs",
|
|
21
|
+
"bounds",
|
|
22
|
+
"capabilities",
|
|
23
|
+
"target_expectations"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"schema": { "const": "campaigns-os-runtime-recipe/v1" },
|
|
27
|
+
"_note": { "type": "string", "description": "Free-text authoring note. Not consumed." },
|
|
28
|
+
"_growth_note": { "type": "string", "description": "Free-text note on what to do when a declared bound is genuinely reached. Not consumed." },
|
|
29
|
+
"recipe_kind": {
|
|
30
|
+
"description": "Safety-critical. The enumerated set of recipe kinds this schema version defines. A document naming any other kind fails closed: an installed consumer cannot execute a kind it was not released knowing.",
|
|
31
|
+
"enum": ["campaigns-os-node-v1"]
|
|
32
|
+
},
|
|
33
|
+
"recipe_revision": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^1\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
|
|
36
|
+
"description": "Safety-critical. Semver, and its major MUST be 1 for every kind this schema version defines. A revision re-parameterises fields the consumer already understands — accepted version bounds, timeout values, the enumerated input set, the expected output inventory. A major other than 1 is a shape change wearing a revision's clothes and fails closed."
|
|
37
|
+
},
|
|
38
|
+
"refusal_reason_code": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"description": "The single stable reason code a consumer emits when this recipe refuses. One code, so a refusal is always attributable to the recipe rather than to whatever step happened to notice."
|
|
42
|
+
},
|
|
43
|
+
"fail_closed": {
|
|
44
|
+
"const": true,
|
|
45
|
+
"description": "Safety-critical. Every field in this document is normative and enforced. There is no advisory mode: a bound not worth enforcing is dropped, never demoted."
|
|
46
|
+
},
|
|
47
|
+
"unperformable_check_disposition": {
|
|
48
|
+
"enum": ["failed"],
|
|
49
|
+
"description": "Safety-critical. A declared check that cannot be performed — the measurement is absent, non-finite, or the check itself errored — counts as FAILED, never as skipped. Carried over from contracts/orientation-limits.v1.json, where an absent measurement counts as exceeded for the same reason."
|
|
50
|
+
},
|
|
51
|
+
"preconditions": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": true,
|
|
54
|
+
"required": ["target_oid_resolved", "lockfile_present", "clean_staging_generation", "input_fingerprint_recorded"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"target_oid_resolved": { "const": true },
|
|
57
|
+
"lockfile_present": { "const": true },
|
|
58
|
+
"clean_staging_generation": { "const": true },
|
|
59
|
+
"input_fingerprint_recorded": { "const": true }
|
|
60
|
+
},
|
|
61
|
+
"description": "Conditions that must already hold before any step runs. All are booleans fixed to true: a precondition a document could switch off is not a precondition."
|
|
62
|
+
},
|
|
63
|
+
"tooling": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": true,
|
|
66
|
+
"required": ["node", "npm", "target_engines", "on_disagreement"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"node": { "$ref": "#/$defs/tool_range" },
|
|
69
|
+
"npm": { "$ref": "#/$defs/tool_range" },
|
|
70
|
+
"target_engines": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": true,
|
|
73
|
+
"required": ["field", "observed", "_note"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"field": { "type": "string", "minLength": 1, "description": "The dotted path in the target's package.json whose declared value this recipe was written against." },
|
|
76
|
+
"observed": { "type": "string", "minLength": 1, "description": "The exact value of that field at the commit this revision was authored against. A checker compares the target's live value to this string; any difference is a disagreement." },
|
|
77
|
+
"_note": { "type": "string", "minLength": 1 }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"on_disagreement": {
|
|
81
|
+
"enum": ["refuse"],
|
|
82
|
+
"description": "Safety-critical. What happens when the contract's declared range and the target's declared engines disagree. Only refuse is defined: an accept-with-warning path produces a build made under conditions nobody approved plus a log line nobody reads."
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"network": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": true,
|
|
89
|
+
"required": ["cache_ownership", "inherit_proxy", "inherit_credentials", "inherit_npmrc", "per_step"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"cache_ownership": {
|
|
92
|
+
"enum": ["consumer_profile"],
|
|
93
|
+
"description": "Safety-critical. Who owns the package cache. The cache is an optimisation and never a correctness input, so it belongs to the consumer profile rather than to the operator's ambient environment."
|
|
94
|
+
},
|
|
95
|
+
"inherit_proxy": { "const": false },
|
|
96
|
+
"inherit_credentials": { "const": false },
|
|
97
|
+
"inherit_npmrc": { "const": false },
|
|
98
|
+
"per_step": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": { "$ref": "#/$defs/network_policy" },
|
|
101
|
+
"minProperties": 1,
|
|
102
|
+
"description": "Network policy keyed by step id. Every step in steps[] must appear here; a step with no declared policy is unbounded network access nobody approved."
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"steps": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"minItems": 1,
|
|
109
|
+
"items": { "$ref": "#/$defs/step" },
|
|
110
|
+
"description": "The ordered, exhaustive command set. A consumer executes these and nothing else."
|
|
111
|
+
},
|
|
112
|
+
"inputs": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": true,
|
|
115
|
+
"required": ["_note", "fingerprint_algorithm", "files"],
|
|
116
|
+
"properties": {
|
|
117
|
+
"_note": { "type": "string", "minLength": 1 },
|
|
118
|
+
"fingerprint_algorithm": { "enum": ["sha256"] },
|
|
119
|
+
"files": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"minItems": 1,
|
|
122
|
+
"uniqueItems": true,
|
|
123
|
+
"items": { "type": "string", "pattern": "^[^/][^\\0]*$" },
|
|
124
|
+
"description": "The complete, explicitly enumerated input set, repository-root-relative. Enumerated rather than globbed on purpose: the compiler's resolved file set is not the config's include globs, and a fingerprint derived from the globs would silently cover a subset."
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"outputs": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": true,
|
|
131
|
+
"required": ["_note", "directory", "committed", "module_source_root", "expected_module_derivation", "type_entry", "checks"],
|
|
132
|
+
"properties": {
|
|
133
|
+
"_note": { "type": "string", "minLength": 1 },
|
|
134
|
+
"directory": { "type": "string", "minLength": 1 },
|
|
135
|
+
"committed": {
|
|
136
|
+
"const": false,
|
|
137
|
+
"description": "Safety-critical. The output directory is a build product, never a committed artifact, so no baseline hash for its contents can exist in this repository. Verification is self-consistency, not comparison against a published expectation."
|
|
138
|
+
},
|
|
139
|
+
"module_source_root": { "type": "string", "minLength": 1, "description": "The input prefix that output paths are derived relative to." },
|
|
140
|
+
"expected_module_derivation": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": true,
|
|
143
|
+
"required": ["rule", "emitted_extensions"],
|
|
144
|
+
"properties": {
|
|
145
|
+
"rule": { "type": "string", "minLength": 1 },
|
|
146
|
+
"emitted_extensions": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^\\." } }
|
|
147
|
+
},
|
|
148
|
+
"description": "How the expected output inventory is derived from the enumerated input set. A derivation, not a second list: a duplicated inventory is a literal that can rot out of step with the inputs that produce it."
|
|
149
|
+
},
|
|
150
|
+
"type_entry": { "type": "string", "minLength": 1 },
|
|
151
|
+
"checks": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"minItems": 1,
|
|
154
|
+
"items": { "$ref": "#/$defs/output_check" },
|
|
155
|
+
"description": "Every declared check is mandatory. There is no optional check: an optional check is an advisory bound under another name."
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"bounds": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"minProperties": 1,
|
|
162
|
+
"additionalProperties": { "$ref": "#/$defs/bound" },
|
|
163
|
+
"description": "Enforced resource bounds. Each carries its unit, what it applies to, and a rationale stating the measured baseline and the resulting headroom, so a number is never mistaken for physics."
|
|
164
|
+
},
|
|
165
|
+
"target_expectations": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"additionalProperties": true,
|
|
168
|
+
"required": ["_note", "package_json", "lockfile", "scripts", "install_script_dependencies"],
|
|
169
|
+
"properties": {
|
|
170
|
+
"_note": { "type": "string", "minLength": 1 },
|
|
171
|
+
"package_json": { "type": "string", "minLength": 1 },
|
|
172
|
+
"lockfile": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"additionalProperties": true,
|
|
175
|
+
"required": ["path", "lockfile_version", "integrity_pinned"],
|
|
176
|
+
"properties": {
|
|
177
|
+
"path": { "type": "string", "minLength": 1 },
|
|
178
|
+
"lockfile_version": { "type": "integer", "minimum": 1 },
|
|
179
|
+
"integrity_pinned": { "const": true }
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"scripts": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"minProperties": 1,
|
|
185
|
+
"additionalProperties": { "type": "string" },
|
|
186
|
+
"description": "The exact text of every package script this recipe depends on, at the commit the revision was authored against. A consumer-side checker compares the target's live script text to these strings; any difference is a change to what the recipe would execute, and it fails until the recipe is revised."
|
|
187
|
+
},
|
|
188
|
+
"install_script_dependencies": {
|
|
189
|
+
"type": "array",
|
|
190
|
+
"uniqueItems": true,
|
|
191
|
+
"items": { "type": "string", "minLength": 1 },
|
|
192
|
+
"description": "Every resolved dependency that declares an install script, as recorded in the lockfile. Enumerated so a newly introduced install script is a gate failure rather than a silent addition to what would run if the suppressing flag were ever dropped."
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"description": "What the recipe assumes about the target at the commit this revision was authored against. Machine-comparable on purpose: the assumptions a recipe makes about its target are the part most likely to rot, and prose cannot be diffed."
|
|
196
|
+
},
|
|
197
|
+
"capabilities": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"additionalProperties": true,
|
|
200
|
+
"required": ["_note", "type_check", "build_spec", "browser_qa"],
|
|
201
|
+
"properties": {
|
|
202
|
+
"_note": { "type": "string", "minLength": 1 },
|
|
203
|
+
"type_check": { "type": "boolean" },
|
|
204
|
+
"build_spec": { "type": "boolean" },
|
|
205
|
+
"browser_qa": {
|
|
206
|
+
"type": "boolean",
|
|
207
|
+
"description": "Whether a generation prepared by this recipe can run browser QA. False for every v1 recipe: running install with lifecycle scripts disabled also suppresses the browser-download step of the browser automation dependency, so a prepared generation can build and type-check but cannot drive a browser. \"Runtime ready\" must not be read as \"can run QA\"."
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"$defs": {
|
|
213
|
+
"tool_range": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"additionalProperties": true,
|
|
216
|
+
"required": ["range", "min_inclusive", "applies_to", "rationale"],
|
|
217
|
+
"properties": {
|
|
218
|
+
"range": { "type": "string", "minLength": 1, "description": "Human-readable range, for documentation. The machine comparison uses min_inclusive / max_exclusive / accepted_majors, never this string." },
|
|
219
|
+
"min_inclusive": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$" },
|
|
220
|
+
"max_exclusive": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$" },
|
|
221
|
+
"accepted_majors": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "integer", "minimum": 0 } },
|
|
222
|
+
"verified": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 }, "description": "Exact versions this range was measured against." },
|
|
223
|
+
"applies_to": { "type": "string", "minLength": 1 },
|
|
224
|
+
"rationale": { "type": "string", "minLength": 1 }
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"network_policy": {
|
|
228
|
+
"type": "object",
|
|
229
|
+
"additionalProperties": true,
|
|
230
|
+
"required": ["policy", "rationale"],
|
|
231
|
+
"properties": {
|
|
232
|
+
"policy": {
|
|
233
|
+
"enum": ["allowlist", "deny"],
|
|
234
|
+
"description": "Safety-critical. allowlist permits exactly the hosts in hosts[]; deny permits none. There is no allow-all value, and an unrecognized value fails closed."
|
|
235
|
+
},
|
|
236
|
+
"hosts": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
237
|
+
"integrity_source": { "type": "string", "minLength": 1, "description": "What bounds WHICH bytes are acceptable, as distinct from where they may come from." },
|
|
238
|
+
"rationale": { "type": "string", "minLength": 1 }
|
|
239
|
+
},
|
|
240
|
+
"allOf": [
|
|
241
|
+
{
|
|
242
|
+
"if": { "properties": { "policy": { "const": "allowlist" } }, "required": ["policy"] },
|
|
243
|
+
"then": { "required": ["hosts"], "properties": { "hosts": { "type": "array", "minItems": 1 } } }
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"if": { "properties": { "policy": { "const": "deny" } }, "required": ["policy"] },
|
|
247
|
+
"then": { "properties": { "hosts": { "type": "array", "maxItems": 0 } } }
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
"step": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"additionalProperties": true,
|
|
254
|
+
"required": ["id", "executable", "args", "cwd", "stdin", "lifecycle_scripts", "timeout_bound", "rationale"],
|
|
255
|
+
"properties": {
|
|
256
|
+
"id": { "enum": ["install", "build"], "description": "Safety-critical. The enumerated step identities a v1 consumer understands." },
|
|
257
|
+
"executable": { "enum": ["npm"], "description": "Safety-critical. The only package manager a v1 recipe may name. A different one is a new kind, because the consumer would have to understand new argv." },
|
|
258
|
+
"args": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "The exact argv, in order. A consumer executes this verbatim and never assembles or interpolates arguments." },
|
|
259
|
+
"cwd": { "enum": ["target_root"] },
|
|
260
|
+
"stdin": { "enum": ["closed"] },
|
|
261
|
+
"lifecycle_scripts": {
|
|
262
|
+
"enum": ["disabled"],
|
|
263
|
+
"description": "Safety-critical. Dependency and pre/post lifecycle scripts do not run in any v1 step. This is why the build is an explicit contracted step rather than a side effect of installing."
|
|
264
|
+
},
|
|
265
|
+
"timeout_bound": { "type": "string", "minLength": 1, "description": "The key in bounds{} that bounds this step." },
|
|
266
|
+
"rationale": { "type": "string", "minLength": 1 }
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"output_check": {
|
|
270
|
+
"type": "object",
|
|
271
|
+
"additionalProperties": true,
|
|
272
|
+
"required": ["id", "kind", "mandatory", "detects", "applies_to", "rationale"],
|
|
273
|
+
"properties": {
|
|
274
|
+
"id": { "type": "string", "minLength": 1 },
|
|
275
|
+
"kind": {
|
|
276
|
+
"enum": [
|
|
277
|
+
"dist_inventory",
|
|
278
|
+
"content_hash_stability",
|
|
279
|
+
"module_import_smoke",
|
|
280
|
+
"type_entry_presence",
|
|
281
|
+
"cli_skill_commit_agreement",
|
|
282
|
+
"tool_versions",
|
|
283
|
+
"input_fingerprint"
|
|
284
|
+
],
|
|
285
|
+
"description": "Safety-critical. The enumerated check kinds a v1 consumer can perform. A new kind of check is a new recipe kind: an installed consumer cannot perform a check it was not released knowing how to perform, and per unperformable_check_disposition it must then report FAILED rather than skip."
|
|
286
|
+
},
|
|
287
|
+
"mandatory": { "const": true },
|
|
288
|
+
"depth": { "enum": ["shallow", "deep"], "description": "Only meaningful for module_import_smoke. shallow imports the package entry module and lets it load its own graph; deep imports every emitted module individually." },
|
|
289
|
+
"detects": {
|
|
290
|
+
"type": "array",
|
|
291
|
+
"minItems": 1,
|
|
292
|
+
"uniqueItems": true,
|
|
293
|
+
"items": { "enum": ["absent", "stale", "extra", "corrupt", "unsupported_tooling", "mismatched_generation"] },
|
|
294
|
+
"description": "The failure modes this check is responsible for catching. Together the checks must cover absent, stale, extra, and corrupt output; staleness in particular is invisible to every output-side check, because stale output is internally consistent."
|
|
295
|
+
},
|
|
296
|
+
"applies_to": { "type": "string", "minLength": 1 },
|
|
297
|
+
"rationale": { "type": "string", "minLength": 1 }
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"bound": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"additionalProperties": true,
|
|
303
|
+
"required": ["value", "unit", "applies_to", "rationale"],
|
|
304
|
+
"properties": {
|
|
305
|
+
"value": { "type": "integer", "minimum": 1 },
|
|
306
|
+
"unit": { "type": "string", "minLength": 1 },
|
|
307
|
+
"measured_baseline": { "type": "string", "minLength": 1 },
|
|
308
|
+
"applies_to": { "type": "string", "minLength": 1 },
|
|
309
|
+
"rationale": { "type": "string", "minLength": 1 }
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://nextcommerce.com/schemas/campaigns-os-sidecar-bundle-conformance.v0.schema.json",
|
|
4
|
+
"title": "Campaigns OS Sidecar Bundle Conformance v0",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"bundle_id",
|
|
10
|
+
"ok",
|
|
11
|
+
"status",
|
|
12
|
+
"stage_blocked",
|
|
13
|
+
"root",
|
|
14
|
+
"packet_generated_at",
|
|
15
|
+
"material_digest",
|
|
16
|
+
"artifacts",
|
|
17
|
+
"errors",
|
|
18
|
+
"warnings"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"schema_version": { "const": "campaigns-os-sidecar-bundle-conformance/v0" },
|
|
22
|
+
"bundle_id": { "const": "campaigns-os-migration-sidecar-bundle/v0" },
|
|
23
|
+
"ok": { "type": "boolean" },
|
|
24
|
+
"status": { "enum": ["conformant", "nonconformant"] },
|
|
25
|
+
"stage_blocked": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"description": "True when a required QA sidecar is shape-valid but its disposition still blocks handoff."
|
|
28
|
+
},
|
|
29
|
+
"root": { "type": "string", "minLength": 1 },
|
|
30
|
+
"packet_generated_at": { "type": ["string", "null"] },
|
|
31
|
+
"material_digest": {
|
|
32
|
+
"type": ["string", "null"],
|
|
33
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
34
|
+
},
|
|
35
|
+
"artifacts": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": [
|
|
41
|
+
"kind",
|
|
42
|
+
"path",
|
|
43
|
+
"requirement",
|
|
44
|
+
"present",
|
|
45
|
+
"schema_version",
|
|
46
|
+
"generated_at",
|
|
47
|
+
"sha256",
|
|
48
|
+
"material_sha256"
|
|
49
|
+
],
|
|
50
|
+
"properties": {
|
|
51
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
52
|
+
"path": { "type": "string", "minLength": 1 },
|
|
53
|
+
"requirement": { "enum": ["required", "required_after_qa"] },
|
|
54
|
+
"present": { "type": "boolean" },
|
|
55
|
+
"schema_version": { "type": ["string", "null"] },
|
|
56
|
+
"generated_at": { "type": ["string", "null"] },
|
|
57
|
+
"sha256": { "type": ["string", "null"], "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
58
|
+
"material_sha256": { "type": ["string", "null"], "pattern": "^sha256:[0-9a-f]{64}$" }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"errors": { "type": "array", "items": { "$ref": "#/$defs/finding" } },
|
|
63
|
+
"warnings": { "type": "array", "items": { "$ref": "#/$defs/finding" } }
|
|
64
|
+
},
|
|
65
|
+
"$defs": {
|
|
66
|
+
"finding": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"required": ["code", "artifact", "message", "remedy"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"code": { "type": "string", "minLength": 1 },
|
|
72
|
+
"artifact": { "type": ["string", "null"] },
|
|
73
|
+
"message": { "type": "string", "minLength": 1 },
|
|
74
|
+
"remedy": { "type": "string", "minLength": 1 }
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|