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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xpert-ai/plugin-mineru-cli

v0.0.1

Published

`@xpert-ai/plugin-mineru-cli` is a CLI middleware plugin for the Xpert platform. It bootstraps a MinerU Python skill into the sandbox, appends MinerU usage guidance to the system prompt, and securely provisions the MinerU API token inside the sandbox when

Readme

Xpert Plugin: MinerU CLI Middleware

@xpert-ai/plugin-mineru-cli is a CLI middleware plugin for the Xpert platform. It bootstraps a MinerU Python skill into the sandbox, appends MinerU usage guidance to the system prompt, and securely provisions the MinerU API token inside the sandbox when the MinerU script is executed through sandbox_shell.

What It Does

  • Registers a middleware strategy named MinerUCLISkill
  • Writes SKILL.md and scripts/mineru.py into the sandbox under /workspace/.xpert/skills/mineru-cli
  • Validates that python3 is available in the sandbox
  • Appends the MinerU skill description to the model system prompt
  • Detects MinerU script execution via sandbox_shell
  • Securely syncs the MinerU API token into /workspace/.xpert/secrets/mineru_token when an API token is configured
  • Warns in draft validation when sandbox or SandboxShell is missing

Middleware Config

| Field | Type | Description | Required | Default | | ---------- | ------ | ----------- | -------- | ------- | | apiToken | string | Optional MinerU API token securely provisioned inside the sandbox for the MinerU CLI script | No | process.env.MINERU_TOKEN |

Runtime Behavior

  1. On beforeAgent, the plugin ensures the skill files exist in the sandbox, writes a bootstrap stamp, and syncs the managed token file when configured.
  2. On wrapModelCall, it appends a <skill>...</skill> block derived from SKILL.md.
  3. On wrapToolCall, it only intercepts sandbox_shell calls that execute:
python3 /workspace/.xpert/skills/mineru-cli/scripts/mineru.py ...

When apiToken is configured, the middleware provisions the token into the sandbox under /workspace/.xpert/secrets/mineru_token and the script reads it automatically. The command itself is not rewritten with secrets. If no token is configured, the script falls back to MinerU's lightweight API.

Converted files are written into a per-run directory in the current working directory. Local files use mineru_<source_name>, URL inputs use the URL file name when available, URLs without a stable file name fall back to mineru_<task_id>, and repeated conversions append _2, _3, and so on instead of overwriting prior results.

Development & Testing

Build the plugin:

NX_DAEMON=false pnpm -C /path/to/xpert-plugins/xpertai exec nx build @xpert-ai/plugin-mineru-cli

Run tests:

pnpm -C /path/to/xpert-plugins/xpertai exec nx test @xpert-ai/plugin-mineru-cli

Validate plugin lifecycle with the harness:

node /path/to/xpert-plugins/plugin-dev-harness/dist/index.js \
  --workspace /path/to/xpert-plugins/xpertai \
  --plugin @xpert-ai/plugin-mineru-cli

License

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