Skip to content

Integrate & migrate commands - #5

Open
eandreeva-twr wants to merge 8 commits into
mainfrom
integrate-command-prototype
Open

Integrate & migrate commands#5
eandreeva-twr wants to merge 8 commits into
mainfrom
integrate-command-prototype

Conversation

@eandreeva-twr

Copy link
Copy Markdown

No description provided.

@eandreeva-twr
eandreeva-twr marked this pull request as draft July 24, 2026 06:40
Print a one-line notice after every run that sends the usage event,
stating what is collected and how to disable it (--no-telemetry,
ADAPTY_TELEMETRY_DISABLED=1, DO_NOT_TRACK=1). Nothing is sent or
printed when disabled; --copy runs never send anything.
Split drivers.ts into a driver registry (src/lib/agent/drivers/) with one
module per agent and shared runners for the two output protocols
(stream-json and plain text). Adds an interactive agent picker when
several agents are installed, derives --driver options and install/login
hints from the registry, and hardens the runners: idle-timeout kill,
NO_COLOR, bounded stdout tail, anchored [STATUS] parsing, and an
exit-code fallback for Cursor's variable result event.
- integrate now offers an interactive switch to `adapty migrate` when an
  existing billing SDK is detected (before the wizard, so no question runs
  twice); headless runs keep the informational banner
- telemetry disclosure moved to the start of the run, Superwall-style, and
  no longer repeats at the end
- without real store product IDs the agent now creates neither products nor
  paywall/placement - the full ready-to-run command sequence goes to
  ADAPTY_SETUP.md, with the placement ID in code matching those commands
- ADAPTY_SETUP.md items link Adapty docs only where a guide genuinely helps
  (store credentials, server notifications, flows), slugs via llms.txt
… client, telemetry

Unit/integration tests replacing the manual checklist's cheap tier:
platform detection fixtures (incl. iOS name extraction and Unity-over-gradle
precedence), billing detection (incl. the transitive pubspec.lock false
positive), prompt content for headless vs copy mode and the migrate mapping
rules, the RevenueCat client against a local mock API (pagination cursors,
429 retry, builder-paywall classification, incomplete-catalog degradation),
and telemetry gating. Shared useTmpDir fixture helper; token/key leak tests
assert on the real seams (PromptContext and the full catalog object).
The fixture used a hardcoded POSIX path, so on Windows CI the expectation
diverged from the dirname/join output (backslashes). Build both the input
and the expectation with node:path.
A staged, always-skippable interview: a which-stores select of mutually
exclusive combos (irrelevant stores hidden per platform, exhaustive
Record<Platform, stores> mapping), then per-product prompts - App Store ID,
Google Play ID (Enter reuses the App Store one, "-" = not in that store),
period from VALID_PERIODS (now exported from api-schemas), and base plan
only for non-lifetime Google Play subscriptions. Collected products render
into a <store_products> ground-truth prompt block; with them the agent
creates the full dashboard setup instead of deferring to ADAPTY_SETUP.md.

Review fixes baked in: cancel (Esc/Ctrl-C) aborts the command instead of
being folded into skip/defaults (text() now returns null on cancel);
go/no-go gates run before the interview so declined confirms don't discard
typed answers; whitespace IDs are rejected and uppercase Google Play IDs
warned (immutability makes typos unfixable); the create-now prompt branch
keeps the Google Play AAB prerequisite; migrate treats code-found SKUs as
authoritative and the user's list as a complement; the platform playbook is
prefetched during the questions to hide network latency.
@eandreeva-twr
eandreeva-twr marked this pull request as ready for review July 27, 2026 14:24
The notice used to print last, just before the run spinner, so it stayed
pinned above the progress line for the whole integration. Moved into the
wizard right after auth: said once among the other setup lines, it scrolls
away with them. --copy and --no-telemetry still print nothing (and --copy
sends nothing).

Also: auth login declared user.email as required, but the API does not
always return it, so a successful login greeted people with "Authenticated
as undefined". Fields are optional now, with a name fallback and a plain
"Authenticated" when neither is present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant