@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.
- package/README.md +12 -0
- package/dist/lib/conformance/oracle.d.ts.map +1 -1
- package/dist/lib/conformance/oracle.js +8 -1
- package/dist/lib/conformance/oracle.js.map +1 -1
- package/dist/lib/conformance/schemaArbitrary.js +135 -9
- package/dist/lib/conformance/schemaArbitrary.js.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/create-adcp-server.d.ts +5 -0
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +41 -3
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/decisioning/capabilities.d.ts +8 -0
- package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/dispatch.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/dispatch.js +2 -0
- package/dist/lib/server/decisioning/proposal/dispatch.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +14 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/responses.d.ts +1 -1
- package/dist/lib/server/responses.d.ts.map +1 -1
- package/dist/lib/server/responses.js +5 -2
- package/dist/lib/server/responses.js.map +1 -1
- package/dist/lib/signing/types.d.ts +6 -0
- package/dist/lib/signing/types.d.ts.map +1 -1
- package/dist/lib/signing/types.js.map +1 -1
- package/dist/lib/signing/verifier.d.ts.map +1 -1
- package/dist/lib/signing/verifier.js +33 -4
- package/dist/lib/signing/verifier.js.map +1 -1
- package/dist/lib/testing/storyboard/compliance.d.ts +1 -0
- package/dist/lib/testing/storyboard/compliance.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/compliance.js +8 -2
- package/dist/lib/testing/storyboard/compliance.js.map +1 -1
- package/dist/lib/testing/storyboard/index.d.ts +1 -1
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/index.js +3 -2
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/probes.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/probes.js +3 -0
- package/dist/lib/testing/storyboard/probes.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +294 -29
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/types.d.ts +59 -0
- 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/validations.d.ts +4 -3
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/validations.js +26 -2
- package/dist/lib/testing/storyboard/validations.js.map +1 -1
- package/dist/lib/types/activate-signal.d.ts +647 -0
- package/dist/lib/types/build-creative.d.ts +2105 -0
- package/dist/lib/types/calibrate-content.d.ts +675 -0
- package/dist/lib/types/check-governance.d.ts +619 -0
- package/dist/lib/types/comply-test-controller.d.ts +8428 -0
- package/dist/lib/types/core.generated.d.ts +180 -252
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +1 -1
- package/dist/lib/types/create-collection-list.d.ts +693 -0
- package/dist/lib/types/create-content-standards.d.ts +830 -0
- package/dist/lib/types/create-media-buy.d.ts +3374 -0
- package/dist/lib/types/create-property-list.d.ts +836 -0
- package/dist/lib/types/delete-collection-list.d.ts +497 -0
- package/dist/lib/types/delete-property-list.d.ts +497 -0
- package/dist/lib/types/get-account-financials.d.ts +624 -0
- package/dist/lib/types/get-adcp-capabilities.d.ts +2863 -0
- package/dist/lib/types/get-collection-list.d.ts +763 -0
- package/dist/lib/types/get-content-standards.d.ts +919 -0
- package/dist/lib/types/get-creative-delivery.d.ts +2219 -0
- package/dist/lib/types/get-creative-features.d.ts +1736 -0
- package/dist/lib/types/get-media-buy-artifacts.d.ts +864 -0
- package/dist/lib/types/get-media-buys.d.ts +1670 -0
- package/dist/lib/types/get-plan-audit-logs.d.ts +455 -0
- package/dist/lib/types/get-products.d.ts +4935 -0
- package/dist/lib/types/get-property-list.d.ts +874 -0
- package/dist/lib/types/get-signals.d.ts +986 -0
- package/dist/lib/types/list-accounts.d.ts +851 -0
- package/dist/lib/types/list-content-standards.d.ts +975 -0
- package/dist/lib/types/list-creative-formats.d.ts +3132 -0
- package/dist/lib/types/list-creatives.d.ts +2390 -0
- package/dist/lib/types/list-property-lists.d.ts +855 -0
- package/dist/lib/types/log-event.d.ts +373 -0
- package/dist/lib/types/per-tool-index.json +391 -0
- package/dist/lib/types/preview-creative.d.ts +1981 -0
- package/dist/lib/types/provide-performance-feedback.d.ts +218 -0
- package/dist/lib/types/report-plan-outcome.d.ts +433 -0
- package/dist/lib/types/report-usage.d.ts +579 -0
- package/dist/lib/types/schemas.generated.d.ts +127279 -125067
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +221 -293
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/si-get-offering.d.ts +259 -0
- package/dist/lib/types/si-initiate-session.d.ts +372 -0
- package/dist/lib/types/si-send-message.d.ts +300 -0
- package/dist/lib/types/si-terminate-session.d.ts +213 -0
- package/dist/lib/types/sync-accounts.d.ts +856 -0
- package/dist/lib/types/sync-audiences.d.ts +707 -0
- package/dist/lib/types/sync-catalogs.d.ts +766 -0
- package/dist/lib/types/sync-creatives.d.ts +2134 -0
- package/dist/lib/types/sync-event-sources.d.ts +665 -0
- package/dist/lib/types/sync-governance.d.ts +558 -0
- package/dist/lib/types/sync-plans.d.ts +979 -0
- package/dist/lib/types/update-collection-list.d.ts +697 -0
- package/dist/lib/types/update-content-standards.d.ts +847 -0
- package/dist/lib/types/update-media-buy.d.ts +3047 -0
- package/dist/lib/types/update-property-list.d.ts +840 -0
- package/dist/lib/types/validate-content-delivery.d.ts +722 -0
- package/dist/lib/types/validate-input.d.ts +1683 -0
- package/dist/lib/utils/response-schemas.js +1 -1
- package/dist/lib/utils/response-schemas.js.map +1 -1
- package/dist/lib/utils/response-unwrapper.d.ts.map +1 -1
- package/dist/lib/utils/response-unwrapper.js +18 -3
- package/dist/lib/utils/response-unwrapper.js.map +1 -1
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/examples/error-compliant-server.ts +1 -1
- package/examples/hello_seller_adapter_guaranteed.ts +8 -3
- package/examples/hello_seller_adapter_multi_tenant.ts +27 -23
- package/examples/hello_seller_adapter_non_guaranteed.ts +7 -3
- package/examples/hello_seller_adapter_proposal_mode.ts +22 -6
- package/examples/hello_signals_adapter_marketplace.ts +34 -3
- package/package.json +9 -2
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
// AUTO-GENERATED — DO NOT EDIT.
|
|
2
|
+
// Per-tool .d.ts slice for `si_get_offering`. 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
|
+
* Get offering details and availability before session handoff. Returns offering information, availability status, and optionally matching products based on context.
|
|
13
|
+
*/
|
|
14
|
+
export interface SIGetOfferingRequest {
|
|
15
|
+
/**
|
|
16
|
+
* 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.
|
|
17
|
+
*/
|
|
18
|
+
adcp_version?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 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.
|
|
21
|
+
*/
|
|
22
|
+
adcp_major_version?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Offering identifier from the catalog to get details for
|
|
25
|
+
*/
|
|
26
|
+
offering_id: string;
|
|
27
|
+
/**
|
|
28
|
+
* Optional natural language description of user intent for personalized results (e.g., 'mens size 14 near Cincinnati'). Must be anonymous - no PII.
|
|
29
|
+
*/
|
|
30
|
+
intent?: string;
|
|
31
|
+
context?: ContextObject;
|
|
32
|
+
/**
|
|
33
|
+
* Whether to include matching products in the response
|
|
34
|
+
*/
|
|
35
|
+
include_products?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Maximum number of matching products to return
|
|
38
|
+
* @minimum 1
|
|
39
|
+
* @maximum 50
|
|
40
|
+
*/
|
|
41
|
+
product_limit?: number;
|
|
42
|
+
ext?: ExtensionObject;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Offering details, availability status, and optionally matching products. Use the offering_token in si_initiate_session for correlation.
|
|
47
|
+
*/
|
|
48
|
+
export interface SIGetOfferingResponse {
|
|
49
|
+
/**
|
|
50
|
+
* 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).
|
|
51
|
+
*/
|
|
52
|
+
context_id?: string;
|
|
53
|
+
context?: ContextObject;
|
|
54
|
+
/**
|
|
55
|
+
* Unique identifier for tracking asynchronous operations. Present when a task requires extended processing time. Used to query task status and retrieve results when complete.
|
|
56
|
+
*/
|
|
57
|
+
task_id?: string;
|
|
58
|
+
status: TaskStatus;
|
|
59
|
+
/**
|
|
60
|
+
* 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.
|
|
61
|
+
*/
|
|
62
|
+
message?: string;
|
|
63
|
+
/**
|
|
64
|
+
* ISO 8601 timestamp when the response was generated. Useful for debugging, logging, cache validation, and tracking async operation progress.
|
|
65
|
+
*/
|
|
66
|
+
timestamp?: string;
|
|
67
|
+
/**
|
|
68
|
+
* 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.
|
|
69
|
+
*/
|
|
70
|
+
replayed?: boolean;
|
|
71
|
+
adcp_error?: Error;
|
|
72
|
+
push_notification_config?: PushNotificationConfig;
|
|
73
|
+
/**
|
|
74
|
+
* 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.
|
|
75
|
+
*
|
|
76
|
+
* 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.
|
|
77
|
+
*
|
|
78
|
+
* This is the primary correlation key for audit and reporting across the governance lifecycle.
|
|
79
|
+
*/
|
|
80
|
+
governance_context?: string;
|
|
81
|
+
/**
|
|
82
|
+
* 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.
|
|
83
|
+
*/
|
|
84
|
+
payload?: {};
|
|
85
|
+
/**
|
|
86
|
+
* 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.
|
|
87
|
+
*/
|
|
88
|
+
adcp_version?: string;
|
|
89
|
+
/**
|
|
90
|
+
* 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.
|
|
91
|
+
*/
|
|
92
|
+
adcp_major_version?: number;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the offering is currently available
|
|
95
|
+
*/
|
|
96
|
+
available: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Token to pass to si_initiate_session for session continuity. Brand stores the full query context server-side (products shown, order, context) so they can resolve references like 'the second one' when the session starts.
|
|
99
|
+
*/
|
|
100
|
+
offering_token?: string;
|
|
101
|
+
/**
|
|
102
|
+
* How long this offering information is valid (seconds). Host should re-fetch after TTL expires.
|
|
103
|
+
* @minimum 0
|
|
104
|
+
*/
|
|
105
|
+
ttl_seconds?: number;
|
|
106
|
+
/**
|
|
107
|
+
* When this offering information was retrieved
|
|
108
|
+
* @format date-time
|
|
109
|
+
*/
|
|
110
|
+
checked_at?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Offering details
|
|
113
|
+
*/
|
|
114
|
+
offering?: {
|
|
115
|
+
/**
|
|
116
|
+
* Offering identifier
|
|
117
|
+
*/
|
|
118
|
+
offering_id?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Offering title
|
|
121
|
+
*/
|
|
122
|
+
title?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Brief summary of the offering
|
|
125
|
+
*/
|
|
126
|
+
summary?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Short promotional tagline
|
|
129
|
+
*/
|
|
130
|
+
tagline?: string;
|
|
131
|
+
/**
|
|
132
|
+
* When this offering expires
|
|
133
|
+
* @format date-time
|
|
134
|
+
*/
|
|
135
|
+
expires_at?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Price indication (e.g., 'from $199', '50% off')
|
|
138
|
+
*/
|
|
139
|
+
price_hint?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Hero image for the offering
|
|
142
|
+
*/
|
|
143
|
+
image_url?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Landing page URL
|
|
146
|
+
*/
|
|
147
|
+
landing_url?: string;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Products matching the request context. Only included if include_products was true.
|
|
151
|
+
*/
|
|
152
|
+
matching_products?: {
|
|
153
|
+
/**
|
|
154
|
+
* Product identifier
|
|
155
|
+
*/
|
|
156
|
+
product_id: string;
|
|
157
|
+
/**
|
|
158
|
+
* Product name
|
|
159
|
+
*/
|
|
160
|
+
name: string;
|
|
161
|
+
/**
|
|
162
|
+
* Display price (e.g., '$129', '$89.99')
|
|
163
|
+
*/
|
|
164
|
+
price?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Original price if on sale
|
|
167
|
+
*/
|
|
168
|
+
original_price?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Product image
|
|
171
|
+
*/
|
|
172
|
+
image_url?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Brief availability info (e.g., 'In stock', 'Size 14 available', '3 left')
|
|
175
|
+
*/
|
|
176
|
+
availability_summary?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Product detail page URL
|
|
179
|
+
*/
|
|
180
|
+
url?: string;
|
|
181
|
+
}[];
|
|
182
|
+
/**
|
|
183
|
+
* Total number of products matching the context (may be more than returned in matching_products)
|
|
184
|
+
* @minimum 0
|
|
185
|
+
*/
|
|
186
|
+
total_matching?: number;
|
|
187
|
+
/**
|
|
188
|
+
* If not available, why (e.g., 'expired', 'sold_out', 'region_restricted')
|
|
189
|
+
*/
|
|
190
|
+
unavailable_reason?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Alternative offerings to consider if this one is unavailable
|
|
193
|
+
*/
|
|
194
|
+
alternative_offering_ids?: string[];
|
|
195
|
+
/**
|
|
196
|
+
* Errors during offering lookup
|
|
197
|
+
*/
|
|
198
|
+
errors?: Error[];
|
|
199
|
+
ext?: ExtensionObject;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* 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.
|
|
204
|
+
*/
|
|
205
|
+
export type AuthenticationScheme = 'Bearer' | 'HMAC-SHA256';
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* 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.
|
|
209
|
+
*/
|
|
210
|
+
export interface ContextObject {
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* 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.
|
|
215
|
+
*/
|
|
216
|
+
export interface ExtensionObject {
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* 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.
|
|
221
|
+
*/
|
|
222
|
+
export interface PushNotificationConfig {
|
|
223
|
+
/**
|
|
224
|
+
* 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).
|
|
225
|
+
*/
|
|
226
|
+
url: string;
|
|
227
|
+
/**
|
|
228
|
+
* 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`.
|
|
229
|
+
* @minLength 1
|
|
230
|
+
* @maxLength 255
|
|
231
|
+
* @pattern ^[A-Za-z0-9_.:-]{1,255}$
|
|
232
|
+
*/
|
|
233
|
+
operation_id?: string;
|
|
234
|
+
/**
|
|
235
|
+
* 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.
|
|
236
|
+
* @minLength 16
|
|
237
|
+
* @maxLength 4096
|
|
238
|
+
*/
|
|
239
|
+
token?: string;
|
|
240
|
+
/**
|
|
241
|
+
* 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).
|
|
242
|
+
*/
|
|
243
|
+
authentication?: {
|
|
244
|
+
/**
|
|
245
|
+
* 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.
|
|
246
|
+
*/
|
|
247
|
+
schemes: AuthenticationScheme[];
|
|
248
|
+
/**
|
|
249
|
+
* 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.
|
|
250
|
+
* @minLength 32
|
|
251
|
+
*/
|
|
252
|
+
credentials: string;
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* 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.
|
|
258
|
+
*/
|
|
259
|
+
export type TaskStatus = 'submitted' | 'working' | 'input-required' | 'completed' | 'canceled' | 'failed' | 'rejected' | 'auth-required' | 'unknown';
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
// AUTO-GENERATED — DO NOT EDIT.
|
|
2
|
+
// Per-tool .d.ts slice for `si_initiate_session`. 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
|
+
* Host initiates a session with a brand agent
|
|
13
|
+
*/
|
|
14
|
+
export interface SIInitiateSessionRequest {
|
|
15
|
+
/**
|
|
16
|
+
* 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.
|
|
17
|
+
*/
|
|
18
|
+
adcp_version?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 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.
|
|
21
|
+
*/
|
|
22
|
+
adcp_major_version?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Natural language description of user intent — the conversation handoff from the host describing what the user needs from the brand agent
|
|
25
|
+
*/
|
|
26
|
+
intent: string;
|
|
27
|
+
context?: ContextObject;
|
|
28
|
+
identity: SIIdentity;
|
|
29
|
+
/**
|
|
30
|
+
* AdCP media buy ID if session was triggered by advertising
|
|
31
|
+
*/
|
|
32
|
+
media_buy_id?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Where this session was triggered (e.g., 'chatgpt_search', 'claude_chat')
|
|
35
|
+
*/
|
|
36
|
+
placement?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Brand-specific offering identifier to apply
|
|
39
|
+
*/
|
|
40
|
+
offering_id?: string;
|
|
41
|
+
supported_capabilities?: SICapabilities;
|
|
42
|
+
/**
|
|
43
|
+
* Token from si_get_offering response for session continuity. Brand uses this to recall what products were shown to the user, enabling natural references like 'the second one' or 'that blue shoe'.
|
|
44
|
+
*/
|
|
45
|
+
offering_token?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Client-generated unique key for this request. Prevents duplicate session creation on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
48
|
+
* @minLength 16
|
|
49
|
+
* @maxLength 255
|
|
50
|
+
* @pattern ^[A-Za-z0-9_.:-]{16,255}$
|
|
51
|
+
*/
|
|
52
|
+
idempotency_key: string;
|
|
53
|
+
ext?: ExtensionObject;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Brand agent's response to session initiation
|
|
58
|
+
*/
|
|
59
|
+
export interface SIInitiateSessionResponse {
|
|
60
|
+
/**
|
|
61
|
+
* 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).
|
|
62
|
+
*/
|
|
63
|
+
context_id?: string;
|
|
64
|
+
context?: ContextObject;
|
|
65
|
+
/**
|
|
66
|
+
* Unique identifier for tracking asynchronous operations. Present when a task requires extended processing time. Used to query task status and retrieve results when complete.
|
|
67
|
+
*/
|
|
68
|
+
task_id?: string;
|
|
69
|
+
status: TaskStatus;
|
|
70
|
+
/**
|
|
71
|
+
* 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.
|
|
72
|
+
*/
|
|
73
|
+
message?: string;
|
|
74
|
+
/**
|
|
75
|
+
* ISO 8601 timestamp when the response was generated. Useful for debugging, logging, cache validation, and tracking async operation progress.
|
|
76
|
+
*/
|
|
77
|
+
timestamp?: string;
|
|
78
|
+
/**
|
|
79
|
+
* 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.
|
|
80
|
+
*/
|
|
81
|
+
replayed?: boolean;
|
|
82
|
+
adcp_error?: Error;
|
|
83
|
+
push_notification_config?: PushNotificationConfig;
|
|
84
|
+
/**
|
|
85
|
+
* 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.
|
|
86
|
+
*
|
|
87
|
+
* 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.
|
|
88
|
+
*
|
|
89
|
+
* This is the primary correlation key for audit and reporting across the governance lifecycle.
|
|
90
|
+
*/
|
|
91
|
+
governance_context?: string;
|
|
92
|
+
/**
|
|
93
|
+
* 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.
|
|
94
|
+
*/
|
|
95
|
+
payload?: {};
|
|
96
|
+
/**
|
|
97
|
+
* 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.
|
|
98
|
+
*/
|
|
99
|
+
adcp_version?: string;
|
|
100
|
+
/**
|
|
101
|
+
* 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.
|
|
102
|
+
*/
|
|
103
|
+
adcp_major_version?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Unique session identifier for subsequent messages
|
|
106
|
+
*/
|
|
107
|
+
session_id: string;
|
|
108
|
+
/**
|
|
109
|
+
* Brand agent's initial response
|
|
110
|
+
*/
|
|
111
|
+
response?: {
|
|
112
|
+
/**
|
|
113
|
+
* Conversational message from brand agent
|
|
114
|
+
*/
|
|
115
|
+
message?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Visual components to render
|
|
118
|
+
*/
|
|
119
|
+
ui_elements?: SIUIElement[];
|
|
120
|
+
};
|
|
121
|
+
negotiated_capabilities?: SICapabilities;
|
|
122
|
+
session_status: SISessionStatus;
|
|
123
|
+
/**
|
|
124
|
+
* Session inactivity timeout in seconds. After this duration without a message, the brand agent may terminate the session. Hosts SHOULD warn users before timeout when possible.
|
|
125
|
+
* @minimum 1
|
|
126
|
+
*/
|
|
127
|
+
session_ttl_seconds?: number;
|
|
128
|
+
/**
|
|
129
|
+
* Errors during session initiation
|
|
130
|
+
*/
|
|
131
|
+
errors?: Error[];
|
|
132
|
+
ext?: ExtensionObject;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* 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.
|
|
137
|
+
*/
|
|
138
|
+
export type AuthenticationScheme = 'Bearer' | 'HMAC-SHA256';
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* 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.
|
|
142
|
+
*/
|
|
143
|
+
export interface ContextObject {
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* 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.
|
|
148
|
+
*/
|
|
149
|
+
export interface ExtensionObject {
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 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.
|
|
154
|
+
*/
|
|
155
|
+
export interface PushNotificationConfig {
|
|
156
|
+
/**
|
|
157
|
+
* 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).
|
|
158
|
+
*/
|
|
159
|
+
url: string;
|
|
160
|
+
/**
|
|
161
|
+
* 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`.
|
|
162
|
+
* @minLength 1
|
|
163
|
+
* @maxLength 255
|
|
164
|
+
* @pattern ^[A-Za-z0-9_.:-]{1,255}$
|
|
165
|
+
*/
|
|
166
|
+
operation_id?: string;
|
|
167
|
+
/**
|
|
168
|
+
* 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.
|
|
169
|
+
* @minLength 16
|
|
170
|
+
* @maxLength 4096
|
|
171
|
+
*/
|
|
172
|
+
token?: string;
|
|
173
|
+
/**
|
|
174
|
+
* 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).
|
|
175
|
+
*/
|
|
176
|
+
authentication?: {
|
|
177
|
+
/**
|
|
178
|
+
* 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.
|
|
179
|
+
*/
|
|
180
|
+
schemes: AuthenticationScheme[];
|
|
181
|
+
/**
|
|
182
|
+
* 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.
|
|
183
|
+
* @minLength 32
|
|
184
|
+
*/
|
|
185
|
+
credentials: string;
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* What capabilities the host supports
|
|
191
|
+
*/
|
|
192
|
+
export interface SICapabilities {
|
|
193
|
+
/**
|
|
194
|
+
* Interaction modalities supported
|
|
195
|
+
*/
|
|
196
|
+
modalities?: {
|
|
197
|
+
/**
|
|
198
|
+
* Pure text exchange - the baseline modality
|
|
199
|
+
*/
|
|
200
|
+
conversational?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Audio-based interaction using brand voice
|
|
203
|
+
*/
|
|
204
|
+
voice?: boolean | {
|
|
205
|
+
/**
|
|
206
|
+
* TTS provider (elevenlabs, openai, etc.)
|
|
207
|
+
*/
|
|
208
|
+
provider?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Brand voice identifier
|
|
211
|
+
*/
|
|
212
|
+
voice_id?: string;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Brand video content playback
|
|
216
|
+
*/
|
|
217
|
+
video?: boolean | {
|
|
218
|
+
/**
|
|
219
|
+
* Supported video formats (mp4, webm, etc.)
|
|
220
|
+
*/
|
|
221
|
+
formats?: string[];
|
|
222
|
+
/**
|
|
223
|
+
* Maximum video duration
|
|
224
|
+
*/
|
|
225
|
+
max_duration_seconds?: number;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Animated video presence with brand avatar
|
|
229
|
+
*/
|
|
230
|
+
avatar?: boolean | {
|
|
231
|
+
/**
|
|
232
|
+
* Avatar provider (d-id, heygen, synthesia, etc.)
|
|
233
|
+
*/
|
|
234
|
+
provider?: string;
|
|
235
|
+
/**
|
|
236
|
+
* Brand avatar identifier
|
|
237
|
+
*/
|
|
238
|
+
avatar_id?: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Visual components supported
|
|
243
|
+
*/
|
|
244
|
+
components?: {
|
|
245
|
+
/**
|
|
246
|
+
* Standard components that all SI hosts must render
|
|
247
|
+
*/
|
|
248
|
+
standard?: ('text' | 'link' | 'image' | 'product_card' | 'carousel' | 'action_button')[];
|
|
249
|
+
/**
|
|
250
|
+
* Platform-specific extensions (chatgpt_apps_sdk, maps, forms, etc.)
|
|
251
|
+
*/
|
|
252
|
+
extensions?: {};
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Commerce capabilities
|
|
256
|
+
*/
|
|
257
|
+
commerce?: {
|
|
258
|
+
/**
|
|
259
|
+
* Supports ACP (Agentic Commerce Protocol) checkout handoff
|
|
260
|
+
*/
|
|
261
|
+
acp_checkout?: boolean;
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* A2UI (Agent-to-UI) capabilities
|
|
265
|
+
*/
|
|
266
|
+
a2ui?: {
|
|
267
|
+
/**
|
|
268
|
+
* Supports A2UI surface rendering
|
|
269
|
+
*/
|
|
270
|
+
supported?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Supported A2UI component catalogs (e.g., 'si-standard', 'standard')
|
|
273
|
+
*/
|
|
274
|
+
catalogs?: string[];
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* Supports MCP Apps for rendering A2UI surfaces in iframes
|
|
278
|
+
*/
|
|
279
|
+
mcp_apps?: boolean;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* User identity shared with brand agent (with explicit consent)
|
|
284
|
+
*/
|
|
285
|
+
export interface SIIdentity {
|
|
286
|
+
/**
|
|
287
|
+
* Whether user consented to share identity
|
|
288
|
+
*/
|
|
289
|
+
consent_granted: boolean;
|
|
290
|
+
/**
|
|
291
|
+
* When consent was granted (ISO 8601)
|
|
292
|
+
* @format date-time
|
|
293
|
+
*/
|
|
294
|
+
consent_timestamp?: string;
|
|
295
|
+
/**
|
|
296
|
+
* What data was consented to share
|
|
297
|
+
*/
|
|
298
|
+
consent_scope?: ('name' | 'email' | 'shipping_address' | 'phone' | 'locale')[];
|
|
299
|
+
/**
|
|
300
|
+
* Brand privacy policy acknowledgment
|
|
301
|
+
*/
|
|
302
|
+
privacy_policy_acknowledged?: {
|
|
303
|
+
/**
|
|
304
|
+
* URL to brand's privacy policy
|
|
305
|
+
*/
|
|
306
|
+
brand_policy_url?: string;
|
|
307
|
+
/**
|
|
308
|
+
* Version of policy acknowledged
|
|
309
|
+
*/
|
|
310
|
+
brand_policy_version?: string;
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* User data (only present if consent_granted is true)
|
|
314
|
+
*/
|
|
315
|
+
user?: {
|
|
316
|
+
/**
|
|
317
|
+
* User's email address
|
|
318
|
+
* @format email
|
|
319
|
+
*/
|
|
320
|
+
email?: string;
|
|
321
|
+
/**
|
|
322
|
+
* User's display name
|
|
323
|
+
*/
|
|
324
|
+
name?: string;
|
|
325
|
+
/**
|
|
326
|
+
* User's locale (e.g., en-US)
|
|
327
|
+
*/
|
|
328
|
+
locale?: string;
|
|
329
|
+
/**
|
|
330
|
+
* User's phone number
|
|
331
|
+
*/
|
|
332
|
+
phone?: string;
|
|
333
|
+
/**
|
|
334
|
+
* User's shipping address for accurate pricing
|
|
335
|
+
*/
|
|
336
|
+
shipping_address?: {
|
|
337
|
+
street?: string;
|
|
338
|
+
city?: string;
|
|
339
|
+
state?: string;
|
|
340
|
+
postal_code?: string;
|
|
341
|
+
country?: string;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
/**
|
|
345
|
+
* Session ID for anonymous users (when consent_granted is false)
|
|
346
|
+
*/
|
|
347
|
+
anonymous_session_id?: string;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Current session lifecycle state. Returned in initiation, message, and termination responses.
|
|
352
|
+
*/
|
|
353
|
+
export type SISessionStatus = 'active' | 'pending_handoff' | 'complete' | 'terminated';
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Standard visual component that brand returns and host renders
|
|
357
|
+
*/
|
|
358
|
+
export interface SIUIElement {
|
|
359
|
+
/**
|
|
360
|
+
* Component type
|
|
361
|
+
*/
|
|
362
|
+
type: 'text' | 'link' | 'image' | 'product_card' | 'carousel' | 'action_button' | 'app_handoff' | 'integration_actions';
|
|
363
|
+
/**
|
|
364
|
+
* Component-specific data
|
|
365
|
+
*/
|
|
366
|
+
data?: {};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* 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.
|
|
371
|
+
*/
|
|
372
|
+
export type TaskStatus = 'submitted' | 'working' | 'input-required' | 'completed' | 'canceled' | 'failed' | 'rejected' | 'auth-required' | 'unknown';
|