Skip to content

Commit 469b2a5

Browse files
chore: release package (#164)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 8104bbb commit 469b2a5

3 files changed

Lines changed: 7 additions & 37 deletions

File tree

.changeset/a2trnbpb54g.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

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+
39
## 3.3.1
410

511
### Patch Changes
@@ -11,7 +17,6 @@
1117
### Minor Changes
1218

1319
- a322f4c: fix: treat working/input-required as valid intermediate states and extract A2A webhook payloads
14-
1520
- `working` status now returns immediately with `status: 'working'` instead of polling and timing out
1621
- `input-required` status returns valid result instead of throwing `InputRequiredError` when no handler provided
1722
- Made `success=true` consistent for all intermediate states (working, submitted, input-required, deferred)
@@ -32,15 +37,13 @@
3237
- 8b05170: Clean up SDK public API and improve response handling
3338

3439
IMPROVEMENTS:
35-
3640
1. Agent class methods now return raw AdCP responses matching schemas exactly
3741
2. Removed internal implementation details from public API exports
3842
3. Added response utilities: unwrapProtocolResponse, isAdcpError, isAdcpSuccess
3943

4044
## What Changed
4145

4246
**Low-level Agent class** now returns raw AdCP responses matching the protocol specification:
43-
4447
- Success responses have required fields per schema (packages, media_buy_id, buyer_ref)
4548
- Error responses follow discriminated union: `{ errors: [{ code, message }] }`
4649
- Errors returned as values, not thrown as exceptions
@@ -50,13 +53,11 @@
5053
## API Export Cleanup
5154

5255
Removed internal utilities that were never meant for public use:
53-
5456
- Low-level protocol clients (ProtocolClient, callA2ATool, callMCPTool)
5557
- Internal utilities (CircuitBreaker, getCircuitBreaker, generateUUID)
5658
- Duplicate exports (NewAgentCollection)
5759

5860
Public API now includes only user-facing features:
59-
6061
- All Zod schemas (for runtime validation, forms)
6162
- Auth utilities (getAuthToken, createAdCPHeaders, etc.)
6263
- Validation utilities (validateAgentUrl, validateAdCPResponse)
@@ -129,14 +130,12 @@
129130
```
130131

131132
**Changes:**
132-
133133
- Moved `pushNotificationConfig` from skill parameters to `params.configuration` in A2A protocol handler
134134
- MCP protocol correctly continues to use `push_notification_config` in tool arguments (per MCP spec)
135135
- Uses generated `PushNotificationConfig` type from AdCP schema for type safety
136136
- Fixed A2A artifact validation to check `artifactId` field per @a2a-js/sdk Artifact interface
137137

138138
**Documentation:**
139-
140139
- Added AGENTS.md section clarifying `push_notification_config` (async task status) vs `reporting_webhook` (reporting metrics)
141140
- Both use PushNotificationConfig schema but have different purposes and placement requirements
142141

@@ -183,18 +182,15 @@
183182
## Breaking Changes
184183

185184
**Removed:**
186-
187185
- `AdCPClient` (deprecated wrapper with confusing lowercase 'd')
188186
- `createAdCPClient()`, `createAdCPClientFromEnv()` factory functions
189187
- `createADCPClient()`, `createADCPMultiAgentClient()` factory functions
190188
- `SingleAgentClient` and `AgentClient` exports from `/advanced` (use `client.agent(id)` instead)
191189

192190
**Moved to `/advanced`:**
193-
194191
- Protocol-level clients: `ProtocolClient`, `callMCPTool`, `callA2ATool`, `createMCPClient`, `createA2AClient`
195192

196193
**Renamed:**
197-
198194
- `ADCPMultiAgentClient``AdCPClient` (primary export, proper AdCP capitalization)
199195

200196
## New API
@@ -246,9 +242,7 @@
246242
- 48add90: PropertyCrawler: Add browser headers and graceful degradation for missing properties array
247243

248244
**Fixes:**
249-
250245
1. **Browser-Like Headers**: PropertyCrawler now sends standard browser headers when fetching `.well-known/adagents.json` files:
251-
252246
- User-Agent: Standard Chrome browser string (required by CDNs like Akamai)
253247
- Accept, Accept-Language, Accept-Encoding: Browser-standard values
254248
- From: Crawler identification per RFC 9110 (includes library version)
@@ -264,7 +258,6 @@
264258
This enables property discovery even when publishers have completed only partial AdCP setup, improving real-world compatibility.
265259

266260
**Real-World Impact:**
267-
268261
- AccuWeather: Now successfully crawled (was failing with 403)
269262
- Weather.com: Now returns inferred property (was returning nothing)
270263
- Result: Properties discoverable from partial implementations
@@ -288,20 +281,17 @@
288281
- d02ed3c: Fix MCP endpoint discovery Accept header handling and send both auth headers
289282

290283
The `discoverMCPEndpoint()` and `getAgentInfo()` methods had issues with header handling:
291-
292284
1. **Lost Accept headers**: Didn't preserve the MCP SDK's required `Accept: application/json, text/event-stream` header
293285
2. **Missing Authorization header**: Only sent `x-adcp-auth` but some servers expect both headers
294286

295287
Changes:
296-
297288
- Updated `discoverMCPEndpoint()` to use the same header-preserving pattern as `callMCPTool()`
298289
- Updated `getAgentInfo()` to properly handle Headers objects without losing SDK defaults
299290
- Both methods now correctly extract and merge headers from Headers objects, arrays, and plain objects
300291
- Now sends **both** `Authorization: Bearer <token>` and `x-adcp-auth: <token>` for maximum compatibility
301292
- Added TypeScript type annotations for Headers.forEach callbacks
302293

303294
Impact:
304-
305295
- MCP endpoint discovery now works correctly with FastMCP SSE servers
306296
- Authentication works with servers expecting either `Authorization` or `x-adcp-auth` headers
307297
- Accept headers are properly preserved (fixes "406 Not Acceptable" errors)
@@ -315,19 +305,16 @@
315305
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.
316306

317307
**Changes:**
318-
319308
- Fixed Headers object extraction to use `forEach()` instead of object spread
320309
- Fixed plain object extraction to use `for...in` loop with `hasOwnProperty` check
321310
- Added comprehensive tests for Headers object handling and Accept header preservation
322311

323312
**Bug Timeline:**
324-
325313
- Bug introduced in v2.3.2 (commit 086be48)
326314
- Exposed between v2.5.0 and v2.5.1 when SDK started passing Headers objects
327315
- Fixed in this release
328316

329317
**Impact:**
330-
331318
- MCP protocol requests now correctly include the required Accept header
332319
- MCP servers will no longer reject requests due to missing Accept header
333320

@@ -344,19 +331,16 @@
344331
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.
345332

346333
**Changes:**
347-
348334
- Fixed Headers object extraction to use `forEach()` instead of object spread
349335
- Fixed plain object extraction to use `for...in` loop with `hasOwnProperty` check
350336
- Added comprehensive tests for Headers object handling and Accept header preservation
351337

352338
**Bug Timeline:**
353-
354339
- Bug introduced in v2.3.2 (commit 086be48)
355340
- Exposed between v2.5.0 and v2.5.1 when SDK started passing Headers objects
356341
- Fixed in this release
357342

358343
**Impact:**
359-
360344
- MCP protocol requests now correctly include the required Accept header
361345
- MCP servers will no longer reject requests due to missing Accept header
362346

@@ -378,15 +362,13 @@
378362
### Patch Changes
379363

380364
- 799dc4a: Optimize pre-push git hook for faster development workflow
381-
382365
- Reduced pre-push hook execution time from 5+ minutes to ~2-5 seconds
383366
- Now only runs essential fast checks: TypeScript typecheck + library build
384367
- Removed slow operations: schema sync, full test suite
385368
- Full validation (tests, schemas) still runs in GitHub Actions CI
386369
- Makes git push much faster while catching TypeScript and build errors early
387370

388371
- b257d06: Improved debug logging and error messages for MCP protocol errors
389-
390372
- CLI now displays debug logs, conversation history, and full metadata when --debug flag is used
391373
- MCP error responses (`isError: true`) now extract and display the actual error message from `content[].text`
392374
- Previously showed "Unknown error", now shows detailed error like "Error calling tool 'list_authorized_properties': name 'get_testing_context' is not defined"
@@ -423,7 +405,6 @@
423405
- Fix webhook HMAC verification by propagating `X-ADCP-Timestamp` through `AgentClient.handleWebhook` and server route
424406

425407
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-
427408
- Updates `AgentClient.handleWebhook(payload, signature, timestamp)` to accept and forward the timestamp.
428409
- Updates the webhook route to extract `X-ADCP-Timestamp` and pass it into `handleWebhook`.
429410
- Allows `AdCPClient.handleWebhook` to successfully validate signatures using both headers.
@@ -460,7 +441,6 @@
460441
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".
461442

462443
**Fixed locations:**
463-
464444
- `src/public/index.html:8611` - Creative upload form
465445
- `src/public/index.html:5137` - Sample creative generation
466446
- `scripts/manual-testing/full-wonderstruck-test.ts:284` - Test script (also fixed to use proper FormatID object structure)
@@ -476,13 +456,11 @@
476456
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.
477457

478458
**New exports:**
479-
480459
- Core schemas: `MediaBuySchema`, `ProductSchema`, `CreativeAssetSchema`, `TargetingSchema`
481460
- Request schemas: `GetProductsRequestSchema`, `CreateMediaBuyRequestSchema`, `SyncCreativesRequestSchema`, etc.
482461
- Response schemas: `GetProductsResponseSchema`, `CreateMediaBuyResponseSchema`, `SyncCreativesResponseSchema`, etc.
483462

484463
**Features:**
485-
486464
- Runtime validation with detailed error messages
487465
- Type inference from schemas
488466
- Integration with React Hook Form, Formik, etc.
@@ -509,15 +487,13 @@
509487
```
510488

511489
**Documentation:**
512-
513490
- `docs/ZOD-SCHEMAS.md` - Complete usage guide with NPM distribution details
514491
- `docs/VALIDATION_WORKFLOW.md` - CI integration (existing)
515492
- `examples/zod-validation-example.ts` - Working examples
516493

517494
### Patch Changes
518495

519496
- 244f639: Sync with AdCP v2.1.0 schema updates for build_creative and preview_creative
520-
521497
- Add support for creative namespace in schema sync script
522498
- Generate TypeScript types for build_creative and preview_creative tools
523499
- Update creative testing UI to handle new schema structure:
@@ -526,7 +502,6 @@
526502
- Display multiple renders with dimensions and roles for companion ads
527503

528504
Schema changes from v2.0.0:
529-
530505
- Formats now have renders array with role and structured dimensions
531506
- Preview responses: outputs → renders, output_id → render_id, output_role → role
532507
- Removed format_id and hints fields from preview renders

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adcp/client",
3-
"version": "3.3.1",
3+
"version": "3.3.2",
44
"description": "AdCP client library with protocol support for MCP and A2A, includes testing framework",
55
"main": "dist/lib/index.js",
66
"types": "dist/lib/index.d.ts",

0 commit comments

Comments
 (0)