@nextcommerce/campaigns-os 1.34.1 → 1.37.2
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 +42 -13
- package/CHANGELOG.md +117 -0
- package/README.md +48 -21
- package/contracts/agent-relevant-change-policy.v1.json +1 -0
- package/contracts/campaign-cart-sdk-support-policy.v0.json +2 -2
- package/contracts/commerce-surface-catalog.json +31 -29
- package/contracts/fixtures/progress/observation.v0.json +89 -0
- package/contracts/release-ledger.json +425 -0
- package/contracts/supported-surface.json +20 -5
- package/contracts/template-brand-contract.shared-commerce.v0.json +1 -1
- package/demo/apollo-v0/NOTICE.txt +51 -0
- package/demo/apollo-v0/assets/css/demo.css +2 -0
- package/demo/apollo-v0/assets/css/landing/tokens.css +35 -0
- package/demo/apollo-v0/assets/css/next-core.css +16124 -0
- package/demo/apollo-v0/assets/images/1x1_1.svg +19 -0
- package/demo/apollo-v0/assets/images/1x1_2.svg +19 -0
- package/demo/apollo-v0/assets/images/affirm-logo.svg +24 -0
- package/demo/apollo-v0/assets/images/apple-pay-logo.svg +4 -0
- package/demo/apollo-v0/assets/images/bancontact-logo.svg +1 -0
- package/demo/apollo-v0/assets/images/cc-visa.svg +28 -0
- package/demo/apollo-v0/assets/images/cc_amex.svg +20 -0
- package/demo/apollo-v0/assets/images/cc_discover.svg +21 -0
- package/demo/apollo-v0/assets/images/cc_master.svg +22 -0
- package/demo/apollo-v0/assets/images/credit-card-flags.svg +38 -0
- package/demo/apollo-v0/assets/images/demo-inline-40788e52a7c75b78.svg +1 -0
- package/demo/apollo-v0/assets/images/demo-inline-686e73c8840a0f0a.svg +1 -0
- package/demo/apollo-v0/assets/images/google-pay-logo.svg +7 -0
- package/demo/apollo-v0/assets/images/guarantee-badge.png +0 -0
- package/demo/apollo-v0/assets/images/icon-dollar.svg +5 -0
- package/demo/apollo-v0/assets/images/icon-guarantee.svg +5 -0
- package/demo/apollo-v0/assets/images/icon-shipping.svg +5 -0
- package/demo/apollo-v0/assets/images/icons8-lock-24_1icons8-lock-24.png +0 -0
- package/demo/apollo-v0/assets/images/ideal-logo.svg +30 -0
- package/demo/apollo-v0/assets/images/klarna-logo.svg +9 -0
- package/demo/apollo-v0/assets/images/landing/_shared/16x9.svg +19 -0
- package/demo/apollo-v0/assets/images/landing/_shared/1x1_1.svg +19 -0
- package/demo/apollo-v0/assets/images/landing/_shared/4x3.svg +19 -0
- package/demo/apollo-v0/assets/images/landing/_shared/arrow-right.svg +6 -0
- package/demo/apollo-v0/assets/images/landing/_shared/cta-guarantee-icon.png +0 -0
- package/demo/apollo-v0/assets/images/landing/benefits-2/benefits-2-icon-1.svg +8 -0
- package/demo/apollo-v0/assets/images/landing/benefits-2/benefits-2-icon-2.svg +10 -0
- package/demo/apollo-v0/assets/images/landing/benefits-2/benefits-2-icon-3.svg +13 -0
- package/demo/apollo-v0/assets/images/landing/benefits-2/benefits-2-icon-4.svg +11 -0
- package/demo/apollo-v0/assets/images/landing/benefits-2/benefits-2-quote.svg +6 -0
- package/demo/apollo-v0/assets/images/landing/benefits-2/benefits-2-verified.svg +10 -0
- package/demo/apollo-v0/assets/images/landing/bottomcta-1/check-bullet.svg +5 -0
- package/demo/apollo-v0/assets/images/landing/faq-1/faq-chevron.svg +6 -0
- package/demo/apollo-v0/assets/images/landing/footer-1/footer-logo.png +0 -0
- package/demo/apollo-v0/assets/images/landing/guarantee-1/guarantee-1-badge.svg +8 -0
- package/demo/apollo-v0/assets/images/landing/hero-1/icon-check.svg +5 -0
- package/demo/apollo-v0/assets/images/landing/hero-1/icon-star.svg +6 -0
- package/demo/apollo-v0/assets/images/landing/hero-1/icon-verified.svg +6 -0
- package/demo/apollo-v0/assets/images/landing/icons-5/icon-batteries.svg +7 -0
- package/demo/apollo-v0/assets/images/landing/icons-5/icon-cuff-checking.svg +6 -0
- package/demo/apollo-v0/assets/images/landing/icons-5/icon-dual-user.svg +5 -0
- package/demo/apollo-v0/assets/images/landing/icons-5/icon-fda-cleared.svg +5 -0
- package/demo/apollo-v0/assets/images/landing/icons-5/icon-heartbeat.svg +17 -0
- package/demo/apollo-v0/assets/images/landing/icons-5/icon-lcd-display.svg +10 -0
- package/demo/apollo-v0/assets/images/landing/icons-5/icon-movement-error.svg +7 -0
- package/demo/apollo-v0/assets/images/landing/icons-5/icon-portable.png +0 -0
- package/demo/apollo-v0/assets/images/landing/icons-5/icon-reading-memory.svg +6 -0
- package/demo/apollo-v0/assets/images/landing/icons-5/icon-wrist-comfort.svg +5 -0
- package/demo/apollo-v0/assets/images/landing/ingredients-3/ingredients-3-card-1.jpg +0 -0
- package/demo/apollo-v0/assets/images/landing/ingredients-3/ingredients-3-card-2.jpg +0 -0
- package/demo/apollo-v0/assets/images/landing/ingredients-3/ingredients-3-card-3.jpg +0 -0
- package/demo/apollo-v0/assets/images/landing/ingredients-3/ingredients-3-card-4.jpg +0 -0
- package/demo/apollo-v0/assets/images/landing/ingredients-3/ingredients-3-promise-1.png +0 -0
- package/demo/apollo-v0/assets/images/landing/ingredients-3/ingredients-3-promise-2.png +0 -0
- package/demo/apollo-v0/assets/images/landing/ingredients-3/ingredients-3-promise-3.png +0 -0
- package/demo/apollo-v0/assets/images/landing/ingredients-3/ingredients-3-promise-4.png +0 -0
- package/demo/apollo-v0/assets/images/landing/ingredients-3/ingredients-3-promise-5.png +0 -0
- package/demo/apollo-v0/assets/images/landing/ingredients-3/ingredients-3-promise-6.png +0 -0
- package/demo/apollo-v0/assets/images/landing/nav-1/flag-us.png +0 -0
- package/demo/apollo-v0/assets/images/landing/reviews-3/star-card.svg +3 -0
- package/demo/apollo-v0/assets/images/landing/reviews-3/star-lg.svg +3 -0
- package/demo/apollo-v0/assets/images/landing/reviews-3/star-sm.svg +3 -0
- package/demo/apollo-v0/assets/images/landing/reviews-3/verified.svg +10 -0
- package/demo/apollo-v0/assets/images/landing/testimonials-2/testimonials-2-reactions.svg +9 -0
- package/demo/apollo-v0/assets/images/landing/testimonials-2/testimonials-2-stars.svg +6 -0
- package/demo/apollo-v0/assets/images/link-logo.svg +1 -0
- package/demo/apollo-v0/assets/images/next-dark.svg +8 -0
- package/demo/apollo-v0/assets/images/paypal-logo.svg +5 -0
- package/demo/apollo-v0/assets/images/paypal-txt.svg +8 -0
- package/demo/apollo-v0/assets/images/paypal.svg +22 -0
- package/demo/apollo-v0/assets/images/sepa-logo.svg +275 -0
- package/demo/apollo-v0/assets/images/twint-logo.svg +1 -0
- package/demo/apollo-v0/assets/images/united-states-flag-icon.webp +0 -0
- package/demo/apollo-v0/assets/images/upsell-payment-logos.svg +38 -0
- package/demo/apollo-v0/assets/images/usps.png +0 -0
- package/demo/apollo-v0/checkout/index.html +1370 -0
- package/demo/apollo-v0/landing/index.html +1836 -0
- package/demo/apollo-v0/provenance.json +342 -0
- package/demo/apollo-v0/receipt/index.html +292 -0
- package/demo/apollo-v0/upsell-bundle-stepper/index.html +401 -0
- package/docs/activation-and-evidence.md +37 -0
- package/docs/build-packet.md +107 -0
- package/docs/demo-preview.md +63 -0
- package/docs/diagnostics.md +55 -0
- package/docs/orientation-contract-reference.md +2 -1
- package/docs/progress-snapshots.md +142 -0
- package/docs/runtime-readiness.md +1 -1
- package/docs/supported-surface.md +13 -1
- package/package.json +13 -3
- package/schemas/campaign-runtime-build-context.v0.schema.json +42 -0
- package/schemas/campaigns-os-progress-snapshot.v0.schema.json +370 -0
- package/skills/next-campaigns-build/SKILL.md +17 -1
- package/skills/next-campaigns-os/SKILL.md +19 -3
- package/skills/next-campaigns-os-setup/SKILL.md +17 -1
- package/skills/next-campaigns-polish/SKILL.md +18 -2
- package/skills/next-campaigns-qa/SKILL.md +24 -8
- package/skills.json +5 -5
- package/src/cli.mjs +74 -4
- package/src/consent.mjs +2 -2
- package/src/demo-artifact.mjs +97 -0
- package/src/demo.mjs +85 -0
- package/src/diagnostic.mjs +101 -0
- package/src/install-mode.mjs +13 -1
- package/src/progress-node.mjs +177 -0
- package/src/progress.mjs +133 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Redacted support diagnostics
|
|
2
|
+
|
|
3
|
+
Requires Campaigns OS 1.35.0 or later. If that version is not yet published to
|
|
4
|
+
npm, install a reviewed full-SHA source pin as described in the quickstart.
|
|
5
|
+
|
|
6
|
+
From the campaign folder:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npx campaigns-os tooling diagnose --platform codex --packet campaign-runtime.build.json
|
|
10
|
+
npx campaigns-os tooling diagnose --platform codex --packet campaign-runtime.build.json --json > diagnostic.json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Omit `--packet` for installation and skill diagnostics only. Use `--platform
|
|
14
|
+
claude` for a Claude-only profile. `--context` and `--report` may select existing
|
|
15
|
+
local sidecars; `--target` selects a local skills directory. These inputs are
|
|
16
|
+
never included in the export. The text and JSON forms are suitable for review
|
|
17
|
+
and copying to a support request. The command itself sends nothing.
|
|
18
|
+
|
|
19
|
+
The `campaigns-os-diagnostic/v0` summary is an allowlist projection of existing
|
|
20
|
+
`tooling status` and read-only `doctor` producers. Its stage comes from doctor's
|
|
21
|
+
`next` block, which uses the existing lifecycle picker. It does not execute
|
|
22
|
+
`next`, install, fetch campaign data, run a browser, publish, remit, deploy,
|
|
23
|
+
create an order, sweep a stale run session, or write retained campaign evidence.
|
|
24
|
+
Mutation flags do not change that behavior. Export success means a summary was
|
|
25
|
+
produced, including when its inspection is unavailable; consult its statuses.
|
|
26
|
+
|
|
27
|
+
The only exported fields are the schema version; a numeric package version or
|
|
28
|
+
null; install mode (`checkout`, `node_modules`, `global`, `npx_cache`,
|
|
29
|
+
`package_directory`, or `unknown`); coarse selected agent profile; tooling and
|
|
30
|
+
doctor statuses; existing next stage; freshness; fixed accepted reason/action
|
|
31
|
+
IDs; and fixed human-readable recovery owner, action, and input-needed text.
|
|
32
|
+
Unknown enum values become `unknown` with `diagnostic.unsupported_value`.
|
|
33
|
+
Unrecognized reason/action IDs become `diagnostic.unsupported_reason` or
|
|
34
|
+
`diagnostic.unsupported_action`; they are never copied or given authority.
|
|
35
|
+
Unsupported IDs need detailed local review, not a guessed repair.
|
|
36
|
+
|
|
37
|
+
Toolkit freshness is `pinned` only when a producer identifies a source pin,
|
|
38
|
+
`local_ref_current`/`local_ref_behind` for a checkout's existing local upstream
|
|
39
|
+
comparison, otherwise `unknown`. This performs no network freshness check.
|
|
40
|
+
An exact registry version and lockfile still identify installed bytes when a
|
|
41
|
+
source commit is not derivable. Inspection `observed` means local doctor
|
|
42
|
+
inspection succeeded, not that the served build, deployed campaign, or saved
|
|
43
|
+
Map revision is current. Missing inspection is `not_requested` or `unavailable`.
|
|
44
|
+
The diagnostic is neither an orientation envelope nor launch evidence.
|
|
45
|
+
|
|
46
|
+
The export excludes absolute paths, URLs, argv, environment, source content,
|
|
47
|
+
prompts, free-text findings, credentials, campaign/customer identities, and
|
|
48
|
+
order values. Producer exceptions are summarized with fixed unavailable IDs;
|
|
49
|
+
their raw messages are not exported. Detailed `doctor`/`next` output stays local
|
|
50
|
+
and can contain campaign data, so it is not a substitute for this export.
|
|
51
|
+
|
|
52
|
+
Recovery names who supplies the missing input. Inspect the detailed local
|
|
53
|
+
producer for the exact command and any campaign-specific input. If a QA verdict
|
|
54
|
+
was recorded but publication failed, follow `qa publish` recovery for that
|
|
55
|
+
retained verdict; never rerun checkout or create an order to republish evidence.
|
|
@@ -25,7 +25,7 @@ Ledger schema id: `campaigns-os-release-ledger/v1`
|
|
|
25
25
|
Change policy version: `1.0.0`
|
|
26
26
|
Reason-code vocabulary version: `1.0.0`
|
|
27
27
|
Limits version: `1.0.0`
|
|
28
|
-
Supported surface at generation time: `1.
|
|
28
|
+
Supported surface at generation time: `1.37.2`
|
|
29
29
|
|
|
30
30
|
## Forward compatibility
|
|
31
31
|
|
|
@@ -243,6 +243,7 @@ so a renamed command fails here as well as at the supported-surface gate.
|
|
|
243
243
|
- `campaigns-os findings`
|
|
244
244
|
- `campaigns-os run-record`
|
|
245
245
|
- `campaigns-os run`
|
|
246
|
+
- `campaigns-os demo`
|
|
246
247
|
|
|
247
248
|
## Terminal outcome examples
|
|
248
249
|
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Minimal progress observations
|
|
2
|
+
|
|
3
|
+
Candidate release **1.36.0** adds the portable `@nextcommerce/campaigns-os/progress`
|
|
4
|
+
export and `schemas/campaigns-os-progress-snapshot.v0.schema.json`. The currently
|
|
5
|
+
published install example does not include this feature. Progress is a compact
|
|
6
|
+
observation of the existing lifecycle, not a second workflow or proof of readiness.
|
|
7
|
+
|
|
8
|
+
`next --packet <packet>` records the canonical picker result after the same doctor
|
|
9
|
+
checks that supply its continuation and gates. Agents run `next` after setup,
|
|
10
|
+
assembly, polish and preview deployment so those committed stage reports become
|
|
11
|
+
visible. The CLI `build` command prepares inputs and runs doctor; it does not build
|
|
12
|
+
or deploy the campaign. Preview's existing stage is `deploy`. Arbitrary edits are
|
|
13
|
+
not tracked. `qa run --packet <packet>` observes its successfully committed or
|
|
14
|
+
unchanged QA report before the existing closeout: ready QA closes its run once,
|
|
15
|
+
blocked QA keeps it open. A progress delivery cannot close a run.
|
|
16
|
+
|
|
17
|
+
## What is shared
|
|
18
|
+
|
|
19
|
+
The strict v0 object carries its schema, package version, observation timestamp,
|
|
20
|
+
producer (`next` or `qa`), opaque progress stream and sequence, prior snapshot ID,
|
|
21
|
+
content digest, Map ID and separate revision/spec/build hashes. Six independent
|
|
22
|
+
stage records retain observed status and explicit build binding. Continuation
|
|
23
|
+
retains the canonical stage, blocked/divergent flags, fixed action IDs and gate
|
|
24
|
+
states. Preview carries only presence and a hash of the URL. An optional QA block
|
|
25
|
+
retains the exact verdict ID, disposition (including `ready_with_exceptions`),
|
|
26
|
+
binding and publication state. Publication failure does not invalidate a locally
|
|
27
|
+
retained verdict; recovery uses `qa publish`, without repeating an order.
|
|
28
|
+
|
|
29
|
+
No commands, prompts, free text, content, local paths, URLs, query strings,
|
|
30
|
+
credentials, order values or customer payloads enter the wire. Unknown vocabulary
|
|
31
|
+
becomes a fixed `unknown` marker and cannot imply a passing continuation. A
|
|
32
|
+
stage's observed `completed` status is a ledger claim, not independent verification.
|
|
33
|
+
Only matching fingerprints carry `matching`; absent or unverifiable binding is
|
|
34
|
+
`unconfirmed`. A current local output hash never proves a deployment is current.
|
|
35
|
+
|
|
36
|
+
The identity algorithms are deliberately different:
|
|
37
|
+
|
|
38
|
+
- `map-store-v1` retains the original saved Map hash. A fresh Map fetch records
|
|
39
|
+
that hash and the fetched local semantic baseline in Build Context intake.
|
|
40
|
+
Saved revision alignment is `aligned` only while the local spec still matches
|
|
41
|
+
that baseline and the context names this packet and Map. Existing contexts,
|
|
42
|
+
offline caches and local exports without that provenance remain `unconfirmed`.
|
|
43
|
+
The saved hash may still be retained as identity; it alone proves no alignment.
|
|
44
|
+
- `campaign-spec-material-v1` hashes recursively key-sorted JSON after removing
|
|
45
|
+
top-level `spec_identity`, `slug`, `map_id` and `saved_at`, as existing
|
|
46
|
+
`specMaterialHash` does. It includes lifecycle and parent Map fields that the
|
|
47
|
+
saved Map producer excludes. It must never be compared as a Map-store hash.
|
|
48
|
+
Assembly Report `identity.spec_hash` is a raw-byte hash and is not this value.
|
|
49
|
+
- `sha256-manifest/v1` is the existing doctor's output fingerprint: SHA-256 of
|
|
50
|
+
the sorted relative-path and file-SHA-256 manifest under the built route.
|
|
51
|
+
Reported assembly/QA binding uses the doctor's actual observed output and its
|
|
52
|
+
recorded-fingerprint comparison. Missing output remains nullable/unconfirmed.
|
|
53
|
+
|
|
54
|
+
Different Map revisions, local specs, builds, packet/context/report bindings and
|
|
55
|
+
endpoint scopes have independent streams. Completed stages cannot be combined
|
|
56
|
+
across them. A progress stream is independent of a run-session ID.
|
|
57
|
+
|
|
58
|
+
## Capture and delivery
|
|
59
|
+
|
|
60
|
+
Sanitized immutable snapshots are written under the target repository's
|
|
61
|
+
`.campaign-runtime/progress/` before any request. Allocation uses an exclusive
|
|
62
|
+
local lock with a process owner. Dead owners are recovered through an exclusive
|
|
63
|
+
recovery claim and an atomic rename; a live process is never evicted. An ownerless
|
|
64
|
+
crash gap is recoverable after ten seconds. If recovery itself is interrupted,
|
|
65
|
+
capture fails closed: stop all Campaigns OS writers for that target, then remove
|
|
66
|
+
the abandoned `.allocation-lock` directory in the affected progress scope before
|
|
67
|
+
retrying `next`. Do not remove a lock while a writer is active.
|
|
68
|
+
|
|
69
|
+
An unchanged projection reuses its ID, timestamp and sequence. Identity
|
|
70
|
+
changes start a new stream. Each local scope retains at most 32 snapshots and
|
|
71
|
+
separate remit metadata; retention can leave an incomplete history. There is no
|
|
72
|
+
daemon. A later observation retries its current pending delivery; old pending
|
|
73
|
+
snapshots remain in the bounded local history, without background sends.
|
|
74
|
+
|
|
75
|
+
`--no-write` disables both capture and delivery. `--no-remit` keeps capture local.
|
|
76
|
+
`--no-run-session` does not start a session. A missing/invalid Map ID keeps the
|
|
77
|
+
observation local with `map_id_missing`; a missing campaign key similarly yields
|
|
78
|
+
`campaign_key_missing`. Capture or delivery failures never alter the lifecycle
|
|
79
|
+
result or exit status.
|
|
80
|
+
Capture may wait up to 1.5 seconds for allocation. Delivery is awaited within
|
|
81
|
+
its separate two-second network budget. Unchanged lifecycle results mean the
|
|
82
|
+
command's output and status remain unchanged; these bounded waits can add latency.
|
|
83
|
+
|
|
84
|
+
The planned ops receiver is `POST /api/progress`. Destination precedence is an
|
|
85
|
+
explicit `--proxy-base`, then the bound Build Context's `intake.proxy_base`, then
|
|
86
|
+
the canonical NEXT endpoint only when there is no source binding. An invalid or
|
|
87
|
+
foreign source binding fails closed, including a context without a nonempty
|
|
88
|
+
matching packet pointer. An explicit endpoint override remains independent of
|
|
89
|
+
that context, and cannot confirm its saved revision.
|
|
90
|
+
|
|
91
|
+
HTTPS and plain HTTP loopback are accepted;
|
|
92
|
+
userinfo, query, fragment and other protocols are refused. Redirects are refused.
|
|
93
|
+
The existing campaign-key resolver supplies `X-Campaign-Key`; keys never enter
|
|
94
|
+
snapshots or metadata.
|
|
95
|
+
|
|
96
|
+
The same telemetry on/off choice governs sharing. Canonical delivery defaults on;
|
|
97
|
+
explicit off, malformed environment/configuration and scope mismatch keep delivery
|
|
98
|
+
off. Consent off still permits the sanitized local capture and sends no request.
|
|
99
|
+
Noncanonical progress delivery requires an explicit matching scoped file
|
|
100
|
+
opt-in (`telemetry on --proxy-base <endpoint>`). Unlike existing Run Record remit,
|
|
101
|
+
unscoped environment ON cannot bypass scope for progress; it yields
|
|
102
|
+
`scoped_consent_required`. Minimal stage observations are intended to be visible
|
|
103
|
+
in Workspace. This producer does not implement the receiver or Workspace UI.
|
|
104
|
+
|
|
105
|
+
Delivery uses a total two-second budget, at most one initial request and one retry
|
|
106
|
+
for transport errors, 429 or 5xx. Both requests use identical canonical JSON bytes,
|
|
107
|
+
ID and timestamp. A response body is bounded to 4 KiB. A 2xx or 409 succeeds only
|
|
108
|
+
with `{ "ok": true, "snapshot_id": "<id>", "digest": "<same-id>" }`. Other
|
|
109
|
+
400/401/403/409 answers and nonmatching acknowledgments remain failed; a conflict
|
|
110
|
+
never silently counts as stored. Response error text is never copied to metadata.
|
|
111
|
+
|
|
112
|
+
## Portable consumption
|
|
113
|
+
|
|
114
|
+
```js
|
|
115
|
+
import {
|
|
116
|
+
verifyProgressSnapshot, groupProgressHistories, progressStorageKey,
|
|
117
|
+
} from '@nextcommerce/campaigns-os/progress';
|
|
118
|
+
|
|
119
|
+
const checked = await verifyProgressSnapshot(snapshot);
|
|
120
|
+
const histories = await groupProgressHistories(snapshots);
|
|
121
|
+
const key = progressStorageKey(snapshot, scopeHash);
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The export uses standard Web Crypto and TextEncoder; it has no Node, filesystem
|
|
125
|
+
or network dependency. `validateProgressSnapshot` checks bounded strict shape and
|
|
126
|
+
binding invariants; `verifyProgressSnapshot` also verifies the content digest.
|
|
127
|
+
`snapshot_id` hashes recursively key-sorted JSON of every field except itself.
|
|
128
|
+
Canonical transport JSON includes the ID, with no whitespace or newline.
|
|
129
|
+
The exported schema and supported example fixture agree byte-for-byte in tests.
|
|
130
|
+
|
|
131
|
+
`groupProgressHistories` accepts at most 256 snapshots, groups whole observations
|
|
132
|
+
by complete identity plus stream, removes exact duplicate IDs and sorts sequences.
|
|
133
|
+
Groups are `conflicted`, `incomplete`, `unconfirmed` or `observed`. It neither
|
|
134
|
+
chooses a lifecycle stage nor merges completion claims. `observed` confers no
|
|
135
|
+
receiver trust or readiness. Invalid members are rejected with fixed reason codes.
|
|
136
|
+
|
|
137
|
+
The planned immutable receiver key is
|
|
138
|
+
`progress:v0:<scope-hex>:<map-id>:<revision-hex>:<stream>:<sequence>:<digest-hex>`.
|
|
139
|
+
`progressStorageKey` returns null without a valid shape, scope hash, Map or saved
|
|
140
|
+
revision. A key match identifies scope; it is not authentication or trust. The
|
|
141
|
+
receiver must verify the digest and authorized Map scope and stamp its own trust.
|
|
142
|
+
Unknown, incomplete or conflicted histories must never yield a ready workspace.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
How a checkout of this repository at one commit becomes a usable installed runtime, and how a consumer decides whether a prepared one is still trustworthy. Everything below is generated from `contracts/runtime-recipe.campaigns-os-node-v1.json`, which is the only authority for these values.
|
|
10
10
|
|
|
11
|
-
Recipe kind `campaigns-os-node-v1`, revision `1.0.2`, validated by `schemas/campaigns-os-runtime-recipe.v1.schema.json` (`Campaigns OS Runtime Recipe v1`). Supported surface at generation time: `1.
|
|
11
|
+
Recipe kind `campaigns-os-node-v1`, revision `1.0.2`, validated by `schemas/campaigns-os-runtime-recipe.v1.schema.json` (`Campaigns OS Runtime Recipe v1`). Supported surface at generation time: `1.37.2`.
|
|
12
12
|
|
|
13
13
|
## What this is
|
|
14
14
|
|
|
@@ -14,7 +14,7 @@ implementation detail, however stable it looks.
|
|
|
14
14
|
| Surface | Contract | Change discipline |
|
|
15
15
|
|---|---|---|
|
|
16
16
|
| `schemas/*.schema.json` (all of them) | The portable contract catalog: CampaignSpec, Design Source Package, Build Packet, Build Context, Assembly Report, Doctor Output, sidecar-bundle conformance, Run Record, Workflow Finding, Build Brief, Source-HTML Manifest, Tooling Orientation, Release Ledger, QA Verdict, the QA Verdict sidecar projection, Runtime Recipe, and the legacy-migration inventory/plan/receipt trio. | Hashed. Any content change requires updating the recorded hash **and** bumping `surface_version` in the same PR. A shape change that alters meaning gets a new schema-version const — one version identifier must never cover two shapes (the 2026-08 assembly-report drift is the incident this rule encodes). Additions to an open `v0` schema are expected and consumers must tolerate unknown fields; the security-sensitive legacy-migration schemas are closed, so additions there require a new lineage. 1.28.0 (RL entry `surface_version: 1.28.0`, breaking) removed the two required Build Packet booleans `qa.test_orders_allowed` and `qa.sandbox_test_card_confirmed` (nothing read them; test orders run from `--test-order <mode>` alone), added `local-serve` to the `deploy.target` enum, and added the optional `remit_result` / `remit_base_kind` fields to the Run Record. 1.30.0 (additive) added the optional `data_layer` record to the QA Verdict's `test_orders[]` entries — the order's `dl_purchase` reading (#325). 1.33.0 (additive) added the optional `qa_verdict_publish` block to the Run Record — which verdict was posted to the QA portal, by `qa run` or `qa publish`, and what the portal answered, in the `remit_result` vocabulary (#328). |
|
|
17
|
-
| CLI commands: `start`, `prepare-build`, `build`, `polish`, `checkpoint`, `page-kit`, `spec`, `doctor`, `bundle`, `next`, `theme`, `tooling`, `install-skills`, `install-agent-context`, `validate-assembly-report`, `telemetry`, `standardize`, `qa`, `findings`, `run-record`, `run`, `sdk` | Scriptable entry points. The founding list (1.0.0) was the argv surface Campaigns Agent's remit fixture pins; 1.25.0 adds the partner entry path the public guides instruct — `install-skills` (skill install), `tooling status` (preflight), `next --packet` (the runtime cursor) — plus `theme`, `install-agent-context`, `validate-assembly-report`, and `telemetry`, since consent is part of the partner contract. `validate-build-packet`, formerly an undocumented and unsupported alias of `doctor`, was removed in 1.25.0+agent.7 (RL-0036) and now gets the unknown-command error; use `doctor`. `standardization-report`, a supported but redundant second spelling of `standardize` — same flags, same output, same exit codes — was removed in 1.27.0 and now gets the same unknown-command error; use `standardize`. Removing a supported command is a breaking change and is why that release moved the minor. `bundle check` validates the canonical JSON readback set and makes QA required only under `--require-qa`. `polish capture` owns page-load evidence production. `checkpoint waive` currently accepts four registered gates: `page_kit.store_profile`, `page_kit.sdk_version`, `polish.hidden_eager_media`, and `built_output.upsell_selector_scope`. `page-kit sync` (added in 1.29.0) writes the CampaignSpec's Store Profile fields and SDK pin into the target's `_data/campaigns.json` entry — the repair the first two gates name — and is the only `page-kit` subcommand. `spec derive` (added in 1.31.0) is the reverse write for the repo-derived field class (#432): the target's SDK pin, page routes and analytics ids into the packet's local CampaignSpec; it is the only `spec` subcommand, and the `page_kit.sdk_version.repo_newer` advisory names it; its `--write-map` flag (1.33.0+agent.2) also records the derived pin in the saved Map's Build hints field through the proxy Worker, never moving a Map pin backwards. `qa publish` (added in 1.33.0) posts an already-stored verdict to the QA portal without a re-run or an order, refusing a stale `spec_hash` or a verdict its Run Record already records as published (#328). Within Polish, only the broader Source Freshness waiver remains on its existing report lane; theme and QA decisions also retain their existing lanes. | Any change to this list — adding, renaming, or removing a command — bumps `surface_version` in the same PR, and since 1.25.0 `check-supported-surface.mjs --base` enforces that (before, only hashed and named entries owed a bump, so `checkpoint` landed unbumped). Subcommands, registered gates, and flags may grow freely beneath a listed command. Removing a listed command from dispatch fails the gate outright. Do not infer support for an unregistered checkpoint from the top-level command. |
|
|
17
|
+
| CLI commands: `start`, `prepare-build`, `build`, `polish`, `checkpoint`, `page-kit`, `spec`, `doctor`, `bundle`, `next`, `theme`, `tooling`, `install-skills`, `install-agent-context`, `validate-assembly-report`, `telemetry`, `standardize`, `qa`, `findings`, `run-record`, `run`, `sdk`, `demo` | Scriptable entry points. The founding list (1.0.0) was the argv surface Campaigns Agent's remit fixture pins; 1.25.0 adds the partner entry path the public guides instruct — `install-skills` (skill install), `tooling status` (preflight), `next --packet` (the runtime cursor) — plus `theme`, `install-agent-context`, `validate-assembly-report`, and `telemetry`, since consent is part of the partner contract. `validate-build-packet`, formerly an undocumented and unsupported alias of `doctor`, was removed in 1.25.0+agent.7 (RL-0036) and now gets the unknown-command error; use `doctor`. `standardization-report`, a supported but redundant second spelling of `standardize` — same flags, same output, same exit codes — was removed in 1.27.0 and now gets the same unknown-command error; use `standardize`. Removing a supported command is a breaking change and is why that release moved the minor. `bundle check` validates the canonical JSON readback set and makes QA required only under `--require-qa`. `polish capture` owns page-load evidence production. `checkpoint waive` currently accepts four registered gates: `page_kit.store_profile`, `page_kit.sdk_version`, `polish.hidden_eager_media`, and `built_output.upsell_selector_scope`. `page-kit sync` (added in 1.29.0) writes the CampaignSpec's Store Profile fields and SDK pin into the target's `_data/campaigns.json` entry — the repair the first two gates name — and is the only `page-kit` subcommand. `spec derive` (added in 1.31.0) is the reverse write for the repo-derived field class (#432): the target's SDK pin, page routes and analytics ids into the packet's local CampaignSpec; it is the only `spec` subcommand, and the `page_kit.sdk_version.repo_newer` advisory names it; its `--write-map` flag (1.33.0+agent.2) also records the derived pin in the saved Map's Build hints field through the proxy Worker, never moving a Map pin backwards. `qa publish` (added in 1.33.0) posts an already-stored verdict to the QA portal without a re-run or an order, refusing a stale `spec_hash` or a verdict its Run Record already records as published (#328). Within Polish, only the broader Source Freshness waiver remains on its existing report lane; theme and QA decisions also retain their existing lanes. | Any change to this list — adding, renaming, or removing a command — bumps `surface_version` in the same PR, and since 1.25.0 `check-supported-surface.mjs --base` enforces that (before, only hashed and named entries owed a bump, so `checkpoint` landed unbumped). Subcommands, registered gates, and flags may grow freely beneath a listed command. Removing a listed command from dispatch fails the gate outright. Do not infer support for an unregistered checkpoint from the top-level command. |
|
|
18
18
|
| `sdk storage-check` and `docs/sdk-storage-compatibility.md` | Read-only AST compatibility report for explicitly scoped tracked campaign HTML/JS before an SDK bump; consumes the supplied SDK-owned manifest and records its SHA-256 and verified or unverified local Git provenance. Incompatible and unknown findings exit 2; a clean scan is static source evidence only. | Additive supported CLI and named documentation; no automatic merchant integration repair. |
|
|
19
19
|
| `bin/campaigns-os.mjs` (`campaigns-os`) | The CLI entry itself. | Declared in `package.json` `bin`; the gate fails if it disappears. |
|
|
20
20
|
| Package export `./campaign-spec` | The versioned campaign-spec rule registry, consumed as `@nextcommerce/campaigns-os` (pinned by consumers' lockfiles; lockstep policy — ADR-003 in the ops repo). | Behavior-guarded from the consumer side by their contract tests; the export path itself is gated here. |
|
|
@@ -82,3 +82,15 @@ the package a consumer installs."
|
|
|
82
82
|
the PR body — downstream pins (Campaigns Agent context spine, ops-repo
|
|
83
83
|
`public-contracts.manifest.json`) update on their own cadence against a
|
|
84
84
|
version they can see move.
|
|
85
|
+
|
|
86
|
+
Candidate 1.36.0 adds the portable `./progress` export, its strict v0 JSON schema,
|
|
87
|
+
[progress observation reference](progress-snapshots.md), and supported example
|
|
88
|
+
fixture. Observations preserve canonical continuation and separate Map/spec/build
|
|
89
|
+
identities; consumers must not treat history presence or scope-key matching as
|
|
90
|
+
readiness or trust.
|
|
91
|
+
|
|
92
|
+
Candidate 1.37.0 adds the `demo` CLI command, [offline sample reference](demo-preview.md),
|
|
93
|
+
a hashed `demo/apollo-v0/provenance.json` and named attribution notice. The command
|
|
94
|
+
exclusively creates a new target with validated inert pages. Its internal static
|
|
95
|
+
files are covered by the provenance output hashes; they are not independent
|
|
96
|
+
consumer interfaces. No campaign proof or session authority is granted.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextcommerce/campaigns-os",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.2",
|
|
4
4
|
"description": "Toolkit for agent-assisted NEXT campaign builds.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -47,7 +47,12 @@
|
|
|
47
47
|
"./schemas/campaigns-os-legacy-migration-inventory.v0.schema.json": "./schemas/campaigns-os-legacy-migration-inventory.v0.schema.json",
|
|
48
48
|
"./schemas/campaigns-os-legacy-provisioning-plan.v0.schema.json": "./schemas/campaigns-os-legacy-provisioning-plan.v0.schema.json",
|
|
49
49
|
"./schemas/campaigns-os-legacy-provisioning-receipt.v0.schema.json": "./schemas/campaigns-os-legacy-provisioning-receipt.v0.schema.json",
|
|
50
|
-
"./package.json": "./package.json"
|
|
50
|
+
"./package.json": "./package.json",
|
|
51
|
+
"./progress": {
|
|
52
|
+
"import": "./src/progress.mjs",
|
|
53
|
+
"default": "./src/progress.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./schemas/campaigns-os-progress-snapshot.v0.schema.json": "./schemas/campaigns-os-progress-snapshot.v0.schema.json"
|
|
51
56
|
},
|
|
52
57
|
"scripts": {
|
|
53
58
|
"campaigns-os": "node ./bin/campaigns-os.mjs",
|
|
@@ -134,6 +139,11 @@
|
|
|
134
139
|
"compatibility.json",
|
|
135
140
|
"AGENTS.md",
|
|
136
141
|
"CHANGELOG.md",
|
|
137
|
-
"docs/sdk-storage-compatibility.md"
|
|
142
|
+
"docs/sdk-storage-compatibility.md",
|
|
143
|
+
"docs/activation-and-evidence.md",
|
|
144
|
+
"docs/diagnostics.md",
|
|
145
|
+
"docs/progress-snapshots.md",
|
|
146
|
+
"demo",
|
|
147
|
+
"docs/demo-preview.md"
|
|
138
148
|
]
|
|
139
149
|
}
|
|
@@ -24,6 +24,48 @@
|
|
|
24
24
|
},
|
|
25
25
|
"description": "Context-relative reference to the normalized Design Source Package. sha256 hashes the exact artifact bytes; material_fingerprint drives freshness gates."
|
|
26
26
|
},
|
|
27
|
+
"intake": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": true,
|
|
30
|
+
"properties": {
|
|
31
|
+
"saved_map_revision": {
|
|
32
|
+
"anyOf": [
|
|
33
|
+
{
|
|
34
|
+
"type": "null"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": [
|
|
40
|
+
"map_id",
|
|
41
|
+
"hash",
|
|
42
|
+
"algorithm",
|
|
43
|
+
"local_spec_material_hash"
|
|
44
|
+
],
|
|
45
|
+
"properties": {
|
|
46
|
+
"map_id": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1
|
|
49
|
+
},
|
|
50
|
+
"hash": {
|
|
51
|
+
"type": [
|
|
52
|
+
"string",
|
|
53
|
+
"null"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"algorithm": {
|
|
57
|
+
"const": "map-store-v1"
|
|
58
|
+
},
|
|
59
|
+
"local_spec_material_hash": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
27
69
|
"spec": {
|
|
28
70
|
"type": "object",
|
|
29
71
|
"required": ["path", "hash", "active_pages"],
|