Skip to content

ADP-7768: hand agent actions to the coding agent and install the Adapty skills - #39

Open
eandreeva-twr wants to merge 12 commits into
mainfrom
feat/migrate-code
Open

eandreeva-twr wants to merge 12 commits into
mainfrom
feat/migrate-code

Conversation

@eandreeva-twr

@eandreeva-twr eandreeva-twr commented Sep 30, 2026 •

Copy link
Copy Markdown

ADP-7768

Hands the migrator's new migrate_code action (kind agent) to the coding agent that runs the CLI, and adds a command that installs the Adapty skills into coding agents.

Changes to existing behavior

  • adapty migrations run handles agent actions instead of printing "needs a newer adapty-cli". The envelope view lists agent as a known kind.

Added

  • adapty skills install: installs the Adapty skills into Claude Code, Codex and Gemini CLI, using each agent's own plugin or skills command.
    • It asks which agent when several are found; --agent or --yes answer without a prompt.
    • With no agent found, it runs npx skills add adaptyteam/adapty-skills --all --global.
  • migrations run <agent action>, run from the app's git repository:
    • reads the action's resources, so an action the server isn't ready for stops right away;
    • writes the resources to .git/adapty/;
    • prints the instructions: the skill to use, where the data is, the server's guide, and the command that reports back. Paste them into an agent when running outside one.
    • With --input, it posts the agent's result like any input action.

Roman Miasnikov and others added 6 commits September 29, 2026 17:37
The developer API rejects a bad token with a 403 and
{ errors: [{ detail, code, status }] }, a shape developerErrorParser did not
read, so the CLI printed "GET /apps failed with HTTP 403". The detail is the
message now, e.g. "Authentication credentials were not provided.", and code
is the error code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Wizard serves no report resource: the first example answered
resource.not_found. The help names apps and mapping and reads apps from the
selected migration instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`adapty skills install` finds Claude Code, Codex and Gemini CLI on PATH and installs the Adapty
skills through each agent's own plugin or skills command, the ones the docs' install modal shows.
Several agents found: it asks which, or takes --agent / --yes, and refuses to guess when no one can
answer. None found: it runs `npx skills add adaptyteam/adapty-skills --all --global`.
`adapty migrations run` now runs an `agent` action, such as the migrator's `migrate_code`, from the
app's git repository. It reads the action's resources first, so a step that is not ready stops
before any agent starts, writes the data to `.git/adapty/`, picks Claude Code or Codex from PATH,
installs the Adapty skills into it, and runs it headless on the `adapty-migrate` branch. The agent's
`SUMMARY:` line is posted back to the action; the changes stay uncommitted for review.

The tools a headless agent may use ship with this binary and never come from a server answer. The
agent helpers move from `skills install` to a shared `src/cli/agents/` module.
The agent that runs `adapty migrations run` on an `agent` action is already a coding agent in the
app's repository, so the command no longer starts a second one headless. It writes the action's
resources to `.git/adapty/` and prints the instructions: the skill, where the data is, the server's
guide, and the command that reports the result back. Run again with --input, it posts the result.

Without the headless runner the agent helpers have one user again, so they move back into
`skills install`.
@eandreeva-twr eandreeva-twr changed the title ADP-7768: run agent actions and install the Adapty skills ADP-7768: hand agent actions to the coding agent and install the Adapty skills Sep 30, 2026
…gration

The skills tests fake agents with `#!/bin/sh` scripts found by their executable bit, which Windows
does not have: they now skip there, as the repo's other POSIX-only tests do, and a Windows test
finds a command by PATHEXT instead.

The agent handoff now asks the agent to create the `adapty-migrate` branch before it changes any
file, and to leave the changes uncommitted for review.
- The handoff took the git directory to be `<root>/.git`, which is a file in a worktree or a
  submodule, so the data could not be written. git now names the directory.
- `skills install --yes` with no agent on PATH installed nothing and exited 0. It now falls back to
  the skills CLI, as it does without --yes.
- A failed marketplace step was taken as harmless, and so it hid an `adapty` marketplace from
  another source. The install now says so in a warning, with the command that shows the source.
- The handoff told the agent to run a bare `adapty skills install`, which refuses when several
  agents are on PATH. It now names the `--agent` flag.
…gration stays open

The agent now takes adapty-migrate-2 and so on when adapty-migrate exists, as it does on a second run, and knows the summary is kept until the developer closes the migration.
… npx fallback

- The handoff lists the files it wrote, as absolute paths, then the server's text as is.
- Resource names are checked before they become file names.
- `skills install` pins `skills@1.7.0` and runs it only after a yes in a terminal.
@chyvak357
chyvak357 force-pushed the ADP-7750-migration-model branch 2 times, most recently from ac119f0 to 37ffe9a Compare October 1, 2026 11:16
Base automatically changed from ADP-7750-migration-model to main October 3, 2026 12:54
@eandreeva-twr
eandreeva-twr marked this pull request as ready for review October 7, 2026 13:49

This branch has not been deployed

No deployments
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.

2 participants