Conversation
createAttribution talks to the UA CLI namespace with the shared bearer token, parses its errors[] envelope, validates report and values input before the network, and never retries report or values requests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ECY4soDhA4oW8LZYT6MmZ
…alues commands A new attribution adapter reuses the Adapty session with its own ADAPTY_ATTRIBUTION_API_URL, and four commands on the migrated stack expose UA analytics with --json as the contract and null shown as a dash. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ECY4soDhA4oW8LZYT6MmZ
…ic names API errors carrying Retry-After now include retry_after_seconds in the --json error, and attribution examples use the contract form d7_roas instead of roas_d7. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ECY4soDhA4oW8LZYT6MmZ
docs/agent/attribution.md covers discovery, units, null semantics, caps, errors, and a crosswalk with asa metrics; the skill reference and trigger mention the topic; check-agent-docs now enforces attribution commands, flags, and contract strings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ECY4soDhA4oW8LZYT6MmZ
…hout a UA feed The backend catalog marks every metric read from the ad-network feed as spend_based, including impressions and network clicks, so the agent docs now say those are null on Apple Search Ads rows, not only spend. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ECY4soDhA4oW8LZYT6MmZ
- exit 2 for flag-parser usage errors under --json too, not 1 - catalog reads no longer sleep through a long server Retry-After; the error carries retry_after_seconds instead - a 200 whose body is not the expected envelope fails as malformed_response - values items may carry a null value or channel; the view prints a dash - --group-by date without --granularity is refused locally (exit 2) - metrics shows the report limits, spend_based and the ratio denominator; dimensions shows the identity; report and values examples include --json - the report meta is only the echoed query - agent docs: the 25-metric cap is a validation error, one --filter per dimension, how to learn the app timezone, the limits, the Apple Search Ads spend rule, and apps a member may not read answer app_not_found - tests for the escaped-comma filter, the value render path, network and 404 exits, and resolveAttributionSession Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new
adapty attributiontopic. It reads Attribution analytics for an app, the same data as the Attribution dashboard, so customers and their agents can query it from the terminal.attribution metricsattribution dimensionsattribution values--filtercan useattribution reportBuilt on the migrated stack, the same way
asais:src/sdk/attribution→src/cli/base/attribution→src/cli/commands/attribution, with one-line shims insrc/commands.It talks to
https://api-ua.adapty.io/api/v1/cliwith the existing developer session.ADAPTY_ATTRIBUTION_API_URLoverrides the URL.Contract points agents rely on
nullmeans not computable, never zero. The human view prints—. Apple Search Ads has no spend source in Attribution, so its spend-based values arenull, as are totals ratios once any row lacks spend.--jsonmode, API errors exit 4, network errors exit 5, auth errors exit 3.retry_after_secondsin the--jsonerror.reportandvaluesare sent once and never retried.Retry-Aftersurfaces as an error immediately instead of a silent sleep.docs/agent/attribution.mdand the skill references.check-agent-docsnow also covers the attribution commands.Backend
The Attribution backend
/api/v1/clihas been in production since 2026-09-24. A follow-up backend MR drops two meta hints (max_valid_day,spend_channels) that this CLI no longer reads, so the order of the two releases doesn't matter.Verification
pnpm install --frozen-lockfile,pnpm build,pnpm check:agent-docs,pnpm test(442 passing, eslint clean) andtsc --noEmit, on the branch rebased ontomain.metrics,dimensions,values, andreportby channel, weekly, with predictions, and with an ASA-only filter;--group-by datewithout--granularity(exit 2 before any request), malformed--filterunder--json(exit 2), and an app the token cannot read (exit 4,attribution_app_not_found).Release
package.jsonis bumped to 0.8.8. PeronPushToMain.yml+onTag.yml, merging creates thev0.8.8tag and GitHub release, publishes to npm aslatest, and dispatches the doc sync toapple-ads-cli. Drop thechore: bump version to 0.8.8commit to merge without releasing.🤖 Generated with Claude Code