npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@helloxiaohu/plugin-zip1

v0.0.1

Published

`@xpert-ai/plugin-zip` is a file compression/decompression toolset plugin for the [Xpert AI](https://github.com/xpert-ai/xpert) agent platform. It equips agents with Zip and Unzip tools so they can package intermediate artifacts or inspect uploaded archiv

Downloads

97

Readme

Xpert Plugin: Zip

@xpert-ai/plugin-zip is a file compression/decompression toolset plugin for the Xpert AI agent platform. It equips agents with Zip and Unzip tools so they can package intermediate artifacts or inspect uploaded archives directly inside workflows.

Installation

pnpm add @xpert-ai/plugin-zip
# or
npm install @xpert-ai/plugin-zip

Note: This plugin depends on @xpert-ai/plugin-sdk, @nestjs/common@^11, @nestjs/config@^4, @langchain/[email protected], [email protected], and [email protected] as peer dependencies. Install these in the host project before enabling the plugin.

Quick Start

  1. Install & Build
    Add the dependency to your host service and rebuild to make the plugin discoverable.

  2. Register the Plugin
    Include the package in your plugin list (environment variable or configuration):

    PLUGINS=@xpert-ai/plugin-zip

    The plugin bootstraps the ZipPlugin NestJS module, registers the toolset, and emits lifecycle logs.

  3. Provision Toolsets for Agents

    • Xpert Console: add a Built-in Toolset instance and choose Zip.
    • API: request toolset zip.

    No credentials or secrets are required, so any authorized agent can immediately create instances.

Zip Toolset

| Field | Value | | ------------ | --------------------------------------------------------------------- | | Name | zip | | Display Name | Zip / 压缩文件 | | Category | tools | | Description | Compress multiple files or extract archives inside agent workflows. | | Config | No configuration or external integrations are needed. |

The toolset wraps jszip to read/write archives fully in memory. Files are exchanged as base64 strings so they can travel safely through JSON payloads.

Tools

| Tool | Purpose | Input Highlights | Output | | --------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | | zip | Bundle multiple files into a .zip archive and return it as a base64 payload. | files[]: each entry accepts name/filename plus content (string, Buffer, or Uint8Array). Optional file_name controls the resulting archive name (defaults to files.zip). | JSON string with blob (base64 zip), mime_type, filename. | | unzip | Extract every file from a .zip archive, with MIME types inferred from extensions. | file: supply name/filename ending in .zip plus content/blob (Buffer, Uint8Array, or base64 string). Directories are skipped automatically. | JSON string containing files[] entries with blob, mime_type, filename. |

Example Payloads

// Zip
{
  "tool": "zip",
  "input": {
    "files": [
      { "name": "README.md", "content": "# intro" },
      { "name": "data/data.json", "content": "{\"value\": 1}" }
    ],
    "file_name": "bundle.zip"
  }
}
// Unzip
{
  "tool": "unzip",
  "input": {
    "file": {
      "name": "bundle.zip",
      "blob": "<base64-encoded zip>"
    }
  }
}

Each tool returns JSON text. Agents typically parse it (JSON.parse(result)) to access the binary data as base64 strings. Invalid inputs produce friendly error strings generated by getErrorMessage.

MIME Detection & Behavior

  • Built-in mapping covers common document types (.md, .docx, .xlsx, .pptx), code files (.py, .ts, .json, etc.), images (.webp, .svg, .ico), and other formats (.csv, .env, .gitignore).
  • Unknown extensions default to application/octet-stream.
  • The Zip tool ignores empty file entries; the Unzip tool skips directories and returns an error if the archive is empty or invalid.

Permissions & Security

  • No external network calls: All compression/decompression happens locally.
  • Filesystem: Tools operate on memory buffers; granting file-system permissions is unnecessary unless your agent independently reads/writes files.
  • Logging: Only lightweight lifecycle logs are emitted (register, onStart, onStop).

Development & Testing

npm install
npx nx build @xpert-ai/plugin-zip
npx nx test @xpert-ai/plugin-zip

Refer to packages/zip/README-TEST.md (and the Chinese variant) for manual testing instructions. Build artifacts land in packages/zip/dist; ensure compiled files, type declarations, and package metadata are aligned before publishing.

License

This project follows the AGPL-3.0 License located at the repository root.