@adcp/sdk 14.0.0-beta.12 → 14.0.0-beta.13
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/dist/lib/index.d.mts +3 -3
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +3 -1
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/create-adcp-server.d.mts +2 -2
- package/dist/lib/server/create-adcp-server.d.ts +2 -2
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +6 -1
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/create-adcp-server.mjs +6 -1
- package/dist/lib/server/create-adcp-server.mjs.map +1 -1
- package/dist/lib/server/decisioning/index.d.mts +3 -3
- package/dist/lib/server/decisioning/index.d.ts +3 -3
- package/dist/lib/server/decisioning/index.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.js.map +1 -1
- package/dist/lib/server/decisioning/index.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +24 -17
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +24 -17
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +71 -42
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +75 -43
- package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.d.mts +15 -21
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.d.ts +15 -21
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.js +100 -30
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.mjs +100 -30
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/task-registry.d.mts +30 -16
- package/dist/lib/server/decisioning/runtime/task-registry.d.ts +30 -16
- package/dist/lib/server/decisioning/runtime/task-registry.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/task-registry.js +40 -20
- package/dist/lib/server/decisioning/runtime/task-registry.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/task-registry.mjs +38 -19
- package/dist/lib/server/decisioning/runtime/task-registry.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.d.mts +2 -2
- package/dist/lib/server/decisioning/runtime/to-context.d.ts +2 -2
- package/dist/lib/server/decisioning/runtime/to-context.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.js +2 -2
- package/dist/lib/server/decisioning/runtime/to-context.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.mjs +2 -2
- package/dist/lib/server/decisioning/runtime/to-context.mjs.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.mts +3 -2
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +3 -2
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative.d.mts +10 -10
- package/dist/lib/server/decisioning/specialisms/creative.d.ts +10 -10
- package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative.js.map +1 -1
- package/dist/lib/server/index.d.mts +1 -1
- package/dist/lib/server/index.d.ts +1 -1
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/index.mjs.map +1 -1
- package/dist/lib/testing/storyboard/default-invariants.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/default-invariants.js +11 -2
- package/dist/lib/testing/storyboard/default-invariants.js.map +1 -1
- package/dist/lib/testing/storyboard/default-invariants.mjs +11 -2
- package/dist/lib/testing/storyboard/default-invariants.mjs.map +1 -1
- package/dist/lib/testing/storyboard/index.d.mts +1 -1
- package/dist/lib/testing/storyboard/index.d.ts +1 -1
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/index.mjs.map +1 -1
- package/dist/lib/testing/storyboard/loader.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/loader.js +14 -0
- package/dist/lib/testing/storyboard/loader.js.map +1 -1
- package/dist/lib/testing/storyboard/loader.mjs +14 -0
- package/dist/lib/testing/storyboard/loader.mjs.map +1 -1
- package/dist/lib/testing/storyboard/phase-condition.d.mts +41 -0
- package/dist/lib/testing/storyboard/phase-condition.d.ts +42 -0
- package/dist/lib/testing/storyboard/phase-condition.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/phase-condition.js +215 -0
- package/dist/lib/testing/storyboard/phase-condition.js.map +1 -0
- package/dist/lib/testing/storyboard/phase-condition.mjs +189 -0
- package/dist/lib/testing/storyboard/phase-condition.mjs.map +1 -0
- package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.js +15 -2
- package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.mjs +15 -2
- package/dist/lib/testing/storyboard/request-builder.mjs.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +57 -23
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.mjs +57 -23
- package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
- package/dist/lib/testing/storyboard/task-map.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/task-map.js +6 -2
- package/dist/lib/testing/storyboard/task-map.js.map +1 -1
- package/dist/lib/testing/storyboard/task-map.mjs +6 -2
- package/dist/lib/testing/storyboard/task-map.mjs.map +1 -1
- package/dist/lib/testing/storyboard/types.d.mts +5 -4
- package/dist/lib/testing/storyboard/types.d.ts +5 -4
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/types.js.map +1 -1
- package/dist/lib/testing/storyboard/types.mjs.map +1 -1
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/testing/storyboard/webhook-assertions.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/webhook-assertions.js +60 -4
- package/dist/lib/testing/storyboard/webhook-assertions.js.map +1 -1
- package/dist/lib/testing/storyboard/webhook-assertions.mjs +60 -4
- package/dist/lib/testing/storyboard/webhook-assertions.mjs.map +1 -1
- package/dist/lib/testing/storyboard/webhook-receiver.d.mts +15 -0
- package/dist/lib/testing/storyboard/webhook-receiver.d.ts +15 -0
- package/dist/lib/testing/storyboard/webhook-receiver.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/webhook-receiver.js +57 -6
- package/dist/lib/testing/storyboard/webhook-receiver.js.map +1 -1
- package/dist/lib/testing/storyboard/webhook-receiver.mjs +57 -6
- package/dist/lib/testing/storyboard/webhook-receiver.mjs.map +1 -1
- package/dist/lib/testing/types.d.mts +2 -0
- package/dist/lib/testing/types.d.ts +2 -0
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/testing/types.js.map +1 -1
- package/dist/lib/types/core.generated.d.mts +5 -2
- package/dist/lib/types/core.generated.d.ts +5 -2
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js.map +1 -1
- package/dist/lib/types/index.d.mts +1 -1
- package/dist/lib/types/index.d.ts +1 -1
- package/dist/lib/types/index.d.ts.map +1 -1
- package/dist/lib/types/index.js.map +1 -1
- package/dist/lib/types/index.mjs.map +1 -1
- package/dist/lib/types/list-transformers.d.ts +9 -5
- package/dist/lib/types/schemas.generated.d.ts +21 -298
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +5 -2
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/schemas.generated.mjs +4 -2
- package/dist/lib/types/schemas.generated.mjs.map +1 -1
- package/dist/lib/types/server-payload-aliases.d.mts +2 -1
- package/dist/lib/types/server-payload-aliases.d.ts +2 -1
- package/dist/lib/types/server-payload-aliases.d.ts.map +1 -1
- package/dist/lib/types/server-payload-aliases.js.map +1 -1
- package/dist/lib/types/tools.generated.d.mts +5 -2
- package/dist/lib/types/tools.generated.d.ts +5 -2
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/types/tools.generated.js.map +1 -1
- package/dist/lib/utils/build-creative-return-builders.d.mts +5 -1
- package/dist/lib/utils/build-creative-return-builders.d.ts +5 -1
- package/dist/lib/utils/build-creative-return-builders.d.ts.map +1 -1
- package/dist/lib/utils/build-creative-return-builders.js +9 -3
- package/dist/lib/utils/build-creative-return-builders.js.map +1 -1
- package/dist/lib/utils/build-creative-return-builders.mjs +7 -2
- package/dist/lib/utils/build-creative-return-builders.mjs.map +1 -1
- package/dist/lib/utils/response-unwrapper.js +1 -1
- package/dist/lib/utils/response-unwrapper.js.map +1 -1
- package/dist/lib/utils/response-unwrapper.mjs +1 -1
- package/dist/lib/utils/response-unwrapper.mjs.map +1 -1
- package/dist/lib/validation/schema-loader.d.ts.map +1 -1
- package/dist/lib/validation/schema-loader.js +16 -7
- package/dist/lib/validation/schema-loader.js.map +1 -1
- package/dist/lib/validation/schema-loader.mjs +16 -7
- package/dist/lib/validation/schema-loader.mjs.map +1 -1
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.js.map +1 -1
- package/dist/lib/version.mjs +3 -3
- package/dist/lib/version.mjs.map +1 -1
- package/docs/llms.txt +2 -2
- package/docs/migration-5.x-to-6.x.md +3 -2
- package/docs/migration-task-registry-scoping.md +61 -0
- package/examples/hello_seller_adapter_guaranteed.ts +1 -1
- package/package.json +4 -4
- package/skills/build-decisioning-creative-template/SKILL.md +2 -2
- package/skills/build-decisioning-platform/SKILL.md +4 -2
- package/skills/build-decisioning-platform/advanced/REFERENCE.md +7 -6
|
@@ -69,6 +69,7 @@ import { readBrandJsonUrl } from "../../signing/agent-resolver/capabilities-type
|
|
|
69
69
|
import { selectAgentByUrl } from "../../signing/agent-resolver/select-agent.mjs";
|
|
70
70
|
import { resolveDeclaredTestKit, selectProbeTask, validateTestKit } from "./test-kit.mjs";
|
|
71
71
|
import { validateStoryboardShape } from "./loader.mjs";
|
|
72
|
+
import { evaluatePhaseCondition, phaseConditionUsesContext } from "./phase-condition.mjs";
|
|
72
73
|
import { trustedStoryboardComplianceRoot } from "./provenance.mjs";
|
|
73
74
|
import { probeRequestSigningVector } from "./request-signing/probe-dispatch.mjs";
|
|
74
75
|
import { createWebhookReceiver } from "./webhook-receiver.mjs";
|
|
@@ -1580,9 +1581,10 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1580
1581
|
storyboard,
|
|
1581
1582
|
phaseCapabilitySkipDetails
|
|
1582
1583
|
);
|
|
1583
|
-
const
|
|
1584
|
+
const preflightExcludedPhaseIds = /* @__PURE__ */ new Set([
|
|
1584
1585
|
...phaseCapabilitySkipDetails.keys(),
|
|
1585
|
-
...storyboard.phases.filter((phase) =>
|
|
1586
|
+
...storyboard.phases.filter((phase) => shouldSkipPhaseBeforeRun(phase, options)).map((phase) => phase.id),
|
|
1587
|
+
...storyboard.phases.filter((phase) => phaseUsesRuntimeContext(phase)).map((phase) => phase.id)
|
|
1586
1588
|
]);
|
|
1587
1589
|
let creativeAssetFixtureGap = preflightRemainingCreativeAssetDirectives(
|
|
1588
1590
|
allSteps,
|
|
@@ -1605,7 +1607,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1605
1607
|
storyboardRequiresRequestSigner: allRequires.includes("request_signer"),
|
|
1606
1608
|
storyboardRequiresPublisherAuthRunner: storyboard.requires?.includes("trusted_match_publisher_auth_runner") === true
|
|
1607
1609
|
},
|
|
1608
|
-
|
|
1610
|
+
preflightExcludedPhaseIds
|
|
1609
1611
|
);
|
|
1610
1612
|
let creativeAssetFixtureGapRecorded = false;
|
|
1611
1613
|
if (!hasExecutableSteps) {
|
|
@@ -1737,7 +1739,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1737
1739
|
context,
|
|
1738
1740
|
options,
|
|
1739
1741
|
buildExecutionState(),
|
|
1740
|
-
|
|
1742
|
+
preflightExcludedPhaseIds
|
|
1741
1743
|
);
|
|
1742
1744
|
}
|
|
1743
1745
|
for (const phase of storyboard.phases) {
|
|
@@ -1816,7 +1818,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1816
1818
|
const phaseStatefulStepIds = phase.steps.filter((s) => s.stateful).map((s) => s.id);
|
|
1817
1819
|
let phaseAbsent = false;
|
|
1818
1820
|
let presenceDetected = false;
|
|
1819
|
-
if (shouldSkipPhase(phase, options)) {
|
|
1821
|
+
if (shouldSkipPhase(phase, options, context)) {
|
|
1820
1822
|
phaseResults.push({
|
|
1821
1823
|
phase_id: phase.id,
|
|
1822
1824
|
phase_title: phase.title,
|
|
@@ -1827,6 +1829,41 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1827
1829
|
});
|
|
1828
1830
|
continue;
|
|
1829
1831
|
}
|
|
1832
|
+
if (phaseUsesRuntimeContext(phase)) {
|
|
1833
|
+
preflightExcludedPhaseIds.delete(phase.id);
|
|
1834
|
+
const firstPhaseStepIndex = allSteps.find((target) => target.phaseId === phase.id)?.globalIndex ?? 0;
|
|
1835
|
+
creativeAssetFixtureGap = preflightRemainingCreativeAssetDirectives(
|
|
1836
|
+
allSteps,
|
|
1837
|
+
firstPhaseStepIndex - 1,
|
|
1838
|
+
context,
|
|
1839
|
+
options,
|
|
1840
|
+
buildExecutionState(),
|
|
1841
|
+
preflightExcludedPhaseIds
|
|
1842
|
+
);
|
|
1843
|
+
if (creativeAssetFixtureGap?.target.phaseId === phase.id) {
|
|
1844
|
+
const gapStep = buildCreativeAssetFixtureUnavailableStep(
|
|
1845
|
+
creativeAssetFixtureGap.target.step,
|
|
1846
|
+
phase.id,
|
|
1847
|
+
context,
|
|
1848
|
+
allSteps,
|
|
1849
|
+
buildExecutionState(),
|
|
1850
|
+
creativeAssetFixtureGap.failure
|
|
1851
|
+
);
|
|
1852
|
+
gapStep.storyboard_id = storyboard.id;
|
|
1853
|
+
priorStepResults.set(gapStep.step_id, gapStep);
|
|
1854
|
+
skippedCount++;
|
|
1855
|
+
creativeAssetFixtureGapRecorded = true;
|
|
1856
|
+
phaseResults.push({
|
|
1857
|
+
phase_id: phase.id,
|
|
1858
|
+
phase_title: phase.title,
|
|
1859
|
+
passed: true,
|
|
1860
|
+
steps: [gapStep],
|
|
1861
|
+
duration_ms: Date.now() - phaseStart
|
|
1862
|
+
});
|
|
1863
|
+
priorPhaseIds.push(phase.id);
|
|
1864
|
+
continue;
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1830
1867
|
if (!phaseAbsent && phaseContainsOauthMetadataProbe(phase) && !agentAdvertisesOauth(profile)) {
|
|
1831
1868
|
phaseAbsent = true;
|
|
1832
1869
|
}
|
|
@@ -2111,7 +2148,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
2111
2148
|
context,
|
|
2112
2149
|
options,
|
|
2113
2150
|
stepExecutionState,
|
|
2114
|
-
|
|
2151
|
+
preflightExcludedPhaseIds
|
|
2115
2152
|
);
|
|
2116
2153
|
}
|
|
2117
2154
|
if (creativeAssetFixtureGap) {
|
|
@@ -2325,7 +2362,8 @@ async function runMultiPass(agentUrls, storyboard, options) {
|
|
|
2325
2362
|
);
|
|
2326
2363
|
const preSeedExcludedPhaseIds = /* @__PURE__ */ new Set([
|
|
2327
2364
|
...phaseCapabilitySkipDetails.keys(),
|
|
2328
|
-
...storyboard.phases.filter((phase) =>
|
|
2365
|
+
...storyboard.phases.filter((phase) => shouldSkipPhaseBeforeRun(phase, options)).map((phase) => phase.id),
|
|
2366
|
+
...storyboard.phases.filter((phase) => phaseUsesRuntimeContext(phase)).map((phase) => phase.id)
|
|
2329
2367
|
]);
|
|
2330
2368
|
const preSeedFixtureGap = preflightRemainingCreativeAssetDirectives(
|
|
2331
2369
|
flattenSteps(storyboard),
|
|
@@ -4640,23 +4678,19 @@ function agentAdvertisesOauth(profile) {
|
|
|
4640
4678
|
const endpoint = resolveCapabilityPath(rawCaps, "account.authorization_endpoint");
|
|
4641
4679
|
return typeof endpoint === "string" && endpoint.length > 0;
|
|
4642
4680
|
}
|
|
4643
|
-
function shouldSkipPhase(phase, options) {
|
|
4681
|
+
function shouldSkipPhase(phase, options, context) {
|
|
4644
4682
|
const expr = phase.skip_if?.trim();
|
|
4645
4683
|
if (!expr) return false;
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
const
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
value = value[segment];
|
|
4657
|
-
}
|
|
4658
|
-
const truthy = Boolean(value);
|
|
4659
|
-
return negated ? !truthy : truthy;
|
|
4684
|
+
return evaluatePhaseCondition(expr, { context, test_kit: options.test_kit });
|
|
4685
|
+
}
|
|
4686
|
+
function shouldSkipPhaseBeforeRun(phase, options) {
|
|
4687
|
+
const expr = phase.skip_if?.trim();
|
|
4688
|
+
if (!expr || phaseConditionUsesContext(expr)) return false;
|
|
4689
|
+
return evaluatePhaseCondition(expr, { test_kit: options.test_kit });
|
|
4690
|
+
}
|
|
4691
|
+
function phaseUsesRuntimeContext(phase) {
|
|
4692
|
+
const expr = phase.skip_if?.trim();
|
|
4693
|
+
return expr ? phaseConditionUsesContext(expr) : false;
|
|
4660
4694
|
}
|
|
4661
4695
|
function resolveTaskName(step, options) {
|
|
4662
4696
|
if (!step.task.startsWith("$test_kit.")) return step.task;
|
|
@@ -4818,7 +4852,7 @@ function applyBrandInvariant(request, options, taskName, stepFlags) {
|
|
|
4818
4852
|
const acct = existingAccount;
|
|
4819
4853
|
const isNaturalKeyVariant = "brand" in acct || "operator" in acct;
|
|
4820
4854
|
if (isNaturalKeyVariant) {
|
|
4821
|
-
const preserveWholesaleAccountBrand = taskName === "get_products" && request.buying_mode === "wholesale" && acct.brand !== void 0;
|
|
4855
|
+
const preserveWholesaleAccountBrand = (taskName === "get_products" && request.buying_mode === "wholesale" || taskName === "get_signals" && request.discovery_mode === "wholesale") && acct.brand !== void 0;
|
|
4822
4856
|
const merged = {
|
|
4823
4857
|
...acct,
|
|
4824
4858
|
brand: preserveWholesaleAccountBrand ? acct.brand : brand
|