Skip to content

[BUG] apm pack does not produce bundle when dependencies: {} #2431

Description

@kkadete

Describe the bug

When apm.yml contains dependencies: {} (the key is present but the dict is empty), apm pack --format plugin does not create a bundle directory. Exit code is 0 and no error or warning is emitted — the pack silently produces no bundle output.

The root cause is in src/apm_cli/core/build_orchestrator.py inside detect_outputs():

if data and data.get("dependencies"):
    out.add(OutputKind.BUNDLE)

Python's truthiness treats an empty dict {} as falsy, so OutputKind.BUNDLE is never added to outputs_needed and BundleProducer is never called.

To Reproduce

  1. Create an apm.yml with a dependencies: {} block and root-level skills/:
name: my-plugin
version: 1.0.0
target: copilot

dependencies: {}
  1. Add at least one skill file under skills/my-skill/SKILL.md.
  2. Run apm pack --format plugin --verbose
  3. Observe: no build/ directory is created, exit code 0, no error.

Expected behavior

The documentation states:

dependencies: block present → a bundle

dependencies: {} has the block present — the key exists in the YAML. A bundle containing the package's own skills should be produced. The truthiness check should be replaced with an explicit is not None check:

# Fix:
if data and data.get("dependencies") is not None:
    out.add(OutputKind.BUNDLE)

Workaround

Add any non-empty entry under dependencies: (e.g. a self-defined MCP server with registry: false). This makes the dict truthy and triggers BundleProducer.

Environment

  • OS: Windows
  • Python Version: n/a (using frozen binary)
  • APM Version: 0.26.0
  • VSCode Version: n/a

Logs

No error output — apm pack exits 0 silently when dependencies: {} is present. With --verbose, only the PluginManifestProducer output is shown (writing .github/plugin/plugin.json for target: copilot).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliCLI command surface, flags, help text (cross-cutting).good first issueGood for newcomerspriority/highShips in current or next milestonestatus/acceptedDirection approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).type/bugSomething does not work as documented.

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions