@adcp/client 4.21.0 → 4.22.1
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/AGENTS.md +278 -0
- package/README.md +96 -61
- package/bin/adcp.js +342 -4
- package/dist/lib/agents/index.generated.d.ts +9 -1
- package/dist/lib/agents/index.generated.d.ts.map +1 -1
- package/dist/lib/agents/index.generated.js +12 -0
- package/dist/lib/agents/index.generated.js.map +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts +2 -1
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +10 -1
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/discovery/property-crawler.d.ts +4 -0
- package/dist/lib/discovery/property-crawler.d.ts.map +1 -1
- package/dist/lib/discovery/property-crawler.js +10 -2
- package/dist/lib/discovery/property-crawler.js.map +1 -1
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +6 -4
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/protocols/index.d.ts.map +1 -1
- package/dist/lib/protocols/index.js +8 -6
- package/dist/lib/protocols/index.js.map +1 -1
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +24 -11
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/server/index.d.ts +2 -0
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js +3 -1
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/serve.d.ts +73 -0
- package/dist/lib/server/serve.d.ts.map +1 -0
- package/dist/lib/server/serve.js +94 -0
- package/dist/lib/server/serve.js.map +1 -0
- package/dist/lib/testing/client.d.ts.map +1 -1
- package/dist/lib/testing/client.js +1 -0
- package/dist/lib/testing/client.js.map +1 -1
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +48 -63
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/storyboard-tracks.d.ts +24 -0
- package/dist/lib/testing/compliance/storyboard-tracks.d.ts.map +1 -0
- package/dist/lib/testing/compliance/storyboard-tracks.js +157 -0
- package/dist/lib/testing/compliance/storyboard-tracks.js.map +1 -0
- package/dist/lib/testing/compliance/types.d.ts +1 -1
- package/dist/lib/testing/compliance/types.d.ts.map +1 -1
- package/dist/lib/testing/index.d.ts +1 -0
- package/dist/lib/testing/index.d.ts.map +1 -1
- package/dist/lib/testing/index.js +23 -1
- package/dist/lib/testing/index.js.map +1 -1
- package/dist/lib/testing/orchestrator.d.ts +8 -0
- package/dist/lib/testing/orchestrator.d.ts.map +1 -1
- package/dist/lib/testing/orchestrator.js +8 -0
- package/dist/lib/testing/orchestrator.js.map +1 -1
- package/dist/lib/testing/storyboard/context.d.ts +34 -0
- package/dist/lib/testing/storyboard/context.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/context.js +257 -0
- package/dist/lib/testing/storyboard/context.js.map +1 -0
- package/dist/lib/testing/storyboard/index.d.ts +15 -0
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/index.js +48 -0
- package/dist/lib/testing/storyboard/index.js.map +1 -0
- package/dist/lib/testing/storyboard/loader.d.ts +53 -0
- package/dist/lib/testing/storyboard/loader.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/loader.js +114 -0
- package/dist/lib/testing/storyboard/loader.js.map +1 -0
- package/dist/lib/testing/storyboard/path.d.ts +29 -0
- package/dist/lib/testing/storyboard/path.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/path.js +121 -0
- package/dist/lib/testing/storyboard/path.js.map +1 -0
- package/dist/lib/testing/storyboard/request-builder.d.ts +28 -0
- package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/request-builder.js +410 -0
- package/dist/lib/testing/storyboard/request-builder.js.map +1 -0
- package/dist/lib/testing/storyboard/runner.d.ts +24 -0
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/runner.js +280 -0
- package/dist/lib/testing/storyboard/runner.js.map +1 -0
- package/dist/lib/testing/storyboard/task-map.d.ts +21 -0
- package/dist/lib/testing/storyboard/task-map.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/task-map.js +84 -0
- package/dist/lib/testing/storyboard/task-map.js.map +1 -0
- package/dist/lib/testing/storyboard/types.d.ts +156 -0
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/types.js +10 -0
- package/dist/lib/testing/storyboard/types.js.map +1 -0
- package/dist/lib/testing/storyboard/validations.d.ts +17 -0
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/validations.js +166 -0
- package/dist/lib/testing/storyboard/validations.js.map +1 -0
- package/dist/lib/testing/types.d.ts +2 -0
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/types/core.generated.d.ts +2 -2
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +1 -1
- package/dist/lib/types/schemas.generated.d.ts +193 -34
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +87 -5
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/tools.generated.d.ts +280 -3
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/utils/response-schemas.d.ts.map +1 -1
- package/dist/lib/utils/response-schemas.js +34 -3
- package/dist/lib/utils/response-schemas.js.map +1 -1
- package/dist/lib/utils/validate-user-agent.d.ts +8 -0
- package/dist/lib/utils/validate-user-agent.d.ts.map +1 -0
- package/dist/lib/utils/validate-user-agent.js +15 -0
- package/dist/lib/utils/validate-user-agent.js.map +1 -0
- package/dist/lib/version.d.ts +6 -0
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +7 -1
- package/dist/lib/version.js.map +1 -1
- package/docs/README.md +42 -0
- package/docs/guides/BUILD-AN-AGENT.md +294 -0
- package/docs/llms.txt +634 -0
- package/examples/README.md +106 -0
- package/examples/adcp.config.json +30 -0
- package/examples/basic-a2a.ts +76 -0
- package/examples/basic-mcp.ts +50 -0
- package/examples/batch-preview-test.ts +266 -0
- package/examples/conversation-client.ts +291 -0
- package/examples/debug-preview-response.ts +73 -0
- package/examples/debug-preview-with-logging.ts +50 -0
- package/examples/easy-config-demo.ts +242 -0
- package/examples/env-config.ts +51 -0
- package/examples/error-compliant-server.ts +237 -0
- package/examples/generative-creative-demo.ts +205 -0
- package/examples/inspect-card-formats.ts +161 -0
- package/examples/logger-usage.ts +165 -0
- package/examples/oauth-cli-example.ts +154 -0
- package/examples/pr78-async-patterns-demo.ts +247 -0
- package/examples/signals-agent.ts +163 -0
- package/examples/simple-getting-started.ts +225 -0
- package/examples/simple-protocol-demo.ts +75 -0
- package/examples/test-helpers-demo.ts +239 -0
- package/examples/zod-validation-example.ts +126 -0
- package/package.json +12 -2
- package/skills/adcp/SKILL.md +13 -2
- package/storyboards/audience_sync.yaml +199 -0
- package/storyboards/behavioral_analysis.yaml +244 -0
- package/storyboards/brand_rights.yaml +131 -0
- package/storyboards/creative_ad_server.yaml +171 -0
- package/storyboards/creative_sales_agent.yaml +169 -0
- package/storyboards/creative_template.yaml +306 -0
- package/storyboards/deterministic_testing.yaml +925 -0
- package/storyboards/error_compliance.yaml +231 -0
- package/storyboards/governance_content_standards.yaml +213 -0
- package/storyboards/governance_property_lists.yaml +372 -0
- package/storyboards/media_buy_catalog_creative.yaml +457 -0
- package/storyboards/media_buy_governance_escalation.yaml +467 -0
- package/storyboards/media_buy_guaranteed_approval.yaml +396 -0
- package/storyboards/media_buy_non_guaranteed.yaml +288 -0
- package/storyboards/media_buy_proposal_mode.yaml +369 -0
- package/storyboards/media_buy_seller.yaml +560 -0
- package/storyboards/media_buy_state_machine.yaml +254 -0
- package/storyboards/schema.yaml +65 -0
- package/storyboards/schema_validation.yaml +166 -0
- package/storyboards/si_session.yaml +384 -0
- package/storyboards/signal_marketplace.yaml +283 -0
- package/storyboards/signal_owned.yaml +211 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
id: error_compliance
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
title: "Error handling and compliance"
|
|
4
|
+
category: media_buy_seller
|
|
5
|
+
track: error_handling
|
|
6
|
+
summary: "Validates that agents return properly structured AdCP errors with correct codes, recovery hints, and transport bindings."
|
|
7
|
+
|
|
8
|
+
required_tools:
|
|
9
|
+
- get_products
|
|
10
|
+
|
|
11
|
+
narrative: |
|
|
12
|
+
Every AdCP agent must handle invalid input gracefully. When a buyer sends a negative budget,
|
|
13
|
+
a nonexistent product ID, or a malformed request, the agent should return a structured error
|
|
14
|
+
response — not a stack trace or a generic 500.
|
|
15
|
+
|
|
16
|
+
AdCP defines three compliance levels for error responses:
|
|
17
|
+
- L1: isError flag set on the MCP response
|
|
18
|
+
- L2: JSON text fallback with adcp_error object in content
|
|
19
|
+
- L3: structuredContent.adcp_error binding (full compliance)
|
|
20
|
+
|
|
21
|
+
This storyboard sends intentionally bad input and validates that the agent rejects it with
|
|
22
|
+
the correct error code, recovery classification, and transport binding. Agents that use the
|
|
23
|
+
adcpError() helper from @adcp/client get L3 compliance automatically.
|
|
24
|
+
|
|
25
|
+
agent:
|
|
26
|
+
interaction_model: media_buy_seller
|
|
27
|
+
capabilities:
|
|
28
|
+
- sells_media
|
|
29
|
+
examples:
|
|
30
|
+
- "Any AdCP seller agent"
|
|
31
|
+
|
|
32
|
+
caller:
|
|
33
|
+
role: buyer_agent
|
|
34
|
+
example: "Compliance test harness"
|
|
35
|
+
|
|
36
|
+
phases:
|
|
37
|
+
- id: error_responses
|
|
38
|
+
title: "Error responses for invalid input"
|
|
39
|
+
narrative: |
|
|
40
|
+
The buyer sends requests with intentionally invalid data — negative budgets, missing
|
|
41
|
+
required fields, nonexistent product IDs. Each request should be rejected with a
|
|
42
|
+
structured error containing an appropriate AdCP error code.
|
|
43
|
+
|
|
44
|
+
steps:
|
|
45
|
+
- id: negative_budget
|
|
46
|
+
title: "Reject negative budget"
|
|
47
|
+
narrative: |
|
|
48
|
+
A negative budget is never valid. The agent must reject this with INVALID_REQUEST
|
|
49
|
+
or BUDGET_TOO_LOW and a correctable recovery hint so the buyer knows to fix the value.
|
|
50
|
+
task: create_media_buy
|
|
51
|
+
requires_tool: create_media_buy
|
|
52
|
+
expect_error: true
|
|
53
|
+
stateful: false
|
|
54
|
+
expected: |
|
|
55
|
+
Reject the request with an error containing:
|
|
56
|
+
- code: INVALID_REQUEST or BUDGET_TOO_LOW
|
|
57
|
+
- recovery: correctable
|
|
58
|
+
- field: packages[0].budget (optional but recommended)
|
|
59
|
+
sample_request:
|
|
60
|
+
idempotency_key: "error-test-negative-budget"
|
|
61
|
+
start_time: "2026-05-01T00:00:00Z"
|
|
62
|
+
end_time: "2026-05-31T23:59:59Z"
|
|
63
|
+
packages:
|
|
64
|
+
- product_id: "test-product"
|
|
65
|
+
budget: -500
|
|
66
|
+
pricing_option_id: "test-pricing"
|
|
67
|
+
validations:
|
|
68
|
+
- check: error_code
|
|
69
|
+
value: "INVALID_REQUEST"
|
|
70
|
+
description: "Error code is INVALID_REQUEST or BUDGET_TOO_LOW"
|
|
71
|
+
|
|
72
|
+
- id: nonexistent_product
|
|
73
|
+
title: "Reject nonexistent product ID"
|
|
74
|
+
narrative: |
|
|
75
|
+
The buyer references a product ID that does not exist on this platform.
|
|
76
|
+
The agent should return PRODUCT_NOT_FOUND or INVALID_REQUEST.
|
|
77
|
+
task: create_media_buy
|
|
78
|
+
requires_tool: create_media_buy
|
|
79
|
+
expect_error: true
|
|
80
|
+
stateful: false
|
|
81
|
+
expected: |
|
|
82
|
+
Reject the request with an error containing:
|
|
83
|
+
- code: PRODUCT_NOT_FOUND or INVALID_REQUEST
|
|
84
|
+
- recovery: correctable
|
|
85
|
+
sample_request:
|
|
86
|
+
idempotency_key: "error-test-nonexistent-product"
|
|
87
|
+
start_time: "2026-05-01T00:00:00Z"
|
|
88
|
+
end_time: "2026-05-31T23:59:59Z"
|
|
89
|
+
packages:
|
|
90
|
+
- product_id: "NONEXISTENT_PRODUCT_ID_12345"
|
|
91
|
+
budget: 1000
|
|
92
|
+
pricing_option_id: "nonexistent-pricing"
|
|
93
|
+
validations:
|
|
94
|
+
- check: error_code
|
|
95
|
+
value: "PRODUCT_NOT_FOUND"
|
|
96
|
+
description: "Error code is PRODUCT_NOT_FOUND or INVALID_REQUEST"
|
|
97
|
+
|
|
98
|
+
- id: missing_fields
|
|
99
|
+
title: "Handle empty get_products request"
|
|
100
|
+
narrative: |
|
|
101
|
+
The buyer sends an empty get_products request with no brief or brand.
|
|
102
|
+
The agent may accept it (permissive) or reject it (strict validation).
|
|
103
|
+
Both behaviors are acceptable — what matters is that the response is structured.
|
|
104
|
+
task: get_products
|
|
105
|
+
requires_tool: get_products
|
|
106
|
+
stateful: false
|
|
107
|
+
expected: |
|
|
108
|
+
Either:
|
|
109
|
+
- Return products (permissive mode)
|
|
110
|
+
- Return a structured error with INVALID_REQUEST (strict mode)
|
|
111
|
+
Both are acceptable. An unstructured error or crash is not.
|
|
112
|
+
sample_request: {}
|
|
113
|
+
validations:
|
|
114
|
+
- check: response_schema
|
|
115
|
+
description: "Response is a valid get-products-response or structured error"
|
|
116
|
+
|
|
117
|
+
- id: reversed_dates
|
|
118
|
+
title: "Reject end time before start time"
|
|
119
|
+
narrative: |
|
|
120
|
+
The buyer sends a create_media_buy with end_time before start_time.
|
|
121
|
+
The agent must reject this temporal inconsistency.
|
|
122
|
+
task: create_media_buy
|
|
123
|
+
requires_tool: create_media_buy
|
|
124
|
+
expect_error: true
|
|
125
|
+
stateful: false
|
|
126
|
+
expected: |
|
|
127
|
+
Reject the request with an error containing:
|
|
128
|
+
- code: INVALID_REQUEST
|
|
129
|
+
- recovery: correctable
|
|
130
|
+
- field: end_time (optional but recommended)
|
|
131
|
+
sample_request:
|
|
132
|
+
idempotency_key: "error-test-reversed-dates"
|
|
133
|
+
start_time: "2026-05-31T23:59:59Z"
|
|
134
|
+
end_time: "2026-05-01T00:00:00Z"
|
|
135
|
+
packages:
|
|
136
|
+
- product_id: "test-product"
|
|
137
|
+
budget: 1000
|
|
138
|
+
pricing_option_id: "test-pricing"
|
|
139
|
+
validations:
|
|
140
|
+
- check: error_code
|
|
141
|
+
value: "INVALID_REQUEST"
|
|
142
|
+
description: "Error code is INVALID_REQUEST for reversed date range"
|
|
143
|
+
|
|
144
|
+
- id: error_structure
|
|
145
|
+
title: "Error JSON structure validation"
|
|
146
|
+
narrative: |
|
|
147
|
+
Beyond returning the right error code, the error object itself must conform to the
|
|
148
|
+
AdCP error schema. Required fields: code (non-empty string), message (string).
|
|
149
|
+
Optional fields: recovery (transient|correctable|terminal), retry_after (non-negative
|
|
150
|
+
number), field (string), suggestion (string). Non-standard codes must use the X_ prefix.
|
|
151
|
+
|
|
152
|
+
steps:
|
|
153
|
+
- id: validate_error_shape
|
|
154
|
+
title: "Validate error JSON structure"
|
|
155
|
+
narrative: |
|
|
156
|
+
Provoke an error and inspect the JSON structure. The error object must have a
|
|
157
|
+
code and message at minimum. If recovery, retry_after, field, or suggestion are
|
|
158
|
+
present, they must have the correct types. Non-standard codes must use X_ prefix.
|
|
159
|
+
task: create_media_buy
|
|
160
|
+
requires_tool: create_media_buy
|
|
161
|
+
expect_error: true
|
|
162
|
+
stateful: false
|
|
163
|
+
expected: |
|
|
164
|
+
Error object with valid structure:
|
|
165
|
+
- code: non-empty string (standard AdCP code or X_-prefixed vendor code)
|
|
166
|
+
- message: string
|
|
167
|
+
- recovery: transient, correctable, or terminal (if present)
|
|
168
|
+
- retry_after: non-negative number (if present)
|
|
169
|
+
- field: string path to the offending field (if present)
|
|
170
|
+
- suggestion: string with remediation hint (if present)
|
|
171
|
+
sample_request:
|
|
172
|
+
idempotency_key: "error-test-structure"
|
|
173
|
+
start_time: "2026-05-01T00:00:00Z"
|
|
174
|
+
end_time: "2026-05-31T23:59:59Z"
|
|
175
|
+
packages:
|
|
176
|
+
- product_id: "NONEXISTENT_PRODUCT_ID_12345"
|
|
177
|
+
budget: 1000
|
|
178
|
+
pricing_option_id: "nonexistent-pricing"
|
|
179
|
+
validations:
|
|
180
|
+
- check: field_present
|
|
181
|
+
path: "adcp_error.code"
|
|
182
|
+
description: "Error has a code field"
|
|
183
|
+
- check: field_present
|
|
184
|
+
path: "adcp_error.message"
|
|
185
|
+
description: "Error has a message field"
|
|
186
|
+
|
|
187
|
+
- id: error_transport
|
|
188
|
+
title: "Error transport binding validation"
|
|
189
|
+
narrative: |
|
|
190
|
+
AdCP errors must be delivered through the correct MCP transport layers. The isError
|
|
191
|
+
flag signals the error to the MCP client, the JSON text content provides a fallback
|
|
192
|
+
for clients that do not support structuredContent, and structuredContent.adcp_error
|
|
193
|
+
provides the full typed error object.
|
|
194
|
+
|
|
195
|
+
Agents using the adcpError() helper from @adcp/client get all three layers automatically.
|
|
196
|
+
|
|
197
|
+
steps:
|
|
198
|
+
- id: validate_transport_binding
|
|
199
|
+
title: "Validate structuredContent.adcp_error binding"
|
|
200
|
+
narrative: |
|
|
201
|
+
Provoke an error and check that it appears in the correct transport layers:
|
|
202
|
+
- isError: true on the MCP response
|
|
203
|
+
- JSON text content with adcp_error (L2 fallback)
|
|
204
|
+
- structuredContent.adcp_error (L3 full compliance)
|
|
205
|
+
|
|
206
|
+
L2 is the minimum passing level. L3 is expected for agents using adcpError().
|
|
207
|
+
task: create_media_buy
|
|
208
|
+
requires_tool: create_media_buy
|
|
209
|
+
expect_error: true
|
|
210
|
+
stateful: false
|
|
211
|
+
expected: |
|
|
212
|
+
MCP response with:
|
|
213
|
+
- isError: true
|
|
214
|
+
- content[].text contains JSON with adcp_error (L2)
|
|
215
|
+
- structuredContent.adcp_error present (L3)
|
|
216
|
+
- Error code in structuredContent matches error code in text content (consistency)
|
|
217
|
+
sample_request:
|
|
218
|
+
idempotency_key: "error-test-transport"
|
|
219
|
+
start_time: "2026-05-01T00:00:00Z"
|
|
220
|
+
end_time: "2026-05-31T23:59:59Z"
|
|
221
|
+
packages:
|
|
222
|
+
- product_id: "NONEXISTENT_PRODUCT_ID_12345"
|
|
223
|
+
budget: 1000
|
|
224
|
+
pricing_option_id: "nonexistent-pricing"
|
|
225
|
+
validations:
|
|
226
|
+
- check: field_present
|
|
227
|
+
path: "adcp_error"
|
|
228
|
+
description: "structuredContent contains adcp_error object"
|
|
229
|
+
- check: error_code
|
|
230
|
+
value: "PRODUCT_NOT_FOUND"
|
|
231
|
+
description: "Error code is a valid AdCP standard code or X_-prefixed vendor code"
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
id: governance_content_standards
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
title: "Governance content standards"
|
|
4
|
+
category: governance_content_standards
|
|
5
|
+
summary: "Content standards discovery, calibration, and delivery validation."
|
|
6
|
+
track: governance
|
|
7
|
+
required_tools:
|
|
8
|
+
- list_content_standards
|
|
9
|
+
|
|
10
|
+
narrative: |
|
|
11
|
+
You operate a governance agent that manages content standards — brand safety
|
|
12
|
+
configurations that define what content is acceptable for a brand's ads.
|
|
13
|
+
Buyer agents discover available standards, retrieve their details, calibrate
|
|
14
|
+
content against them, and validate delivery records for compliance.
|
|
15
|
+
|
|
16
|
+
This storyboard covers two concerns: discovering and inspecting content
|
|
17
|
+
standards, and the active calibration/validation workflow where the governance
|
|
18
|
+
agent evaluates content artifacts against those standards.
|
|
19
|
+
|
|
20
|
+
agent:
|
|
21
|
+
interaction_model: governance
|
|
22
|
+
capabilities:
|
|
23
|
+
- manages_content_standards
|
|
24
|
+
- brand_safety
|
|
25
|
+
- content_calibration
|
|
26
|
+
examples:
|
|
27
|
+
- "Brand safety verification platforms"
|
|
28
|
+
- "Content classification services"
|
|
29
|
+
- "Publisher quality assurance tools"
|
|
30
|
+
|
|
31
|
+
caller:
|
|
32
|
+
role: buyer_agent
|
|
33
|
+
example: "Scope3 (DSP)"
|
|
34
|
+
|
|
35
|
+
prerequisites:
|
|
36
|
+
description: |
|
|
37
|
+
The caller needs a brand identity and content artifacts (URLs) for
|
|
38
|
+
calibration and validation testing. The governance agent must have at
|
|
39
|
+
least one content standards configuration available.
|
|
40
|
+
test_kit: "test-kits/acme-outdoor.yaml"
|
|
41
|
+
|
|
42
|
+
phases:
|
|
43
|
+
- id: content_standards_discovery
|
|
44
|
+
title: "Content standards discovery"
|
|
45
|
+
narrative: |
|
|
46
|
+
The buyer discovers what content standards configurations are available
|
|
47
|
+
from the governance agent, then retrieves the details of a specific
|
|
48
|
+
standard. This is the read-only exploration phase before any calibration
|
|
49
|
+
or validation occurs.
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- id: list_content_standards
|
|
53
|
+
title: "List available content standards"
|
|
54
|
+
narrative: |
|
|
55
|
+
The buyer asks the governance agent for all available content
|
|
56
|
+
standards configurations. These represent brand safety rule sets
|
|
57
|
+
that content can be evaluated against — GARM floor categories,
|
|
58
|
+
custom brand policies, or industry-specific compliance rules.
|
|
59
|
+
task: list_content_standards
|
|
60
|
+
stateful: false
|
|
61
|
+
expected: |
|
|
62
|
+
Return available content standards with:
|
|
63
|
+
- standards: array of content standards summaries
|
|
64
|
+
- Each standard has standards_id, name, and optionally provider
|
|
65
|
+
sample_request:
|
|
66
|
+
context: "Discover available brand safety configurations"
|
|
67
|
+
max_results: 10
|
|
68
|
+
validations:
|
|
69
|
+
- check: response_schema
|
|
70
|
+
description: "Response matches list-content-standards response schema"
|
|
71
|
+
- check: field_present
|
|
72
|
+
path: "standards"
|
|
73
|
+
description: "Response contains a standards array"
|
|
74
|
+
context_outputs:
|
|
75
|
+
- path: "standards[0].standards_id"
|
|
76
|
+
key: "standards_id"
|
|
77
|
+
|
|
78
|
+
- id: get_content_standards
|
|
79
|
+
title: "Get content standards detail"
|
|
80
|
+
requires_tool: get_content_standards
|
|
81
|
+
narrative: |
|
|
82
|
+
The buyer retrieves full details of a specific content standards
|
|
83
|
+
configuration discovered in the previous step. The response includes
|
|
84
|
+
the complete rule set — categories, thresholds, and feature
|
|
85
|
+
definitions that the governance agent uses to evaluate content.
|
|
86
|
+
task: get_content_standards
|
|
87
|
+
stateful: true
|
|
88
|
+
expected: |
|
|
89
|
+
Return the content standards configuration with:
|
|
90
|
+
- standards_id: matches the requested ID
|
|
91
|
+
- name: human-readable label
|
|
92
|
+
- features: array of evaluation criteria
|
|
93
|
+
sample_request:
|
|
94
|
+
standards_id: "$context.standards_id"
|
|
95
|
+
context_inputs:
|
|
96
|
+
- key: "standards_id"
|
|
97
|
+
inject_at: "standards_id"
|
|
98
|
+
validations:
|
|
99
|
+
- check: response_schema
|
|
100
|
+
description: "Response matches get-content-standards response schema"
|
|
101
|
+
- check: field_present
|
|
102
|
+
path: "standards_id"
|
|
103
|
+
description: "Response contains the standards ID"
|
|
104
|
+
|
|
105
|
+
- id: get_invalid_content_standards
|
|
106
|
+
title: "Get invalid content standards (error expected)"
|
|
107
|
+
requires_tool: get_content_standards
|
|
108
|
+
narrative: |
|
|
109
|
+
The buyer requests a content standards configuration that does not
|
|
110
|
+
exist. The governance agent should reject the request with an error,
|
|
111
|
+
rather than returning empty or fabricated data.
|
|
112
|
+
task: get_content_standards
|
|
113
|
+
stateful: false
|
|
114
|
+
expect_error: true
|
|
115
|
+
expected: |
|
|
116
|
+
Return an error indicating the standards ID does not exist.
|
|
117
|
+
sample_request:
|
|
118
|
+
standards_id: "INVALID_STANDARDS_ID_DOES_NOT_EXIST_12345"
|
|
119
|
+
validations:
|
|
120
|
+
- check: error_code
|
|
121
|
+
value: "not_found"
|
|
122
|
+
description: "Agent rejects an invalid standards_id"
|
|
123
|
+
|
|
124
|
+
- id: content_calibration
|
|
125
|
+
title: "Content calibration and delivery validation"
|
|
126
|
+
requires_tool: calibrate_content
|
|
127
|
+
narrative: |
|
|
128
|
+
With a content standards configuration identified, the buyer submits
|
|
129
|
+
content artifacts for calibration — asking the governance agent to
|
|
130
|
+
evaluate whether specific pages or content items meet the brand safety
|
|
131
|
+
requirements. After calibration, the buyer validates delivery records
|
|
132
|
+
to confirm that ads were served alongside compliant content.
|
|
133
|
+
|
|
134
|
+
steps:
|
|
135
|
+
- id: calibrate_content
|
|
136
|
+
title: "Calibrate content against standards"
|
|
137
|
+
narrative: |
|
|
138
|
+
The buyer submits content artifacts (web pages, articles) for
|
|
139
|
+
evaluation against a specific content standards configuration.
|
|
140
|
+
The governance agent classifies each artifact and returns
|
|
141
|
+
calibration results — pass/fail per artifact, with scores or
|
|
142
|
+
category assignments.
|
|
143
|
+
task: calibrate_content
|
|
144
|
+
stateful: true
|
|
145
|
+
expected: |
|
|
146
|
+
Return calibration results with:
|
|
147
|
+
- session_id: identifier for this calibration session
|
|
148
|
+
- session_status: completed or in_progress
|
|
149
|
+
- Per-artifact evaluation results (pending or evaluated)
|
|
150
|
+
sample_request:
|
|
151
|
+
context: "Evaluate sample content for brand safety"
|
|
152
|
+
standards_id: "$context.standards_id"
|
|
153
|
+
artifacts:
|
|
154
|
+
- artifact_id: "test-artifact-1"
|
|
155
|
+
artifact_type: "webpage"
|
|
156
|
+
url: "https://example.com/article/safe-content"
|
|
157
|
+
title: "Safe Test Article"
|
|
158
|
+
- artifact_id: "test-artifact-2"
|
|
159
|
+
artifact_type: "webpage"
|
|
160
|
+
url: "https://example.com/article/test-content"
|
|
161
|
+
title: "Another Test Article"
|
|
162
|
+
feedback_type: "binary"
|
|
163
|
+
context_inputs:
|
|
164
|
+
- key: "standards_id"
|
|
165
|
+
inject_at: "standards_id"
|
|
166
|
+
validations:
|
|
167
|
+
- check: response_schema
|
|
168
|
+
description: "Response matches calibrate-content response schema"
|
|
169
|
+
- check: field_present
|
|
170
|
+
path: "session_id"
|
|
171
|
+
description: "Response contains a calibration session ID"
|
|
172
|
+
context_outputs:
|
|
173
|
+
- path: "session_id"
|
|
174
|
+
key: "calibration_session_id"
|
|
175
|
+
|
|
176
|
+
- id: validate_content_delivery
|
|
177
|
+
title: "Validate content delivery records"
|
|
178
|
+
requires_tool: validate_content_delivery
|
|
179
|
+
narrative: |
|
|
180
|
+
The buyer submits delivery records — evidence that ads were served
|
|
181
|
+
alongside specific content — for compliance validation. The
|
|
182
|
+
governance agent checks each record against the content standards
|
|
183
|
+
and returns pass/fail results with a summary.
|
|
184
|
+
task: validate_content_delivery
|
|
185
|
+
stateful: true
|
|
186
|
+
expected: |
|
|
187
|
+
Return validation results with:
|
|
188
|
+
- summary.total_records: number of records validated
|
|
189
|
+
- summary.passed_records: number that met standards
|
|
190
|
+
- summary.failed_records: number that did not meet standards
|
|
191
|
+
- Per-record validation details
|
|
192
|
+
sample_request:
|
|
193
|
+
context: "Validate delivery records against content standards"
|
|
194
|
+
standards_id: "$context.standards_id"
|
|
195
|
+
records:
|
|
196
|
+
- record_id: "test-record-1"
|
|
197
|
+
artifact:
|
|
198
|
+
artifact_id: "test-artifact-1"
|
|
199
|
+
artifact_type: "webpage"
|
|
200
|
+
url: "https://example.com/article/delivered-content"
|
|
201
|
+
delivered_at: "2026-04-01T12:00:00Z"
|
|
202
|
+
context_inputs:
|
|
203
|
+
- key: "standards_id"
|
|
204
|
+
inject_at: "standards_id"
|
|
205
|
+
validations:
|
|
206
|
+
- check: response_schema
|
|
207
|
+
description: "Response matches validate-content-delivery response schema"
|
|
208
|
+
- check: field_present
|
|
209
|
+
path: "summary"
|
|
210
|
+
description: "Response contains a validation summary"
|
|
211
|
+
- check: field_present
|
|
212
|
+
path: "summary.total_records"
|
|
213
|
+
description: "Summary includes total record count"
|