DeepSeek Harness: Local Code Memory and Code Graph Plugin

Introduction

When building a DeepSeek Harness (DSH) agent, giving the model access to the code context of a local project is a common requirement. Traditional approaches either rely on concatenating codebase files or depend on remote code repositories. The former lacks semantic information, while the latter incurs privacy concerns and network overhead. cam is a local code proxy memory project that maintains a project’s code graph and solution memories, with data stored in a local database. This plugin bridges cam with DSH, allowing the Harness to directly read the code graph and memories locally.

Plugin Overview

dsh-cam-plugin is a DeepSeek Harness plugin maintained by HanochZhu, categorized under “Memory.” It connects to the local cam binary, reads the code graph and solution memories stored in .cam/cam.db within the project, and keeps all data within the local project directory.

Core Features

The plugin communicates with cam through the local cam --json binary. Data is stored in .cam/cam.db within the project directory and is never uploaded. The memory tree and code graph can be viewed in the plugin interface of Harness Web.

Key capabilities include:

  • Memory browsing: View the project’s memory tree, filter by summary, and select entries to read the body text and related memories.
  • Code graph browsing: Browse indexed files, search by symbol name, and view a symbol’s callers and callees (one-hop neighbors).
  • Index management: After selecting a project, click “Build index” to create or incrementally update the code index. Upon completion, the code graph view opens automatically.

Installation & Enablement

The plugin is provided as pure ESM with no build step required.

Install:

dsh plugin --profile <profile> add github:HanochZhu/dsh-cam-plugin

Enable:

dsh --profile <profile>

After installation, use --dump-config to see a configuration layer named # == dsh-cam-plugin.

Typical Usage

In Harness Web, navigate to “Plugins → Installed → dsh-cam-plugin” and select a project in the “CAM explorer.”

  • Memory: Displays the project’s memory tree. Filter by summary and click an entry to view the body text and related memories.
  • Code graph: Browse indexed files or search by symbol. Click a symbol to view its one-hop callers and callees, then click a neighbor to continue exploring deeper.

Index operation: After selecting a project, click “Build index” to create or update the code index. Once complete, the code graph view opens automatically.

Configuration

By default, the plugin uses project or the environment variable CAM_PROJECT as the project path. If neither is specified, the plugin searches upward from the current working directory for a .cam or .git directory. To pin a binary path or default project, override the config for the corresponding id in the profile’s cordis.patch.yml:

- id: cam
  config:
    camBin: cam
    project: D:/work/my-repo

project is optional; camBin defaults to cam.

If you need to use a workspace that is not installed as a bundle, you can load the configuration via --patch:

dsh web --patch ./cordis.example.yml

Note: The plugin path in cordis.example.yml must use an absolute path.

Tool List

When the plugin registers a runtime skill named cam in Harness’s skill service, it exposes the following tools:

  • cam_recall: Search solution memories using a single English sentence
  • cam_index: Build the code graph, with incremental updates available afterward
  • cam_ls / cam_find / cam_grep: List directories, search by symbol name, and search text
  • cam_read / cam_ref: Read a single symbol, or list its callers (in) and callees (out)
  • cam_add / cam_mem_show / cam_mem_tree: Store a memory, display a memory by id, and print the memory tree
  • cam_status: Display the resolved project and database status

Use Cases & Notes

This plugin is suitable for DSH agent development scenarios that require local code context. Before use, ensure the cam binary is installed and available in PATH; run cam --help to verify.

The plugin runs with the permissions of the current dsh process. Review the source code and license (MIT) before use. Data is stored in .cam/cam.db within the local project and is never uploaded.

Conclusion

This plugin integrates cam’s local code graph and solution memories into DSH, enabling agents to access project-level semantic context locally. Installation and configuration are straightforward, making it ideal for scenarios that demand privacy and real-time access.

Directory page: https://www.skillhub.cn/plugins/HanochZhu/dsh-cam-plugin
GitHub: https://github.com/HanochZhu/dsh-cam-plugin

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

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

Xiaoye