You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
13
13
- Systematic Windows path compatibility hardening: added `portable_relpath()` utility and migrated ~23 `relative_to()` call sites to use `.resolve()` on both sides + `.as_posix()` output, preventing `ValueError` on Windows 8.3 short names and backslash-contaminated path strings (#419)
14
14
- Virtual package types (files, collections, subdirectories) now respect `ARTIFACTORY_ONLY=1`, matching the primary zip-archive proxy-only behavior (#418)
15
+
-`apm pack --target claude` no longer produces an empty bundle when skills/agents are installed under `.github/` -- cross-target path mapping remaps `skills/` and `agents/` to the pack target prefix (#420)
15
16
16
17
### Added
17
18
@@ -32,6 +33,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
32
33
-`gh-aw-compat` is now informational (`continue-on-error: true`) — non-deterministic external dependencies should not block releases (#371)
33
34
- Copilot encoding instructions: `encoding.instructions.md` (`applyTo: "**"`) bans non-ASCII characters in source and CLI output; updated `copilot-instructions.md` and `cli.instructions.md` to use ASCII bracket notation (`[+]`/`[!]`/`[x]`/`[i]`/`[*]`/`[>]`) instead of emoji STATUS_SYMBOLS (#282)
34
35
36
+
### Fixed
37
+
38
+
- Resolved Windows 8.3 short-name path mismatch: call `.resolve()` on both sides of `relative_to()` in `_generate_placement_summary` and `_generate_distributed_summary` so paths display correctly on Windows CI runners (#411)
Copy file name to clipboardExpand all lines: docs/src/content/docs/guides/pack-distribute.md
+43-5Lines changed: 43 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Creates a self-contained bundle from installed dependencies. Reads the `deployed
40
40
apm pack
41
41
42
42
# Filter by target
43
-
apm pack --target vscode # only .github/ files
43
+
apm pack --target copilot# only .github/ files
44
44
apm pack --target claude # only .claude/ files
45
45
apm pack --target all # both targets
46
46
@@ -62,7 +62,7 @@ apm pack --dry-run
62
62
| Flag | Default | Description |
63
63
|------|---------|-------------|
64
64
|`--format`|`apm`| Bundle format (`apm` or `plugin`) |
65
-
|`-t, --target`| auto-detect | File filter: `copilot`, `vscode`, `claude`, `cursor`, `opencode`, `all`. `vscode` is an alias for `copilot`|
65
+
|`-t, --target`| auto-detect | File filter: `copilot`, `claude`, `cursor`, `opencode`, `all`. `vscode` is a deprecated alias for `copilot`|
66
66
|`--archive`| off | Produce `.tar.gz` instead of directory |
67
67
|`-o, --output`|`./build`| Output directory |
68
68
|`--dry-run`| off | List files without writing |
@@ -75,14 +75,48 @@ The target flag controls which deployed files are included based on path prefix:
75
75
| Target | Includes |
76
76
|--------|----------|
77
77
|`copilot`| Paths starting with `.github/`|
78
-
|`vscode`|Alias for `copilot`|
78
+
|`vscode`|Deprecated alias for `copilot`|
79
79
|`claude`| Paths starting with `.claude/`|
80
80
|`cursor`| Paths starting with `.cursor/`|
81
81
|`opencode`| Paths starting with `.opencode/`|
82
82
|`all`|`.github/`, `.claude/`, `.cursor/`, and `.opencode/`|
83
83
84
84
When no target is specified, APM auto-detects from the `target` field in `apm.yml`, falling back to `all`.
85
85
86
+
### Cross-target path mapping
87
+
88
+
Skills and agents are semantically identical across targets -- `.github/skills/X` and `.claude/skills/X` contain the same content. When the lockfile records files under a different target prefix than the one you are packing for, APM automatically remaps `skills/` and `agents/` paths:
Only `skills/` and `agents/` are remapped. Commands, instructions, and hooks are target-specific and are never mapped.
97
+
98
+
The enriched lockfile inside the bundle uses the remapped paths, so the bundle is self-consistent. When mapping occurs, the `pack:` section includes a `mapped_from` field listing the original prefixes.
99
+
100
+
### Targeting mental model
101
+
102
+
**Choose your target when you pack. Unpack delivers exactly what was packed.**
103
+
104
+
A bundle is a deployable snapshot, not a retargetable source artifact. Target selection happens at pack time because that is when the full context is available -- which file types are remappable (skills, agents) and which are target-specific (commands, instructions, hooks).
105
+
106
+
`apm unpack` does not remap paths. If the bundle was packed for Claude, the files land under `.claude/`. If you need a different target, re-pack from source with the desired `--target` flag, or use `--target all` to include all platforms.
107
+
108
+
When unpacking, APM reads the bundle's `pack:` metadata and shows the target it was packed for. If the bundle target does not match the project's detected target, a warning is displayed:
109
+
110
+
```
111
+
$ apm unpack team-skills.tar.gz
112
+
[*] Unpacking team-skills.tar.gz -> .
113
+
[i] Bundle target: claude (1 dep(s), 3 file(s))
114
+
[!] Bundle target 'claude' differs from project target 'copilot'
115
+
[+] Unpacked 3 file(s) (verified)
116
+
```
117
+
118
+
This is informational -- the files still extract. The warning helps users understand why their tool may not see the unpacked files and suggests the correct workflow.
119
+
86
120
## Bundle structure
87
121
88
122
The bundle mirrors the directory structure that `apm install` produces. It is not an intermediate format — extract it at the project root and the files land exactly where they belong.
@@ -212,7 +246,7 @@ The bundle includes a copy of `apm.lock.yaml` enriched with a `pack:` section. T
@@ -390,4 +425,7 @@ During unpack, verification found files listed in the bundle's lockfile that are
390
425
391
426
### Empty bundle
392
427
393
-
If `apm pack` produces zero files, check that your dependencies have `deployed_files` entries in `apm.lock.yaml`. This can happen if `apm install` completed but no integration files were deployed (e.g., the package has no prompts or agents for the active target).
428
+
If `apm pack` produces zero files, check:
429
+
430
+
1. Your dependencies have `deployed_files` entries in `apm.lock.yaml`. This can happen if `apm install` completed but no integration files were deployed (e.g., the package has no prompts or agents for the active target).
431
+
2. The `--target` filter matches where files were deployed. For example, if files are under `.github/` but you pack with `--target claude`, APM will remap `skills/` and `agents/` automatically. If no remappable files exist, the bundle will be empty. Try `--target all` or check `apm.lock.yaml` to see which prefixes your files use.
0 commit comments