Skip to content

[FEATURE] Persist marketplace object-form deps; accept SHA catalog pins #2903

Description

Is your feature request related to a problem? Please describe.
On apm-cli 0.30.0, operating a registry-only marketplace (immutable commit-SHA pins, nested deps that must resolve through the catalog) hits several CLI mismatches:

  1. apm install plugin@<catalog> validates through the marketplace, then writes owner/repo#sha git shorthands into consumer apm.yml. Durable marketplace identity requires hand-editing object form (name + marketplace) and reinstalling.
  2. plugin@marketplace is the advertised install identity, but the same string is rejected inside apm.yml. Only object form persists.
  3. apm marketplace check fails raw commit-SHA catalog pins even when apm pack and CI drift checks succeed.
  4. The same marketplace Git URL can be registered under two names (e.g. a local alias and the published catalog name) with no warning; @marketplace suffixes and audit then disagree.
  5. apm deps list Source stays github even when the lockfile has discovered_via / marketplace_plugin_name.
  6. After apm install -g, parked executables require apm approve from ~/.apm because approve has no --global and follows cwd.

Describe the solution you'd like

  • Persist name + marketplace (optional version) in consumer apm.yml on apm install plugin@<catalog>. Keep resolved git coordinates in the lockfile.
  • Accept commit-SHA refs in apm marketplace check for registry-only catalogs, or document that pack+CI is the SHA-pin gate.
  • Align CLI shorthand with manifest grammar (accept plugin@marketplace in apm.yml, or stop advertising that string as the persisted identity).
  • Warn in apm doctor / apm marketplace list when one source URL is registered under multiple names.
  • Surface catalog provenance in apm deps list from lockfile discovered_via.
  • Let apm approve target user scope after -g installs without cd ~/.apm.

Describe alternatives you've considered

  • Keep expanding marketplace installs to git shorthands and document a manual rewrite step (what operators do today; easy to regress).
  • Treat apm marketplace check failures on SHA pins as expected and ignore them (confusing for CI authors).
  • Continue using lockfile fields only for provenance (works, but deps list misleads agents and humans).

Additional context
apm marketplace audit is already the right consumer check for nested catalog resolution. Nested package dependencies.apm must use object form on 0.30.0; git owner/repo shorthands install but audit as bypasses. Happy to split this into separate issues if maintainers prefer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliCLI command surface, flags, help text (cross-cutting).area/lockfileLockfile schema, per-file provenance, integrity hashes, drift detection.area/marketplacemarketplace.json schema, federation, authoring suite, source parity.status/needs-designDesign discussion required before implementation; not scope approval by itself.theme/securitySecure by default. Content scanning, lockfile integrity, MCP trust boundaries.triage/recommendedAutomated advice completed; not human scope approval.type/featureNew capability, new flag, new primitive.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions