@adcp/client 3.3.3 → 3.5.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 (108) hide show
  1. package/dist/lib/auth/index.d.ts +1 -7
  2. package/dist/lib/auth/index.d.ts.map +1 -1
  3. package/dist/lib/auth/index.js +2 -33
  4. package/dist/lib/auth/index.js.map +1 -1
  5. package/dist/lib/core/ADCPMultiAgentClient.d.ts +5 -4
  6. package/dist/lib/core/ADCPMultiAgentClient.d.ts.map +1 -1
  7. package/dist/lib/core/ADCPMultiAgentClient.js +7 -6
  8. package/dist/lib/core/ADCPMultiAgentClient.js.map +1 -1
  9. package/dist/lib/core/AgentClient.d.ts +29 -1
  10. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  11. package/dist/lib/core/AgentClient.js +51 -2
  12. package/dist/lib/core/AgentClient.js.map +1 -1
  13. package/dist/lib/core/AsyncHandler.d.ts +23 -27
  14. package/dist/lib/core/AsyncHandler.d.ts.map +1 -1
  15. package/dist/lib/core/AsyncHandler.js +9 -19
  16. package/dist/lib/core/AsyncHandler.js.map +1 -1
  17. package/dist/lib/core/ConfigurationManager.d.ts.map +1 -1
  18. package/dist/lib/core/ConfigurationManager.js +5 -14
  19. package/dist/lib/core/ConfigurationManager.js.map +1 -1
  20. package/dist/lib/core/CreativeAgentClient.js +1 -1
  21. package/dist/lib/core/CreativeAgentClient.js.map +1 -1
  22. package/dist/lib/core/SingleAgentClient.d.ts +126 -22
  23. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  24. package/dist/lib/core/SingleAgentClient.js +372 -84
  25. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  26. package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
  27. package/dist/lib/core/TaskExecutor.js +3 -0
  28. package/dist/lib/core/TaskExecutor.js.map +1 -1
  29. package/dist/lib/discovery/property-crawler.js +1 -1
  30. package/dist/lib/discovery/property-crawler.js.map +1 -1
  31. package/dist/lib/index.d.ts +2 -1
  32. package/dist/lib/index.d.ts.map +1 -1
  33. package/dist/lib/index.js +36 -1
  34. package/dist/lib/index.js.map +1 -1
  35. package/dist/lib/testing/agent-tester.d.ts +33 -0
  36. package/dist/lib/testing/agent-tester.d.ts.map +1 -0
  37. package/dist/lib/testing/agent-tester.js +211 -0
  38. package/dist/lib/testing/agent-tester.js.map +1 -0
  39. package/dist/lib/testing/client.d.ts +54 -0
  40. package/dist/lib/testing/client.d.ts.map +1 -0
  41. package/dist/lib/testing/client.js +293 -0
  42. package/dist/lib/testing/client.js.map +1 -0
  43. package/dist/lib/testing/formatter.d.ts +17 -0
  44. package/dist/lib/testing/formatter.d.ts.map +1 -0
  45. package/dist/lib/testing/formatter.js +79 -0
  46. package/dist/lib/testing/formatter.js.map +1 -0
  47. package/dist/lib/testing/index.d.ts +1 -0
  48. package/dist/lib/testing/index.d.ts.map +1 -1
  49. package/dist/lib/testing/index.js +26 -1
  50. package/dist/lib/testing/index.js.map +1 -1
  51. package/dist/lib/testing/scenarios/creative.d.ts +24 -0
  52. package/dist/lib/testing/scenarios/creative.d.ts.map +1 -0
  53. package/dist/lib/testing/scenarios/creative.js +224 -0
  54. package/dist/lib/testing/scenarios/creative.js.map +1 -0
  55. package/dist/lib/testing/scenarios/discovery.d.ts +15 -0
  56. package/dist/lib/testing/scenarios/discovery.d.ts.map +1 -0
  57. package/dist/lib/testing/scenarios/discovery.js +66 -0
  58. package/dist/lib/testing/scenarios/discovery.js.map +1 -0
  59. package/dist/lib/testing/scenarios/edge-cases.d.ts +64 -0
  60. package/dist/lib/testing/scenarios/edge-cases.d.ts.map +1 -0
  61. package/dist/lib/testing/scenarios/edge-cases.js +610 -0
  62. package/dist/lib/testing/scenarios/edge-cases.js.map +1 -0
  63. package/dist/lib/testing/scenarios/health.d.ts +12 -0
  64. package/dist/lib/testing/scenarios/health.d.ts.map +1 -0
  65. package/dist/lib/testing/scenarios/health.js +21 -0
  66. package/dist/lib/testing/scenarios/health.js.map +1 -0
  67. package/dist/lib/testing/scenarios/index.d.ts +12 -0
  68. package/dist/lib/testing/scenarios/index.d.ts.map +1 -0
  69. package/dist/lib/testing/scenarios/index.js +38 -0
  70. package/dist/lib/testing/scenarios/index.js.map +1 -0
  71. package/dist/lib/testing/scenarios/media-buy.d.ts +59 -0
  72. package/dist/lib/testing/scenarios/media-buy.d.ts.map +1 -0
  73. package/dist/lib/testing/scenarios/media-buy.js +422 -0
  74. package/dist/lib/testing/scenarios/media-buy.js.map +1 -0
  75. package/dist/lib/testing/scenarios/signals.d.ts +26 -0
  76. package/dist/lib/testing/scenarios/signals.d.ts.map +1 -0
  77. package/dist/lib/testing/scenarios/signals.js +227 -0
  78. package/dist/lib/testing/scenarios/signals.js.map +1 -0
  79. package/dist/lib/testing/test-helpers.d.ts.map +1 -1
  80. package/dist/lib/testing/test-helpers.js +2 -6
  81. package/dist/lib/testing/test-helpers.js.map +1 -1
  82. package/dist/lib/testing/types.d.ts +92 -0
  83. package/dist/lib/testing/types.d.ts.map +1 -0
  84. package/dist/lib/testing/types.js +6 -0
  85. package/dist/lib/testing/types.js.map +1 -0
  86. package/dist/lib/types/adcp.d.ts +14 -29
  87. package/dist/lib/types/adcp.d.ts.map +1 -1
  88. package/dist/lib/types/core.generated.d.ts +489 -39
  89. package/dist/lib/types/core.generated.d.ts.map +1 -1
  90. package/dist/lib/types/core.generated.js +2 -2
  91. package/dist/lib/types/index.d.ts +1 -1
  92. package/dist/lib/types/index.d.ts.map +1 -1
  93. package/dist/lib/types/index.js.map +1 -1
  94. package/dist/lib/types/schemas.generated.d.ts +834 -214
  95. package/dist/lib/types/schemas.generated.d.ts.map +1 -1
  96. package/dist/lib/types/schemas.generated.js +155 -137
  97. package/dist/lib/types/schemas.generated.js.map +1 -1
  98. package/dist/lib/types/tools.generated.d.ts +297 -216
  99. package/dist/lib/types/tools.generated.d.ts.map +1 -1
  100. package/dist/lib/types/tools.generated.js +1 -1
  101. package/dist/lib/types/tools.generated.js.map +1 -1
  102. package/dist/lib/utils/typeGuards.d.ts +147 -0
  103. package/dist/lib/utils/typeGuards.d.ts.map +1 -0
  104. package/dist/lib/utils/typeGuards.js +240 -0
  105. package/dist/lib/utils/typeGuards.js.map +1 -0
  106. package/dist/lib/version.d.ts +3 -3
  107. package/dist/lib/version.js +3 -3
  108. package/package.json +1 -1
@@ -0,0 +1,610 @@
1
+ "use strict";
2
+ /**
3
+ * Edge Case Testing Scenarios
4
+ *
5
+ * Tests various edge cases, error handling, and validation:
6
+ * - Error handling (invalid inputs, non-existent IDs)
7
+ * - Schema validation (negative values, invalid enums)
8
+ * - Pricing edge cases (auction vs fixed, min spend, floor prices)
9
+ * - Behavior analysis
10
+ * - Temporal validation
11
+ * - Response consistency
12
+ *
13
+ * These scenarios are designed to find bugs and ensure agents
14
+ * properly handle edge cases according to the AdCP spec.
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.testErrorHandling = testErrorHandling;
18
+ exports.testValidation = testValidation;
19
+ exports.testPricingEdgeCases = testPricingEdgeCases;
20
+ exports.testTemporalValidation = testTemporalValidation;
21
+ exports.testBehaviorAnalysis = testBehaviorAnalysis;
22
+ exports.testResponseConsistency = testResponseConsistency;
23
+ const client_1 = require("../client");
24
+ const discovery_1 = require("./discovery");
25
+ /**
26
+ * Test: Error Handling
27
+ * Verifies the agent returns proper discriminated union error responses
28
+ */
29
+ async function testErrorHandling(agentUrl, options) {
30
+ const steps = [];
31
+ const client = (0, client_1.createTestClient)(agentUrl, options.protocol || 'mcp', options);
32
+ const { profile, step: profileStep } = await (0, client_1.discoverAgentProfile)(client);
33
+ steps.push(profileStep);
34
+ if (!profileStep.passed) {
35
+ return { steps, profile };
36
+ }
37
+ // Test 1: Invalid product_id in create_media_buy
38
+ if (profile.tools.includes('create_media_buy')) {
39
+ const { result, step } = await (0, client_1.runStep)('Invalid product_id error response', 'create_media_buy', async () => client.executeTask('create_media_buy', {
40
+ buyer_ref: `error-test-${Date.now()}`,
41
+ brand_manifest: {
42
+ name: 'Error Test Brand',
43
+ url: 'https://test.example.com',
44
+ },
45
+ start_time: new Date(Date.now() + 86400000).toISOString(),
46
+ end_time: new Date(Date.now() + 604800000).toISOString(),
47
+ packages: [
48
+ {
49
+ buyer_ref: 'pkg-error-test',
50
+ product_id: 'NONEXISTENT_PRODUCT_ID_12345',
51
+ budget: 1000,
52
+ pricing_option_id: 'nonexistent-pricing',
53
+ },
54
+ ],
55
+ }));
56
+ if (result && !result.success && result.error) {
57
+ step.passed = true;
58
+ step.details = 'Agent correctly returned error for invalid product_id';
59
+ step.response_preview = JSON.stringify({ error: result.error }, null, 2);
60
+ }
61
+ else if (result?.success) {
62
+ step.passed = false;
63
+ step.error = 'Agent accepted invalid product_id - should have returned error';
64
+ }
65
+ else {
66
+ step.passed = false;
67
+ step.error = 'Agent returned neither success nor proper error response';
68
+ }
69
+ steps.push(step);
70
+ }
71
+ // Test 2: Missing required field in get_products
72
+ if (profile.tools.includes('get_products')) {
73
+ const { result, step } = await (0, client_1.runStep)('Empty request handling', 'get_products', async () => client.executeTask('get_products', {}));
74
+ if (result?.success) {
75
+ step.passed = true;
76
+ step.details = 'Agent accepts empty get_products request (permissive)';
77
+ }
78
+ else if (result && !result.success && result.error) {
79
+ step.passed = true;
80
+ step.details = 'Agent requires brief/brand_manifest (stricter validation)';
81
+ step.response_preview = JSON.stringify({ error: result.error }, null, 2);
82
+ }
83
+ else {
84
+ step.passed = false;
85
+ step.error = 'Unclear response - neither success nor proper error';
86
+ }
87
+ steps.push(step);
88
+ }
89
+ // Test 3: Invalid format_id in sync_creatives
90
+ if (profile.tools.includes('sync_creatives')) {
91
+ const { result, step } = await (0, client_1.runStep)('Invalid format_id error response', 'sync_creatives', async () => client.executeTask('sync_creatives', {
92
+ creatives: [
93
+ {
94
+ creative_id: `invalid-format-test-${Date.now()}`,
95
+ name: 'Invalid Format Test',
96
+ format_id: 'TOTALLY_INVALID_FORMAT_ID_999',
97
+ assets: {
98
+ primary: {
99
+ url: 'https://via.placeholder.com/300x250',
100
+ width: 300,
101
+ height: 250,
102
+ format: 'png',
103
+ },
104
+ },
105
+ },
106
+ ],
107
+ }));
108
+ if (result && !result.success && result.error) {
109
+ step.passed = true;
110
+ step.details = 'Agent correctly rejected invalid format_id';
111
+ step.response_preview = JSON.stringify({ error: result.error }, null, 2);
112
+ }
113
+ else if (result?.success) {
114
+ step.passed = true;
115
+ step.details = 'Agent accepts unknown format_ids (permissive mode)';
116
+ }
117
+ else {
118
+ step.passed = false;
119
+ step.error = 'Unclear response for invalid format_id';
120
+ }
121
+ steps.push(step);
122
+ }
123
+ // Test 4: get_media_buy_delivery with non-existent media_buy_id
124
+ if (profile.tools.includes('get_media_buy_delivery')) {
125
+ const { result, step } = await (0, client_1.runStep)('Non-existent media_buy_id error', 'get_media_buy_delivery', async () => client.executeTask('get_media_buy_delivery', {
126
+ media_buy_ids: ['NONEXISTENT_MEDIA_BUY_ID_99999'],
127
+ }));
128
+ if (result && !result.success && result.error) {
129
+ step.passed = true;
130
+ step.details = 'Agent correctly returned error for non-existent media buy';
131
+ step.response_preview = JSON.stringify({ error: result.error }, null, 2);
132
+ }
133
+ else if (result?.success) {
134
+ const data = result.data;
135
+ const deliveries = data?.deliveries || data?.media_buys || [];
136
+ if (deliveries.length === 0) {
137
+ step.passed = true;
138
+ step.details = 'Agent returned empty deliveries for non-existent media buy';
139
+ }
140
+ else {
141
+ step.passed = false;
142
+ step.error = 'Agent returned deliveries for non-existent media_buy_id';
143
+ }
144
+ }
145
+ else {
146
+ step.passed = false;
147
+ step.error = 'Unclear response for non-existent media_buy_id';
148
+ }
149
+ steps.push(step);
150
+ }
151
+ return { steps, profile };
152
+ }
153
+ /**
154
+ * Test: Validation
155
+ * Tests that agents properly validate inputs and reject malformed requests
156
+ */
157
+ async function testValidation(agentUrl, options) {
158
+ const steps = [];
159
+ const client = (0, client_1.createTestClient)(agentUrl, options.protocol || 'mcp', options);
160
+ const { profile, step: profileStep } = await (0, client_1.discoverAgentProfile)(client);
161
+ steps.push(profileStep);
162
+ if (!profileStep.passed) {
163
+ return { steps, profile };
164
+ }
165
+ // Test 1: Invalid enum value for pacing
166
+ if (profile.tools.includes('create_media_buy')) {
167
+ const { result, step } = await (0, client_1.runStep)('Invalid pacing enum value', 'create_media_buy', async () => client.executeTask('create_media_buy', {
168
+ buyer_ref: `validation-test-${Date.now()}`,
169
+ brand_manifest: { name: 'Validation Test', url: 'https://test.example.com' },
170
+ start_time: new Date(Date.now() + 86400000).toISOString(),
171
+ end_time: new Date(Date.now() + 604800000).toISOString(),
172
+ packages: [
173
+ {
174
+ buyer_ref: 'pkg-validation',
175
+ product_id: 'test-product',
176
+ budget: 1000,
177
+ pricing_option_id: 'test-pricing',
178
+ pacing: 'INVALID_PACING_VALUE',
179
+ },
180
+ ],
181
+ }));
182
+ if (result && !result.success && result.error) {
183
+ step.passed = true;
184
+ step.details = 'Agent rejected invalid pacing enum value';
185
+ }
186
+ else if (result?.success) {
187
+ step.passed = false;
188
+ step.error = 'Agent accepted invalid pacing value - should validate enums';
189
+ }
190
+ else {
191
+ step.passed = false;
192
+ step.error = 'Unclear validation response';
193
+ }
194
+ steps.push(step);
195
+ }
196
+ // Test 2: Negative budget (definitely invalid)
197
+ if (profile.tools.includes('create_media_buy')) {
198
+ const { result, step } = await (0, client_1.runStep)('Negative budget rejection', 'create_media_buy', async () => client.executeTask('create_media_buy', {
199
+ buyer_ref: `negative-budget-test-${Date.now()}`,
200
+ brand_manifest: { name: 'Negative Budget Test', url: 'https://test.example.com' },
201
+ start_time: new Date(Date.now() + 86400000).toISOString(),
202
+ end_time: new Date(Date.now() + 604800000).toISOString(),
203
+ packages: [
204
+ {
205
+ buyer_ref: 'pkg-negative',
206
+ product_id: 'test-product',
207
+ budget: -500,
208
+ pricing_option_id: 'test-pricing',
209
+ },
210
+ ],
211
+ }));
212
+ if (result && !result.success && result.error) {
213
+ step.passed = true;
214
+ step.details = 'Agent correctly rejected negative budget';
215
+ }
216
+ else if (result?.success) {
217
+ step.passed = false;
218
+ step.error = 'CRITICAL: Agent accepted negative budget - must validate minimum: 0';
219
+ }
220
+ else {
221
+ step.passed = false;
222
+ step.error = 'Unclear response for negative budget';
223
+ }
224
+ steps.push(step);
225
+ }
226
+ // Test 3: Invalid creative weight (> 100)
227
+ if (profile.tools.includes('sync_creatives')) {
228
+ const { result, step } = await (0, client_1.runStep)('Invalid creative weight (> 100)', 'sync_creatives', async () => client.executeTask('sync_creatives', {
229
+ creatives: [
230
+ {
231
+ creative_id: `weight-test-${Date.now()}`,
232
+ name: 'Weight Test Creative',
233
+ format_id: 'display_300x250',
234
+ weight: 150,
235
+ assets: {
236
+ primary: {
237
+ url: 'https://via.placeholder.com/300x250',
238
+ width: 300,
239
+ height: 250,
240
+ format: 'png',
241
+ },
242
+ },
243
+ },
244
+ ],
245
+ }));
246
+ if (result && !result.success && result.error) {
247
+ step.passed = true;
248
+ step.details = 'Agent rejected weight > 100';
249
+ }
250
+ else if (result?.success) {
251
+ step.passed = false;
252
+ step.error = 'Agent accepted weight > 100 - should validate maximum: 100';
253
+ }
254
+ else {
255
+ step.passed = false;
256
+ step.error = 'Unclear response for invalid weight';
257
+ }
258
+ steps.push(step);
259
+ }
260
+ // Test 4: Empty creatives array
261
+ if (profile.tools.includes('sync_creatives')) {
262
+ const { result, step } = await (0, client_1.runStep)('Empty creatives array handling', 'sync_creatives', async () => client.executeTask('sync_creatives', {
263
+ creatives: [],
264
+ }));
265
+ if (result && !result.success && result.error) {
266
+ step.passed = true;
267
+ step.details = 'Agent rejected empty creatives array';
268
+ }
269
+ else if (result?.success) {
270
+ step.passed = true;
271
+ step.details = 'Agent accepts empty creatives array (returns empty result)';
272
+ }
273
+ else {
274
+ step.passed = false;
275
+ step.error = 'Unclear response for empty creatives array';
276
+ }
277
+ steps.push(step);
278
+ }
279
+ return { steps, profile };
280
+ }
281
+ /**
282
+ * Test: Pricing Edge Cases
283
+ * Tests auction vs fixed pricing, min spend requirements, bid_price handling
284
+ */
285
+ async function testPricingEdgeCases(agentUrl, options) {
286
+ const steps = [];
287
+ const client = (0, client_1.createTestClient)(agentUrl, options.protocol || 'mcp', options);
288
+ const { steps: discoverySteps, profile } = await (0, discovery_1.testDiscovery)(agentUrl, options);
289
+ steps.push(...discoverySteps);
290
+ if (!profile?.tools.includes('create_media_buy') || !profile?.tools.includes('get_products')) {
291
+ steps.push({
292
+ step: 'Pricing edge cases',
293
+ passed: false,
294
+ duration_ms: 0,
295
+ error: 'Agent does not support create_media_buy or get_products',
296
+ });
297
+ return { steps, profile };
298
+ }
299
+ // Get products to find actual pricing options
300
+ const { result: productsResult } = await (0, client_1.runStep)('Fetch products for pricing analysis', 'get_products', async () => client.executeTask('get_products', {
301
+ brief: 'Show all products with pricing details',
302
+ brand_manifest: options.brand_manifest || {
303
+ name: 'Pricing Test',
304
+ url: 'https://test.example.com',
305
+ },
306
+ }));
307
+ const products = productsResult?.data?.products;
308
+ if (!products?.length) {
309
+ steps.push({
310
+ step: 'Pricing edge cases',
311
+ passed: false,
312
+ duration_ms: 0,
313
+ error: 'No products available for pricing tests',
314
+ });
315
+ return { steps, profile };
316
+ }
317
+ // Analyze products for auction vs fixed pricing
318
+ const auctionProducts = [];
319
+ const fixedProducts = [];
320
+ const productsWithMinSpend = [];
321
+ for (const product of products) {
322
+ for (const po of product.pricing_options || []) {
323
+ if (po.is_fixed === false || po.floor_price !== undefined || po.price_guidance !== undefined) {
324
+ auctionProducts.push({ product, pricingOption: po });
325
+ }
326
+ else if (po.rate !== undefined) {
327
+ fixedProducts.push({ product, pricingOption: po });
328
+ }
329
+ if (po.min_spend_per_package !== undefined && po.min_spend_per_package > 0) {
330
+ productsWithMinSpend.push({
331
+ product,
332
+ pricingOption: po,
333
+ minSpend: po.min_spend_per_package,
334
+ });
335
+ }
336
+ }
337
+ }
338
+ steps.push({
339
+ step: 'Analyze pricing options',
340
+ passed: true,
341
+ duration_ms: 0,
342
+ details: `Found ${fixedProducts.length} fixed, ${auctionProducts.length} auction, ${productsWithMinSpend.length} with min spend`,
343
+ });
344
+ // Test 1: Auction pricing without bid_price (should fail)
345
+ if (auctionProducts.length > 0) {
346
+ const { product, pricingOption } = auctionProducts[0];
347
+ const { result, step } = await (0, client_1.runStep)('Auction pricing without bid_price', 'create_media_buy', async () => client.executeTask('create_media_buy', {
348
+ buyer_ref: `auction-no-bid-${Date.now()}`,
349
+ brand_manifest: { name: 'Auction Test', url: 'https://test.example.com' },
350
+ start_time: new Date(Date.now() + 86400000).toISOString(),
351
+ end_time: new Date(Date.now() + 604800000).toISOString(),
352
+ packages: [
353
+ {
354
+ buyer_ref: 'pkg-auction-no-bid',
355
+ product_id: product.product_id,
356
+ budget: 5000,
357
+ pricing_option_id: pricingOption.pricing_option_id,
358
+ },
359
+ ],
360
+ }));
361
+ if (result && !result.success && result.error) {
362
+ step.passed = true;
363
+ step.details = 'Agent correctly requires bid_price for auction pricing';
364
+ }
365
+ else if (result?.success) {
366
+ step.passed = false;
367
+ step.error = 'Agent accepted auction pricing without bid_price - should require it';
368
+ }
369
+ else {
370
+ step.passed = false;
371
+ step.error = 'Unclear response for missing bid_price';
372
+ }
373
+ steps.push(step);
374
+ }
375
+ // Test 2: Budget below min_spend_per_package
376
+ if (productsWithMinSpend.length > 0) {
377
+ const { product, pricingOption, minSpend } = productsWithMinSpend[0];
378
+ const underBudget = minSpend * 0.5;
379
+ const { result, step } = await (0, client_1.runStep)('Budget below min_spend_per_package', 'create_media_buy', async () => client.executeTask('create_media_buy', {
380
+ buyer_ref: `under-min-spend-${Date.now()}`,
381
+ brand_manifest: { name: 'Min Spend Test', url: 'https://test.example.com' },
382
+ start_time: new Date(Date.now() + 86400000).toISOString(),
383
+ end_time: new Date(Date.now() + 604800000).toISOString(),
384
+ packages: [
385
+ {
386
+ buyer_ref: 'pkg-under-min',
387
+ product_id: product.product_id,
388
+ budget: underBudget,
389
+ pricing_option_id: pricingOption.pricing_option_id,
390
+ },
391
+ ],
392
+ }));
393
+ if (result && !result.success && result.error) {
394
+ step.passed = true;
395
+ step.details = `Agent rejected budget ${underBudget} below min_spend ${minSpend}`;
396
+ }
397
+ else if (result?.success) {
398
+ step.passed = false;
399
+ step.error = `Agent accepted budget ${underBudget} below min_spend ${minSpend}`;
400
+ }
401
+ else {
402
+ step.passed = false;
403
+ step.error = 'Unclear response for under-min-spend budget';
404
+ }
405
+ steps.push(step);
406
+ }
407
+ return { steps, profile };
408
+ }
409
+ /**
410
+ * Test: Temporal Validation
411
+ * Tests date/time ordering and format validation
412
+ */
413
+ async function testTemporalValidation(agentUrl, options) {
414
+ const steps = [];
415
+ const client = (0, client_1.createTestClient)(agentUrl, options.protocol || 'mcp', options);
416
+ const { profile, step: profileStep } = await (0, client_1.discoverAgentProfile)(client);
417
+ steps.push(profileStep);
418
+ if (!profileStep.passed || !profile.tools.includes('create_media_buy')) {
419
+ return { steps, profile };
420
+ }
421
+ // Test 1: End time before start time
422
+ const { result: endBeforeStart, step: step1 } = await (0, client_1.runStep)('End time before start time', 'create_media_buy', async () => client.executeTask('create_media_buy', {
423
+ buyer_ref: `temporal-test-${Date.now()}`,
424
+ brand_manifest: { name: 'Temporal Test', url: 'https://test.example.com' },
425
+ start_time: new Date(Date.now() + 604800000).toISOString(), // 7 days from now
426
+ end_time: new Date(Date.now() + 86400000).toISOString(), // 1 day from now (before start!)
427
+ packages: [
428
+ {
429
+ buyer_ref: 'pkg-temporal',
430
+ product_id: 'test-product',
431
+ budget: 1000,
432
+ pricing_option_id: 'test-pricing',
433
+ },
434
+ ],
435
+ }));
436
+ if (endBeforeStart && !endBeforeStart.success && endBeforeStart.error) {
437
+ step1.passed = true;
438
+ step1.details = 'Agent correctly rejected end_time before start_time';
439
+ }
440
+ else if (endBeforeStart?.success) {
441
+ step1.passed = false;
442
+ step1.error = 'Agent accepted end_time before start_time - must validate';
443
+ }
444
+ else {
445
+ step1.passed = false;
446
+ step1.error = 'Unclear response for invalid temporal ordering';
447
+ }
448
+ steps.push(step1);
449
+ // Test 2: Start time in the past
450
+ const { result: pastStart, step: step2 } = await (0, client_1.runStep)('Start time in the past', 'create_media_buy', async () => client.executeTask('create_media_buy', {
451
+ buyer_ref: `past-start-${Date.now()}`,
452
+ brand_manifest: { name: 'Past Start Test', url: 'https://test.example.com' },
453
+ start_time: new Date(Date.now() - 86400000).toISOString(), // Yesterday
454
+ end_time: new Date(Date.now() + 604800000).toISOString(), // 7 days from now
455
+ packages: [
456
+ {
457
+ buyer_ref: 'pkg-past',
458
+ product_id: 'test-product',
459
+ budget: 1000,
460
+ pricing_option_id: 'test-pricing',
461
+ },
462
+ ],
463
+ }));
464
+ if (pastStart && !pastStart.success && pastStart.error) {
465
+ step2.passed = true;
466
+ step2.details = 'Agent rejected start_time in the past';
467
+ }
468
+ else if (pastStart?.success) {
469
+ step2.passed = true;
470
+ step2.details = 'Agent accepts start_time in past (may auto-adjust)';
471
+ }
472
+ else {
473
+ step2.passed = false;
474
+ step2.error = 'Unclear response for past start_time';
475
+ }
476
+ steps.push(step2);
477
+ return { steps, profile };
478
+ }
479
+ /**
480
+ * Test: Behavior Analysis
481
+ * Analyzes agent behavioral characteristics
482
+ */
483
+ async function testBehaviorAnalysis(agentUrl, options) {
484
+ const steps = [];
485
+ const client = (0, client_1.createTestClient)(agentUrl, options.protocol || 'mcp', options);
486
+ const { profile, step: profileStep } = await (0, client_1.discoverAgentProfile)(client);
487
+ steps.push(profileStep);
488
+ if (!profileStep.passed) {
489
+ return { steps, profile };
490
+ }
491
+ // Test 1: Does get_products require brand_manifest?
492
+ if (profile.tools.includes('get_products')) {
493
+ const { result: withoutManifest, step: step1 } = await (0, client_1.runStep)('get_products without brand_manifest', 'get_products', async () => client.executeTask('get_products', {
494
+ brief: 'Show me all available products',
495
+ }));
496
+ if (withoutManifest?.success && withoutManifest?.data?.products?.length) {
497
+ step1.details = `Returns ${withoutManifest.data.products.length} products without brand_manifest`;
498
+ }
499
+ else if (withoutManifest && !withoutManifest.success) {
500
+ step1.details = 'Requires brand_manifest for product discovery';
501
+ }
502
+ steps.push(step1);
503
+ // Test 2: Are results filtered by brief?
504
+ const { result: specificBrief, step: step2 } = await (0, client_1.runStep)('get_products with specific brief', 'get_products', async () => client.executeTask('get_products', {
505
+ brief: 'Looking specifically for podcast audio advertising only',
506
+ brand_manifest: options.brand_manifest || {
507
+ name: 'Brief Filter Test',
508
+ url: 'https://test.example.com',
509
+ },
510
+ }));
511
+ const { result: broadBrief } = await (0, client_1.runStep)('get_products with broad brief', 'get_products', async () => client.executeTask('get_products', {
512
+ brief: 'Show all products across all channels and formats',
513
+ brand_manifest: options.brand_manifest || {
514
+ name: 'Brief Filter Test',
515
+ url: 'https://test.example.com',
516
+ },
517
+ }));
518
+ const specificCount = specificBrief?.data?.products?.length || 0;
519
+ const broadCount = broadBrief?.data?.products?.length || 0;
520
+ if (specificCount < broadCount) {
521
+ step2.passed = true;
522
+ step2.details = `Brief filtering: specific=${specificCount}, broad=${broadCount} (filtered)`;
523
+ }
524
+ else if (specificCount === broadCount && broadCount > 0) {
525
+ step2.passed = true;
526
+ step2.details = `No brief filtering: specific=${specificCount}, broad=${broadCount} (same)`;
527
+ }
528
+ else {
529
+ step2.details = `Brief filtering unclear: specific=${specificCount}, broad=${broadCount}`;
530
+ }
531
+ steps.push(step2);
532
+ }
533
+ return { steps, profile };
534
+ }
535
+ /**
536
+ * Test: Response Consistency
537
+ * Checks for schema errors, pagination bugs, data mismatches
538
+ */
539
+ async function testResponseConsistency(agentUrl, options) {
540
+ const steps = [];
541
+ const client = (0, client_1.createTestClient)(agentUrl, options.protocol || 'mcp', options);
542
+ const { profile, step: profileStep } = await (0, client_1.discoverAgentProfile)(client);
543
+ steps.push(profileStep);
544
+ if (!profileStep.passed) {
545
+ return { steps, profile };
546
+ }
547
+ // Test list_authorized_properties consistency
548
+ if (profile.tools.includes('list_authorized_properties')) {
549
+ const { result, step } = await (0, client_1.runStep)('Check list_authorized_properties consistency', 'list_authorized_properties', async () => client.executeTask('list_authorized_properties', {}));
550
+ if (result?.success && result?.data) {
551
+ const data = result.data;
552
+ const properties = data.authorized_properties || data.properties || [];
553
+ const publisherDomains = data.publisher_domains || [];
554
+ const issues = [];
555
+ // Check for undefined elements
556
+ for (let i = 0; i < properties.length; i++) {
557
+ if (properties[i] === undefined || properties[i] === null) {
558
+ issues.push(`properties[${i}] is ${properties[i]}`);
559
+ }
560
+ }
561
+ for (let i = 0; i < publisherDomains.length; i++) {
562
+ if (publisherDomains[i] === undefined || publisherDomains[i] === null) {
563
+ issues.push(`publisher_domains[${i}] is ${publisherDomains[i]}`);
564
+ }
565
+ }
566
+ if (issues.length > 0) {
567
+ step.passed = false;
568
+ step.error = `Schema validation errors: ${issues.slice(0, 3).join(', ')}`;
569
+ step.response_preview = JSON.stringify({
570
+ issues: issues.slice(0, 10),
571
+ properties_count: properties.length,
572
+ publisher_domains_count: publisherDomains.length,
573
+ }, null, 2);
574
+ }
575
+ else {
576
+ step.details = `Properties consistent: ${properties.length} properties, ${publisherDomains.length} domains`;
577
+ }
578
+ }
579
+ else if (result && !result.success) {
580
+ step.passed = false;
581
+ step.error = result.error || 'list_authorized_properties failed';
582
+ }
583
+ steps.push(step);
584
+ }
585
+ // Test list_creatives pagination consistency
586
+ if (profile.tools.includes('list_creatives')) {
587
+ const { result, step } = await (0, client_1.runStep)('Check list_creatives pagination consistency', 'list_creatives', async () => client.executeTask('list_creatives', {}));
588
+ if (result?.success && result?.data) {
589
+ const data = result.data;
590
+ const creatives = data.creatives || [];
591
+ const querySummary = data.query_summary;
592
+ const totalMatching = querySummary?.total_matching;
593
+ const returned = querySummary?.returned ?? creatives.length;
594
+ if (totalMatching !== undefined && totalMatching > 0 && returned === 0) {
595
+ step.passed = false;
596
+ step.error = `Pagination bug: total_matching=${totalMatching} but returned=${returned}`;
597
+ }
598
+ else if (returned !== creatives.length) {
599
+ step.passed = false;
600
+ step.error = `Mismatch: returned=${returned} but creatives.length=${creatives.length}`;
601
+ }
602
+ else {
603
+ step.details = `Pagination consistent: ${creatives.length} creatives`;
604
+ }
605
+ }
606
+ steps.push(step);
607
+ }
608
+ return { steps, profile };
609
+ }
610
+ //# sourceMappingURL=edge-cases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-cases.js","sourceRoot":"","sources":["../../../../src/lib/testing/scenarios/edge-cases.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAUH,8CAmJC;AAMD,wCAqJC;AAMD,oDAqJC;AAMD,wDAiFC;AAMD,oDA2EC;AAMD,0DA2FC;AAztBD,sCAAuG;AACvG,2CAA4C;AAE5C;;;GAGG;AACI,KAAK,UAAU,iBAAiB,CACrC,QAAgB,EAChB,OAAoB;IAEpB,MAAM,KAAK,GAAqB,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,IAAA,yBAAgB,EAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,KAAK,EAAE,OAAO,CAAC,CAAC;IAE9E,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,IAAA,6BAAoB,EAAC,MAAM,CAAC,CAAC;IAC1E,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAExB,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAC5B,CAAC;IAED,iDAAiD;IACjD,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAC/C,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,gBAAO,EACpC,mCAAmC,EACnC,kBAAkB,EAClB,KAAK,IAAI,EAAE,CACT,MAAM,CAAC,WAAW,CAAC,kBAAkB,EAAE;YACrC,SAAS,EAAE,cAAc,IAAI,CAAC,GAAG,EAAE,EAAE;YACrC,cAAc,EAAE;gBACd,IAAI,EAAE,kBAAkB;gBACxB,GAAG,EAAE,0BAA0B;aAChC;YACD,UAAU,EAAE,IAAI,IAAI,CA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,CAAC,aAAa,CAAC;YACxC,MAAM,aAAa,GAAG,YAAY,EAAE,cAAc,CAAC;YACnD,MAAM,QAAQ,GAAG,YAAY,EAAE,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC;YAE5D,IAAI,aAAa,KAAK,SAAS,IAAI,aAAa,GAAG,CAAC,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;gBACvE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;gBACpB,IAAI,CAAC,KAAK,GAAG,kCAAkC,aAAa,iBAAiB,QAAQ,EAAE,CAAC;YAC1F,CAAC;iBAAM,IAAI,QAAQ,KAAK,SAAS,CAAC,MAAM,EAAE,CAAC;gBACzC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;gBACpB,IAAI,CAAC,KAAK,GAAG,sBAAsB,QAAQ,yBAAyB,SAAS,CAAC,MAAM,EAAE,CAAC;YACzF,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,OAAO,GAAG,0BAA0B,SAAS,CAAC,MAAM,YAAY,CAAC;YACxE,CAAC;QACH,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Health Check Testing Scenario
3
+ *
4
+ * Verifies the agent is responding and has an agent card.
5
+ */
6
+ import type { TestOptions, TestStepResult } from '../types';
7
+ /**
8
+ * Test: Health Check
9
+ * Verifies the agent is responding and has an agent card
10
+ */
11
+ export declare function testHealthCheck(agentUrl: string, options: TestOptions): Promise<TestStepResult[]>;
12
+ //# sourceMappingURL=health.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../../../src/lib/testing/scenarios/health.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG5D;;;GAGG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAQvG"}