Introduction

In the development practice of DeepSeek Harness (DSH), agents sometimes need to look up code structures (such as class names and function names) by symbol name alone, without fetching file contents or locating the cursor. Traditional LSP tools (such as goToDefinition) usually rely on context. dsh-workspace-intelligence addresses this requirement by providing DSH with a standalone workspace_symbol tool that allows agents to perform deterministic searches using the standard LSP workspace/symbol request.

Plugin Scope

dsh-workspace-intelligence is a standalone DSH/Cordis plugin.
It focuses on deterministic LSP workspace symbol search. The plugin does not modify DeepSeek Harness core code and does not call ctx.lsp directly; instead, it communicates with LSP through the public ctx.fs, ctx.subprocess, and ctx.tools contexts. It is compatible with multiple response formats, including SymbolInformation[], WorkspaceSymbol[], URI-only locations, null, and empty arrays, ensuring predictable behavior.

Installation and Enabling

The plugin is disabled by default because the Language Server startup command must be specified by the deployer.

  1. Install the plugin
    Use the official installation command to add the plugin to the specified Profile.
    dsh plugin --profile <name> add dsh-workspace-intelligence
  1. Install dependencies
    Install Node.js (requires ^22.19.0 or >=24) and at least one language server that supports stdio LSP (example).
    pnpm add -g pyright typescript typescript-language-server
  1. Configure the Language Server
    The deployer must configure the language server in the Profile’s cordis.patch.yml. Perform the following steps according to the operating system:

    • Windows
      Run pnpm root -g to obtain the global directory. Merge examples/windows/cordis.patch.yml into the Profile configuration. Replace C:/pnpm-global-root with the actual output path (make sure to use / as the path separator). Keep the absolute path form of node plus the JS file, and do not use the .cmd shim; ctx.subprocess does not go through a shell.

    • macOS/Linux
      Merge examples/macos-linux/cordis.patch.yml into the Profile’s cordis.patch.yml. The template starts the language server directly from PATH.

    • Verify configuration
      After merging, inspect the resolved result to ensure the configuration is correct.

    dsh --profile <name> --dump-config

Usage

When calling this tool, the model only needs to pass a single required parameter.

{ "query": "SessionManager" }
  • Parameter restrictions: A blank query is rejected. The model cannot choose the provider, command, workspace, or timeout.
  • Response contents: The result includes the symbol name, a readable kind, a canonical URI, an optional range, and containerName.

Configuration

The servers configuration item is required and must contain at least one entry. Server IDs are sorted lexicographically, so object insertion order does not affect behavior.

Setting Default Description
command Required Absolute path to the executable or command name resolved by ctx.subprocess
args [] argv passed directly, without a shell
env {} Incremental environment variables for the subprocess
initializationOptions null LSP initialization parameters
configuration null workspace/configuration response value
maxMessageBytes 16000000 Upper limit for a single LSP message
maxStderrBytes 1000000 Upper limit for the stderr diagnostic tail
shutdownTimeoutMs 5000 Graceful shutdown wait time
killGraceMs 2000 Process tree termination wait time
maxResults 100 Number of symbols retained after merging and deduplication
maxResultChars 16000 Character budget for the full model output, minimum 256
timeoutMs 60000 Tool timeout metadata passed to the DSH timeout policy

Behavior and Limitations

  • Concurrency and ordering: A query is fanned out to all configured servers; within the same server, requests are serial. Results are stably sorted by exact match, prefix match, other results, server ID, and original order.
  • Deduplication rule: The deduplication key is name + kind + URI + optional range. The first item after sorting is retained.
  • Error handling: If any provider succeeds (including an empty result), the response is successful; failures and unsupported providers are only counted. If all providers are unsupported, report WORKSPACE_SYMBOL_UNSUPPORTED; if there are failures and no successful results, report WORKSPACE_SYMBOL_PROVIDER_FAILED.
  • Cancellation policy: Caller cancellation sends a best-effort $/cancelRequest and rejects as-is; it does not become a partial success.
  • Process management: For each canonical workspace/server, one process is lazily reused. During unloading, the tool is removed first, then shutdown, exit, and process-tree termination are executed.
  • Unsupported features: No grep fallback, document symbols, call hierarchy, embedding, raw JSON-RPC, or cursor-based LSP operations are provided.

Conclusion

dsh-workspace-intelligence provides a deterministic, context-independent symbol search capability. It embodies the “everything is a plugin” philosophy in the DSH ecosystem. The plugin is released under the MIT License and is suitable for development scenarios that require code structure queries at the agent level.