|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 3.3.2 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- 27693b2: Fixed CLI bug where agentConfig was not wrapped in array for AdCPClient constructor |
| 8 | + |
3 | 9 | ## 3.3.1 |
4 | 10 |
|
5 | 11 | ### Patch Changes |
|
11 | 17 | ### Minor Changes |
12 | 18 |
|
13 | 19 | - a322f4c: fix: treat working/input-required as valid intermediate states and extract A2A webhook payloads |
14 | | - |
15 | 20 | - `working` status now returns immediately with `status: 'working'` instead of polling and timing out |
16 | 21 | - `input-required` status returns valid result instead of throwing `InputRequiredError` when no handler provided |
17 | 22 | - Made `success=true` consistent for all intermediate states (working, submitted, input-required, deferred) |
|
32 | 37 | - 8b05170: Clean up SDK public API and improve response handling |
33 | 38 |
|
34 | 39 | IMPROVEMENTS: |
35 | | - |
36 | 40 | 1. Agent class methods now return raw AdCP responses matching schemas exactly |
37 | 41 | 2. Removed internal implementation details from public API exports |
38 | 42 | 3. Added response utilities: unwrapProtocolResponse, isAdcpError, isAdcpSuccess |
39 | 43 |
|
40 | 44 | ## What Changed |
41 | 45 |
|
42 | 46 | **Low-level Agent class** now returns raw AdCP responses matching the protocol specification: |
43 | | - |
44 | 47 | - Success responses have required fields per schema (packages, media_buy_id, buyer_ref) |
45 | 48 | - Error responses follow discriminated union: `{ errors: [{ code, message }] }` |
46 | 49 | - Errors returned as values, not thrown as exceptions |
|
50 | 53 | ## API Export Cleanup |
51 | 54 |
|
52 | 55 | Removed internal utilities that were never meant for public use: |
53 | | - |
54 | 56 | - Low-level protocol clients (ProtocolClient, callA2ATool, callMCPTool) |
55 | 57 | - Internal utilities (CircuitBreaker, getCircuitBreaker, generateUUID) |
56 | 58 | - Duplicate exports (NewAgentCollection) |
57 | 59 |
|
58 | 60 | Public API now includes only user-facing features: |
59 | | - |
60 | 61 | - All Zod schemas (for runtime validation, forms) |
61 | 62 | - Auth utilities (getAuthToken, createAdCPHeaders, etc.) |
62 | 63 | - Validation utilities (validateAgentUrl, validateAdCPResponse) |
|
129 | 130 | ``` |
130 | 131 |
|
131 | 132 | **Changes:** |
132 | | - |
133 | 133 | - Moved `pushNotificationConfig` from skill parameters to `params.configuration` in A2A protocol handler |
134 | 134 | - MCP protocol correctly continues to use `push_notification_config` in tool arguments (per MCP spec) |
135 | 135 | - Uses generated `PushNotificationConfig` type from AdCP schema for type safety |
136 | 136 | - Fixed A2A artifact validation to check `artifactId` field per @a2a-js/sdk Artifact interface |
137 | 137 |
|
138 | 138 | **Documentation:** |
139 | | - |
140 | 139 | - Added AGENTS.md section clarifying `push_notification_config` (async task status) vs `reporting_webhook` (reporting metrics) |
141 | 140 | - Both use PushNotificationConfig schema but have different purposes and placement requirements |
142 | 141 |
|
|
183 | 182 | ## Breaking Changes |
184 | 183 |
|
185 | 184 | **Removed:** |
186 | | - |
187 | 185 | - `AdCPClient` (deprecated wrapper with confusing lowercase 'd') |
188 | 186 | - `createAdCPClient()`, `createAdCPClientFromEnv()` factory functions |
189 | 187 | - `createADCPClient()`, `createADCPMultiAgentClient()` factory functions |
190 | 188 | - `SingleAgentClient` and `AgentClient` exports from `/advanced` (use `client.agent(id)` instead) |
191 | 189 |
|
192 | 190 | **Moved to `/advanced`:** |
193 | | - |
194 | 191 | - Protocol-level clients: `ProtocolClient`, `callMCPTool`, `callA2ATool`, `createMCPClient`, `createA2AClient` |
195 | 192 |
|
196 | 193 | **Renamed:** |
197 | | - |
198 | 194 | - `ADCPMultiAgentClient` → `AdCPClient` (primary export, proper AdCP capitalization) |
199 | 195 |
|
200 | 196 | ## New API |
|
246 | 242 | - 48add90: PropertyCrawler: Add browser headers and graceful degradation for missing properties array |
247 | 243 |
|
248 | 244 | **Fixes:** |
249 | | - |
250 | 245 | 1. **Browser-Like Headers**: PropertyCrawler now sends standard browser headers when fetching `.well-known/adagents.json` files: |
251 | | - |
252 | 246 | - User-Agent: Standard Chrome browser string (required by CDNs like Akamai) |
253 | 247 | - Accept, Accept-Language, Accept-Encoding: Browser-standard values |
254 | 248 | - From: Crawler identification per RFC 9110 (includes library version) |
|
264 | 258 | This enables property discovery even when publishers have completed only partial AdCP setup, improving real-world compatibility. |
265 | 259 |
|
266 | 260 | **Real-World Impact:** |
267 | | - |
268 | 261 | - AccuWeather: Now successfully crawled (was failing with 403) |
269 | 262 | - Weather.com: Now returns inferred property (was returning nothing) |
270 | 263 | - Result: Properties discoverable from partial implementations |
|
288 | 281 | - d02ed3c: Fix MCP endpoint discovery Accept header handling and send both auth headers |
289 | 282 |
|
290 | 283 | The `discoverMCPEndpoint()` and `getAgentInfo()` methods had issues with header handling: |
291 | | - |
292 | 284 | 1. **Lost Accept headers**: Didn't preserve the MCP SDK's required `Accept: application/json, text/event-stream` header |
293 | 285 | 2. **Missing Authorization header**: Only sent `x-adcp-auth` but some servers expect both headers |
294 | 286 |
|
295 | 287 | Changes: |
296 | | - |
297 | 288 | - Updated `discoverMCPEndpoint()` to use the same header-preserving pattern as `callMCPTool()` |
298 | 289 | - Updated `getAgentInfo()` to properly handle Headers objects without losing SDK defaults |
299 | 290 | - Both methods now correctly extract and merge headers from Headers objects, arrays, and plain objects |
300 | 291 | - Now sends **both** `Authorization: Bearer <token>` and `x-adcp-auth: <token>` for maximum compatibility |
301 | 292 | - Added TypeScript type annotations for Headers.forEach callbacks |
302 | 293 |
|
303 | 294 | Impact: |
304 | | - |
305 | 295 | - MCP endpoint discovery now works correctly with FastMCP SSE servers |
306 | 296 | - Authentication works with servers expecting either `Authorization` or `x-adcp-auth` headers |
307 | 297 | - Accept headers are properly preserved (fixes "406 Not Acceptable" errors) |
|
315 | 305 | The customFetch function in mcp.ts was incorrectly handling Headers objects by using object spread syntax (`{...init.headers}`), which returns an empty object for Headers instances. This caused the MCP SDK's required `Accept: application/json, text/event-stream` header to be lost. |
316 | 306 |
|
317 | 307 | **Changes:** |
318 | | - |
319 | 308 | - Fixed Headers object extraction to use `forEach()` instead of object spread |
320 | 309 | - Fixed plain object extraction to use `for...in` loop with `hasOwnProperty` check |
321 | 310 | - Added comprehensive tests for Headers object handling and Accept header preservation |
322 | 311 |
|
323 | 312 | **Bug Timeline:** |
324 | | - |
325 | 313 | - Bug introduced in v2.3.2 (commit 086be48) |
326 | 314 | - Exposed between v2.5.0 and v2.5.1 when SDK started passing Headers objects |
327 | 315 | - Fixed in this release |
328 | 316 |
|
329 | 317 | **Impact:** |
330 | | - |
331 | 318 | - MCP protocol requests now correctly include the required Accept header |
332 | 319 | - MCP servers will no longer reject requests due to missing Accept header |
333 | 320 |
|
|
344 | 331 | The customFetch function in mcp.ts was incorrectly handling Headers objects by using object spread syntax (`{...init.headers}`), which returns an empty object for Headers instances. This caused the MCP SDK's required `Accept: application/json, text/event-stream` header to be lost. |
345 | 332 |
|
346 | 333 | **Changes:** |
347 | | - |
348 | 334 | - Fixed Headers object extraction to use `forEach()` instead of object spread |
349 | 335 | - Fixed plain object extraction to use `for...in` loop with `hasOwnProperty` check |
350 | 336 | - Added comprehensive tests for Headers object handling and Accept header preservation |
351 | 337 |
|
352 | 338 | **Bug Timeline:** |
353 | | - |
354 | 339 | - Bug introduced in v2.3.2 (commit 086be48) |
355 | 340 | - Exposed between v2.5.0 and v2.5.1 when SDK started passing Headers objects |
356 | 341 | - Fixed in this release |
357 | 342 |
|
358 | 343 | **Impact:** |
359 | | - |
360 | 344 | - MCP protocol requests now correctly include the required Accept header |
361 | 345 | - MCP servers will no longer reject requests due to missing Accept header |
362 | 346 |
|
|
378 | 362 | ### Patch Changes |
379 | 363 |
|
380 | 364 | - 799dc4a: Optimize pre-push git hook for faster development workflow |
381 | | - |
382 | 365 | - Reduced pre-push hook execution time from 5+ minutes to ~2-5 seconds |
383 | 366 | - Now only runs essential fast checks: TypeScript typecheck + library build |
384 | 367 | - Removed slow operations: schema sync, full test suite |
385 | 368 | - Full validation (tests, schemas) still runs in GitHub Actions CI |
386 | 369 | - Makes git push much faster while catching TypeScript and build errors early |
387 | 370 |
|
388 | 371 | - b257d06: Improved debug logging and error messages for MCP protocol errors |
389 | | - |
390 | 372 | - CLI now displays debug logs, conversation history, and full metadata when --debug flag is used |
391 | 373 | - MCP error responses (`isError: true`) now extract and display the actual error message from `content[].text` |
392 | 374 | - Previously showed "Unknown error", now shows detailed error like "Error calling tool 'list_authorized_properties': name 'get_testing_context' is not defined" |
|
423 | 405 | - Fix webhook HMAC verification by propagating `X-ADCP-Timestamp` through `AgentClient.handleWebhook` and server route |
424 | 406 |
|
425 | 407 | Previously, the server only forwarded `X-ADCP-Signature` to the client verifier. The timestamp required by the HMAC scheme (message = `{timestamp}.{json_payload}`) was not passed through, causing verification to fail when `webhookSecret` was enabled. This change: |
426 | | - |
427 | 408 | - Updates `AgentClient.handleWebhook(payload, signature, timestamp)` to accept and forward the timestamp. |
428 | 409 | - Updates the webhook route to extract `X-ADCP-Timestamp` and pass it into `handleWebhook`. |
429 | 410 | - Allows `AdCPClient.handleWebhook` to successfully validate signatures using both headers. |
|
460 | 441 | Multiple locations in the codebase were incorrectly using `format` instead of `format_id` when creating creative assets for sync_creatives calls. This caused the AdCP agent to reject creatives with validation errors: "Input should be a valid dictionary or instance of FormatId". |
461 | 442 |
|
462 | 443 | **Fixed locations:** |
463 | | - |
464 | 444 | - `src/public/index.html:8611` - Creative upload form |
465 | 445 | - `src/public/index.html:5137` - Sample creative generation |
466 | 446 | - `scripts/manual-testing/full-wonderstruck-test.ts:284` - Test script (also fixed to use proper FormatID object structure) |
|
476 | 456 | This release adds Zod schema exports alongside existing TypeScript types, enabling runtime validation of AdCP data structures. All core schemas, request schemas, and response schemas are now available as Zod schemas. |
477 | 457 |
|
478 | 458 | **New exports:** |
479 | | - |
480 | 459 | - Core schemas: `MediaBuySchema`, `ProductSchema`, `CreativeAssetSchema`, `TargetingSchema` |
481 | 460 | - Request schemas: `GetProductsRequestSchema`, `CreateMediaBuyRequestSchema`, `SyncCreativesRequestSchema`, etc. |
482 | 461 | - Response schemas: `GetProductsResponseSchema`, `CreateMediaBuyResponseSchema`, `SyncCreativesResponseSchema`, etc. |
483 | 462 |
|
484 | 463 | **Features:** |
485 | | - |
486 | 464 | - Runtime validation with detailed error messages |
487 | 465 | - Type inference from schemas |
488 | 466 | - Integration with React Hook Form, Formik, etc. |
|
509 | 487 | ``` |
510 | 488 |
|
511 | 489 | **Documentation:** |
512 | | - |
513 | 490 | - `docs/ZOD-SCHEMAS.md` - Complete usage guide with NPM distribution details |
514 | 491 | - `docs/VALIDATION_WORKFLOW.md` - CI integration (existing) |
515 | 492 | - `examples/zod-validation-example.ts` - Working examples |
516 | 493 |
|
517 | 494 | ### Patch Changes |
518 | 495 |
|
519 | 496 | - 244f639: Sync with AdCP v2.1.0 schema updates for build_creative and preview_creative |
520 | | - |
521 | 497 | - Add support for creative namespace in schema sync script |
522 | 498 | - Generate TypeScript types for build_creative and preview_creative tools |
523 | 499 | - Update creative testing UI to handle new schema structure: |
|
526 | 502 | - Display multiple renders with dimensions and roles for companion ads |
527 | 503 |
|
528 | 504 | Schema changes from v2.0.0: |
529 | | - |
530 | 505 | - Formats now have renders array with role and structured dimensions |
531 | 506 | - Preview responses: outputs → renders, output_id → render_id, output_role → role |
532 | 507 | - Removed format_id and hints fields from preview renders |
|
0 commit comments