Dynamic Context Pruning plugin for the OpenCode agent
DCP is an OpenCode plugin that reduces token usage by pruning obsolete tool outputs from the conversation context before it is sent to the model, via automatic deduplication and an AI-assisted compress tool. It has no command-line interface of its own: OpenCode loads it in-process through OpenCode's own plugin config (opencode.jsonc). Installing this port gives you a MacPorts-managed, version-pinned copy to point OpenCode at, instead of letting OpenCode fetch @latest from the npm registry itself on every start.
DCP is an OpenCode plugin that reduces token usage by pruning obsolete tool outputs from the conversation context before it is sent to the model, via automatic deduplication and an AI-assisted compress tool. It has no command-line interface of its own: OpenCode loads it in-process through OpenCode's own plugin config (opencode.jsonc). Installing this port gives you a MacPorts-managed, version-pinned copy to point OpenCode at, instead of letting OpenCode fetch @latest from the npm registry itself on every start.
To install opencode-dcp, run the following command in macOS terminal (Applications->Utilities->Terminal)
sudo port install opencode-dcp
To see what files were installed by opencode-dcp, run:
port contents opencode-dcp
To later upgrade opencode-dcp, run:
sudo port selfupdate && sudo port upgrade opencode-dcp
Reporting an issue on MacPorts Trac
The MacPorts Project uses a system called Trac to file tickets to report bugs and enhancement requests.
Though anyone may search Trac for tickets, you must have a GitHub account in order to login to Trac to create tickets.