/adcp-client:reporting-subscriptionsfrom adcp-client
Manages AdCP 3.3 principal-level reporting subscriptions for buyers and sellers using @adcp/sdk. Covers subscribe, unsubscribe, list, preview, replace, reconcile, poll, and webhook handling for experimental media_buy.reporting_subscriptions.
Ships in adcp-client. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A buyer registers reporting once on its principal (sync_principal), and the subscription follows its grants across every account. Wire payloads stay snake_case exactly as in the spec; only method and option names are camelCase.
await client.reporting.subscribe(subscription, { registerDestination }); // upsert one; version chosen for you
await client.reporting.unsubscribe('pacing-hourly'); // the only deactivation path
await client.reporting.listSubscriptions(); // states
await client.reporting.preview(subscription); // seller dry run + offeringIds
const outcome = await client.accounts.ensure(key, { billing: 'operator' }); // ready | pending | ambiguous | rejected
client.reporting.replaceSubscriptions(list, { deactivateOmitted: true }) is the expert complete-set write; [] needs deactivateAll: true. client.reporting.reconcile() lists every owed period with its status, reason and responsible party; client.reporting.explain({ accountId, period }) returns CoverageTraces. client.reporting.poll() returns the events since the last batch.ack() (call ack() after handling; ids are deterministic, so deduplicate on event.id); events({ signal }) is the loop; handleWebhook(VerifiedWebhook.fromOutcome(verification, body)) is a doorbell, and a webhook body is never event content. Receipts: never send one on read. reconcile({ receipts: { mode: 'verified', commit } }) receipts after the SDK verified the revision and your commit returned { commitRef }; billing lines without a receipt read receipt: { status: 'owed_by_buyer' }. Never auto-accept adjustments.
import { postgresStorage } from '@adcp/reporting-storage'; // memoryStorage() from '@adcp/sdk/storage' in development
const reporting = createReliableReportingService({
storage: postgresStorage({ pool, acknowledgeIsolatedDatabase: true }),
...producerConfig,
subscriptions: { principal: { agentUrl, notifications, resolvePrincipal }, maxAccounts: 500 },
});
const server = createAdcpServerFromPlatform(reporting.install(platform), { protocol: reporting.principals!.protocol });
Run npx adcp-reporting-storage migrate before starting a release. The service reconciles on writes and sweeps in runCycle; you do not call the engine.
| Don't | Do |
|---|---|
Raw syncPrincipal({ configuration: { reporting_subscriptions: [newOne] } }): every omitted subscription is deactivated and every omitted destination revoked | client.reporting.subscribe(newOne). The raw call is refused with SUBSCRIPTION_WOULD_DEACTIVATE / DESTINATION_WOULD_REVOKE unless you pass allowDeactivation / allowRevocation |
Omit subscription_version or forget to bump it | Let subscribe choose it |
scope: {}, or rely on an implicit all-accounts scope | scope: { all_authorized_accounts: true } or { account_ids: [...] }, plus operator_domains for agencies |
Compute periods with new Date() and local time | Read owed periods from the SDK (client.reporting.reconcile / explain); never default a timezone |
| Treat a pending account as an error and retry with a new key | Switch on outcome.kind and nextStep(outcome); a repeat ensure returns the open request |
Fetch pending_action.url | Show it to a person: formatPendingAction(outcome.action) |
| Revoke a grant to end a relationship | windDownGrant(account.authorization) keeps reconciliation tasks |
Reduce a grant to tasks without get_reporting_status and expect coverage to continue | That is a loss of reporting authority (AdCP 3.3.0-beta.4): accounts_unauthorized[], SCOPE_INSUFFICIENT; adding it back is a re-grant. Keep get_reporting_status, as windDownGrant does |
| Add a package to a confirmed buy and serve it like the original packages | Serve packages[].added_at on get_media_buys for every package added after confirmed_at: the package is owed from the period containing it, never as a cutover |
List reporting_subscription_probe without reset_state | Pass resetState with reportingSubscriptionProbe: it unpins the sandbox clock and undoes the probe's grant and timezone changes |
Set authorized_at to now on a re-grant, or compute the chain | The SDK's grant journal is the only source of authorized_at |
Pass durability: 'durable' to a store | Durability is read from the store; use memoryStorage() / postgresStorage({ pool }) |
Call engine.reconcile from request handlers | Use the managed subscriptions block (the engine is rung 3, @adcp/sdk/reporting/advanced) |
docs/guides/REPORTING-SUBSCRIPTIONS-SELLER.md and docs/guides/REPORTING-SUBSCRIPTIONS-BUYER.mddocs/guides/REPORTING-SUBSCRIPTIONS-COVERAGE.md, -ERRORS.md and -MIGRATION.mddocs/guides/FIRST-CALL-TO-A-SELLER.md for accounts.ensure outcomes and accounts.change (a separate account's subscriptionsNotCovering)docs/guides/REPORTING-LEDGER.md for the building blocksWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub adcontextprotocol/adcp-client --plugin adcp-client24 skills in this plugin
/adcpInteract with AdCP (Ad Context Protocol) advertising agents over MCP or A2A protocols. Use when the user wants to call AdCP tools (get_products, create_media_buy, sync_creatives, etc.), discover an agent's capabilities, run protocol compliance tests, look up brands or properties in the AdCP registry, manage saved agent aliases, or debug agent responses. NOT for general HTTP/REST API calls. Requires @adcp/sdk (npm)./adcp-brandExecute AdCP Brand Protocol operations with brand agents - get brand identity data, search for licensable rights, acquire rights for campaigns, and manage existing grants. Use when users want to look up brand identities, find talent or IP for licensing, or manage rights grants./adcp-creativeExecute AdCP Creative Protocol operations with creative agents - build creatives from briefs or existing assets, preview renderings, and discover format specifications. Use when users want to generate or transform ad creatives, preview how ads will look, or understand creative format requirements./adcp-governanceExecute AdCP Governance Protocol operations with governance agents - manage property lists, collection lists, content standards, and campaign governance (plans, checks, outcomes, audit trail). Use when users want to create include/exclude lists, set up brand safety rules, validate content delivery, register campaign plans, validate actions against policy, or produce internal/shareable audit trails./adcp-measurementOperate as or integrate with an AdCP measurement agent through a buyer-controlled orchestrator gateway - publish a metric catalog, receive authorized cross-seller delivery, and return compact feedback for orchestrator-controlled seller fan-out. Use when connecting measurement providers or routing provider results into seller optimization./adcp-media-buyExecute AdCP Media Buy Protocol operations with sales agents - discover advertising products, create and manage campaigns, sync creatives, and track delivery. Use when users want to buy advertising, create media buys, interact with ad sales agents, or test advertising APIs.Other plugins' skills for the same job