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-dcp-dynamic-limits

v0.1.1

Published

OpenCode plugin that syncs DCP context limits to the active model and quiets chat reminder spam.

Readme

opencode-dcp-dynamic-limits

npm version backend: llm-server license: MIT

OpenCode plugin for one specific annoyance: DCP should follow the context window of the model you are actually using.

I wrote this for my local llm-server setup, where OpenCode switches between GGUF models served by ik_llama.cpp / llama.cpp and normal cloud models. When the active model changes, DCP can be left with stale limits. That is when it starts pruning at the wrong time, or worse, keeps dropping dcp-system-reminder messages into the chat.

This plugin runs on real chat requests, figures out the active model context, and updates the DCP config before DCP needs it.

Install

npm install -g opencode-dcp-dynamic-limits

Add it after DCP in your OpenCode config:

{
  "plugin": [
    "@tarquinen/opencode-dcp@latest",
    "opencode-dcp-dynamic-limits"
  ]
}

DCP needs to load first. This plugin only adjusts DCP's config.

llm-server

The main target is llm-server:

llm-server model.gguf --port 8081 --ctx-size 262144

Point OpenCode at that local OpenAI-compatible endpoint as usual. The plugin will read the active provider/model and, for llama.cpp-style backends, use the running server's context instead of guessing from a static number.

It also works with plain llama.cpp-style servers, Ollama-style local providers, and cloud models from the OpenCode model manifest.

What It Changes

The plugin writes both common DCP config files when they exist:

~/.config/opencode/dcp.jsonc
~/.opencode/dcp.jsonc

It updates:

  • activeModel
  • minContextLimit
  • maxContextLimit
  • notification/nudge settings that keep reminders out of the chat

It ignores non-chat calls like the title agent, so a title-generation request cannot shrink your DCP limits.

Context Rules

For local llama.cpp-style servers:

  • prefer runtime --ctx-size
  • fall back to /v1/models metadata
  • treat --parallel slot size as diagnostics, not the full context window

For cloud models:

  • use OpenCode's model manifest context

The DCP limit is set to 85% of the detected context. Quiet mode sets minContextLimit equal to maxContextLimit, which avoids the repeated soft-warning zone while still letting DCP prune at the hard limit.

The quiet settings are:

{
  "pruneNotificationType": "toast",
  "compress": {
    "nudgeForce": "soft",
    "nudgeFrequency": 50,
    "iterationNudgeThreshold": 50
  }
}

Development

npm install
npm test
npm pack

License

MIT