dsh-worldsense: Secure Read-Only Perception Layer for DeepSeek Harness

In the development of DeepSeek Harness (DSH), granting an Agent arbitrary HTTP access is tantamount to endowing it with unauthenticated proxy capabilities, which can easily lead to security issues such as SSRF (Server-Side Request Forgery). The dsh-worldsense plugin aims to address this pain point by providing the Agent with a secure, restricted, and read-only “reality awareness layer.”

Plugin Introduction

This is a networking tool plugin maintained by guhanfei-ai. It provides DSH Agents with six read-only tools for observing general structured world states (such as deployment APIs, service registries, business data, etc.).

The core value lies in decoupling the Agent from arbitrary network requests. Administrators define “which windows exist in the world,” and the Agent decides “which window to look through now,” but the Agent cannot create a hole in the wall itself. It ensures that the perception process is controllable and traceable by limiting response size, field count, and computational deterministic differences.

Core Capabilities

The plugin provides the following six read-only tools:

  1. worldsense_sources: Lists configured sources, endpoints, parameters, and field aliases (excluding secrets).
  2. worldsense_status: Checks the reachability, latency, and HTTP status of a single source endpoint (does not return the response body).
  3. worldsense_read: Observes the current state and returns a WorldObservation with provenance information.
  4. worldsense_snapshot: Saves observation results to a local SQLite database and returns a snapshot ID.
  5. worldsense_history: Lists saved snapshot metadata, supporting filtering by source, endpoint, and time.
  6. worldsense_diff: Calculates deterministic structural differences between two snapshots.

Every read is subject to limits on response bytes, field counts, etc.; excess portions are honestly marked as truncated. Meanwhile, the plugin generates a SHA-256 content hash for each observation to ensure traceability.

Installation and Activation

The installation command is as follows:

npm install

To configure sources, you can use the graphical interface in DeepSeek Harness under Settings → Plugins, or write a JSON file directly.

Usage Examples

Configuration typically includes a source ID, type (http-json), base URL, authentication information, specific endpoint paths, and field mappings. Authentication credentials are referenced from the DSH credential store and will not appear in tool outputs.

For example, configuring a GitHub repository monitoring source:

{
  "sources": [
    {
      "id": "github-dsh-grafana",
      "type": "http-json",
      "baseUrl": "https://api.github.com",
      "auth": { "type": "bearer", "credential": "GITHUB_TOKEN" },
      "endpoints": {
        "repository": {
          "path": "/repos/guhanfei-ai/dsh-grafana",
          "fields": {
            "stars": "/stargazers_count",
            "forks": "/forks_count",
            "issues": "/open_issues_count",
            "updatedAt": "/updated_at"
          }
        }
      }
    }
  ]
}

The typical workflow is: use worldsense_read to observe the state, use worldsense_snapshot to save the observation, perform changes, read again, and use worldsense_diff to calculate the differences.

Use Cases and Notes

Use Cases:
* Deployment Status: Monitor versions, replica counts, and health status in production environments.
* GitHub Feedback: Read statistics such as Stars and Issues from project repositories.
* Internal Business State: Query business metrics such as orders and revenue.

Precautions:
1. Permission Isolation: Agents can never specify arbitrary URLs, hosts, ports, protocols, paths, HTTP methods, headers, or credentials.
2. Security Restrictions: The plugin only supports GET requests and does not follow redirects.
3. Data Masking Mechanism: Redaction of secrets is based on heuristic rules, and it cannot guarantee detection of all sensitive fields.
4. Permission Boundaries: The plugin does not authorize write operations; all changes must be handled by the Human Intent plugin.
5. Trust Model: The plugin does not guarantee that data from remote APIs is trustworthy; it is only responsible for providing observations with provenance.

The plugin runs with the permissions of the current DSH process. Please check the source code and license before installation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye