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

opencode-gliner-prune

v0.1.5

Published

Local GLiNER2.5 context pruning for OpenCode

Readme

opencode-gliner-prune

Local, non-destructive context pruning for OpenCode using fastino/gliner2.5-small-v1.

The plugin analyzes completed tool interactions locally, keeps recent and mutating operations, preserves exact evidence spans, and changes only the cloned context sent to the model. OpenCode's stored session remains unchanged.

Requirements

  • Apple Silicon macOS
  • OpenCode 1.18.31
  • uv

Install

Add the npm package to opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-gliner-prune"]
}

Restart OpenCode. The plugin immediately prepares and loads the local model in the background. On first launch it downloads the checkpoint; subsequent loading and inference are local.

When context has accumulated, run:

/gliner-prune

The completion toast reports the reduction, changed-action counts, preserved evidence, and confirms that stored history was not modified. A new substantive prompt automatically restores full context; exact continuations keep pruning active.

For local development, build from the repository root and use:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    "file:///absolute/path/to/gliner25-compaction/integrations/opencode"
  ]
}

Transcript content stays on the machine and inference is forced offline after the checkpoint is available.

Safety model

  • Mutating tools, question answers, recent interactions, unresolved errors, requirements, URLs, and generated identifiers are protected.
  • Unknown tools and shell commands are treated as mutating unless they match a narrow observational allowlist.
  • Low-confidence or malformed model output resolves to keep_full.
  • A worker crash, timeout, or invalid span sends the original full context.
  • A substantive new user prompt clears active pruning automatically. Only an explicit continuation such as Continue. carries decisions forward.

Token counts shown by the plugin are estimates. Character counts cover the canonical text and tool payloads analyzed by GLiNER, not OpenCode's provider framing or metadata.

See the shared architecture, safety policy, and evaluation guide.