New:Socket for Asana Is Now Available.Learn more
Get Started

dsh-acp

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsh-acp

Standalone Agent Client Protocol (ACP) server for DeepSeek Harness with real-time streaming, thought visibility, tool lifecycle updates, and session recovery.

latest
Source
npmnpm
Version
0.1.27
Version published
Weekly downloads
1.8K
4.63%
Maintainers
1
Weekly downloads
 
Created
Source

DeepSeek Harness ACP Server (Standalone)

npm version npm downloads license

Standalone Agent Client Protocol (ACP) Server powered by DeepSeek Harness with real-time token streaming, thought trace transparency, tool execution lifecycle updates, and cross-process session recovery.

中文文档

✨ Features

  • ⚡ Real-time Token Streaming: Word-by-word streaming (agent_message_chunk) for ultra-low latency.

  • 🧠 Thought Trace Streaming: Live reasoning and thinking flow (agent_thought_chunk).

  • 📊 Comprehensive Token & Performance Metrics: Standard usage (input/output/cached/thought tokens) and detailed _meta.metrics (TTFT, tok/s, cache hit rate, turns, steps) in session/prompt response.

  • 🛠️ Tool Lifecycle Updates: Observable tool execution states (tool_call & tool_call_update).

  • 🧩 MCP (Model Context Protocol) Support: Connect to external Stdio / SSE MCP servers, auto-discovering project .mcp.json / .cursor/mcp.json / .vscode/mcp.json and ACP session parameters to seamlessly expand the agent's tool ecosystem.

  • 🔄 Session Recovery & Listing: Seamless multi-turn session resume (session/load, session/resume, session/list).

  • ⚙️ Dynamic Configuration: Real-time model switching (deepseek-v4-pro / deepseek-v4-flash).

  • 📦 Zero-Config Startup: Built-in default configuration — start immediately with only DEEPSEEK_API_KEY.

🚀 Quick Start

1. Global Installation (CLI)

# Install globally via npm (using full name or short alias)
npm install -g deepseek-harness-acp
# or
npm install -g dsh-acp

# Or run directly via npx without installation
npx dsh-acp
# or
npx deepseek-harness-acp

2. Environment Variables

Create a .env file or export environment variables:

export DEEPSEEK_API_KEY="sk-your-api-key"
# Optional overrides:
export DEEPSEEK_BASE_URL="https://api.deepseek.com"
export DSH_PERMISSION_MODE="workspace-write" # workspace-write | danger-full-access

🔌 Integration with Third-Party Clients

Zed Editor

Add the following to your Zed settings (~/.config/zed/settings.json):

{
  "assistant": {
    "version": "2",
    "custom_agents": [
      {
        "name": "DeepSeek Harness",
        "command": "deepseek-harness-acp",
        "env": {
          "DEEPSEEK_API_KEY": "sk-your-deepseek-api-key"
        }
      }
    ]
  }
}

FreeBuddy

In FreeBuddy settings or custom agent configuration, specify:

  • Command: deepseek-harness-acp (or dsh-acp)
  • Environment: DEEPSEEK_API_KEY=sk-...

Node.js / TypeScript SDK

import { spawn } from 'node:child_process'
import { ClientSideConnection, ndJsonStream } from '@agentclientprotocol/sdk'

const proc = spawn('deepseek-harness-acp', [], {
  env: { ...process.env, DEEPSEEK_API_KEY: 'sk-your-api-key' },
  stdio: ['pipe', 'pipe', 'inherit'],
})

const stream = ndJsonStream(proc.stdin, proc.stdout)
const client = new ClientSideConnection(
  (agent) => ({
    sessionUpdate: async ({ update }) => {
      if (update.sessionUpdate === 'agent_message_chunk') {
        process.stdout.write(update.content.text)
      } else if (update.sessionUpdate === 'agent_thought_chunk') {
        process.stderr.write(update.content.text)
      }
    },
    requestPermission: async () => ({ outcome: { outcome: 'selected', optionId: 'allow-once' } }),
  }),
  stream,
)

await client.initialize({ protocolVersion: 1, clientCapabilities: {} })
const { sessionId } = await client.newSession({ cwd: process.cwd(), mcpServers: [] })

await client.prompt({
  sessionId,
  prompt: [{ type: 'text', text: 'Hello DeepSeek!' }],
})

🧩 MCP (Model Context Protocol) Configuration

deepseek-harness-acp natively operates as an MCP Client, connecting to external MCP servers and exposing their tools directly to the DeepSeek agent:

1. Workspace Configuration Discovery

Create a .mcp.json (or .cursor/mcp.json / .vscode/mcp.json) in your project root:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."
      }
    },
    "fetch": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"]
    },
    "remote-sse": {
      "url": "http://localhost:8080/sse"
    }
  }
}

2. Dynamic ACP Session Parameters

When an editor client requests session/new or session/resume, specify the mcpServers list in the parameters. The server will dynamically connect and register the tools into DeepSeek's decision context.

📜 Supported ACP Methods

Method / NotificationDescription
initializeCapability negotiation (loadSession: true, sessionCapabilities.close/list/resume)
session/newCreate a fresh session and return active configOptions
session/loadRestore an existing session and historical context from disk
session/resumeResume an existing session from memory or persistence
session/listList known sessions filtered by workspace cwd
session/set_config_optionDynamically update active session configuration (e.g. model)
session/promptSend user message and await completion
session/cancelCancel in-flight prompt
session/closeRelease session and clean up memory
session/update (Stream)Delivers live text, thoughts, and tool lifecycle events

📄 License

MIT © maojindao55

Keywords

deepseek

FAQs

Package last updated on 27 Aug 2026

Related posts