@nextcommerce/campaigns-os 1.37.3 → 1.41.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 +114 -10
- package/CHANGELOG.md +530 -0
- package/README.md +38 -27
- package/contracts/agent-relevant-change-policy.v1.json +11 -1
- package/contracts/effects.v1.json +4794 -0
- package/contracts/release-ledger.json +789 -0
- package/contracts/supported-surface.json +25 -5
- package/docs/build-packet.md +27 -16
- package/docs/demo-preview.md +1 -1
- package/docs/diagnostics.md +7 -4
- package/docs/effects.md +281 -0
- package/docs/gateway-login.md +113 -0
- package/docs/orientation-contract-reference.md +4 -1
- package/docs/progress-snapshots.md +3 -3
- package/docs/qa-and-test-orders.md +3 -3
- package/docs/readback.md +523 -0
- package/docs/runtime-readiness.md +1 -1
- package/docs/sdk-storage-compatibility.md +1 -1
- package/docs/skills-revision.md +364 -0
- package/docs/supported-surface.md +11 -3
- package/docs/versioning.md +8 -4
- package/package.json +8 -3
- package/schemas/campaign-runtime-build-packet.v0.schema.json +5 -0
- package/schemas/campaigns-os-effects.v1.schema.json +211 -0
- package/schemas/campaigns-os-readback.v2.schema.json +267 -0
- package/skills/campaign-lifecycle-orientation/SKILL.md +174 -0
- package/skills/campaign-readback-classification/SKILL.md +230 -0
- package/skills/campaign-run-evidence/SKILL.md +140 -0
- package/skills/contribution-intake/SKILL.md +85 -0
- package/skills/next-campaigns-build/SKILL.md +33 -12
- package/skills/next-campaigns-os/SKILL.md +45 -21
- package/skills/next-campaigns-os-setup/SKILL.md +35 -14
- package/skills/next-campaigns-polish/SKILL.md +43 -17
- package/skills/next-campaigns-qa/SKILL.md +48 -24
- package/skills.json +39 -6
- package/src/admin-transport.mjs +123 -0
- package/src/cli.mjs +991 -200
- package/src/credential-store.mjs +183 -0
- package/src/deviation.mjs +3 -2
- package/src/diagnostic.mjs +4 -1
- package/src/gate-actions.mjs +2 -2
- package/src/install-mode.mjs +17 -9
- package/src/lifecycle.mjs +95 -0
- package/src/login.mjs +152 -0
- package/src/package-install-fixture.mjs +3 -2
- package/src/qa-node.mjs +56 -19
- package/src/qa-publish.mjs +108 -2
- package/src/readback.mjs +1936 -0
- package/src/remit.mjs +17 -3
package/src/remit.mjs
CHANGED
|
@@ -81,6 +81,22 @@ export function assertSecureProxyBase(proxyBase, { label = "Remit", credential =
|
|
|
81
81
|
throw new Error(`${label}: --proxy-base must be https (or a loopback host for local testing); declining to send ${subject} over ${url.protocol}//${url.host}.`);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* The transport's OTHER precondition, checked before the destination gate: a
|
|
86
|
+
* fetch to send with. Exported because a preview must make it too — `qa
|
|
87
|
+
* publish --dry-run` and `run-record --dry-run` call this exact function, so a
|
|
88
|
+
* runtime without a global fetch refuses the dry path by the same message the
|
|
89
|
+
* real send throws, instead of previewing a POST that cannot be made.
|
|
90
|
+
* Throws; returns nothing. There is no default: the caller passes the fetch it
|
|
91
|
+
* would actually send with, so `assertFetchAvailable(undefined)` is a refusal
|
|
92
|
+
* rather than a silent fallback to the global that may not be there either.
|
|
93
|
+
*/
|
|
94
|
+
export function assertFetchAvailable(fetchImpl) {
|
|
95
|
+
if (typeof fetchImpl !== "function") {
|
|
96
|
+
throw new Error("Global fetch is not available. Upgrade to Node 18+ or pass fetchImpl.");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
84
100
|
function byteLength(value) {
|
|
85
101
|
return Buffer.byteLength(String(value), "utf8");
|
|
86
102
|
}
|
|
@@ -158,9 +174,7 @@ export async function remit(path, payload, proxyBase, {
|
|
|
158
174
|
credential = undefined,
|
|
159
175
|
onResponse = null,
|
|
160
176
|
} = {}) {
|
|
161
|
-
|
|
162
|
-
throw new Error("Global fetch is not available. Upgrade to Node 18+ or pass fetchImpl.");
|
|
163
|
-
}
|
|
177
|
+
assertFetchAvailable(fetchImpl);
|
|
164
178
|
// What the gate says must match what this request actually carries. A caller
|
|
165
179
|
// that names its credential wins; otherwise infer it from the headers this
|
|
166
180
|
// module knows carry one (never from a bare Accept or Content-Type), so a
|