@adcp/client 4.22.0 → 4.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/lib/index.d.ts +2 -2
  2. package/dist/lib/index.d.ts.map +1 -1
  3. package/dist/lib/index.js.map +1 -1
  4. package/dist/lib/server/index.d.ts +1 -1
  5. package/dist/lib/server/index.d.ts.map +1 -1
  6. package/dist/lib/server/serve.d.ts +32 -4
  7. package/dist/lib/server/serve.d.ts.map +1 -1
  8. package/dist/lib/server/serve.js +12 -4
  9. package/dist/lib/server/serve.js.map +1 -1
  10. package/dist/lib/testing/compliance/comply.d.ts +22 -5
  11. package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
  12. package/dist/lib/testing/compliance/comply.js +242 -276
  13. package/dist/lib/testing/compliance/comply.js.map +1 -1
  14. package/dist/lib/testing/compliance/index.d.ts +1 -0
  15. package/dist/lib/testing/compliance/index.d.ts.map +1 -1
  16. package/dist/lib/testing/compliance/index.js +6 -1
  17. package/dist/lib/testing/compliance/index.js.map +1 -1
  18. package/dist/lib/testing/compliance/platform-storyboards.d.ts +44 -0
  19. package/dist/lib/testing/compliance/platform-storyboards.d.ts.map +1 -0
  20. package/dist/lib/testing/compliance/platform-storyboards.js +230 -0
  21. package/dist/lib/testing/compliance/platform-storyboards.js.map +1 -0
  22. package/dist/lib/testing/compliance/storyboard-tracks.d.ts +2 -9
  23. package/dist/lib/testing/compliance/storyboard-tracks.d.ts.map +1 -1
  24. package/dist/lib/testing/compliance/storyboard-tracks.js +4 -44
  25. package/dist/lib/testing/compliance/storyboard-tracks.js.map +1 -1
  26. package/dist/lib/testing/index.d.ts +1 -1
  27. package/dist/lib/testing/index.d.ts.map +1 -1
  28. package/dist/lib/testing/index.js +6 -1
  29. package/dist/lib/testing/index.js.map +1 -1
  30. package/dist/lib/types/core.generated.d.ts +241 -2
  31. package/dist/lib/types/core.generated.d.ts.map +1 -1
  32. package/dist/lib/types/core.generated.js +1 -1
  33. package/dist/lib/types/schemas.generated.d.ts +3380 -3154
  34. package/dist/lib/types/schemas.generated.d.ts.map +1 -1
  35. package/dist/lib/types/schemas.generated.js +220 -115
  36. package/dist/lib/types/schemas.generated.js.map +1 -1
  37. package/dist/lib/types/tools.generated.d.ts +267 -74
  38. package/dist/lib/types/tools.generated.d.ts.map +1 -1
  39. package/dist/lib/version.d.ts +3 -3
  40. package/dist/lib/version.js +3 -3
  41. package/docs/guides/BUILD-AN-AGENT.md +5 -3
  42. package/docs/llms.txt +48 -32
  43. package/examples/signals-agent.ts +3 -2
  44. package/package.json +1 -1
  45. package/storyboards/audience_sync.yaml +18 -29
  46. package/storyboards/behavioral_analysis.yaml +40 -72
  47. package/storyboards/brand_rights.yaml +172 -75
  48. package/storyboards/campaign_governance_conditions.yaml +187 -0
  49. package/storyboards/campaign_governance_delivery.yaml +231 -0
  50. package/storyboards/campaign_governance_denied.yaml +135 -0
  51. package/storyboards/capability_discovery.yaml +106 -0
  52. package/storyboards/content_standards.yaml +251 -0
  53. package/storyboards/creative_ad_server.yaml +108 -16
  54. package/storyboards/creative_lifecycle.yaml +284 -0
  55. package/storyboards/creative_sales_agent.yaml +2 -6
  56. package/storyboards/creative_template.yaml +1 -5
  57. package/storyboards/error_compliance.yaml +105 -108
  58. package/storyboards/media_buy_catalog_creative.yaml +6 -4
  59. package/storyboards/media_buy_governance_escalation.yaml +9 -5
  60. package/storyboards/media_buy_guaranteed_approval.yaml +9 -7
  61. package/storyboards/media_buy_non_guaranteed.yaml +7 -6
  62. package/storyboards/media_buy_proposal_mode.yaml +9 -8
  63. package/storyboards/media_buy_seller.yaml +153 -165
  64. package/storyboards/media_buy_state_machine.yaml +100 -99
  65. package/storyboards/property_governance.yaml +239 -0
  66. package/storyboards/schema.yaml +2 -2
  67. package/storyboards/schema_validation.yaml +58 -51
  68. package/storyboards/si_session.yaml +99 -317
  69. package/storyboards/signal_marketplace.yaml +6 -5
  70. package/storyboards/signal_owned.yaml +5 -5
  71. package/storyboards/social_platform.yaml +274 -0
  72. package/storyboards/governance_content_standards.yaml +0 -213
  73. package/storyboards/governance_property_lists.yaml +0 -372
@@ -1,10 +1,9 @@
1
1
  id: schema_validation
2
2
  version: "1.0.0"
3
3
  title: "Schema compliance and temporal validation"
4
- category: media_buy_seller
5
- track: core
4
+ category: schema_validation
6
5
  summary: "Validates that agent responses conform to AdCP schemas and that temporal constraints are enforced."
7
-
6
+ track: core
8
7
  required_tools:
9
8
  - get_products
10
9
 
@@ -29,13 +28,18 @@ caller:
29
28
  role: buyer_agent
30
29
  example: "Compliance test harness"
31
30
 
31
+ prerequisites:
32
+ description: |
33
+ The caller needs a brand identity for product discovery requests.
34
+ test_kit: "test-kits/acme-outdoor.yaml"
35
+
32
36
  phases:
33
37
  - id: schema_compliance
34
38
  title: "Response schema compliance"
35
39
  narrative: |
36
40
  The buyer sends a standard get_products request and validates that the response
37
41
  matches the published schema. Each product must have the required fields defined
38
- in the AdCP spec: product_id, delivery_type, and pricing information.
42
+ in the AdCP spec.
39
43
 
40
44
  steps:
41
45
  - id: get_products_schema
@@ -45,7 +49,10 @@ phases:
45
49
  must conform to the get-products-response.json schema, with required v3 fields
46
50
  present.
47
51
  task: get_products
48
- requires_tool: get_products
52
+ schema_ref: "media-buy/get-products-request.json"
53
+ response_schema_ref: "media-buy/get-products-response.json"
54
+ doc_ref: "/media-buy/task-reference/get_products"
55
+ comply_scenario: schema_compliance
49
56
  stateful: false
50
57
  expected: |
51
58
  Return products matching the brief. Each product must have:
@@ -53,11 +60,13 @@ phases:
53
60
  - name: human-readable name
54
61
  - delivery_type: guaranteed or non_guaranteed
55
62
  - pricing_options: at least one pricing option
63
+
56
64
  sample_request:
57
65
  buying_mode: "brief"
58
66
  brief: "Show all available advertising products"
59
67
  brand:
60
68
  domain: "acmeoutdoor.com"
69
+
61
70
  validations:
62
71
  - check: response_schema
63
72
  description: "Response matches get-products-response.json schema"
@@ -70,32 +79,31 @@ phases:
70
79
  - check: field_present
71
80
  path: "products[0].delivery_type"
72
81
  description: "Each product declares guaranteed or non_guaranteed delivery"
73
- - check: field_present
74
- path: "products[0].name"
75
- description: "Each product has a name"
76
82
 
77
83
  - id: pricing_options_present
78
84
  title: "Validate pricing options structure"
79
85
  narrative: |
80
- Check that products include pricing_options with the required fields:
81
- pricing_option_id and pricing_model. These are essential for buyers to
86
+ Verify that products include pricing_options with the required fields:
87
+ pricing_option_id and pricing_model. These are required for buyers to
82
88
  construct valid create_media_buy requests.
83
89
  task: get_products
84
- requires_tool: get_products
90
+ schema_ref: "media-buy/get-products-request.json"
91
+ response_schema_ref: "media-buy/get-products-response.json"
92
+ doc_ref: "/media-buy/task-reference/get_products"
93
+ comply_scenario: schema_compliance
85
94
  stateful: false
86
95
  expected: |
87
96
  Products include pricing_options with:
88
97
  - pricing_option_id: unique identifier for the pricing option
89
- - pricing_model: CPM, CPC, flat_fee, etc.
98
+ - pricing_model: CPM, CPC, flat_rate, etc.
99
+
90
100
  sample_request:
91
101
  buying_mode: "brief"
92
- brief: "Products with detailed pricing information"
102
+ brief: "Premium display inventory with pricing details"
93
103
  brand:
94
104
  domain: "acmeoutdoor.com"
105
+
95
106
  validations:
96
- - check: field_present
97
- path: "products[0].pricing_options"
98
- description: "Products include pricing_options array"
99
107
  - check: field_present
100
108
  path: "products[0].pricing_options[0].pricing_option_id"
101
109
  description: "Pricing options have a pricing_option_id"
@@ -106,61 +114,60 @@ phases:
106
114
  - id: temporal_validation
107
115
  title: "Temporal constraint enforcement"
108
116
  narrative: |
109
- Flight dates are a fundamental constraint in media buying. The start date must come
110
- before the end date, and agents should validate this before accepting a media buy.
111
- Some agents also reject start dates in the past, though this is platform-dependent.
117
+ The buyer sends media buy requests with invalid temporal constraints. The agent
118
+ must reject reversed dates (end before start) and handle past start dates
119
+ appropriately.
112
120
 
113
121
  steps:
114
122
  - id: reversed_dates
115
- title: "Reject reversed date range"
123
+ title: "Reject reversed flight dates"
116
124
  narrative: |
117
- Send a create_media_buy with end_time before start_time. The agent must reject
118
- this a campaign cannot end before it starts.
125
+ Send a create_media_buy request where end_time is before start_time. The agent
126
+ must reject this with an INVALID_REQUEST error.
119
127
  task: create_media_buy
120
- requires_tool: create_media_buy
121
- expect_error: true
128
+ schema_ref: "media-buy/create-media-buy-request.json"
129
+ response_schema_ref: "media-buy/create-media-buy-response.json"
130
+ doc_ref: "/media-buy/task-reference/create_media_buy"
131
+ comply_scenario: temporal_validation
122
132
  stateful: false
123
133
  expected: |
124
- Reject with an error containing:
125
- - code: INVALID_REQUEST
126
- - recovery: correctable
127
- The agent must not accept a media buy where end_time precedes start_time.
134
+ Reject the request with:
135
+ - Error code: INVALID_REQUEST
136
+ - Message indicating the date constraint violation
137
+
128
138
  sample_request:
129
- idempotency_key: "temporal-test-reversed"
130
- start_time: "2026-05-31T23:59:59Z"
131
- end_time: "2026-05-01T00:00:00Z"
139
+ start_time: "2026-12-31T00:00:00Z"
140
+ end_time: "2026-01-01T00:00:00Z"
132
141
  packages:
133
142
  - product_id: "test-product"
134
- budget: 1000
143
+ budget: 10000
135
144
  pricing_option_id: "test-pricing"
145
+
136
146
  validations:
137
- - check: error_code
138
- value: "INVALID_REQUEST"
139
- description: "Error code is INVALID_REQUEST for reversed date range"
147
+ - check: field_present
148
+ path: "errors"
149
+ description: "Response contains an error for reversed dates"
140
150
 
141
151
  - id: past_start_date
142
- title: "Handle start date in the past"
152
+ title: "Handle past start date"
143
153
  narrative: |
144
- Send a create_media_buy with a start_time in the past. Some agents reject this
145
- outright, others accept it and auto-adjust the start date. Both behaviors are
146
- acceptable — what matters is that the response is structured and intentional.
154
+ Send a create_media_buy request with a start_time in the past. The agent
155
+ should either reject the request or auto-adjust the start date forward.
147
156
  task: create_media_buy
148
- requires_tool: create_media_buy
157
+ schema_ref: "media-buy/create-media-buy-request.json"
158
+ response_schema_ref: "media-buy/create-media-buy-response.json"
159
+ doc_ref: "/media-buy/task-reference/create_media_buy"
160
+ comply_scenario: temporal_validation
149
161
  stateful: false
150
162
  expected: |
151
- Either:
152
- - Reject with INVALID_REQUEST (strict validation)
153
- - Accept and auto-adjust the start date (permissive)
154
- Both are acceptable. The agent should not silently accept a past date without
155
- adjusting it or warning the buyer.
163
+ Either reject with INVALID_REQUEST or accept with adjusted dates.
164
+ Both behaviors are valid the key is that the agent does not silently
165
+ accept a past start date without acknowledgment.
166
+
156
167
  sample_request:
157
- idempotency_key: "temporal-test-past-start"
158
- start_time: "2025-01-01T00:00:00Z"
168
+ start_time: "2020-01-01T00:00:00Z"
159
169
  end_time: "2026-12-31T23:59:59Z"
160
170
  packages:
161
171
  - product_id: "test-product"
162
- budget: 1000
172
+ budget: 10000
163
173
  pricing_option_id: "test-pricing"
164
- validations:
165
- - check: response_schema
166
- description: "Response is a valid create-media-buy-response or structured error"