$ 00 DeepSeekCode open source

围绕 DeepSeek 本地工具链路构建的 Code Agent。

DeepSeekCode 不是聊天壳。它把 DeepSeek native tool calls、稳定 prompt 前缀、会话恢复、工具结果压缩、权限 gate、长期记忆和 Windows 终端体验放进同一个 TypeScript runtime。

D:\code\DeepSeekTest | deepseekcode SESSION EVENTS +

$ deepseekcode --continue

* session_context_loaded | latest transcript restored

* startup_shell_prompt | ask before command execution

> 继续上一个本地项目,修复失败点并跑验证

1 cache_guard -> reusable prefix checked

2 tool<read_file> -> src/orders.js

3 tool<write_file> -> src/discounts.js

thinking compact tool_result_summary persisted

recent_conversation
tool_result_summary
runtime_run_state

* npm test passed | acceptance report created

2 缓存检查
4 发布检查
0 待处理 gate
MIT license
INSTALL

安装后在任意项目目录启动。

通过 npm 全局安装后,进入项目目录输入 deepseekcode 即可启动。默认项目是当前目录,运行数据写入当前项目的 .deepseekcode;启动时会询问是否开启本会话 shell 权限。

npm install -g @xh12312/deepseekcode
cd D:\code\DeepSeekTest
deepseekcode
CONTEXT

长任务不应该反复回放全部历史。

DeepSeekCode 将旧对话压缩为 conversation summary、tool_result_summary 和 runtime_run_state,并把稳定前缀保持在 prompt 前段以提高缓存复用。

3 context layers
stable prefix
recent conversation
tool summaries
raw log replay
FEATURES

当前版本聚焦本地工具链路和 TUI 交互。

Typed action loop

模型通过 DeepSeek native tool calls 请求本地工具,runtime 负责权限、校验、执行、tool result 回放和失败反馈。

TUI workflow

TUI 默认中文,支持模型选择、输入历史、滚动 transcript、启动 shell 权限询问,以及 shell/plan/question gate。

Agent state

Planner、Builder、Tester、Reviewer 使用 compact tool summary,并写入 agent progress checkpoint。

Approval gates

文件、shell、browser、MCP、plan 都可以进入审批或验证闸,状态写入 SQLite。

Extensions

Skills、plugins、MCP、Office 产物和 browser action 保持明确扩展边界。

Telemetry

记录 provider cache hit/miss、prompt shape、run progress 和真实测试审计结果。

ARCHITECTURE

DeepSeekCode 的后端工作流。

messages tools schema tool_calls local execution tool_result next turn
ROADMAP

下一步继续补真实 Agent 能力。

Now

已接通 native tool calls、本地工具 registry、tool_result 压缩、runtime_run_state、skills/plugins 基础路径和 TencentDB-Agent-Memory。

Next

继续增强真实场景评测、后台 worker pool、Office/PPT 质量、浏览器验证、TUI 键鼠验收和大型项目稳定性。

Later

补更完整的插件生态、浏览器自动化、远程执行、长任务 worker 和更细的 token/cache 优化。

FAQ

常见问题。

DeepSeekCode 现在的核心链路是什么?

QueryEngine 负责分类和 action loop,Tools 执行本地能力,StateStore 持久化 run/task/action/event,SessionStorage 保存对话和 compact tool result。

怎么降低历史对话的 token 消耗?

不全量塞历史。稳定规则和工具 schema 放前面吃缓存;最近几轮保留;旧对话压成结构化摘要;工具输出只保留失败原因、路径、产物和关键结果。

怎么验证不是只跑基础检查?

公开版本只写已接通能力;真实任务、prompt audit、产物验证和失败点继续放在独立测试目录,不作为完成度宣传。