@adcp/sdk 13.0.0-rc.10 → 13.0.0-rc.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/core/AgentClient.d.mts +12 -3
- package/dist/lib/core/AgentClient.d.ts +12 -3
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/AgentClient.js +12 -3
- package/dist/lib/core/AgentClient.js.map +1 -1
- package/dist/lib/core/AgentClient.mjs +12 -3
- package/dist/lib/core/AgentClient.mjs.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.mts +13 -3
- package/dist/lib/core/SingleAgentClient.d.ts +13 -3
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +52 -31
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/core/SingleAgentClient.mjs +52 -31
- package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
- package/dist/lib/index.d.mts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +8 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +8 -0
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/registry/types.generated.d.mts +48 -1
- package/dist/lib/registry/types.generated.d.ts +48 -1
- package/dist/lib/registry/types.generated.d.ts.map +1 -1
- package/dist/lib/registry/types.generated.js.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +389 -65
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +389 -65
- package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +8 -2
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/comply.mjs +8 -2
- package/dist/lib/testing/compliance/comply.mjs.map +1 -1
- package/dist/lib/testing/compliance/spec-conformance.d.ts.map +1 -1
- package/dist/lib/testing/compliance/spec-conformance.js +2 -0
- package/dist/lib/testing/compliance/spec-conformance.js.map +1 -1
- package/dist/lib/testing/compliance/spec-conformance.mjs +2 -0
- package/dist/lib/testing/compliance/spec-conformance.mjs.map +1 -1
- package/dist/lib/testing/compliance/summary.d.mts +2 -0
- package/dist/lib/testing/compliance/summary.d.ts +2 -0
- package/dist/lib/testing/compliance/summary.d.ts.map +1 -1
- package/dist/lib/testing/compliance/summary.js +3 -2
- package/dist/lib/testing/compliance/summary.js.map +1 -1
- package/dist/lib/testing/compliance/summary.mjs +3 -2
- package/dist/lib/testing/compliance/summary.mjs.map +1 -1
- package/dist/lib/testing/compliance/types.d.mts +4 -0
- package/dist/lib/testing/compliance/types.d.ts +4 -0
- package/dist/lib/testing/compliance/types.d.ts.map +1 -1
- package/dist/lib/testing/compliance/types.js.map +1 -1
- package/dist/lib/testing/storyboard/junit.js +49 -32
- package/dist/lib/testing/storyboard/junit.js.map +1 -1
- package/dist/lib/testing/storyboard/junit.mjs +49 -32
- package/dist/lib/testing/storyboard/junit.mjs.map +1 -1
- package/dist/lib/testing/storyboard/loader.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/loader.js +26 -0
- package/dist/lib/testing/storyboard/loader.js.map +1 -1
- package/dist/lib/testing/storyboard/loader.mjs +26 -0
- package/dist/lib/testing/storyboard/loader.mjs.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +66 -15
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.mjs +70 -16
- package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
- package/dist/lib/testing/storyboard/types.d.mts +26 -1
- package/dist/lib/testing/storyboard/types.d.ts +26 -1
- 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 +11 -0
- package/dist/lib/testing/storyboard/validations.d.ts +11 -0
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/validations.js +30 -13
- package/dist/lib/testing/storyboard/validations.js.map +1 -1
- package/dist/lib/testing/storyboard/validations.mjs +27 -13
- package/dist/lib/testing/storyboard/validations.mjs.map +1 -1
- package/dist/lib/v2/projection/augment-response.d.mts +45 -0
- package/dist/lib/v2/projection/augment-response.d.ts +45 -0
- package/dist/lib/v2/projection/augment-response.d.ts.map +1 -1
- package/dist/lib/v2/projection/augment-response.js +54 -0
- package/dist/lib/v2/projection/augment-response.js.map +1 -1
- package/dist/lib/v2/projection/augment-response.mjs +52 -0
- package/dist/lib/v2/projection/augment-response.mjs.map +1 -1
- package/dist/lib/v2/projection/index.d.mts +7 -1
- package/dist/lib/v2/projection/index.d.ts +7 -1
- package/dist/lib/v2/projection/index.d.ts.map +1 -1
- package/dist/lib/v2/projection/index.js +9 -0
- package/dist/lib/v2/projection/index.js.map +1 -1
- package/dist/lib/v2/projection/index.mjs +10 -0
- package/dist/lib/v2/projection/index.mjs.map +1 -1
- package/dist/lib/v2/projection/legacy-routes.d.mts +24 -0
- package/dist/lib/v2/projection/legacy-routes.d.ts +25 -0
- package/dist/lib/v2/projection/legacy-routes.d.ts.map +1 -0
- package/dist/lib/v2/projection/legacy-routes.js +163 -0
- package/dist/lib/v2/projection/legacy-routes.js.map +1 -0
- package/dist/lib/v2/projection/legacy-routes.mjs +138 -0
- package/dist/lib/v2/projection/legacy-routes.mjs.map +1 -0
- package/dist/lib/v2/projection/v1-to-v2.d.mts +3 -0
- package/dist/lib/v2/projection/v1-to-v2.d.ts +3 -0
- package/dist/lib/v2/projection/v1-to-v2.d.ts.map +1 -1
- package/dist/lib/v2/projection/v1-to-v2.js +2 -1
- package/dist/lib/v2/projection/v1-to-v2.js.map +1 -1
- package/dist/lib/v2/projection/v1-to-v2.mjs +2 -1
- package/dist/lib/v2/projection/v1-to-v2.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/migration-12-to-13.md +56 -2
- package/package.json +3 -1
|
@@ -1879,25 +1879,25 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
1879
1879
|
} else if (result.status === "completed" && result.success && result.data && transformCompletedResponse) {
|
|
1880
1880
|
result = { ...result, data: transformCompletedResponse(result.data) };
|
|
1881
1881
|
}
|
|
1882
|
-
|
|
1883
|
-
const handler = this.config.handlers?.[handlerName];
|
|
1884
|
-
if (handler) {
|
|
1885
|
-
(0, import_abort2.throwIfAborted)(effectiveOptions?.signal);
|
|
1886
|
-
const metadata = {
|
|
1887
|
-
operation_id: options?.contextId || "sync",
|
|
1888
|
-
context_id: options?.contextId,
|
|
1889
|
-
task_id: result.metadata.taskId,
|
|
1890
|
-
agent_id: this.agent.id,
|
|
1891
|
-
task_type: taskType,
|
|
1892
|
-
status: result.status,
|
|
1893
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1894
|
-
};
|
|
1895
|
-
await handler(result.data, metadata);
|
|
1896
|
-
(0, import_abort2.throwIfAborted)(effectiveOptions?.signal);
|
|
1897
|
-
}
|
|
1898
|
-
}
|
|
1882
|
+
await this.notifyCompletedStatusHandler(result, taskType, handlerName, effectiveOptions);
|
|
1899
1883
|
return result;
|
|
1900
1884
|
}
|
|
1885
|
+
async notifyCompletedStatusHandler(result, taskType, handlerName, options) {
|
|
1886
|
+
if (result.status !== "completed" || !result.success || !this.asyncHandler) return;
|
|
1887
|
+
const handler = this.config.handlers?.[handlerName];
|
|
1888
|
+
if (!handler) return;
|
|
1889
|
+
(0, import_abort2.throwIfAborted)(options?.signal);
|
|
1890
|
+
await handler(result.data, {
|
|
1891
|
+
operation_id: options?.contextId || "sync",
|
|
1892
|
+
context_id: options?.contextId,
|
|
1893
|
+
task_id: result.metadata.taskId,
|
|
1894
|
+
agent_id: this.agent.id,
|
|
1895
|
+
task_type: taskType,
|
|
1896
|
+
status: result.status,
|
|
1897
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1898
|
+
});
|
|
1899
|
+
(0, import_abort2.throwIfAborted)(options?.signal);
|
|
1900
|
+
}
|
|
1901
1901
|
canonicalCreativeInputHandler(taskType, inputHandler) {
|
|
1902
1902
|
if (!inputHandler || !CANONICAL_CREATIVE_ACTIVITY_TASKS.has(taskType)) return inputHandler;
|
|
1903
1903
|
return async (context) => {
|
|
@@ -2854,12 +2854,17 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
2854
2854
|
if (result.data !== void 0) this.rememberCanonicalPackageRoutes(result.data, params);
|
|
2855
2855
|
return result;
|
|
2856
2856
|
}
|
|
2857
|
-
/**
|
|
2857
|
+
/**
|
|
2858
|
+
* @deprecated Compatibility-only entry point for callers still holding legacy creative `format_id` values.
|
|
2859
|
+
* Projection-only options are ignored because this method preserves the caller's legacy wire payload.
|
|
2860
|
+
*/
|
|
2858
2861
|
async createMediaBuyLegacy(params, inputHandler, options) {
|
|
2859
|
-
return
|
|
2862
|
+
return this.executeTaskUnprojected(
|
|
2863
|
+
"create_media_buy",
|
|
2860
2864
|
params,
|
|
2861
2865
|
inputHandler,
|
|
2862
|
-
options
|
|
2866
|
+
options,
|
|
2867
|
+
"onCreateMediaBuyStatusChange"
|
|
2863
2868
|
);
|
|
2864
2869
|
}
|
|
2865
2870
|
/**
|
|
@@ -2912,12 +2917,17 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
2912
2917
|
if (result.data !== void 0) this.rememberCanonicalPackageRoutes(result.data, params);
|
|
2913
2918
|
return result;
|
|
2914
2919
|
}
|
|
2915
|
-
/**
|
|
2920
|
+
/**
|
|
2921
|
+
* @deprecated Compatibility-only entry point for callers still holding legacy creative `format_id` values.
|
|
2922
|
+
* Projection-only options are ignored because this method preserves the caller's legacy wire payload.
|
|
2923
|
+
*/
|
|
2916
2924
|
async updateMediaBuyLegacy(params, inputHandler, options) {
|
|
2917
|
-
return
|
|
2925
|
+
return this.executeTaskUnprojected(
|
|
2926
|
+
"update_media_buy",
|
|
2918
2927
|
params,
|
|
2919
2928
|
inputHandler,
|
|
2920
|
-
options
|
|
2929
|
+
options,
|
|
2930
|
+
"onUpdateMediaBuyStatusChange"
|
|
2921
2931
|
);
|
|
2922
2932
|
}
|
|
2923
2933
|
/**
|
|
@@ -2983,12 +2993,17 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
2983
2993
|
params
|
|
2984
2994
|
);
|
|
2985
2995
|
}
|
|
2986
|
-
/**
|
|
2996
|
+
/**
|
|
2997
|
+
* @deprecated Compatibility-only entry point for callers still holding legacy creative `format_id` values.
|
|
2998
|
+
* Projection-only options are ignored because this method preserves the caller's legacy wire payload.
|
|
2999
|
+
*/
|
|
2987
3000
|
async syncCreativesLegacy(params, inputHandler, options) {
|
|
2988
|
-
return
|
|
3001
|
+
return this.executeTaskUnprojected(
|
|
3002
|
+
"sync_creatives",
|
|
2989
3003
|
params,
|
|
2990
3004
|
inputHandler,
|
|
2991
|
-
options
|
|
3005
|
+
options,
|
|
3006
|
+
"onSyncCreativesStatusChange"
|
|
2992
3007
|
);
|
|
2993
3008
|
}
|
|
2994
3009
|
resolveCreativeFormatWireMode(taskType, capabilities) {
|
|
@@ -3538,11 +3553,17 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
3538
3553
|
async executeTaskLegacy(taskName, params, inputHandler, options) {
|
|
3539
3554
|
return this.executeTaskUnprojected(taskName, params, inputHandler, options);
|
|
3540
3555
|
}
|
|
3541
|
-
async executeTaskUnprojected(taskName, params, inputHandler, options) {
|
|
3542
|
-
return (0, import_task_deadline.withTaskDeadline)(
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3556
|
+
async executeTaskUnprojected(taskName, params, inputHandler, options, handlerName) {
|
|
3557
|
+
return (0, import_task_deadline.withTaskDeadline)(options, async (effectiveOptions) => {
|
|
3558
|
+
const result = await this.executeTaskUnprojectedWithinDeadline(
|
|
3559
|
+
taskName,
|
|
3560
|
+
params,
|
|
3561
|
+
inputHandler,
|
|
3562
|
+
effectiveOptions
|
|
3563
|
+
);
|
|
3564
|
+
if (handlerName) await this.notifyCompletedStatusHandler(result, taskName, handlerName, effectiveOptions);
|
|
3565
|
+
return result;
|
|
3566
|
+
});
|
|
3546
3567
|
}
|
|
3547
3568
|
async executeTaskUnprojectedWithinDeadline(taskName, params, inputHandler, options) {
|
|
3548
3569
|
(0, import_abort2.throwIfAborted)(options?.signal);
|