@adcp/sdk 15.2.1 → 15.3.0
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/ConversationTypes.d.mts +5 -0
- package/dist/lib/core/ConversationTypes.d.ts +5 -0
- package/dist/lib/core/SingleAgentClient.d.mts +19 -1
- package/dist/lib/core/SingleAgentClient.d.ts +19 -1
- package/dist/lib/core/SingleAgentClient.js +38 -7
- package/dist/lib/core/SingleAgentClient.mjs +38 -7
- package/dist/lib/index.d.mts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +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/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +2 -1
- package/docs/guides/PUSH-NOTIFICATION-CONFIG.md +39 -0
- package/docs/llms.txt +1 -1
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/package.json +1 -1
|
@@ -121,6 +121,11 @@ export type WebhookUrlTemplate = string | {
|
|
|
121
121
|
* Options for task execution
|
|
122
122
|
*/
|
|
123
123
|
export interface TaskOptions {
|
|
124
|
+
/**
|
|
125
|
+
* Skip inline completion status handlers for this call and its continuations.
|
|
126
|
+
* Defaults to false. Independently delivered webhook handlers are unaffected.
|
|
127
|
+
*/
|
|
128
|
+
skipStatusHandlers?: boolean;
|
|
124
129
|
/**
|
|
125
130
|
* Absolute wall-clock deadline for the entire SDK task call (ms), including
|
|
126
131
|
* discovery and capability/version preflight. Unlike `workingTimeout`, this
|
|
@@ -121,6 +121,11 @@ export type WebhookUrlTemplate = string | {
|
|
|
121
121
|
* Options for task execution
|
|
122
122
|
*/
|
|
123
123
|
export interface TaskOptions {
|
|
124
|
+
/**
|
|
125
|
+
* Skip inline completion status handlers for this call and its continuations.
|
|
126
|
+
* Defaults to false. Independently delivered webhook handlers are unaffected.
|
|
127
|
+
*/
|
|
128
|
+
skipStatusHandlers?: boolean;
|
|
124
129
|
/**
|
|
125
130
|
* Absolute wall-clock deadline for the entire SDK task call (ms), including
|
|
126
131
|
* discovery and capability/version preflight. Unlike `workingTimeout`, this
|
|
@@ -9,7 +9,7 @@ type TaskStatusUpdateEvent = Record<string, any>;
|
|
|
9
9
|
import type { InputHandler, Message, TaskOptions, TaskResult, ConversationConfig, TaskInfo, TaskState, WebhookUrlTemplate, DirectPauseRecoveryRequest } from './ConversationTypes.mjs';
|
|
10
10
|
import type { AdcpTaskName, TaskRequestFor, TaskResponseTypeMap } from './AgentClient.mjs';
|
|
11
11
|
import type { DeferredTaskStorage } from '../storage/interfaces.mjs';
|
|
12
|
-
import type { Activity, AsyncHandlerConfig } from './AsyncHandler.mjs';
|
|
12
|
+
import type { Activity, AsyncHandlerConfig, WebhookMetadata } from './AsyncHandler.mjs';
|
|
13
13
|
import { type WebhookHeaderValue, type WebhookHeadersLike } from '../webhooks/index.mjs';
|
|
14
14
|
import { type WebhookRegistration, type WebhookRegistrationStore } from './webhook-registration.mjs';
|
|
15
15
|
import { type ReplayStore, type RevocationStore, type JwksResolver, type WebhookSignatureErrorCode, type ResolvedAgentJwksResolverOptions } from '../signing/server.mjs';
|
|
@@ -191,6 +191,11 @@ export declare class WebhookDispatchError extends Error {
|
|
|
191
191
|
readonly cause?: unknown;
|
|
192
192
|
constructor(code: WebhookParseErrorCode, message: string, cause?: unknown);
|
|
193
193
|
}
|
|
194
|
+
/** Context for an isolated inline completion status-handler failure. */
|
|
195
|
+
export interface StatusHandlerErrorContext {
|
|
196
|
+
handlerName: keyof AsyncHandlerConfig;
|
|
197
|
+
metadata: WebhookMetadata;
|
|
198
|
+
}
|
|
194
199
|
/**
|
|
195
200
|
* Configuration for SingleAgentClient (and multi-agent client)
|
|
196
201
|
*/
|
|
@@ -266,8 +271,21 @@ export interface SingleAgentClientConfig extends ConversationConfig {
|
|
|
266
271
|
* For at-least-once webhook delivery, set `handlers.webhookDedup` to
|
|
267
272
|
* drop duplicate retries by `idempotency_key`. See
|
|
268
273
|
* `docs/guides/PUSH-NOTIFICATION-CONFIG.md#deduplication`.
|
|
274
|
+
* For per-call skipping and inline error isolation, see
|
|
275
|
+
* `docs/guides/PUSH-NOTIFICATION-CONFIG.md#inline-completion-handlers`.
|
|
269
276
|
*/
|
|
270
277
|
handlers?: AsyncHandlerConfig;
|
|
278
|
+
/**
|
|
279
|
+
* Return successful completed results even if an inline status handler throws.
|
|
280
|
+
* Defaults to false, preserving handler rejection and durable finalization retry.
|
|
281
|
+
* Does not change webhook error handling or cancellation behavior.
|
|
282
|
+
*/
|
|
283
|
+
isolateStatusHandlerErrors?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Reports inline status-handler errors when isolateStatusHandlerErrors is true.
|
|
286
|
+
* Errors thrown by this observer are recorded as warnings and do not reject the task.
|
|
287
|
+
*/
|
|
288
|
+
onStatusHandlerError?: (error: unknown, context: StatusHandlerErrorContext) => void | Promise<void>;
|
|
271
289
|
/** Select legacy HMAC-SHA256 push verification. Omit to use RFC 9421. */
|
|
272
290
|
webhookSecret?: string;
|
|
273
291
|
/** Durable provenance for outbound push registrations. Defaults to process-local memory. */
|
|
@@ -9,7 +9,7 @@ type TaskStatusUpdateEvent = Record<string, any>;
|
|
|
9
9
|
import type { InputHandler, Message, TaskOptions, TaskResult, ConversationConfig, TaskInfo, TaskState, WebhookUrlTemplate, DirectPauseRecoveryRequest } from './ConversationTypes';
|
|
10
10
|
import type { AdcpTaskName, TaskRequestFor, TaskResponseTypeMap } from './AgentClient';
|
|
11
11
|
import type { DeferredTaskStorage } from '../storage/interfaces';
|
|
12
|
-
import type { Activity, AsyncHandlerConfig } from './AsyncHandler';
|
|
12
|
+
import type { Activity, AsyncHandlerConfig, WebhookMetadata } from './AsyncHandler';
|
|
13
13
|
import { type WebhookHeaderValue, type WebhookHeadersLike } from '../webhooks';
|
|
14
14
|
import { type WebhookRegistration, type WebhookRegistrationStore } from './webhook-registration';
|
|
15
15
|
import { type ReplayStore, type RevocationStore, type JwksResolver, type WebhookSignatureErrorCode, type ResolvedAgentJwksResolverOptions } from '../signing/server';
|
|
@@ -191,6 +191,11 @@ export declare class WebhookDispatchError extends Error {
|
|
|
191
191
|
readonly cause?: unknown;
|
|
192
192
|
constructor(code: WebhookParseErrorCode, message: string, cause?: unknown);
|
|
193
193
|
}
|
|
194
|
+
/** Context for an isolated inline completion status-handler failure. */
|
|
195
|
+
export interface StatusHandlerErrorContext {
|
|
196
|
+
handlerName: keyof AsyncHandlerConfig;
|
|
197
|
+
metadata: WebhookMetadata;
|
|
198
|
+
}
|
|
194
199
|
/**
|
|
195
200
|
* Configuration for SingleAgentClient (and multi-agent client)
|
|
196
201
|
*/
|
|
@@ -266,8 +271,21 @@ export interface SingleAgentClientConfig extends ConversationConfig {
|
|
|
266
271
|
* For at-least-once webhook delivery, set `handlers.webhookDedup` to
|
|
267
272
|
* drop duplicate retries by `idempotency_key`. See
|
|
268
273
|
* `docs/guides/PUSH-NOTIFICATION-CONFIG.md#deduplication`.
|
|
274
|
+
* For per-call skipping and inline error isolation, see
|
|
275
|
+
* `docs/guides/PUSH-NOTIFICATION-CONFIG.md#inline-completion-handlers`.
|
|
269
276
|
*/
|
|
270
277
|
handlers?: AsyncHandlerConfig;
|
|
278
|
+
/**
|
|
279
|
+
* Return successful completed results even if an inline status handler throws.
|
|
280
|
+
* Defaults to false, preserving handler rejection and durable finalization retry.
|
|
281
|
+
* Does not change webhook error handling or cancellation behavior.
|
|
282
|
+
*/
|
|
283
|
+
isolateStatusHandlerErrors?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Reports inline status-handler errors when isolateStatusHandlerErrors is true.
|
|
286
|
+
* Errors thrown by this observer are recorded as warnings and do not reject the task.
|
|
287
|
+
*/
|
|
288
|
+
onStatusHandlerError?: (error: unknown, context: StatusHandlerErrorContext) => void | Promise<void>;
|
|
271
289
|
/** Select legacy HMAC-SHA256 push verification. Omit to use RFC 9421. */
|
|
272
290
|
webhookSecret?: string;
|
|
273
291
|
/** Durable provenance for outbound push registrations. Defaults to process-local memory. */
|
|
@@ -240,7 +240,7 @@ const WEBHOOK_JWKS_RESOLVER_LIMIT = 1024;
|
|
|
240
240
|
function isDeferredClientFinalizationContext(value) {
|
|
241
241
|
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
242
242
|
const context = value;
|
|
243
|
-
return context.kind === "single-agent" && typeof context.taskType === "string" && typeof context.canonical === "boolean" && !!context.productPolicyRequest && typeof context.productPolicyRequest === "object" && !Array.isArray(context.productPolicyRequest) && (context.serverVersion === void 0 || context.serverVersion === "v2" || context.serverVersion === "v3") && (context.serverVersionSynthetic === void 0 || typeof context.serverVersionSynthetic === "boolean") && (context.projectionCatalogs === void 0 || Array.isArray(context.projectionCatalogs)) && (context.handlerName === void 0 || typeof context.handlerName === "string");
|
|
243
|
+
return context.kind === "single-agent" && typeof context.taskType === "string" && typeof context.canonical === "boolean" && !!context.productPolicyRequest && typeof context.productPolicyRequest === "object" && !Array.isArray(context.productPolicyRequest) && (context.serverVersion === void 0 || context.serverVersion === "v2" || context.serverVersion === "v3") && (context.serverVersionSynthetic === void 0 || typeof context.serverVersionSynthetic === "boolean") && (context.projectionCatalogs === void 0 || Array.isArray(context.projectionCatalogs)) && (context.handlerName === void 0 || typeof context.handlerName === "string") && (context.skipStatusHandlers === void 0 || typeof context.skipStatusHandlers === "boolean");
|
|
244
244
|
}
|
|
245
245
|
const CANONICAL_PACKAGE_ROUTE_TASKS = /* @__PURE__ */ new Set(["create_media_buy", "update_media_buy", "get_media_buys"]);
|
|
246
246
|
const canonicalCreativeRoutingSnapshots = /* @__PURE__ */ new WeakSet();
|
|
@@ -3189,7 +3189,10 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
3189
3189
|
...projectionCatalogs !== void 0 && { projectionCatalogs },
|
|
3190
3190
|
...routingSnapshot !== void 0 && { routingSnapshot },
|
|
3191
3191
|
...effectiveOptions?.taskId !== void 0 && { optionTaskId: effectiveOptions.taskId },
|
|
3192
|
-
...effectiveOptions?.contextId !== void 0 && { optionContextId: effectiveOptions.contextId }
|
|
3192
|
+
...effectiveOptions?.contextId !== void 0 && { optionContextId: effectiveOptions.contextId },
|
|
3193
|
+
...effectiveOptions?.skipStatusHandlers !== void 0 && {
|
|
3194
|
+
skipStatusHandlers: effectiveOptions.skipStatusHandlers
|
|
3195
|
+
}
|
|
3193
3196
|
};
|
|
3194
3197
|
let result = await canonicalCreativeExecutionStorage.run(
|
|
3195
3198
|
{
|
|
@@ -3300,7 +3303,8 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
3300
3303
|
const resumedOptions = {
|
|
3301
3304
|
...options ?? {},
|
|
3302
3305
|
...context.optionTaskId !== void 0 && { taskId: context.optionTaskId },
|
|
3303
|
-
...context.optionContextId !== void 0 && { contextId: context.optionContextId }
|
|
3306
|
+
...context.optionContextId !== void 0 && { contextId: context.optionContextId },
|
|
3307
|
+
...context.skipStatusHandlers !== void 0 && { skipStatusHandlers: context.skipStatusHandlers }
|
|
3304
3308
|
};
|
|
3305
3309
|
const rawDeferredResume = result.deferred?.resume;
|
|
3306
3310
|
const rawSubmittedWaitForCompletion = result.submitted?.waitForCompletion;
|
|
@@ -3390,11 +3394,12 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
3390
3394
|
return finalized;
|
|
3391
3395
|
}
|
|
3392
3396
|
async notifyCompletedStatusHandler(result, taskType, handlerName, options) {
|
|
3393
|
-
if (result.status !== "completed" || !result.success || !this.asyncHandler)
|
|
3397
|
+
if (options?.skipStatusHandlers === true || result.status !== "completed" || !result.success || !this.asyncHandler)
|
|
3398
|
+
return;
|
|
3394
3399
|
const handler = this.config.handlers?.[handlerName];
|
|
3395
3400
|
if (!handler) return;
|
|
3396
3401
|
(0, import_abort2.throwIfAborted)(options?.signal);
|
|
3397
|
-
|
|
3402
|
+
const metadata = {
|
|
3398
3403
|
operation_id: options?.contextId || "sync",
|
|
3399
3404
|
context_id: options?.contextId,
|
|
3400
3405
|
task_id: result.metadata.taskId,
|
|
@@ -3402,7 +3407,30 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
3402
3407
|
task_type: taskType,
|
|
3403
3408
|
status: result.status,
|
|
3404
3409
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
3405
|
-
}
|
|
3410
|
+
};
|
|
3411
|
+
try {
|
|
3412
|
+
await handler(result.data, metadata);
|
|
3413
|
+
} catch (error) {
|
|
3414
|
+
if (this.config.isolateStatusHandlerErrors !== true) throw error;
|
|
3415
|
+
(0, import_abort2.throwIfAborted)(options?.signal);
|
|
3416
|
+
result.debug_logs = [
|
|
3417
|
+
...result.debug_logs ?? [],
|
|
3418
|
+
{
|
|
3419
|
+
level: "warn",
|
|
3420
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3421
|
+
message: "Inline status handler failed. The seller operation completed; reconcile local post-processing."
|
|
3422
|
+
}
|
|
3423
|
+
];
|
|
3424
|
+
try {
|
|
3425
|
+
await this.config.onStatusHandlerError?.(error, { handlerName, metadata });
|
|
3426
|
+
} catch {
|
|
3427
|
+
result.debug_logs.push({
|
|
3428
|
+
level: "warn",
|
|
3429
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3430
|
+
message: "onStatusHandlerError observer failed. The seller operation completed."
|
|
3431
|
+
});
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3406
3434
|
(0, import_abort2.throwIfAborted)(options?.signal);
|
|
3407
3435
|
}
|
|
3408
3436
|
canonicalCreativeInputHandler(taskType, inputHandler, canonical = CANONICAL_CREATIVE_ACTIVITY_TASKS.has(taskType)) {
|
|
@@ -5678,7 +5706,10 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
5678
5706
|
productPolicyRequest: productPolicyRequestSnapshot(normalizedParams),
|
|
5679
5707
|
accountRegistry: this.accountRegistryContext(taskName, normalizedParams, effectiveOptions),
|
|
5680
5708
|
...effectiveOptions?.taskId !== void 0 && { optionTaskId: effectiveOptions.taskId },
|
|
5681
|
-
...effectiveOptions?.contextId !== void 0 && { optionContextId: effectiveOptions.contextId }
|
|
5709
|
+
...effectiveOptions?.contextId !== void 0 && { optionContextId: effectiveOptions.contextId },
|
|
5710
|
+
...effectiveOptions?.skipStatusHandlers !== void 0 && {
|
|
5711
|
+
skipStatusHandlers: effectiveOptions.skipStatusHandlers
|
|
5712
|
+
}
|
|
5682
5713
|
};
|
|
5683
5714
|
let result = await this.executor.executeTask(
|
|
5684
5715
|
agent,
|
|
@@ -310,7 +310,7 @@ const WEBHOOK_JWKS_RESOLVER_LIMIT = 1024;
|
|
|
310
310
|
function isDeferredClientFinalizationContext(value) {
|
|
311
311
|
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
312
312
|
const context = value;
|
|
313
|
-
return context.kind === "single-agent" && typeof context.taskType === "string" && typeof context.canonical === "boolean" && !!context.productPolicyRequest && typeof context.productPolicyRequest === "object" && !Array.isArray(context.productPolicyRequest) && (context.serverVersion === void 0 || context.serverVersion === "v2" || context.serverVersion === "v3") && (context.serverVersionSynthetic === void 0 || typeof context.serverVersionSynthetic === "boolean") && (context.projectionCatalogs === void 0 || Array.isArray(context.projectionCatalogs)) && (context.handlerName === void 0 || typeof context.handlerName === "string");
|
|
313
|
+
return context.kind === "single-agent" && typeof context.taskType === "string" && typeof context.canonical === "boolean" && !!context.productPolicyRequest && typeof context.productPolicyRequest === "object" && !Array.isArray(context.productPolicyRequest) && (context.serverVersion === void 0 || context.serverVersion === "v2" || context.serverVersion === "v3") && (context.serverVersionSynthetic === void 0 || typeof context.serverVersionSynthetic === "boolean") && (context.projectionCatalogs === void 0 || Array.isArray(context.projectionCatalogs)) && (context.handlerName === void 0 || typeof context.handlerName === "string") && (context.skipStatusHandlers === void 0 || typeof context.skipStatusHandlers === "boolean");
|
|
314
314
|
}
|
|
315
315
|
const CANONICAL_PACKAGE_ROUTE_TASKS = /* @__PURE__ */ new Set(["create_media_buy", "update_media_buy", "get_media_buys"]);
|
|
316
316
|
const canonicalCreativeRoutingSnapshots = /* @__PURE__ */ new WeakSet();
|
|
@@ -3259,7 +3259,10 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
3259
3259
|
...projectionCatalogs !== void 0 && { projectionCatalogs },
|
|
3260
3260
|
...routingSnapshot !== void 0 && { routingSnapshot },
|
|
3261
3261
|
...effectiveOptions?.taskId !== void 0 && { optionTaskId: effectiveOptions.taskId },
|
|
3262
|
-
...effectiveOptions?.contextId !== void 0 && { optionContextId: effectiveOptions.contextId }
|
|
3262
|
+
...effectiveOptions?.contextId !== void 0 && { optionContextId: effectiveOptions.contextId },
|
|
3263
|
+
...effectiveOptions?.skipStatusHandlers !== void 0 && {
|
|
3264
|
+
skipStatusHandlers: effectiveOptions.skipStatusHandlers
|
|
3265
|
+
}
|
|
3263
3266
|
};
|
|
3264
3267
|
let result = await canonicalCreativeExecutionStorage.run(
|
|
3265
3268
|
{
|
|
@@ -3370,7 +3373,8 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
3370
3373
|
const resumedOptions = {
|
|
3371
3374
|
...options ?? {},
|
|
3372
3375
|
...context.optionTaskId !== void 0 && { taskId: context.optionTaskId },
|
|
3373
|
-
...context.optionContextId !== void 0 && { contextId: context.optionContextId }
|
|
3376
|
+
...context.optionContextId !== void 0 && { contextId: context.optionContextId },
|
|
3377
|
+
...context.skipStatusHandlers !== void 0 && { skipStatusHandlers: context.skipStatusHandlers }
|
|
3374
3378
|
};
|
|
3375
3379
|
const rawDeferredResume = result.deferred?.resume;
|
|
3376
3380
|
const rawSubmittedWaitForCompletion = result.submitted?.waitForCompletion;
|
|
@@ -3460,11 +3464,12 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
3460
3464
|
return finalized;
|
|
3461
3465
|
}
|
|
3462
3466
|
async notifyCompletedStatusHandler(result, taskType, handlerName, options) {
|
|
3463
|
-
if (result.status !== "completed" || !result.success || !this.asyncHandler)
|
|
3467
|
+
if (options?.skipStatusHandlers === true || result.status !== "completed" || !result.success || !this.asyncHandler)
|
|
3468
|
+
return;
|
|
3464
3469
|
const handler = this.config.handlers?.[handlerName];
|
|
3465
3470
|
if (!handler) return;
|
|
3466
3471
|
throwIfAborted(options?.signal);
|
|
3467
|
-
|
|
3472
|
+
const metadata = {
|
|
3468
3473
|
operation_id: options?.contextId || "sync",
|
|
3469
3474
|
context_id: options?.contextId,
|
|
3470
3475
|
task_id: result.metadata.taskId,
|
|
@@ -3472,7 +3477,30 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
3472
3477
|
task_type: taskType,
|
|
3473
3478
|
status: result.status,
|
|
3474
3479
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
3475
|
-
}
|
|
3480
|
+
};
|
|
3481
|
+
try {
|
|
3482
|
+
await handler(result.data, metadata);
|
|
3483
|
+
} catch (error) {
|
|
3484
|
+
if (this.config.isolateStatusHandlerErrors !== true) throw error;
|
|
3485
|
+
throwIfAborted(options?.signal);
|
|
3486
|
+
result.debug_logs = [
|
|
3487
|
+
...result.debug_logs ?? [],
|
|
3488
|
+
{
|
|
3489
|
+
level: "warn",
|
|
3490
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3491
|
+
message: "Inline status handler failed. The seller operation completed; reconcile local post-processing."
|
|
3492
|
+
}
|
|
3493
|
+
];
|
|
3494
|
+
try {
|
|
3495
|
+
await this.config.onStatusHandlerError?.(error, { handlerName, metadata });
|
|
3496
|
+
} catch {
|
|
3497
|
+
result.debug_logs.push({
|
|
3498
|
+
level: "warn",
|
|
3499
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3500
|
+
message: "onStatusHandlerError observer failed. The seller operation completed."
|
|
3501
|
+
});
|
|
3502
|
+
}
|
|
3503
|
+
}
|
|
3476
3504
|
throwIfAborted(options?.signal);
|
|
3477
3505
|
}
|
|
3478
3506
|
canonicalCreativeInputHandler(taskType, inputHandler, canonical = CANONICAL_CREATIVE_ACTIVITY_TASKS.has(taskType)) {
|
|
@@ -5748,7 +5776,10 @@ Hint: this usually means agent_uri does not include the MCP endpoint path. The S
|
|
|
5748
5776
|
productPolicyRequest: productPolicyRequestSnapshot(normalizedParams),
|
|
5749
5777
|
accountRegistry: this.accountRegistryContext(taskName, normalizedParams, effectiveOptions),
|
|
5750
5778
|
...effectiveOptions?.taskId !== void 0 && { optionTaskId: effectiveOptions.taskId },
|
|
5751
|
-
...effectiveOptions?.contextId !== void 0 && { optionContextId: effectiveOptions.contextId }
|
|
5779
|
+
...effectiveOptions?.contextId !== void 0 && { optionContextId: effectiveOptions.contextId },
|
|
5780
|
+
...effectiveOptions?.skipStatusHandlers !== void 0 && {
|
|
5781
|
+
skipStatusHandlers: effectiveOptions.skipStatusHandlers
|
|
5782
|
+
}
|
|
5752
5783
|
};
|
|
5753
5784
|
let result = await this.executor.executeTask(
|
|
5754
5785
|
agent,
|
package/dist/lib/index.d.mts
CHANGED
|
@@ -14,7 +14,7 @@ export { resolveInlinePublisherProperties, resolveSingularInline, detectInlineFe
|
|
|
14
14
|
export { fetchAgentAuthorizationsFromDirectory, type AgentAuthorizationsIterator, type FetchAgentAuthorizationsOptions, type DirectoryLookupPage, type DirectoryPublisherEntry, type DirectoryDiscoveryMethod, type DirectoryPublisherStatus, } from './discovery/agent-directory.mjs';
|
|
15
15
|
export { validateAdAgents, parseManagerDomain, type DiscoveryMethod, type AdAgentsValidationResult, type ValidateAdAgentsOptions, } from './discovery/validate-adagents.mjs';
|
|
16
16
|
export { SingleAgentClient, WebhookDispatchError, createSingleAgentClient, UnsupportedFeatureError, } from './core/SingleAgentClient.mjs';
|
|
17
|
-
export type { CapabilityEvidenceScope, CapabilityEvidenceSnapshot, ClientProductPropertyPolicy, CreativeDeliveryTaskOptions, SingleAgentClientConfig, SyncCreativesTaskOptions, VerifyAndParseWebhookOptions, WebhookHandlerAdapter, WebhookHandlerRequest, WebhookRequestContext, WebhookParseErrorCode, WebhookParseFailure, WebhookParseResult, WebhookParseSuccess, WebhookVerificationConfig, } from './core/SingleAgentClient.mjs';
|
|
17
|
+
export type { CapabilityEvidenceScope, CapabilityEvidenceSnapshot, ClientProductPropertyPolicy, CreativeDeliveryTaskOptions, SingleAgentClientConfig, StatusHandlerErrorContext, SyncCreativesTaskOptions, VerifyAndParseWebhookOptions, WebhookHandlerAdapter, WebhookHandlerRequest, WebhookRequestContext, WebhookParseErrorCode, WebhookParseFailure, WebhookParseResult, WebhookParseSuccess, WebhookVerificationConfig, } from './core/SingleAgentClient.mjs';
|
|
18
18
|
export { InMemoryWebhookRegistrationStore, type InMemoryWebhookRegistrationStoreOptions, type WebhookAuthenticationMode, type WebhookRegistration, type WebhookRegistrationStore, } from './core/webhook-registration.mjs';
|
|
19
19
|
export { pgWebhookRegistrationStore, getWebhookRegistrationMigration, WEBHOOK_REGISTRATION_MIGRATION, cleanupExpiredWebhookRegistrations, type PgWebhookRegistrationStoreOptions, type CleanupExpiredWebhookRegistrationsOptions, } from './core/postgres-webhook-registration-store.mjs';
|
|
20
20
|
export { redisWebhookRegistrationStore, type RedisWebhookRegistrationStoreOptions, } from './core/redis-webhook-registration-store.mjs';
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { resolveInlinePublisherProperties, resolveSingularInline, detectInlineFe
|
|
|
14
14
|
export { fetchAgentAuthorizationsFromDirectory, type AgentAuthorizationsIterator, type FetchAgentAuthorizationsOptions, type DirectoryLookupPage, type DirectoryPublisherEntry, type DirectoryDiscoveryMethod, type DirectoryPublisherStatus, } from './discovery/agent-directory';
|
|
15
15
|
export { validateAdAgents, parseManagerDomain, type DiscoveryMethod, type AdAgentsValidationResult, type ValidateAdAgentsOptions, } from './discovery/validate-adagents';
|
|
16
16
|
export { SingleAgentClient, WebhookDispatchError, createSingleAgentClient, UnsupportedFeatureError, } from './core/SingleAgentClient';
|
|
17
|
-
export type { CapabilityEvidenceScope, CapabilityEvidenceSnapshot, ClientProductPropertyPolicy, CreativeDeliveryTaskOptions, SingleAgentClientConfig, SyncCreativesTaskOptions, VerifyAndParseWebhookOptions, WebhookHandlerAdapter, WebhookHandlerRequest, WebhookRequestContext, WebhookParseErrorCode, WebhookParseFailure, WebhookParseResult, WebhookParseSuccess, WebhookVerificationConfig, } from './core/SingleAgentClient';
|
|
17
|
+
export type { CapabilityEvidenceScope, CapabilityEvidenceSnapshot, ClientProductPropertyPolicy, CreativeDeliveryTaskOptions, SingleAgentClientConfig, StatusHandlerErrorContext, SyncCreativesTaskOptions, VerifyAndParseWebhookOptions, WebhookHandlerAdapter, WebhookHandlerRequest, WebhookRequestContext, WebhookParseErrorCode, WebhookParseFailure, WebhookParseResult, WebhookParseSuccess, WebhookVerificationConfig, } from './core/SingleAgentClient';
|
|
18
18
|
export { InMemoryWebhookRegistrationStore, type InMemoryWebhookRegistrationStoreOptions, type WebhookAuthenticationMode, type WebhookRegistration, type WebhookRegistrationStore, } from './core/webhook-registration';
|
|
19
19
|
export { pgWebhookRegistrationStore, getWebhookRegistrationMigration, WEBHOOK_REGISTRATION_MIGRATION, cleanupExpiredWebhookRegistrations, type PgWebhookRegistrationStoreOptions, type CleanupExpiredWebhookRegistrationsOptions, } from './core/postgres-webhook-registration-store';
|
|
20
20
|
export { redisWebhookRegistrationStore, type RedisWebhookRegistrationStoreOptions, } from './core/redis-webhook-registration-store';
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
"source_sha": "4e553ad955f83b49c7d221ab5c3ff78237ad02e3",
|
|
5
5
|
"source_tarball_sha256": "580656d6466ef9f0d1119985e6726c2efea718dc671e2ad30957fcb2fd54af0f",
|
|
6
6
|
"upstream_adcp_version": "2.5.3",
|
|
7
|
-
"synced_at": "2026-10-
|
|
7
|
+
"synced_at": "2026-10-08T14:21:02.333Z"
|
|
8
8
|
}
|
|
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
|
|
|
197
197
|
*/
|
|
198
198
|
export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
|
|
199
199
|
/** Capability semver emitted in run summaries and used for advisory expiry. */
|
|
200
|
-
export declare const RUNNER_CAPABILITY_VERSION = "15.
|
|
200
|
+
export declare const RUNNER_CAPABILITY_VERSION = "15.3.0";
|
|
201
201
|
/** True when a failed validation contributes to the owning step's grade. */
|
|
202
202
|
export declare function validationFailsStep(result: ValidationResult): boolean;
|
|
203
203
|
/**
|
|
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
|
|
|
197
197
|
*/
|
|
198
198
|
export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
|
|
199
199
|
/** Capability semver emitted in run summaries and used for advisory expiry. */
|
|
200
|
-
export declare const RUNNER_CAPABILITY_VERSION = "15.
|
|
200
|
+
export declare const RUNNER_CAPABILITY_VERSION = "15.3.0";
|
|
201
201
|
/** True when a failed validation contributes to the owning step's grade. */
|
|
202
202
|
export declare function validationFailsStep(result: ValidationResult): boolean;
|
|
203
203
|
/**
|
package/dist/lib/version.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "15.
|
|
4
|
+
export declare const LIBRARY_VERSION = "15.3.0";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "15.
|
|
36
|
+
readonly library: "15.3.0";
|
|
37
37
|
readonly adcp: "3.2.3";
|
|
38
38
|
readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2", "3.2.2", "3.2.3"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-08T13:30:50.878Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "15.
|
|
4
|
+
export declare const LIBRARY_VERSION = "15.3.0";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "15.
|
|
36
|
+
readonly library: "15.3.0";
|
|
37
37
|
readonly adcp: "3.2.3";
|
|
38
38
|
readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2", "3.2.2", "3.2.3"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-08T13:30:50.878Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.js
CHANGED
|
@@ -31,7 +31,7 @@ __export(version_exports, {
|
|
|
31
31
|
toReleasePrecisionVersion: () => toReleasePrecisionVersion
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(version_exports);
|
|
34
|
-
const LIBRARY_VERSION = "15.
|
|
34
|
+
const LIBRARY_VERSION = "15.3.0";
|
|
35
35
|
const ADCP_VERSION = "3.2.3";
|
|
36
36
|
const ADCP_MAJOR_VERSION = 3;
|
|
37
37
|
const COMPATIBLE_ADCP_VERSIONS = [
|
|
@@ -97,10 +97,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
|
|
|
97
97
|
"3.2.3"
|
|
98
98
|
];
|
|
99
99
|
const VERSION_INFO = {
|
|
100
|
-
library: "15.
|
|
100
|
+
library: "15.3.0",
|
|
101
101
|
adcp: "3.2.3",
|
|
102
102
|
compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
|
|
103
|
-
generatedAt: "2026-10-
|
|
103
|
+
generatedAt: "2026-10-08T13:30:50.878Z"
|
|
104
104
|
};
|
|
105
105
|
function getAdcpVersion() {
|
|
106
106
|
return ADCP_VERSION;
|
package/dist/lib/version.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const LIBRARY_VERSION = "15.
|
|
1
|
+
const LIBRARY_VERSION = "15.3.0";
|
|
2
2
|
const ADCP_VERSION = "3.2.3";
|
|
3
3
|
const ADCP_MAJOR_VERSION = 3;
|
|
4
4
|
const COMPATIBLE_ADCP_VERSIONS = [
|
|
@@ -64,10 +64,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
|
|
|
64
64
|
"3.2.3"
|
|
65
65
|
];
|
|
66
66
|
const VERSION_INFO = {
|
|
67
|
-
library: "15.
|
|
67
|
+
library: "15.3.0",
|
|
68
68
|
adcp: "3.2.3",
|
|
69
69
|
compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
|
|
70
|
-
generatedAt: "2026-10-
|
|
70
|
+
generatedAt: "2026-10-08T13:30:50.878Z"
|
|
71
71
|
};
|
|
72
72
|
function getAdcpVersion() {
|
|
73
73
|
return ADCP_VERSION;
|
package/docs/TYPE-SUMMARY.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AdCP Type Summary
|
|
2
2
|
|
|
3
3
|
> Generated at: 2026-10-08
|
|
4
|
-
> @adcp/sdk v15.
|
|
4
|
+
> @adcp/sdk v15.3.0
|
|
5
5
|
|
|
6
6
|
Curated reference of the types that matter for using the AdCP client. For full generated types see `src/lib/types/tools.generated.ts` and `src/lib/types/core.generated.ts`.
|
|
7
7
|
|
|
@@ -57,6 +57,7 @@ interface TransportOptions {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
interface TaskOptions {
|
|
60
|
+
skipStatusHandlers?: boolean; // Skip inline completion handlers, including continuations
|
|
60
61
|
timeout?: number; // Absolute whole-task deadline
|
|
61
62
|
signal?: AbortSignal; // Caller cancellation
|
|
62
63
|
// Direct A2A mutation route, bound to authenticated principal + account scope.
|
|
@@ -39,6 +39,45 @@ the reporting webhook schema. A caller-provided reporting URL must always bring
|
|
|
39
39
|
its own complete authentication block; the client never pairs `webhookSecret`
|
|
40
40
|
with a caller-controlled endpoint.
|
|
41
41
|
|
|
42
|
+
## Inline completion handlers
|
|
43
|
+
|
|
44
|
+
Configured status handlers also run inline when a task call returns a successful
|
|
45
|
+
completed result. By default, an inline handler error rejects that call. For a
|
|
46
|
+
forwarding call whose caller will process the returned result, skip the inline
|
|
47
|
+
handler for that call:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
const result = await agent.syncCreatives(params, undefined, { skipStatusHandlers: true });
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The option follows submitted waits and deferred resumes, including stored
|
|
54
|
+
continuations resumed after restart. Independently delivered webhook handlers
|
|
55
|
+
still run; `skipStatusHandlers` does not disable webhook registration or delivery.
|
|
56
|
+
|
|
57
|
+
To keep successful results when inline post-processing fails, opt in at client
|
|
58
|
+
construction:
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
const agent = new SingleAgentClient(sellerConfig, {
|
|
62
|
+
handlers: {
|
|
63
|
+
onSyncCreativesStatusChange: recordCreativeResults,
|
|
64
|
+
},
|
|
65
|
+
isolateStatusHandlerErrors: true,
|
|
66
|
+
onStatusHandlerError: async (error, { handlerName, metadata }) => {
|
|
67
|
+
await recordLocalFailure(error, handlerName, metadata.task_id);
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Isolation returns the completed `TaskResult` and allows settlement acknowledgement.
|
|
73
|
+
The SDK adds a warning to `debug_logs` without including the handler's error text.
|
|
74
|
+
The observer receives the original error and completion metadata, so keep secrets
|
|
75
|
+
out of application logs. Observer errors add a warning and do not reject the task.
|
|
76
|
+
The observer is awaited; keep its work bounded so it cannot stall local completion.
|
|
77
|
+
Cancellation, response validation, settlement acknowledgement errors, and webhook
|
|
78
|
+
error handling retain their existing behavior. With isolation disabled, durable
|
|
79
|
+
handler failures remain retryable without redispatching the seller operation.
|
|
80
|
+
|
|
42
81
|
## Wire Payload
|
|
43
82
|
|
|
44
83
|
The default RFC 9421 registration has no `authentication` block:
|
package/docs/llms.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Ad Context Protocol (AdCP)
|
|
2
2
|
|
|
3
3
|
> Generated at: 2026-10-08
|
|
4
|
-
> Library: @adcp/sdk v15.
|
|
4
|
+
> Library: @adcp/sdk v15.3.0
|
|
5
5
|
> AdCP major version: 3
|
|
6
6
|
> Canonical URL: https://adcontextprotocol.github.io/adcp-client/llms.txt
|
|
7
7
|
> Note: the `Library` stamp reflects the package.json version at doc-generation time. The narrative below describes the surface that lands on the next-published minor — including any 6.7 helpers documented here ahead of the release tag.
|
|
@@ -11,8 +11,8 @@ below as the publication/deployment gate.
|
|
|
11
11
|
|
|
12
12
|
| Fact | Value |
|
|
13
13
|
| --- | --- |
|
|
14
|
-
| Exact npm package | `@adcp/sdk@15.
|
|
15
|
-
| npm integrity | registry-derived after publication; run `npm view @adcp/sdk@15.
|
|
14
|
+
| Exact npm package | `@adcp/sdk@15.3.0` |
|
|
15
|
+
| npm integrity | registry-derived after publication; run `npm view @adcp/sdk@15.3.0 dist.integrity` |
|
|
16
16
|
| Node.js runtime | `^20.19.0 || >=22.12.0` |
|
|
17
17
|
| Default AdCP wire release | `3.2.3` |
|
|
18
18
|
| Maintained wire releases | `v2.5`, `v2.6`, `v3`, `3.0.0`, `3.0`, `3.0.1`, `3.0.2`, `3.0.3`, `3.0.4`, `3.0.5`, `3.0.6`, `3.0.7`, `3.0.8`, `3.0.9`, `3.0.10`, `3.0.11`, `3.0.12`, `3.0.13`, `3.0.14`, `3.0.15`, `3.0.16`, `3.0.17`, `3.0.18`, `3.0.19`, `3.0.20`, `3.0.21`, `3.0.22`, `3.0.23`, `3.0.24`, `3.0.25`, `3.1.0`, `3.1`, `3.1.1`, `3.1.2`, `3.1.3`, `3.1.4`, `3.1.5`, `3.1.6`, `3.1.7`, `3.1.8`, `3.1.9`, `3.1.10`, `3.1.11`, `3.1.12`, `3.1.13`, `3.1.14`, `3.1.15`, `3.1.16`, `3.1.17`, `3.1.18`, `3.1.19`, `3.1.20`, `3.1.21`, `3.1.22`, `3.1.23`, `3.1.24`, `3.2.1`, `3.2`, `3.2.2`, `3.2.3` |
|
|
@@ -21,8 +21,8 @@ below as the publication/deployment gate.
|
|
|
21
21
|
Install exact production inputs rather than a moving range or dist-tag:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm install --save-exact '@adcp/sdk@15.
|
|
25
|
-
npm view '@adcp/sdk@15.
|
|
24
|
+
npm install --save-exact '@adcp/sdk@15.3.0'
|
|
25
|
+
npm view '@adcp/sdk@15.3.0' dist.integrity
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
### Required and optional peers
|