@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
|
@@ -1889,25 +1889,25 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
1889
1889
|
} else if (result.status === "completed" && result.success && result.data && transformCompletedResponse) {
|
|
1890
1890
|
result = { ...result, data: transformCompletedResponse(result.data) };
|
|
1891
1891
|
}
|
|
1892
|
-
|
|
1893
|
-
const handler = this.config.handlers?.[handlerName];
|
|
1894
|
-
if (handler) {
|
|
1895
|
-
throwIfAborted(effectiveOptions?.signal);
|
|
1896
|
-
const metadata = {
|
|
1897
|
-
operation_id: options?.contextId || "sync",
|
|
1898
|
-
context_id: options?.contextId,
|
|
1899
|
-
task_id: result.metadata.taskId,
|
|
1900
|
-
agent_id: this.agent.id,
|
|
1901
|
-
task_type: taskType,
|
|
1902
|
-
status: result.status,
|
|
1903
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1904
|
-
};
|
|
1905
|
-
await handler(result.data, metadata);
|
|
1906
|
-
throwIfAborted(effectiveOptions?.signal);
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1892
|
+
await this.notifyCompletedStatusHandler(result, taskType, handlerName, effectiveOptions);
|
|
1909
1893
|
return result;
|
|
1910
1894
|
}
|
|
1895
|
+
async notifyCompletedStatusHandler(result, taskType, handlerName, options) {
|
|
1896
|
+
if (result.status !== "completed" || !result.success || !this.asyncHandler) return;
|
|
1897
|
+
const handler = this.config.handlers?.[handlerName];
|
|
1898
|
+
if (!handler) return;
|
|
1899
|
+
throwIfAborted(options?.signal);
|
|
1900
|
+
await handler(result.data, {
|
|
1901
|
+
operation_id: options?.contextId || "sync",
|
|
1902
|
+
context_id: options?.contextId,
|
|
1903
|
+
task_id: result.metadata.taskId,
|
|
1904
|
+
agent_id: this.agent.id,
|
|
1905
|
+
task_type: taskType,
|
|
1906
|
+
status: result.status,
|
|
1907
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1908
|
+
});
|
|
1909
|
+
throwIfAborted(options?.signal);
|
|
1910
|
+
}
|
|
1911
1911
|
canonicalCreativeInputHandler(taskType, inputHandler) {
|
|
1912
1912
|
if (!inputHandler || !CANONICAL_CREATIVE_ACTIVITY_TASKS.has(taskType)) return inputHandler;
|
|
1913
1913
|
return async (context) => {
|
|
@@ -2864,12 +2864,17 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
2864
2864
|
if (result.data !== void 0) this.rememberCanonicalPackageRoutes(result.data, params);
|
|
2865
2865
|
return result;
|
|
2866
2866
|
}
|
|
2867
|
-
/**
|
|
2867
|
+
/**
|
|
2868
|
+
* @deprecated Compatibility-only entry point for callers still holding legacy creative `format_id` values.
|
|
2869
|
+
* Projection-only options are ignored because this method preserves the caller's legacy wire payload.
|
|
2870
|
+
*/
|
|
2868
2871
|
async createMediaBuyLegacy(params, inputHandler, options) {
|
|
2869
|
-
return
|
|
2872
|
+
return this.executeTaskUnprojected(
|
|
2873
|
+
"create_media_buy",
|
|
2870
2874
|
params,
|
|
2871
2875
|
inputHandler,
|
|
2872
|
-
options
|
|
2876
|
+
options,
|
|
2877
|
+
"onCreateMediaBuyStatusChange"
|
|
2873
2878
|
);
|
|
2874
2879
|
}
|
|
2875
2880
|
/**
|
|
@@ -2922,12 +2927,17 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
2922
2927
|
if (result.data !== void 0) this.rememberCanonicalPackageRoutes(result.data, params);
|
|
2923
2928
|
return result;
|
|
2924
2929
|
}
|
|
2925
|
-
/**
|
|
2930
|
+
/**
|
|
2931
|
+
* @deprecated Compatibility-only entry point for callers still holding legacy creative `format_id` values.
|
|
2932
|
+
* Projection-only options are ignored because this method preserves the caller's legacy wire payload.
|
|
2933
|
+
*/
|
|
2926
2934
|
async updateMediaBuyLegacy(params, inputHandler, options) {
|
|
2927
|
-
return
|
|
2935
|
+
return this.executeTaskUnprojected(
|
|
2936
|
+
"update_media_buy",
|
|
2928
2937
|
params,
|
|
2929
2938
|
inputHandler,
|
|
2930
|
-
options
|
|
2939
|
+
options,
|
|
2940
|
+
"onUpdateMediaBuyStatusChange"
|
|
2931
2941
|
);
|
|
2932
2942
|
}
|
|
2933
2943
|
/**
|
|
@@ -2993,12 +3003,17 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
2993
3003
|
params
|
|
2994
3004
|
);
|
|
2995
3005
|
}
|
|
2996
|
-
/**
|
|
3006
|
+
/**
|
|
3007
|
+
* @deprecated Compatibility-only entry point for callers still holding legacy creative `format_id` values.
|
|
3008
|
+
* Projection-only options are ignored because this method preserves the caller's legacy wire payload.
|
|
3009
|
+
*/
|
|
2997
3010
|
async syncCreativesLegacy(params, inputHandler, options) {
|
|
2998
|
-
return
|
|
3011
|
+
return this.executeTaskUnprojected(
|
|
3012
|
+
"sync_creatives",
|
|
2999
3013
|
params,
|
|
3000
3014
|
inputHandler,
|
|
3001
|
-
options
|
|
3015
|
+
options,
|
|
3016
|
+
"onSyncCreativesStatusChange"
|
|
3002
3017
|
);
|
|
3003
3018
|
}
|
|
3004
3019
|
resolveCreativeFormatWireMode(taskType, capabilities) {
|
|
@@ -3548,11 +3563,17 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
3548
3563
|
async executeTaskLegacy(taskName, params, inputHandler, options) {
|
|
3549
3564
|
return this.executeTaskUnprojected(taskName, params, inputHandler, options);
|
|
3550
3565
|
}
|
|
3551
|
-
async executeTaskUnprojected(taskName, params, inputHandler, options) {
|
|
3552
|
-
return withTaskDeadline(
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3566
|
+
async executeTaskUnprojected(taskName, params, inputHandler, options, handlerName) {
|
|
3567
|
+
return withTaskDeadline(options, async (effectiveOptions) => {
|
|
3568
|
+
const result = await this.executeTaskUnprojectedWithinDeadline(
|
|
3569
|
+
taskName,
|
|
3570
|
+
params,
|
|
3571
|
+
inputHandler,
|
|
3572
|
+
effectiveOptions
|
|
3573
|
+
);
|
|
3574
|
+
if (handlerName) await this.notifyCompletedStatusHandler(result, taskName, handlerName, effectiveOptions);
|
|
3575
|
+
return result;
|
|
3576
|
+
});
|
|
3556
3577
|
}
|
|
3557
3578
|
async executeTaskUnprojectedWithinDeadline(taskName, params, inputHandler, options) {
|
|
3558
3579
|
throwIfAborted(options?.signal);
|