58869abc15dde4f26e2faaeb34d04f2c442d99ca
- W12.1 context_plugin (engineer-zhou): wrap C ABI surface in try/catch, add OOM-safe strdup_message_fields helper, make g_max_tokens drive message-count trim (option A). - W12.2 config refactor (architect-lin): introduce plugins/config/include/toml_parse.h to eliminate 74-line parser duplication; config_plugin delegates to host->config_get/set, collapsing the dual-store data island; ConfigStore::get() now copies via thread_local std::string to remove c_str() dangling under concurrent set(). Zero ABI changes. - W12.3 CLI command parsing (engineer-zhao): guard /clear and /context on missing session service; refactor /file dispatch so bare /file write hits usage instead of unknown-command. - W12.4 build path unification (devops-hu): set per-target RUNTIME_OUTPUT_DIRECTORY on dstalk-cli; remove stale build/dstalk-cli/dstalk-cli.exe so build/bin/ is the sole binary. - W12.5 STATUS.md auto-refresh (engineer-li): run W11.6 script to regenerate STATUS from live profile/group data. - W12.6 plugin-abi.md (writer-deng): add §8 exception safety across ABI boundary and §9 string return lifetime; reference real audit-found violations as anti-examples. Verified: cmake build 0 error 0 warning, ctest 4/4 pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.toml 中 ai.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.
Languages
C++
85%
Python
4.5%
C
3.6%
CMake
3.1%
Batchfile
2.1%
Other
1.7%