From 5928dab44dbe3a174d66c8f3bce68b6abe8f4ffb Mon Sep 17 00:00:00 2001 From: Daniel Meppiel <51440732+danielmeppiel@users.noreply.github.com> Date: Wed, 29 Apr 2026 15:10:01 +0200 Subject: [PATCH] docs: update marketplace add alias resolution + CHANGELOG for #1032 - Document 3-tier alias precedence for apm marketplace add (manifest.name > repo name), including Claude Code parity example - Add CHANGELOG [Unreleased] Fixed entry for #1032 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 1 + docs/src/content/docs/guides/marketplaces.md | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b047cfc96..7a752d503 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `apm marketplace build` now respects `GITHUB_HOST` for GitHub Enterprise repos -- ref resolution, token lookup, and metadata fetch all use the configured host instead of hardcoded `github.com`. `git ls-remote` is authenticated so private repos work without separate credential setup. (#1008) - `apm marketplace build` now accepts multiple Git URL forms (GitHub, GHES, GitLab, Bitbucket, ADO, SSH) for `type: url` parsing via `DependencyReference.parse()`. Host resolution is still driven by `GITHUB_HOST`, so non-`github.com` hosts require `GITHUB_HOST` to be set accordingly. (#1008) - **ADO Entra ID auth path no longer silently fails.** Bearer tokens from `az account get-access-token` are now correctly plumbed through validation (auth scheme, git env). Auth failures raise a typed `AuthenticationError` with an actionable 4-case diagnostic instead of the ambiguous "not accessible or doesn't exist" message. `apm install --update` runs a pre-flight auth check before modifying any files -- on failure it aborts with "No files were modified". (#1015) +- `apm marketplace add` now uses the `name` field from the fetched `marketplace.json` as the default local alias, falling back to the repo name only when the manifest omits it or declares an invalid value. This restores parity with Claude Code install instructions (e.g. `addyosmani/agent-skills` registers as `addy-agent-skills` as that repo's README documents). Existing marketplace entries are unaffected; use `--name` to override explicitly. (#1032) ## [0.10.0] - 2026-04-27 diff --git a/docs/src/content/docs/guides/marketplaces.md b/docs/src/content/docs/guides/marketplaces.md index 71a1ea77e..2c6bce310 100644 --- a/docs/src/content/docs/guides/marketplaces.md +++ b/docs/src/content/docs/guides/marketplaces.md @@ -91,8 +91,25 @@ You can author and publish your own marketplace registry. See the [Marketplace Authoring Guide](../marketplace-authoring/) for details. ::: +### Default alias resolution + +When `--name` is not provided, APM resolves the local alias in this order: + +1. `name` field declared in the marketplace's `marketplace.json` (if present and valid) +2. Repository name (fallback) + +This ensures parity with Claude Code install instructions -- if a marketplace's `marketplace.json` declares `"name": "addy-agent-skills"`, APM registers it under that alias and shows a hint: + +``` +[*] Registering marketplace 'addy-agent-skills'... +[+] Marketplace 'addy-agent-skills' registered (1 plugins) +[i] Install plugins with: apm install @addy-agent-skills +``` + +Use `--name` to override the alias explicitly. + **Options:** -- `--name/-n` -- Custom display name for the marketplace +- `--name/-n` -- Override the local alias (defaults to `manifest.name`, then repo name) - `--branch/-b` -- Branch to track (default: `main`) - `--host` -- Git host FQDN for non-github.com hosts (default: `github.com` or `GITHUB_HOST` env var)