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
feat(pack): switch --archive to .zip and add --archive-format zip|tar.gz (#1720)
* feat(pack): switch --archive output from tar.gz to zip
Replace tarfile/gzip with zipfile (ZIP_DEFLATED) in both pack_bundle
(apm format) and export_plugin_bundle (plugin format). The unpacker
gains .zip support as the primary path; .tar.gz extraction is kept for
backward compatibility with existing bundles.
Aligns apm pack --archive with apm publish, which switched to .zip in
#1695, making the whole toolchain consistent on a single archive format.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(pack): add --archive-format zip|tar.gz option (default zip)
Adds --archive-format [zip|tar.gz] to apm pack --archive so callers can
opt into .tar.gz output. Default remains zip. Threaded through
BuildOptions → pack_bundle → export_plugin_bundle (both apm and plugin
bundle formats).
* fix(pack): fold zip archive review followups
Co-authored-by: nadav-y <nadav-y@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: danielmeppiel <danielmeppiel@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CI pipelines that depended on the previous `.tar.gz` default opt back in without
34
+
changing the project default. Passing `--archive-format` without `--archive` is
35
+
now a `UsageError`. (#1720)
36
+
37
+
### Changed
38
+
39
+
-**BREAKING:**`apm pack --archive` now produces `.zip` by default instead of `.tar.gz`, matching the format produced by `apm publish` and expected by Claude Code and plugin hosts while staying natively extractable on Windows without WSL or a tar binary. Note: ZIP archives are typically 30-130% larger than `.tar.gz` for text-heavy skill bundles due to per-file compression; use `--archive-format tar.gz` if archive size is a priority. (#1720)
Copy file name to clipboardExpand all lines: docs/src/content/docs/enterprise/security.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,7 +215,7 @@ A path must pass all three checks. Failure on any check prevents the file from b
215
215
216
216
### Local bundle install trust model
217
217
218
-
`apm install <bundle>` accepts a directory or `.tar.gz` produced by `apm pack`. Bundles are imperative (no policy / dependency-resolver / network) and target-agnostic; the consumer's project drives where files land. Trust boundaries:
218
+
`apm install <bundle>` accepts a directory or `.zip` (or legacy `.tar.gz`) produced by `apm pack`. Bundles are imperative (no policy / dependency-resolver / network) and target-agnostic; the consumer's project drives where files land. Trust boundaries:
219
219
220
220
1. **`bundle_files` keys are untrusted.** They come from the bundle's own `apm.lock.yaml` and are validated for traversal sequences before any filesystem path is constructed; resolved destinations must remain within the deploy root. Unsafe entries are skipped with a warning.
221
221
2. **`plugin.json` is bundle metadata, never deployed.** It is recognized case-insensitively and skipped in both the manifest-driven deploy loop and the lockfile-less fallback walk so case-folding filesystems (HFS+, NTFS) cannot smuggle a renamed file past the skip.
Copy file name to clipboardExpand all lines: docs/src/content/docs/integrations/ci-cd.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,7 @@ Use `apm pack` in CI to build a distributable bundle once, then consume it in do
177
177
178
178
### Pack in CI (build once)
179
179
180
-
`apm-action@v1` with `pack: true` emits an APM-format bundle (`--format apm --archive`) so downstream jobs can restore it via `tar xzf` or the action's restore mode.
180
+
`apm-action@v1` with `pack: true` emits an APM-format bundle (`--format apm --archive`) so downstream jobs can restore it via `unzip` or the action's restore mode.
181
181
182
182
```yaml
183
183
- uses: microsoft/apm-action@v1
@@ -186,7 +186,7 @@ Use `apm pack` in CI to build a distributable bundle once, then consume it in do
186
186
- uses: actions/upload-artifact@v4
187
187
with:
188
188
name: agent-config
189
-
path: build/*.tar.gz
189
+
path: build/*.zip
190
190
```
191
191
192
192
### Pack as standalone plugin
@@ -204,19 +204,25 @@ Use `apm pack` in CI to build a distributable bundle once, then consume it in do
204
204
205
205
The APM bundle layout below assumes the upstream job ran `apm-action@v1` with `pack: true` (or `apm pack --format apm --archive`). Plugin-format output cannot be restored this way because it does not carry the install-time directory tree.
206
206
207
+
:::caution[Migrating from the previous `.tar.gz` default?]
208
+
`apm pack --archive`now writes `.zip`. If a downstream job still expects
209
+
`build/*.tar.gz`, add `--archive-format tar.gz` to the pack step instead of
210
+
switching the restore step to `unzip`.
211
+
:::
212
+
207
213
```yaml
208
214
- uses: actions/download-artifact@v4
209
215
with:
210
216
name: agent-config
211
-
- run: tar xzf build/*.tar.gz -C ./
217
+
- run: unzip -o build/*.zip -d ./
212
218
```
213
219
214
220
Or use the apm-action restore mode to unpack a bundle directly:
215
221
216
222
```yaml
217
223
- uses: microsoft/apm-action@v1
218
224
with:
219
-
bundle: ./agent-config.tar.gz
225
+
bundle: ./agent-config.zip
220
226
```
221
227
222
228
See the [Pack a bundle guide](../../producer/pack-a-bundle/) for the full workflow.
Copy file name to clipboardExpand all lines: docs/src/content/docs/integrations/gh-aw.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,7 +123,7 @@ The repo needs an `apm.yml` with dependencies and `apm.lock.yaml` for reproducib
123
123
124
124
For sandboxed environments where network access is restricted during workflow execution, use pre-built APM bundles:
125
125
126
-
1. Run `apm pack --format apm --archive` in your CI pipeline to produce a self-contained APM bundle (the format restorable via `tar xzf` or `apm-action` restore mode).
126
+
1. Run `apm pack --format apm --archive` in your CI pipeline to produce a self-contained APM bundle (`.zip` by default; restorable via `unzip` or `apm-action` restore mode).
127
127
2. Distribute the bundle as a workflow artifact or commit it to the repository.
128
128
3. Reference the bundled primitives directly from `.github/agents/` in your workflow.
0 commit comments