feat(manager): add apm manager for Agent Package Manager#44390
Open
MPV wants to merge 3 commits into
Open
Conversation
|
|
Add a new `apm` manager that updates git-pinned dependencies in APM (Agent Package Manager) `apm.yml` manifests, as requested in renovatebot#42507. The manager parses the string entries under `dependencies.apm` and `devDependencies.apm` (`[host/]owner/repo[/subpath]#<ref>`) and selects the datasource dynamically from the git host, reusing the existing github-tags, gitlab-tags and git-tags datasources. MCP entries carry no pinnable version and are ignored. When an `apm.lock.yaml` lockfile is present, it is refreshed by running `apm install` via a new `apm` tool constraint (pypi `apm-cli`). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vfjt3BpqDriiVsvwqVe9M9
APM ships self-contained binaries as GitHub release assets (apm-linux-<arch>.tar.gz under vX.Y.Z tags), not as the PyPI apm-cli wheel. Point the apm tool constraint at the github-releases datasource so the version Renovate resolves matches the artifact that actually gets installed, stripping the leading `v` from the tag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vfjt3BpqDriiVsvwqVe9M9
The APM project's canonical home is github.com/microsoft/apm (originally danielmeppiel/apm). Update the manager URL and readme accordingly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vfjt3BpqDriiVsvwqVe9M9
3ff6c7b to
9cc5d88
Compare
Contributor
Author
|
(sorry about the force-push, it was necessary to solve the CLA issue, i.e. committing properly as myself) |
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.
Changes
Adds a new
apmmanager that keeps APM (Agent Package Manager) dependencies up to date, as requested in discussion #42507.APM projects declare git-pinned agent dependencies (skills, plugins, agents, full packages) in an
apm.ymlmanifest and pin the resolved tree in anapm.lock.yamllockfile. Nothing currently bumps those refs.The new manager:
dependencies.apmanddevDependencies.apm, of the form[host/]owner/repo[/subpath]#<ref>.detectPlatform, which also honorshostRules) — no new datasource is required:github.com(and self-hosted GitHub) →github-tagsgitlab.com(and self-hosted GitLab) →gitlab-tagsgit-tags#<ref>; unpinned entries are skipped.apm.lock.yaml(when present) by runningapm install, wired through a newapmtool constraint that resolves the CLI frommicrosoft/apmGitHub releases.MCP server entries under
dependencies.mcpare intentionally not managed: they are identified by an MCP registry name (e.g.io.github.github/github-mcp-server) and carry no version to pin, so there is nothing for Renovate to update.Lock file maintenance note
Renovate's adding-a-package-manager guide prefers a
<tool> updatecommand over delete-then-<tool> install, since the latter can lose platform-specific lock data. APM does not provide anupdatecommand, so:apm installto syncapm.lock.yamlto the updated manifest (no delete).apm.lock.yamland runsapm installto regenerate it. APM's lockfile records resolved sources and content hashes (no platform-specific fields), so a full regeneration is deterministic and safe here.Category
I omitted a manager
categoryto keep the diff self-contained (avoiding a change to the sharedcategoriesconstant). I'm happy to add one if preferred — would maintainers like a newaicategory (APM targets AI coding agents), or is leaving it uncategorized better?Depends on
...which adds
install-tool apmto the base image. Theapm installlockfile step only works once that PR is merged and a new base image is released; the manager’s unit tests mock exec, so this PR’s CI is green independently.Context
Please select one of the following:
The New Package Manager Questionnaire is completed in discussion #42507.
AI assistance disclosure
Did you use AI tools to create any part of this pull request?
The manager code, unit tests, and documentation were drafted with Claude (via Claude Code) and reviewed before submission.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
100% test coverage on the new files (
pnpm vitest run lib/modules/manager/apm), pluspnpm check --allandpnpm type-checkpassing.Additionally verified with a local extraction dry-run against a representative
apm.yml, confirming correct datasource/packageName resolution across hosts:microsoft/apm-sample-package#v1.0.0github-tagsmicrosoft/apm-sample-packagev1.0.0anthropics/skills/skills/frontend-design#v0.24.0github-tagsanthropics/skillsv0.24.0gitlab.com/acme/agents#v2.3.0gitlab-tagsacme/agentsv2.3.0bitbucket.org/acme/tools#v1.1.0git-tagshttps://bitbucket.org/acme/toolsv1.1.0danielmeppiel/design-guide(unpinned)unspecified-version)owner/repo#v1.2.3(devDependencies)github-tagsowner/repov1.2.3MCP entries under
dependencies.mcpwere correctly ignored.The public repository: https://github.com/microsoft/apm