chore(deps): bump @adcp/sdk 7.7 → 7.10.2 + adopt 7.8/7.10 surfaces#4912
chore(deps): bump @adcp/sdk 7.7 → 7.10.2 + adopt 7.8/7.10 surfaces#4912bokelley wants to merge 4 commits into
Conversation
Catches up on the 7.x line. Headline gains: - 7.8 storyboard runner: `impairment.coherence` grades audience inverse rule (was deferred) and walks `creative_approvals[]` on buy snapshots alongside the request-side `creative_assignments[]`. - 7.8 server: `ctx.input` exposed on v6 platform methods — fixes the silent-drop bug where `sync_creatives`/`sync_audiences`/`sync_accounts` lost `assignments[]`, `delete_missing`, `dry_run`, `validation_mode` (adcp-client#1842). Adoption in our v6 shims is a follow-up. - 7.9 server: `pgCtxMetadataStore` round-trips the `resource` field; optional Redis backend for the idempotency store. - 7.10 client: `fetchAgentAuthorizationsFromDirectory` for AAO inverse lookup (adopts #4828); typed `AGENT_SUSPENDED`/`AGENT_BLOCKED` codes (adopts #3906). 7.10.0 and 7.10.1 shipped the new `v2/projection` cluster (Creative Formats v2, RFC #3305) with packaging gaps that crashed `get_products` storyboards on `/sales`. Both fixed: - 7.10.1 vendors `aao-reference-formats.json` next to the catalog loader (adcp-client#1909). - 7.10.2 patches the registry loader candidate paths to read from `dist/lib/schemas-data/<version>/registries/` where the SDK actually ships `v1-canonical-mapping.json` (adcp-client#1917). Matrix on 7.10.2: /signals 81 / 111 (floor 74 / 111) /sales 78 / 402 (floor 74 / 380) /governance 80 / 155 (floor 73 / 151) /creative 79 / 177 (floor 73 / 169) /creative-builder 76 / 152 (floor 70 / 146) /brand 80 / 96 (floor 73 / 96) Typecheck and the 7 SDK-touching unit-test files (64 tests) green. Storyboard floors held without changes; ratcheting them is a separate follow-up once CI confirms the new numbers on a couple of runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
LGTM. Pure SDK bump 7.7.0 → 7.10.2, two files, no wire-touching surface, storyboard matrix posted above floor on all six tenants.
Things I checked
- Diff is
package.json+package-lock.jsononly. Nostatic/schemas/source/**, nodocs/reference/**, nomintlify-docs/reference/**, no spec-build scripts → changeset correctly omitted. - Lockfile picks up a new optional
redispeerDependency (^4.6.0 || ^5.0.0) on@adcp/sdk. Optional, so adcp does not need to install it — confirmed viapeerDependenciesMeta.redis.optional: trueatpackage-lock.json:167. - SDK consumers exist across
server/src/**andscripts/**(mcp-tools, http, storyboards, v6 training-agent shims, smoke-conformance). Test plan claimsnpm run typecheckclean and 64 SDK-touching unit tests pass. CI will confirm. - Storyboard matrix in the description: every tenant ratchets up (
/sales+4 floor, +22 actual;/governance+7/+4;/creative+6/+8). No regressions. Floors held without modification — the right call to ratchet in a separate PR after CI stabilizes.
Follow-ups (non-blocking — already noted in PR description)
ctx.inputadoption in v6 platform shims (v6-sales-platform.ts,v6-account-helpers.ts) — the shims still destructure to v5 handlers and silently dropassignments[],delete_missing,dry_run,validation_mode. Unblocked by 7.8 but not exercised here.AGENT_SUSPENDED/AGENT_BLOCKEDemission audit — switch any lingeringPERMISSION_DENIED+details.{scope:'agent',status:'suspended'}sites to the typed codes from 7.10.- Directory inverse-lookup wiring in
scripts/e2e-resolve-training-agent.tsto demo the chain end-to-end with PR #4836. - Ratchet storyboard floors once CI confirms the new numbers across a couple of runs.
Ship it once CI validates the matrix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
LGTM. Clean dep bump — package.json + lockfile + changeset only, no source touched, spec wire shape unchanged.
Things I checked
- Diff is 3 files, 18/-5:
package.json,package-lock.json,.changeset/sdk-7-10-2-bump.md. No source code changes — every behavior change is inside the dependency itself. package.json:99andpackage-lock.json:11both move@adcp/sdkfloor from^7.7.0→^7.10.2. Consistent.- Changeset type is
patchforadcontextprotocol(.changeset/sdk-7-10-2-bump.md:2). Right call — the consumer-side SDK floor moves, but no schemas understatic/schemas/source/**change and nodocs/reference/**shifts. The wire shape adopters see is unchanged. - Lockfile picks up a new optional peer dep on
redis: ^4.6.0 || ^5.0.0(package-lock.json:158,167-169). Additive and marked optional inpeerDependenciesMeta— non-breaking for adopters that don't pull redis. - Storyboard matrix in the body shows all six tenants over floor (+4 to +22 on actuals). Floors held without modification — ratcheting is correctly deferred.
- 7.10.0/7.10.1 packaging gaps that crashed
/salesstoryboards are called out as fixed in 7.10.2 via adcp-client#1909 and #1917 — the bump skips landing on a known-broken minor.
Follow-ups (non-blocking — already enumerated in the PR body)
ctx.inputadoption inserver/src/training-agent/v6-sales-platform.ts/v6-account-helpers.tsshims is unblocked by this bump; currently silently dropsassignments[],delete_missing,dry_run,validation_modeonsync_creatives/sync_audiences/sync_accounts.AGENT_SUSPENDED/AGENT_BLOCKEDemission audit (adcp-client#1406 / adcp#3906) to retire any legacyPERMISSION_DENIED+details.{scope:'agent',status:'suspended'}shapes.- Directory inverse-lookup wiring in
scripts/e2e-resolve-training-agent.ts, pairing with #4836 andfetchAgentAuthorizationsFromDirectory.
Minor nits (non-blocking)
- Unchecked CI box.
[ ] CI confirms the same numbersin the test plan is the only remaining gate; at review timecode_review,TypeScript Build,Server integration tests, and 5 of 6 storyboard jobs are still IN_PROGRESS. Not a block — local matrix is over floor on all six tenants and unit tests pass — but the matrix numbers in the body are the actual verification surface for this bump. Self-merge after CI lands.
Ship it once CI validates the matrix.
…a ctx.input The v6 SDK's typed platform-method signatures destructure the request envelope and pass only the typed first-arg to the method, dropping `dry_run` / `assignments[]` (sync_creatives) and `dry_run` (sync_accounts). The legacy `/mcp` route saw them; `/sales/mcp`, `/creative/mcp`, `/creative-builder/mcp`, and every per-tenant `accounts.upsert` silently ignored them. 7.8 fixed this upstream by exposing the original envelope as `ctx.input: Readonly<Record<string, unknown>>` (adcp-client#1842) — this change adopts it. - `v6-input-helpers.ts` adds `pickFromInput` for named-field lifts. Per SDK guidance, `ctx.input` is buyer-controlled and untrusted; the helper reads only named fields, never logs wholesale. - `syncCreatives` in the 3 creative-bearing v6 platforms now threads `dry_run` (suppresses session persistence in `handleSyncCreatives`) and `assignments[]` (writes inline package bindings to session). The v6 response signature is `SyncCreativesRow[]`, so assignment results surface via subsequent `get_media_buys`, not the sync response itself. - `syncAccountsUpsert` in `v6-account-helpers.ts` threads `dry_run` to `handleSyncAccounts`. `delete_missing` is on the SDK's drop list but v5 doesn't implement it yet — threading would be inert. Tests: 5 picker tests in `v6-input-helpers.test.ts` cover the lift shape (named fields, no undefined leakage, falsy preservation, undefined input, no-match). Storyboard matrix held identical numbers (no storyboard currently exercises `dry_run` or inline `assignments[]` on these paths, so the threading is dormant infrastructure until an adopter or future storyboard reaches for it). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extends `e2e-resolve-training-agent.ts` to call `fetchAgentAuthorizationsFromDirectory` (shipped in @adcp/sdk@7.10.0) after the existing 8-step forward chain, printing publishers whose adagents.json authorizes the resolved agent. Pairs the SDK consumer wrapper with PR #4836's server endpoint for a runnable demo of the full directory chain. - HTTP mode: directory URL defaults to `${base-url}/api` (registry router mount point per `server/src/http.ts:1072`). Override with `--directory <url>` or skip with `--directory none`. - In-process mode: skipped — the inline Express app doesn't mount the AAO routes (federated_index pool unavailable in script context). - Directory failures don't fail the script; the forward chain is the primary contract. The SDK's `ssrfSafeFetch` permits loopback by default (`probe-policy.d.ts` table — loopback is allowed for buyer-side discovery), so `http://localhost:3000` works out of the box. The endpoint's published path is `/v1/agents/{encoded_agent_url}/publishers` per spec; our deployment mounts the registry router under `/api`, hence the `${base}/api` default. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
LGTM. Follow-ups noted below. SDK bump is a no-spec-change patch and the v6→v5 shim fix is the right shape — a typed-signature-drop is exactly what ctx.input is for.
Things I checked
pickFromInput(v6-input-helpers.ts) only lifts an explicit allowlist; spread order at all four call sites (v6-sales-platform.ts:262, v6-creative-platform.ts:160, v6-creative-builder-platform.ts:151, v6-account-helpers.ts:67) cannot let a hostilectx.input.creatives/brand/accountsoverride the typed first-arg because the return type is locked toPartial<Record<'assignments' | 'dry_run', unknown>>.- v5
handleSyncCreativesactually consumes both threaded fields —req.dry_runat task-handlers.ts:2679,req.assignmentsat task-handlers.ts:2777. The PR description and changeset claims hold. delete_missingcorrectly left out of the v6-account-helpers.ts lift —account-handlers.tsdoesn't implement it; threading would be inert. Comment says so.- Both changesets are
patch. Correct — wire shape unchanged, internal-only ergonomics fix on the training agent. - Storyboard matrix in PR body shows floors held across all six tenants. CI gate on those numbers is the right next step.
- Helper test covers presence, absence, falsy preservation, undefined input, and empty-overlap. Five cases is light for an untrusted-input frontier but exercises the documented contract.
Follow-ups (non-blocking — file as issues)
sync_audiencesnot yet threaded. v6-sales-platform.ts:342 still handsaudienceList+ a synthesised idempotency_key only —dry_run/delete_missing/validation_modefrom the envelope are dropped. PR body acknowledges this as a follow-up; worth tracking alongsidedelete_missingonsync_accountsso the v5 handlers grow the field and the lift wires up in one pass.- Floor ratcheting. Numbers in the matrix (+22 on /sales, +8 on /creative, etc.) are real headroom. Ratchet after two clean CI runs so we don't burn the cushion on flake.
Minor nits (non-blocking)
key in inputwalks the prototype chain. v6-input-helpers.ts:24. The doc comment promises buyer-controlled, untrusted handling —Object.hasOwn(input, key)would lock the promise in. Lifted keys (dry_run,assignments) aren't onObject.prototype, so this is defense-in-depth, not a live exploit. One-line tighten.- Test gap on the untrusted-input frontier. v6-input-helpers.test.ts has no case for non-object input (string/array/null vs undefined) and no prototype-pollution sanity check (assert an inherited
dry_runis NOT lifted). If you take theObject.hasOwnchange, add the pollution case to lock the behavior. - Two patch changesets ship as a unit. Acceptable as-is; one merged entry would read cleaner in the CHANGELOG since the shim fix is what the SDK bump exists to enable. Notable but not worth a respin.
Approved.
There was a problem hiding this comment.
Approved. SDK dependency bump plus the v6-shim ctx.input lift that fixes the documented silent-drop from adcp-client#1842 — three contained commits, three changesets, clean test coverage on the helper.
Things I checked
pickFromInputfield-name allowlist is the security barrier, not spread order. A buyer puttingcreativesorbrandintoctx.inputcannot reachfromInputbecause the call sites pass fixed lists['assignments', 'dry_run'](v6-sales-platform.ts:262-266,v6-creative-platform.ts:158-162,v6-creative-builder-platform.ts:149-150) and['dry_run'](v6-account-helpers.ts:69). The spreads{ creatives, ...fromInput, ... }and{ accounts: refs, ...fromInput }are safe regardless of order.- Treatment of
ctx.inputmatches the SDK's "untrusted, buyer-controlled" guidance — named-field lift, no wholesale log, v5 handler still validates shape. - 7.10.2 packaging — adds optional
redispeer dep (package-lock.json:158); additive, no install break for existing consumers. - Three changesets, all
patch. Wire surface unchanged, dependency bump and internal shim threading — patch is correct. - e2e script: directory URL defaults to
<base-url>/apimatching theserver/src/http.tsmount point, errors are caught and reported per the documented "forward chain is the primary contract" stance (scripts/e2e-resolve-training-agent.ts:516-519). - Storyboard-floor claim ("Floors unchanged") consistent with the diff — no floor config touched.
Follow-ups (non-blocking — file as issues)
server/src/training-agent/v6-input-helpers.ts:24—key in inputwalks the prototype chain. With fixed-string allowlists this is inert today, butObject.prototype.hasOwnProperty.call(input, key)is stricter and reads better against the "untrusted" comment two lines above.server/tests/unit/v6-input-helpers.test.ts— missing the explicit allowlist-barrier assertion:pickFromInput({ creatives: 'evil', dry_run: true }, ['dry_run'])yielding only{ dry_run: true }. That's the property the call sites rely on; worth pinning down.- The unchecked
[ ] CI confirms the same numbersis the right call to leave open until CI runs the matrix, but the floors do warrant a ratchet PR once two clean runs land.
Minor nits (non-blocking)
- Comment the allowlist barrier at call sites.
v6-sales-platform.ts:243-247already documents the spread-order convention forupdateMediaBuy; a reader hittingsyncCreativesat L262 might assume the same applies. One line noting "allowlist inpickFromInputis the barrier, spread order is incidental" would close the loop. scripts/e2e-resolve-training-agent.ts:441-445—args.indexOf('--directory')+args[idx+1]silently falls through to the default when--directoryis the last arg with no value. Brittle for an e2e script; not load-bearing.
The dormant-infrastructure framing is honest — threading dry_run/assignments through with no storyboard exercising them yet is the right shape; you'd rather have the silent-drop fixed before an adopter trips it than after.
LGTM. Follow-ups noted below.
Summary
Catches the spec repo up on the
@adcp/sdk7.x line and adopts two new surfaces it unblocks. Three logical changes, each as its own commit:@adcp/sdk7.7 → 7.10.2 — picks up the 7.8 storyboard-runner lifts (audience inverse,creative_approvals[]walk), the 7.8ctx.inputsurface on v6 platform methods, the 7.9 ctx-metadataresourceround-trip, and 7.10'sfetchAgentAuthorizationsFromDirectory+ typedAGENT_SUSPENDED/AGENT_BLOCKEDcodes. 7.10.0 and 7.10.1 shipped the v2/projection cluster (Creative Formats v2, RFC RFC: Creative Formats v2 — canonical formats live on products, composition primitives, validate_input #3305) with packaging gaps that crashed/salesstoryboards; both fixed in the 7.10.x line via adcp-client#1909 (catalog) and adcp-client#1917 (registry).ctx.inputin v6 platform shims —syncCreativesinv6-sales-platform.ts,v6-creative-platform.ts,v6-creative-builder-platform.tsnow threadsdry_runand inlineassignments[]through tohandleSyncCreatives.syncAccountsUpsertinv6-account-helpers.tsthreadsdry_runtohandleSyncAccounts. Fixes the silent-drop bug from adcp-client#1842 — the v6 typed signatures previously dropped these fields between the framework and our v5 handlers.scripts/e2e-resolve-training-agent.tsnow optionally callsfetchAgentAuthorizationsFromDirectoryafter the forward chain, pairing the SDK consumer wrapper with PR feat(server): implement /v1/agents/{agent_url}/publishers directory endpoint #4836's server endpoint for an end-to-end demo.Matrix on 7.10.2
/signals/sales/governance/creative/creative-builder/brandHeld identical after the
ctx.inputadoption (no storyboard currently exercisesdry_runor inlineassignments[]on these paths — the threading is dormant infrastructure until an adopter or future storyboard reaches for it). Floors unchanged; ratcheting them is a separate follow-up once CI confirms the new numbers across a couple of runs.Audit not requiring change
AGENT_SUSPENDED/AGENT_BLOCKED— 7.10 ships typed codes for buyer-agent suspension. The training-agent'sBuyerAgentRegistryalways returnsstatus: 'active'(buyer-agent-registry.ts:85); it doesn't model buyer-agent suspension, so neither the legacyPERMISSION_DENIED + {scope:'agent',status:'suspended'}shape nor the new typed codes have a firing site. The 7.10 codes are future-proofing for whenever a force-suspend scenario gets added.Newly unblocked
identity.brand_json_urlemit) — gated on the SDK bundling 3.1 schemas with the new field. 7.10.2'sdist/lib/schemas-data/3.1.0-beta.2/ships them. Revert of commit89c38e74cinframework-server.ts+task-handlers.ts handleGetAdcpCapabilitiesis now safe. Not done in this PR (separate fix); confirmed unblocked by running--inprocagainst the current branch — failure mode isrequest_signature_brand_json_url_missingexactly as the issue describes.Test plan
npm run typecheckpickFromInputcovered by 5 new tests inv6-input-helpers.test.tsbash scripts/run-storyboards-matrix.sh— all six tenants over floor on both 7.10.2-only and 7.10.2 + ctx.input commits🤖 Generated with Claude Code