@adcp/sdk 8.1.0-beta.6 → 8.1.0-beta.8

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.
Files changed (122) hide show
  1. package/README.md +12 -0
  2. package/dist/lib/conformance/oracle.d.ts.map +1 -1
  3. package/dist/lib/conformance/oracle.js +8 -1
  4. package/dist/lib/conformance/oracle.js.map +1 -1
  5. package/dist/lib/conformance/schemaArbitrary.js +135 -9
  6. package/dist/lib/conformance/schemaArbitrary.js.map +1 -1
  7. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  8. package/dist/lib/server/create-adcp-server.d.ts +5 -0
  9. package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
  10. package/dist/lib/server/create-adcp-server.js +41 -3
  11. package/dist/lib/server/create-adcp-server.js.map +1 -1
  12. package/dist/lib/server/decisioning/capabilities.d.ts +8 -0
  13. package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -1
  14. package/dist/lib/server/decisioning/proposal/dispatch.d.ts.map +1 -1
  15. package/dist/lib/server/decisioning/proposal/dispatch.js +2 -0
  16. package/dist/lib/server/decisioning/proposal/dispatch.js.map +1 -1
  17. package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
  18. package/dist/lib/server/decisioning/runtime/from-platform.js +14 -1
  19. package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
  20. package/dist/lib/server/responses.d.ts +1 -1
  21. package/dist/lib/server/responses.d.ts.map +1 -1
  22. package/dist/lib/server/responses.js +5 -2
  23. package/dist/lib/server/responses.js.map +1 -1
  24. package/dist/lib/signing/types.d.ts +6 -0
  25. package/dist/lib/signing/types.d.ts.map +1 -1
  26. package/dist/lib/signing/types.js.map +1 -1
  27. package/dist/lib/signing/verifier.d.ts.map +1 -1
  28. package/dist/lib/signing/verifier.js +33 -4
  29. package/dist/lib/signing/verifier.js.map +1 -1
  30. package/dist/lib/testing/storyboard/compliance.d.ts +1 -0
  31. package/dist/lib/testing/storyboard/compliance.d.ts.map +1 -1
  32. package/dist/lib/testing/storyboard/compliance.js +8 -2
  33. package/dist/lib/testing/storyboard/compliance.js.map +1 -1
  34. package/dist/lib/testing/storyboard/index.d.ts +1 -1
  35. package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
  36. package/dist/lib/testing/storyboard/index.js +3 -2
  37. package/dist/lib/testing/storyboard/index.js.map +1 -1
  38. package/dist/lib/testing/storyboard/probes.d.ts.map +1 -1
  39. package/dist/lib/testing/storyboard/probes.js +3 -0
  40. package/dist/lib/testing/storyboard/probes.js.map +1 -1
  41. package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
  42. package/dist/lib/testing/storyboard/runner.js +294 -29
  43. package/dist/lib/testing/storyboard/runner.js.map +1 -1
  44. package/dist/lib/testing/storyboard/types.d.ts +59 -0
  45. package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
  46. package/dist/lib/testing/storyboard/types.js.map +1 -1
  47. package/dist/lib/testing/storyboard/validations.d.ts +4 -3
  48. package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
  49. package/dist/lib/testing/storyboard/validations.js +26 -2
  50. package/dist/lib/testing/storyboard/validations.js.map +1 -1
  51. package/dist/lib/types/activate-signal.d.ts +647 -0
  52. package/dist/lib/types/build-creative.d.ts +2105 -0
  53. package/dist/lib/types/calibrate-content.d.ts +675 -0
  54. package/dist/lib/types/check-governance.d.ts +619 -0
  55. package/dist/lib/types/comply-test-controller.d.ts +8428 -0
  56. package/dist/lib/types/core.generated.d.ts +180 -252
  57. package/dist/lib/types/core.generated.d.ts.map +1 -1
  58. package/dist/lib/types/core.generated.js +1 -1
  59. package/dist/lib/types/create-collection-list.d.ts +693 -0
  60. package/dist/lib/types/create-content-standards.d.ts +830 -0
  61. package/dist/lib/types/create-media-buy.d.ts +3374 -0
  62. package/dist/lib/types/create-property-list.d.ts +836 -0
  63. package/dist/lib/types/delete-collection-list.d.ts +497 -0
  64. package/dist/lib/types/delete-property-list.d.ts +497 -0
  65. package/dist/lib/types/get-account-financials.d.ts +624 -0
  66. package/dist/lib/types/get-adcp-capabilities.d.ts +2863 -0
  67. package/dist/lib/types/get-collection-list.d.ts +763 -0
  68. package/dist/lib/types/get-content-standards.d.ts +919 -0
  69. package/dist/lib/types/get-creative-delivery.d.ts +2219 -0
  70. package/dist/lib/types/get-creative-features.d.ts +1736 -0
  71. package/dist/lib/types/get-media-buy-artifacts.d.ts +864 -0
  72. package/dist/lib/types/get-media-buys.d.ts +1670 -0
  73. package/dist/lib/types/get-plan-audit-logs.d.ts +455 -0
  74. package/dist/lib/types/get-products.d.ts +4935 -0
  75. package/dist/lib/types/get-property-list.d.ts +874 -0
  76. package/dist/lib/types/get-signals.d.ts +986 -0
  77. package/dist/lib/types/list-accounts.d.ts +851 -0
  78. package/dist/lib/types/list-content-standards.d.ts +975 -0
  79. package/dist/lib/types/list-creative-formats.d.ts +3132 -0
  80. package/dist/lib/types/list-creatives.d.ts +2390 -0
  81. package/dist/lib/types/list-property-lists.d.ts +855 -0
  82. package/dist/lib/types/log-event.d.ts +373 -0
  83. package/dist/lib/types/per-tool-index.json +391 -0
  84. package/dist/lib/types/preview-creative.d.ts +1981 -0
  85. package/dist/lib/types/provide-performance-feedback.d.ts +218 -0
  86. package/dist/lib/types/report-plan-outcome.d.ts +433 -0
  87. package/dist/lib/types/report-usage.d.ts +579 -0
  88. package/dist/lib/types/schemas.generated.d.ts +127279 -125067
  89. package/dist/lib/types/schemas.generated.d.ts.map +1 -1
  90. package/dist/lib/types/schemas.generated.js +221 -293
  91. package/dist/lib/types/schemas.generated.js.map +1 -1
  92. package/dist/lib/types/si-get-offering.d.ts +259 -0
  93. package/dist/lib/types/si-initiate-session.d.ts +372 -0
  94. package/dist/lib/types/si-send-message.d.ts +300 -0
  95. package/dist/lib/types/si-terminate-session.d.ts +213 -0
  96. package/dist/lib/types/sync-accounts.d.ts +856 -0
  97. package/dist/lib/types/sync-audiences.d.ts +707 -0
  98. package/dist/lib/types/sync-catalogs.d.ts +766 -0
  99. package/dist/lib/types/sync-creatives.d.ts +2134 -0
  100. package/dist/lib/types/sync-event-sources.d.ts +665 -0
  101. package/dist/lib/types/sync-governance.d.ts +558 -0
  102. package/dist/lib/types/sync-plans.d.ts +979 -0
  103. package/dist/lib/types/update-collection-list.d.ts +697 -0
  104. package/dist/lib/types/update-content-standards.d.ts +847 -0
  105. package/dist/lib/types/update-media-buy.d.ts +3047 -0
  106. package/dist/lib/types/update-property-list.d.ts +840 -0
  107. package/dist/lib/types/validate-content-delivery.d.ts +722 -0
  108. package/dist/lib/types/validate-input.d.ts +1683 -0
  109. package/dist/lib/utils/response-schemas.js +1 -1
  110. package/dist/lib/utils/response-schemas.js.map +1 -1
  111. package/dist/lib/utils/response-unwrapper.d.ts.map +1 -1
  112. package/dist/lib/utils/response-unwrapper.js +18 -3
  113. package/dist/lib/utils/response-unwrapper.js.map +1 -1
  114. package/dist/lib/version.d.ts +3 -3
  115. package/dist/lib/version.js +3 -3
  116. package/examples/error-compliant-server.ts +1 -1
  117. package/examples/hello_seller_adapter_guaranteed.ts +8 -3
  118. package/examples/hello_seller_adapter_multi_tenant.ts +27 -23
  119. package/examples/hello_seller_adapter_non_guaranteed.ts +7 -3
  120. package/examples/hello_seller_adapter_proposal_mode.ts +22 -6
  121. package/examples/hello_signals_adapter_marketplace.ts +34 -3
  122. package/package.json +9 -2
@@ -0,0 +1,455 @@
1
+ // AUTO-GENERATED — DO NOT EDIT.
2
+ // Per-tool .d.ts slice for `get_plan_audit_logs`. Built from the published
3
+ // `tools.generated.d.ts` + `core.generated.d.ts` + `enums.generated.d.ts`
4
+ // by `scripts/generate-per-tool-types.ts`.
5
+ //
6
+ // Self-contained: imports nothing from the broader SDK. Adopters who
7
+ // import only this slice pay a fraction of the tsc cost of pulling in
8
+ // `@adcp/sdk` root — useful when strict + skipLibCheck:false adopters
9
+ // hit memory pressure on the full surface.
10
+
11
+ /**
12
+ * Retrieve governance state and audit trail for one or more plans.
13
+ */
14
+ export type GetPlanAuditLogsRequest = {
15
+ [k: string]: unknown | undefined;
16
+ } & {
17
+ /**
18
+ * Release-precision AdCP version (VERSION.RELEASE, e.g. "3.0", "3.1", "3.1-beta"). On a request: the buyer's release pin — the seller validates against its supported_versions and returns VERSION_UNSUPPORTED on cross-major mismatch, or downshifts to the highest supported release within the same major. On a response: the release the seller actually served — clients SHOULD validate the response against that release's schema, not against their pin. Patches are not negotiated; surface them as build_version on capabilities for operational visibility. When omitted, falls back to adcp_major_version (deprecated) or server default. Buyers SHOULD emit both adcp_version and adcp_major_version through 3.x to remain compatible with sellers that only read the legacy field. NORMALIZATION: SDKs that read full-semver values from bundle metadata (e.g. ComplianceIndex.published_version = "3.1.0-beta.1") MUST normalize to release-precision ("3.1-beta.1") before emitting on the wire — meta-field values are NOT valid wire values.
19
+ */
20
+ adcp_version?: string;
21
+ /**
22
+ * DEPRECATED in favor of adcp_version (release-precision string). Servers MUST continue to honor this field through 3.x. Removed in 4.0. Original semantics: the AdCP major version the buyer's payloads conform to. Sellers validate against their supported major_versions and return VERSION_UNSUPPORTED if unsupported. When omitted, the seller assumes its highest supported version.
23
+ */
24
+ adcp_major_version?: number;
25
+ /**
26
+ * Plan IDs to retrieve. For a single plan, pass a one-element array. Plans uniquely scope account and operator; do not include a separate `account` field — the governance agent resolves account from each plan. Including `account` is rejected by `additionalProperties: false`.
27
+ */
28
+ plan_ids?: string[];
29
+ /**
30
+ * Portfolio plan IDs. The governance agent expands each to its member_plan_ids and returns combined audit data.
31
+ */
32
+ portfolio_plan_ids?: string[];
33
+ /**
34
+ * Filter audit entries by governance context. Returns only checks and outcomes that share these governance contexts, enabling lifecycle tracing across purchase types.
35
+ */
36
+ governance_contexts?: string[];
37
+ /**
38
+ * Filter audit entries by purchase type. Returns only checks and outcomes matching these purchase types (e.g., ['rights_license'] to see all rights activity).
39
+ */
40
+ purchase_types?: PurchaseType[];
41
+ /**
42
+ * Include the full audit trail. Default: false.
43
+ */
44
+ include_entries?: boolean;
45
+ context?: ContextObject;
46
+ ext?: ExtensionObject;
47
+ };
48
+
49
+ /**
50
+ * Governance state and audit trail for one or more plans.
51
+ */
52
+ export interface GetPlanAuditLogsResponse {
53
+ /**
54
+ * Session/conversation identifier for tracking related operations across multiple task invocations. Managed by the protocol layer to maintain conversational context. Distinct from `context` (per-request opaque echo, see below).
55
+ */
56
+ context_id?: string;
57
+ context?: ContextObject;
58
+ /**
59
+ * Unique identifier for tracking asynchronous operations. Present when a task requires extended processing time. Used to query task status and retrieve results when complete.
60
+ */
61
+ task_id?: string;
62
+ status: TaskStatus;
63
+ /**
64
+ * Human-readable summary of the task result. Provides natural language explanation of what happened, suitable for display to end users or for AI agent comprehension. Generated by the protocol layer based on the task response.
65
+ */
66
+ message?: string;
67
+ /**
68
+ * ISO 8601 timestamp when the response was generated. Useful for debugging, logging, cache validation, and tracking async operation progress.
69
+ */
70
+ timestamp?: string;
71
+ /**
72
+ * Set to true when this response was returned from the idempotency cache rather than from a fresh execution. Set to false (or omitted) when the request was executed fresh. Buyers use this to distinguish cached replays from new executions — matters for billing reconciliation, audit logs, state-machine routing (cached state-tracking fields are historical snapshots, not current state — re-read via the resource's read endpoint), and any downstream system that assumes exactly-once event semantics. From 3.1 onward, `replayed` MAY appear on responses to any request that resolved via the idempotency cache, including read tools — universal `idempotency_key` (see security.mdx §Idempotency) means the cache holds read responses too.
73
+ */
74
+ replayed?: boolean;
75
+ adcp_error?: Error;
76
+ push_notification_config?: PushNotificationConfig;
77
+ /**
78
+ * Governance context token issued by the account's governance agent during check_governance. Buyers attach it to governed purchase requests (media buys, rights acquisitions, signal activations, creative services); sellers persist it and include it on all subsequent governance calls for that action's lifecycle. An account binds to one governance agent (see sync_governance); governance is phased across `purchase` / `modification` / `delivery`, not partitioned across specialist agents, so the envelope carries a single token for the full lifecycle.
79
+ *
80
+ * Value format: governance agents MUST emit a compact JWS per the AdCP JWS profile (see Security — Signed Governance Context). Sellers MAY verify; sellers that do not verify MUST persist and forward the token unchanged. In 3.1 all sellers MUST verify. Non-JWS values from pre-3.0 governance agents are deprecated.
81
+ *
82
+ * This is the primary correlation key for audit and reporting across the governance lifecycle.
83
+ */
84
+ governance_context?: string;
85
+ /**
86
+ * Conceptual grouping for the task-specific response data defined by individual task response schemas (e.g., get-products-response.json, create-media-buy-response.json). `payload` is a documentary construct — it is NOT a required wire field, and its on-the-wire shape depends on transport (see Transport serialization below). Task response schemas declare body fields without wrapping them in a `payload` object; the wire representation places those body fields per transport convention. On MCP the body fields appear as siblings of envelope fields at the root of the tool response; on A2A they appear inside `task.artifacts[0].parts[].DataPart`; on REST they appear at the root of the JSON body.
87
+ */
88
+ payload?: {};
89
+ /**
90
+ * Release-precision AdCP version (VERSION.RELEASE, e.g. "3.0", "3.1", "3.1-beta"). On a request: the buyer's release pin — the seller validates against its supported_versions and returns VERSION_UNSUPPORTED on cross-major mismatch, or downshifts to the highest supported release within the same major. On a response: the release the seller actually served — clients SHOULD validate the response against that release's schema, not against their pin. Patches are not negotiated; surface them as build_version on capabilities for operational visibility. When omitted, falls back to adcp_major_version (deprecated) or server default. Buyers SHOULD emit both adcp_version and adcp_major_version through 3.x to remain compatible with sellers that only read the legacy field. NORMALIZATION: SDKs that read full-semver values from bundle metadata (e.g. ComplianceIndex.published_version = "3.1.0-beta.1") MUST normalize to release-precision ("3.1-beta.1") before emitting on the wire — meta-field values are NOT valid wire values.
91
+ */
92
+ adcp_version?: string;
93
+ /**
94
+ * DEPRECATED in favor of adcp_version (release-precision string). Servers MUST continue to honor this field through 3.x. Removed in 4.0. Original semantics: the AdCP major version the buyer's payloads conform to. Sellers validate against their supported major_versions and return VERSION_UNSUPPORTED if unsupported. When omitted, the seller assumes its highest supported version.
95
+ */
96
+ adcp_major_version?: number;
97
+ /**
98
+ * Audit data for each requested plan.
99
+ */
100
+ plans: {
101
+ /**
102
+ * Plan identifier.
103
+ */
104
+ plan_id: string;
105
+ /**
106
+ * Current plan version.
107
+ */
108
+ plan_version: number;
109
+ /**
110
+ * Plan lifecycle status.
111
+ */
112
+ status: 'active' | 'suspended' | 'completed';
113
+ /**
114
+ * Budget state.
115
+ */
116
+ budget: {
117
+ /**
118
+ * Total authorized budget from the plan.
119
+ */
120
+ authorized?: number;
121
+ /**
122
+ * Total budget committed from confirmed outcomes.
123
+ */
124
+ committed?: number;
125
+ /**
126
+ * Authorized minus committed.
127
+ */
128
+ remaining?: number;
129
+ /**
130
+ * Committed as a percentage of authorized.
131
+ */
132
+ utilization_pct?: number;
133
+ };
134
+ /**
135
+ * Current channel mix. Keyed by channel ID.
136
+ */
137
+ channel_allocation?: {
138
+ [k: string]: {
139
+ /**
140
+ * Budget committed to this channel.
141
+ */
142
+ committed?: number;
143
+ /**
144
+ * Channel's share of the authorized total budget.
145
+ */
146
+ pct?: number;
147
+ } | undefined;
148
+ };
149
+ /**
150
+ * Aggregate validation and outcome statistics.
151
+ */
152
+ summary: {
153
+ /**
154
+ * Total governance checks performed.
155
+ */
156
+ checks_performed?: number;
157
+ /**
158
+ * Total outcomes reported.
159
+ */
160
+ outcomes_reported?: number;
161
+ /**
162
+ * Count of each governance check status.
163
+ */
164
+ statuses?: {
165
+ approved?: number;
166
+ denied?: number;
167
+ conditions?: number;
168
+ /**
169
+ * Supplementary count of checks that went through internal human review. These checks are also counted in approved or denied.
170
+ */
171
+ human_reviewed?: number;
172
+ };
173
+ /**
174
+ * Total findings across all checks and outcomes.
175
+ */
176
+ findings_count?: number;
177
+ /**
178
+ * All escalations and their resolutions.
179
+ */
180
+ escalations?: {
181
+ /**
182
+ * The escalated governance check.
183
+ */
184
+ check_id: string;
185
+ /**
186
+ * Why it was escalated.
187
+ */
188
+ reason: string;
189
+ /**
190
+ * How it was resolved (e.g., 'approved_by_human', 'rejected_by_human').
191
+ */
192
+ resolution?: string;
193
+ /**
194
+ * ISO 8601 resolution timestamp.
195
+ * @format date-time
196
+ */
197
+ resolved_at?: string;
198
+ }[];
199
+ /**
200
+ * Aggregate governance metrics for detecting oversight drift. A declining escalation rate may indicate well-calibrated governance or eroding human oversight -- surfacing the trend lets the organization make that judgment.
201
+ */
202
+ drift_metrics?: {
203
+ /**
204
+ * Fraction of checks that resulted in escalation.
205
+ * @minimum 0
206
+ * @maximum 1
207
+ */
208
+ escalation_rate?: number;
209
+ /**
210
+ * Direction of escalation rate over the plan's lifetime.
211
+ */
212
+ escalation_rate_trend?: 'increasing' | 'stable' | 'declining';
213
+ /**
214
+ * Fraction of checks approved without human intervention.
215
+ * @minimum 0
216
+ * @maximum 1
217
+ */
218
+ auto_approval_rate?: number;
219
+ /**
220
+ * Fraction of escalations where the human overrode the governance agent's recommendation.
221
+ * @minimum 0
222
+ * @maximum 1
223
+ */
224
+ human_override_rate?: number;
225
+ /**
226
+ * Average confidence score across all findings. Present when findings include confidence scores.
227
+ * @minimum 0
228
+ * @maximum 1
229
+ */
230
+ mean_confidence?: number;
231
+ /**
232
+ * Organization-defined thresholds for drift metrics. When a metric crosses its threshold, the governance agent SHOULD include a finding on the next check. Set by the organization in governance agent configuration, echoed here for visibility.
233
+ */
234
+ thresholds?: {
235
+ /**
236
+ * Maximum acceptable escalation rate. A rate above this suggests policy miscalibration.
237
+ * @minimum 0
238
+ * @maximum 1
239
+ */
240
+ escalation_rate_max?: number;
241
+ /**
242
+ * Minimum acceptable escalation rate. A rate below this may indicate eroding oversight.
243
+ * @minimum 0
244
+ * @maximum 1
245
+ */
246
+ escalation_rate_min?: number;
247
+ /**
248
+ * Maximum acceptable auto-approval rate.
249
+ * @minimum 0
250
+ * @maximum 1
251
+ */
252
+ auto_approval_rate_max?: number;
253
+ /**
254
+ * Maximum acceptable human override rate. A high rate suggests the governance agent's recommendations are poorly calibrated.
255
+ * @minimum 0
256
+ * @maximum 1
257
+ */
258
+ human_override_rate_max?: number;
259
+ };
260
+ };
261
+ };
262
+ /**
263
+ * Ordered audit trail. Only present when include_entries is true.
264
+ */
265
+ entries?: {
266
+ /**
267
+ * Entry identifier.
268
+ */
269
+ id: string;
270
+ /**
271
+ * Entry type.
272
+ */
273
+ type: 'check' | 'outcome';
274
+ /**
275
+ * ISO 8601 timestamp.
276
+ * @format date-time
277
+ */
278
+ timestamp: string;
279
+ /**
280
+ * Plan this entry belongs to. Present when querying multiple plans or a portfolio.
281
+ */
282
+ plan_id?: string;
283
+ /**
284
+ * URL of the agent that made the request. Resolved from the credentials used on the governance callback.
285
+ */
286
+ caller?: string;
287
+ /**
288
+ * The AdCP tool (present for check entries).
289
+ */
290
+ tool?: string;
291
+ verdict?: GovernanceDecision;
292
+ /**
293
+ * Whether the check was an intent check (orchestrator) or execution check (seller). Inferred from the fields present on the original check request. Present for check entries.
294
+ */
295
+ check_type?: 'intent' | 'execution';
296
+ mode?: GovernanceMode;
297
+ /**
298
+ * Human-readable explanation of the governance decision (present for check entries).
299
+ */
300
+ explanation?: string;
301
+ /**
302
+ * Policy IDs evaluated during this check. Includes registry policy IDs (resolved via the policy registry) and any inline `policy_id`s declared in the plan's `custom_policies`. Present for check entries.
303
+ */
304
+ policies_evaluated?: string[];
305
+ /**
306
+ * Governance categories evaluated (e.g., 'budget_authority', 'regulatory_compliance'). Present for check entries.
307
+ */
308
+ categories_evaluated?: string[];
309
+ /**
310
+ * Findings from this check or outcome. Same structure as check_governance response findings.
311
+ */
312
+ findings?: {
313
+ category_id: string;
314
+ policy_id?: string;
315
+ severity: EscalationSeverity;
316
+ explanation: string;
317
+ /**
318
+ * @minimum 0
319
+ * @maximum 1
320
+ */
321
+ confidence?: number;
322
+ }[];
323
+ outcome?: OutcomeType;
324
+ /**
325
+ * Budget committed (present for completed outcome entries).
326
+ */
327
+ committed_budget?: number;
328
+ /**
329
+ * Governance context for this entry (present for check and outcome entries).
330
+ */
331
+ governance_context?: string;
332
+ /**
333
+ * Audit-layer binding to the plan revision this attestation was evaluated over — base64url_no_pad(SHA-256(JCS(plan_payload))) per Plan binding and audit in the campaign-governance specification. Present on check entries. Auditors and buyer-side compliance verify by recomputing over the retained plan revision and byte-comparing the decoded 32-byte digests.
334
+ * @pattern ^[A-Za-z0-9_-]{43}$
335
+ */
336
+ plan_hash?: string;
337
+ purchase_type?: PurchaseType;
338
+ /**
339
+ * Outcome status (present for outcome entries).
340
+ */
341
+ outcome_status?: string;
342
+ }[];
343
+ /**
344
+ * Per-action breakdown grouped by governance context.
345
+ */
346
+ governed_actions: {
347
+ /**
348
+ * Governance context correlating this action's lifecycle.
349
+ */
350
+ governance_context: string;
351
+ purchase_type: PurchaseType;
352
+ /**
353
+ * Action status.
354
+ */
355
+ status: 'active' | 'suspended' | 'completed';
356
+ /**
357
+ * Budget committed for this action.
358
+ */
359
+ committed: number;
360
+ /**
361
+ * Number of governance checks performed for this action.
362
+ */
363
+ check_count: number;
364
+ /**
365
+ * The seller's identifier for the resource (e.g., media_buy_id, rights_grant_id). Present when reported via report_plan_outcome.
366
+ */
367
+ seller_reference?: string;
368
+ }[];
369
+ }[];
370
+ ext?: ExtensionObject;
371
+ }
372
+
373
+ /**
374
+ * Legacy authentication schemes for the webhook auth block. Bearer: token sent in Authorization header. HMAC-SHA256: legacy shared-secret signing. Both are deprecated; new integrations SHOULD omit the authentication block and use the RFC 9421 webhook signing profile (applicable on schemas where authentication is optional). Removed in AdCP 4.0.
375
+ */
376
+ export type AuthenticationScheme = 'Bearer' | 'HMAC-SHA256';
377
+
378
+ /**
379
+ * Opaque correlation data that is echoed unchanged in responses. Used for internal tracking, UI session IDs, trace IDs, and other caller-specific identifiers that don't affect protocol behavior. Context data is never parsed by AdCP agents - it's simply preserved and returned.
380
+ */
381
+ export interface ContextObject {
382
+ }
383
+
384
+ /**
385
+ * Finding severity.
386
+ */
387
+ export type EscalationSeverity = 'info' | 'warning' | 'critical';
388
+
389
+ /**
390
+ * Extension object for platform-specific, vendor-namespaced parameters. Extensions are always optional and must be namespaced under a vendor/platform key (e.g., ext.gam, ext.roku). Used for custom capabilities, partner-specific configuration, and features being proposed for standardization.
391
+ */
392
+ export interface ExtensionObject {
393
+ }
394
+
395
+ /**
396
+ * Governance verdict (present for check entries). Renamed from `status` in 3.1 alongside check-governance-response for vocabulary consistency.
397
+ */
398
+ export type GovernanceDecision = 'approved' | 'denied' | 'conditions';
399
+
400
+ /**
401
+ * Governance mode active at the moment this specific check was evaluated. Governance agents SHOULD populate this field on check entries, recording the mode from their runtime configuration at the moment check_governance was processed — not derived from a plan field. This is a per-check value: if the operator changes mode between checks for the same governed action, each entry records the mode active for that entry. A future `governed_actions[].mode` field would describe the action's current mode, which may differ from the most recent entry's `mode` if the plan has since been re-synced. Absent for outcome entries and for pre-3.1 governance agents that do not surface mode on audit responses.
402
+ */
403
+ export type GovernanceMode = 'audit' | 'advisory' | 'enforce';
404
+
405
+ /**
406
+ * Outcome type.
407
+ */
408
+ export type OutcomeType = 'completed' | 'failed' | 'delivery';
409
+
410
+ /**
411
+ * The type of financial commitment this outcome is for. Determines which budget allocation (if any) to charge against. Defaults to 'media_buy' when omitted.
412
+ */
413
+ export type PurchaseType = 'media_buy' | 'rights_license' | 'signal_activation' | 'creative_services';
414
+
415
+ /**
416
+ * Push notification configuration for async task updates (A2A and REST protocols). Echoed from the request to confirm webhook settings. Specifies URL, authentication scheme (Bearer or HMAC-SHA256), and credentials. MCP uses progress notifications instead of webhooks.
417
+ */
418
+ export interface PushNotificationConfig {
419
+ /**
420
+ * Webhook endpoint URL for task status notifications. The wire contract is unconstrained beyond `format: "uri"` — in particular, publishers SHOULD NOT enforce a destination-port allowlist by default, since buyers legitimately host receivers on non-standard TLS ports (`:9443`, `:4443`, path-routed multi-tenant gateways). The SSRF guard the protocol relies on is the IP-range check + DNS-rebinding-resistant connect pin defined in [Webhook URL validation (SSRF)](/docs/building/by-layer/L1/security#webhook-url-validation-ssrf), not port filtering. Operators who want a hardened destination-port allowlist as defense-in-depth (e.g., locked-down enterprise egress) opt in explicitly — see [Destination port: permissive by default](/docs/building/by-layer/L1/security#destination-port-permissive-by-default).
421
+ */
422
+ url: string;
423
+ /**
424
+ * Buyer-supplied correlation identifier for the operation that will produce webhooks against this registration. The seller MUST echo this value verbatim into every webhook payload's `operation_id` field (see [`mcp-webhook-payload.json`](/schemas/core/mcp-webhook-payload.json) and [Webhooks — Operation IDs](/docs/building/by-layer/L3/webhooks#operation-ids-and-url-templates)). Buyers SHOULD generate a unique value per task invocation (UUID recommended). This field is the canonical registration channel for `operation_id`; buyers MAY additionally embed the same value in the URL path or query as a routing aid for their own HTTP server, but the URL is opaque to the seller and the wire-level source of truth is this field. Sellers MUST NOT parse the URL to recover `operation_id`. Sellers that receive a webhook registration without `operation_id` MAY reject the task with `INVALID_REQUEST`.
425
+ * @minLength 1
426
+ * @maxLength 255
427
+ * @pattern ^[A-Za-z0-9_.:-]{1,255}$
428
+ */
429
+ operation_id?: string;
430
+ /**
431
+ * Optional client-provided token for webhook validation. The seller MUST echo this value verbatim in every webhook payload's `token` field (see [`mcp-webhook-payload.json`](/schemas/core/mcp-webhook-payload.json) for the receiver-side validation obligation). Length bounds give receivers a defensive range check on the echoed value; senders SHOULD generate tokens with at least 128 bits of entropy (≥22 base64url characters). This is a complementary authenticity mechanism that can layer on top of the RFC 9421 webhook signature — unlike the `authentication` block below, it is not on the 4.0 removal track. Receivers that registered both a signing key (RFC 9421) and a `token` MUST NOT treat a valid token echo as authorization to skip signature verification; both checks remain independent obligations.
432
+ * @minLength 16
433
+ * @maxLength 4096
434
+ */
435
+ token?: string;
436
+ /**
437
+ * Legacy authentication configuration (A2A-compatible). Opts the seller into Bearer or HMAC-SHA256 signing instead of the default RFC 9421 webhook profile. Deprecated; removed in AdCP 4.0. **Precedence is a switch, not a fallback:** presence of this block selects the legacy scheme; absence selects 9421. A seller MUST NOT sign the same webhook both ways, and a buyer MUST NOT attempt 'try 9421 first, fall back to HMAC' verification — signature mode is determined solely by whether this block was present at registration time. The seller's baseline 9421 webhook-signing key published at its brand.json `agents[]` `jwks_uri` does not override this selector; it is always discoverable but only used when `authentication` is omitted. See docs/building/implementation/security.mdx#webhook-callbacks for the full precedence and downgrade-resistance rules (including the `webhook_mode_mismatch` rejection a buyer MUST apply when a received webhook's signing mode does not match the registered mode).
438
+ */
439
+ authentication?: {
440
+ /**
441
+ * Array of authentication schemes. Supported: ['Bearer'] for simple token auth, ['HMAC-SHA256'] for legacy shared-secret signing. Both are deprecated; new integrations SHOULD omit `authentication` and use the RFC 9421 webhook profile.
442
+ */
443
+ schemes: AuthenticationScheme[];
444
+ /**
445
+ * Credentials for the legacy scheme. For Bearer: token sent in Authorization header. For HMAC-SHA256: shared secret used to generate signature. Minimum 32 characters. Exchanged out-of-band during onboarding.
446
+ * @minLength 32
447
+ */
448
+ credentials: string;
449
+ };
450
+ }
451
+
452
+ /**
453
+ * Current task execution state. Indicates whether the task is completed, in progress (working), submitted for async processing, failed, or requires user input. REQUIRED on every task response envelope. Synchronous tasks (including read-only metadata calls like `get_adcp_capabilities`) MUST emit `status: "completed"`; async tasks emit `submitted`, `working`, `input-required`, etc. per their lifecycle. Agents MUST NOT emit the legacy task_status or response_status fields alongside this field — the status field is the single authoritative task state.
454
+ */
455
+ export type TaskStatus = 'submitted' | 'working' | 'input-required' | 'completed' | 'canceled' | 'failed' | 'rejected' | 'auth-required' | 'unknown';