feat: add apm (Agent Package Manager) install support#7038
Open
MPV wants to merge 1 commit into
Open
Conversation
12 tasks
Add an install service for APM (Agent Package Manager) which downloads the self-contained native binary bundle from the `microsoft/apm` GitHub releases, verifies the published `.sha256` checksum, extracts the PyInstaller `onedir` layout (the `apm` binary plus its sibling `_internal` directory), and wraps the binary onto PATH. This is a prerequisite for adding APM (`apm.yml`) support to Renovate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UbMAQBiMRNkCNxc8EGQw1C
8b32297 to
2b98e6b
Compare
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.
Description
Adds
install-tool apmsupport for APM (Agent Package Manager) — a language-agnostic dependency manager for AI-agent context (apm.yml/apm.lock.yaml).This is a prerequisite for adding APM support to Renovate (see renovatebot/renovate discussion #42507 and PR #44390): Renovate needs the
apmCLI available in its container image to regenerate the lock file after updating dependency refs.How it works
APM publishes self-contained native binaries on its GitHub releases as
apm-linux-<arch>.tar.gz(with a.sha256sidecar per asset). Each archive is a PyInstalleronedirbundle — anapmexecutable next to an_internal/directory — wrapped in a top-levelapm-linux-<arch>/folder.The new
ApmInstallService(modeled on the existingdeno/bunsingle-binary tools):amd64→x86_64,arm64→arm64);.sha256checksum;strip: 1so theapmbinary and its sibling_internal/land directly in the versioned tool path (keeping them adjacent, as the PyInstaller bootloader requires);apmbinary ontoPATH;apm --version.Changes
src/cli/tools/apm.ts— newApmInstallService.src/cli/install-tool/index.ts— register the service in the DI container.src/cli/tools/index.ts— addapmtoNoPrepareTools(self-contained binary; no prepare/init step).test/latest/Dockerfile— add aninstall-tool apme2e check with arenovate:annotation (datasource=github-releases packageName=microsoft/apm).Testing
prettier,eslint, andtscpass on the changed files.src/cli/install-tool/index.spec.ts).latesttest image and will exercise a real download/extract/link on bothx86_64andaarch64in CI.