Skip to content

[BUG] YAML field target is not honored #1188

@kuisathaverat

Description

@kuisathaverat

Describe the bug

If you set the target field in the configuration is not honored. The type of the field is string ot list in the documentation, but the reality is that it is a string of a comma-separated string

This configuration works

version: 0.1.0
description: test
author: foo
license: Apache-2.0
type: hybrid
target: copilot
compilation:
  strategy: single-file
  exclude:
  - docs/**
dependencies:
  apm: 
    - github/awesome-copilot
  mcp: []
scripts: {}

This configuration works too

version: 0.1.0
description: test
author: foo
license: Apache-2.0
type: hybrid
target: copilot,claude
compilation:
  strategy: single-file
  exclude:
  - docs/**
dependencies:
  apm: 
    - github/awesome-copilot
  mcp: []
scripts: {}

These two configurations fail with the same error

[x] [x] Unknown target '['copilot''

Valid targets: agent-skills, claude, codex, copilot, cursor, gemini, opencode, windsurf

Fix with one of:

  apm targets                            # see all supported harnesses
  apm install <pkg> --target agent-skills
  apm install <pkg> --dry-run

Or declare in apm.yml:

  targets:
    - agent-skills
version: 0.1.0
description: test
author: foo
license: Apache-2.0
type: hybrid
target: ['copilot', 'claude']
compilation:
  strategy: single-file
  exclude:
  - docs/**
dependencies:
  apm: 
    - github/awesome-copilot
  mcp: []
scripts: {}
version: 0.1.0
description: test
author: foo
license: Apache-2.0
type: hybrid
target: 
  - 'copilot'
  - 'claude'
compilation:
  strategy: single-file
  exclude:
  - docs/**
dependencies:
  apm: 
    - github/awesome-copilot
  mcp: []
scripts: {}

To Reproduce
Steps to reproduce the behavior:

  1. Configure target field with claude and copilot in the apm.yml file
  2. run target install
  3. See error

Expected behavior

Only the selected target must be created without failures

Environment (please complete the following information):

  • OS: macOS
  • Python Version: 3.13.11
  • APM Version: 0.12.3

Logs
If applicable, add any error logs or screenshots.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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