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

@wierdbytes/pi-video-mention

v0.1.0

Published

Send video files to video-capable models via @mentions — routed as video_url content parts when the active model supports video, left as plain text otherwise.

Readme

@wierdbytes/pi-video-mention

Attach video files to pi prompts with @ mentions and let the agent actually see them — but only when the active model really supports video input.

what happens in this clip? @demo.mp4
compare @take-one.mov with @take-two.mov

How it works

  1. On input every @mention pointing at a video file (.mp4, .webm, .mov, .mkv, .avi, .wmv, .flv, .mpg, .mpeg, .m4v, .3gp, .ogv, .ts) that exists, is non-empty and under the size cap is rewritten into an internal marker.

  2. On every provider request (the marker rides along in the message history, so the decision follows model switches mid-session) the active model is checked for video support, in order:

    • PI_VIDEO_MENTION_MODELS — comma-separated provider/model glob patterns that force video support (openrouter/stealth/*, …);
    • the pi model registry — model's input list contains "video";
    • for OpenRouter-baseUrl models — a single probe of the public /api/v1/models catalogue per process: any model whose architecture.input_modalities includes "video" qualifies.

    If supported and the model uses the openai-completions wire format, the marker becomes a base64 data-URL content part:

    { "type": "video_url", "video_url": { "url": "data:video/mp4;base64,..." } }

    This is the shape OpenRouter documents for video input (stealth/ox-alpha, Gemini, Grok, …).

    • Anything else — no model, no "video" in input, different API, unreadable file → the marker degrades back to the plain @path mention. Nothing breaks; the agent can still open the file with its read tool.

Run /video-mention to check whether the active model supports video.

Configuration

| Variable | Default | Meaning | |---|---|---| | PI_VIDEO_MENTION_MAX_MB | 100 | Max attachment size in MB. Larger mentions stay plain text (base64 lives in memory). | | PI_VIDEO_MENTION_MODELS | — | Comma-separated provider/model globs forced video-capable, e.g. openrouter/stealth/*. |

Local development install

One-off test:

pi -e ~/me/dev/pi-wierd-stuff/packages/video-mention/index.ts

Global (all projects) — add to ~/.pi/agent/settings.json:

{
  "extensions": [
    "~/me/dev/pi-wierd-stuff/packages/video-mention"
  ]
}

(or symlink it into ~/.pi/agent/extensions/).

Project-local — from the project root:

mkdir -p .pi/extensions
ln -s ~/me/dev/pi-wierd-stuff/packages/video-mention .

No runtime dependencies; only devDependencies for typechecking.

Notes

  • The whole file is base64-encoded into the request (~+33 % size), so very large videos are better hosted and referenced by URL instead.

  • pi normalizes catalogued modalities to text/image, so registry-based detection usually needs a modelOverrides entry in ~/.pi/agent/models.json:

    {
      "providers": {
        "openrouter": {
          "modelOverrides": {
            "stealth/ox-alpha": { "input": ["text", "image", "video"] }
          }
        }
      }
    }

    For OpenRouter models the extension works without this thanks to the catalogue probe; other providers may need the override or the env var.