When building agent workflows based on DeepSeek Harness (DSH), handling network logic (such as validating IP formats and calculating CIDR subnet ranges) usually requires relying on regular expressions or external tools. Implementing such logic directly in code increases complexity. The DSH philosophy is “everything is a plugin,” and introducing dedicated tools can abstract away these implementation details.

Plugin Introduction

dsh-ip is a utility plugin for network address processing. It is maintained by uckkk and belongs to the network tool category. Its core capabilities are validating and classifying IP addresses, as well as calculating IPv4 CIDR subnet ranges, implemented in pure Node.js.

Core Features

The plugin provides two main tools:
1. ip_info: Used to validate an IP address and classify it.
2. cidr_range: Converts IPv4 CIDR notation (e.g., 10.0.0.0/24) into a subnet range.

Installation and Activation

Add the plugin using the official installation command:

dsh plugin add github:uckkk/dsh-ip

After installation, locate the dsh.profile.bundles field in the profile’s package.json file and add "dsh-ip" to it.

Typical Usage

After installation, simply call the tools registered by the plugin in a session.

Example:

10.0.0.0/24 的网段范围是多少
→ 调用 cidr_range(cidr="10.0.0.0/24")

Applicable Scenarios and Notes

The plugin runs locally with the permissions of the current DSH process and involves third-party code. Before installation, be sure to review the source code (repository: https://github.com/uckkk/dsh-ip) to ensure security. It is suitable for scenarios that require direct network address operations in agent logic.

dsh-ip encapsulates IP processing logic into a plugin, reducing the need to write repetitive regular expressions or network logic in agent code. To view more plugins or source code, visit: Plugin Directory or GitHub.