47082376efaddd1897243204e57ead39eaac6a97
- W13.1 anthropic_plugin (architect-yang, 497 lines): rated C. 6 C ABI functions lack try/catch (§8 violation); my_chat leaks response_body on error path; tool_use response silently dropped. - W13.2 deepseek_plugin (engineer-sun, 486 lines): rated C+. 7 ABI entries unprotected including json::parse paths (malformed JSON terminates); SSE [DONE] sentinel match brittle; ~55% code overlap with anthropic suggests an ai_plugin_base extraction. - W13.3 network_plugin (qa-wang, 322 lines): rated C. CRITICAL: TLS certificate verification fully disabled (set_verify_mode never called, default verify_none accepts any cert) — all AI traffic incl. api_key is MITM-vulnerable. DNS resolve has no timeout; catch lacks (...). - W13.4 lsp_plugin (architect-huang, 749 lines): rated C. CRITICAL: guaranteed deadlock at L519-526 → L547 (g_lsp_impl_start holds mutex then calls g_lsp_impl_stop which re-locks the same non-recursive mutex); 7 vtable funcs unprotected; server→client requests dropped. - W13.5 session+tools (security-cao, 264+251 lines): rated D+/D. Path traversal in builtin_file_read/write (zero validation); global static state in both plugins lacks mutex (UAF risk); 9 vtable funcs lack try/catch. - W13.6 smoke regression (qa-xu, +193 lines): 4 new cases — context max_tokens trim, config dual-store consistency (exposes that W12.2 merge is incomplete: dstalk_config_set→config_service.get returns null), HTTP error path no-crash, repeated init/shutdown cycle. Verified: cmake build 0 error 0 warning, ctest 4/4 pass. Top W14 priorities surfaced: TLS verification (W13.3), LSP deadlock (W13.4), file-tool path traversal (W13.5), config dual-store still broken (W13.6 R2), shared try/catch wrapper across all AI plugins. 🤖 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%