actpkg.dev
Components

library/archive

v0.1.0

Extract tar, zip, 7z, rar, cpio, iso and more, with bomb and traversal limits

by @library updated 2026-08-12 1.1 MB 0

Install

$ act pull actpkg.dev/library/archive

Capabilities

Elevated host access

Requests: Filesystem read/write.

  • wasi:filesystem Filesystem read/write

    ** (rw)

Risk Low Medium High

Tools · 4

act:tools interface — expand a tool for its input schema.

  • supported_formats

    List the archive formats and compression filters this build supports.

    No input parameters.

    Returns content.

  • list_entries

    List every entry in an archive without extracting: path, size, kind, mode and mtime. Supports tar, zip, 7z, rar, cpio, ar, iso9660, cab, lha, xar and warc, through gzip/bzip2/xz/zstd/lz4 and other filters.

    ParameterTypeDescription
    dataobject | nullInline archive bytes, as a CBOR byte string — or `{"$bytes": "<base64>"}` over JSON transports. Needs no filesystem grant.
    pathstring | nullPath to an archive on the host. Needs a `wasi:filesystem` read grant.

    Returns content.

  • read_entry

    Read a single entry out of an archive and return its bytes, without unpacking anything to disk. Needs no filesystem write grant.

    ParameterTypeDescription
    dataobject | nullInline archive bytes, as a CBOR byte string — or `{"$bytes": "<base64>"}` over JSON transports. Needs no filesystem grant.
    pathstring | nullPath to an archive on the host. Needs a `wasi:filesystem` read grant.
    entry*stringExact entry path as reported by `list_entries`.
    max_bytesinteger | nullRefuse entries larger than this many bytes. Defaults to 256 MiB.

    Returns content.

  • extract

    Unpack an archive into a destination directory. Refuses path traversal, absolute paths, special files and control characters unconditionally; skips symlinks unless allow_links is set; enforces entry-count, size and compression-ratio limits while decoding. Returns what was written and what was refused.

    ParameterTypeDescription
    dataobject | nullInline archive bytes, as a CBOR byte string — or `{"$bytes": "<base64>"}` over JSON transports. Needs no filesystem grant.
    dest*stringDirectory to unpack into. Created if absent. Requires a `wasi:filesystem` write grant covering it.
    pathstring | nullPath to an archive on the host. Needs a `wasi:filesystem` read grant.
    limitsLimitsTunable limits. Omitted fields take their conservative defaults.
    excludestring[]Never extract entries matching these globs. Applied before `include`.
    includestring[]Only extract entries matching one of these globs. Empty means all.

    Returns content.

Readme

No README provided.