Files
dstalk/README.md
XiuChengWu 5766938524
Some checks failed
CI / Determine matrix (push) Has been cancelled
CI / ${{ matrix.os }} / ${{ matrix.build_type }} (push) Has been cancelled
Wave 5+6: plugin ABI hardening, build modernization, ABI/security docs
Wave 5 (9 parallel agents):
- W1.1 atomic diag callback + DLL handle release on shutdown (lin)
- W2.1 unify cross-DLL heap discipline (host->alloc/free/strdup) (chen)
- W2.2 secure_zero api_key on shutdown for deepseek/anthropic (cao)
- W3 CMake modernization: target-based cxx_std_20, dstalk_boost_config
  INTERFACE lib, root-level RUNTIME_OUTPUT_DIRECTORY (hu)
- W4 GitHub Actions CI with dynamic Linux/Windows matrix (ma)
- W5.1 SSE buffer_body to cut peak memory ~67% on 32K streams (zhou)
- W6.1 LSP JSON-RPC frame parser hardened against header reordering (sun)
- W7 smoke test: copy plugin DLLs post-build + Boost.JSON src.hpp fix
  for full 9-plugin load coverage (wang)
- W8.1 README slimmed 398->92, Diataxis docs/ skeleton (deng)

Wave 6 (6 parallel agents):
- W9.1 docs/explanation: architecture + plugin-lifecycle (deng)
- W9.3 log credential leak audit (0 vulns, audit trail in
  docs/explanation/security-logging.md) (cao)
- W9.4 docs/reference/plugin-abi.md - 7-point ABI contract (lin)
- W9.6 CLI /history command + status integration (zhao)
- W9.8 plugin_loader fault tolerance: per-plugin failure no longer
  aborts dstalk_init (huang)
- W9.10 host_api unit tests: tests/host_api_test.cpp, 8 cases (liu)

CEO oversight (preexisting bugs fixed during Wave 5 verification):
- lsp_plugin.cpp:449 forward decl mismatch (int vs void)
- tools_plugin.cpp:109 missing forward decl

Multi-agent collaboration framework:
- agents/WORKFLOW.md: 6-stage protocol, two-tier governance,
  prompt template, technical constraints registry

Build: cmake --build 0 error / 0 warning. Tests: 2/2 100% pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-27 05:39:10 +08:00

4.9 KiB

dstalk

AI 编程 CLI —— 基于 DeepSeek V4, 兼容 OpenAI / Anthropic API

官网: dstalk.top


这是什么?

dstalk 是一款 AI 编程助手命令行工具, 通过调用大模型在终端里完成代码编写、重构、调试和文件操作。

核心设计为 插件化 CDLL + 多前端解耦:

┌───────────────────────────────────────────────────────────┐
│                    前端层 (Frontends)                       │
│  ┌──────────────────┐      ┌──────────────────────────┐   │
│  │  dstalk-cli      │      │  dstalk-gui               │   │
│  │  ANSI 终端 UI    │      │  SDL3 图形化 UI            │   │
│  └────────┬─────────┘      └─────────────┬─────────────┘   │
│           └──────────────┬───────────────┘                 │
│                          │ C ABI                           │
└──────────────────────────┼─────────────────────────────────┘
                           │
┌──────────────────────────▼─────────────────────────────────┐
│           核心层 (dstalk-core.dll) — 插件宿主               │
│  ┌──────────────────────────────────────────────────────┐  │
│  │  Host: 插件加载 · 服务注册 · 事件总线 · 配置管理       │  │
│  └──────────────────────────────────────────────────────┘  │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐  │
│  │ deepseek │ │ anthropic│ │ network  │ │    lsp       │  │
│  │ (ai)     │ │ (ai)     │ │ (http)   │ │   客户端     │  │
│  └──────────┘ └──────────┘ └──────────┘ └──────────────┘  │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐  │
│  │ session  │ │ context  │ │ file-io  │ │    tools     │  │
│  └──────────┘ └──────────┘ └──────────┘ └──────────────┘  │
└─────────────────────────────────────────────────────────────┘
  • dstalk-core —— C11/C++20 插件化宿主 DLL, 负责插件加载、服务注册、事件总线、配置管理
  • dstalk-cli —— 命令行前端, ANSI 终端 UI
  • dstalk-gui —— 图形化前端, SDL3 跨平台窗口
  • plugins/ —— 9 个功能插件, 编译为独立 DLL, 通过 C ABI 动态注册服务

核心与界面完全解耦, 可编写自己的前端或把 AI 能力嵌入到现有工具中。


支持的 AI 模型

提供商 模型 插件
DeepSeek deepseek-v4-pro ai.deepseek
Anthropic claude-opus-4 ai.anthropic
OpenAI 兼容 GPT 系列 ai.deepseek (兼容)

通过 config.tomlai.provider 一键切换。


快速开始

cd tools && setup.bat    # 1. 安装工具链 (CMake / Ninja / LLVM / Conan2)
build.bat                # 2. 编译
# 3. 创建 config.toml    # 见教程: docs/tutorial/quick-start.md
build/dstalk-cli/dstalk-cli.exe   # 4. 运行
# 5. 输入自然语言        # "帮我写一个 C 程序"

详细 5 步教程 (含 config.toml 模板与对话示例): docs/tutorial/quick-start.md


文档

文档 说明
教程: 快速入门 5 步上手, 从安装到第一个对话
参考: CLI 命令 完整命令速查表
文档导航 全部文档索引与未来计划

许可证

GNU General Public License v3. Copyright (c) 2026 dstalk contributors.


dstalk.top | GitHub