Update meta descriptions and enhance documentation for dstalk project
- Revised meta description to include multi-endpoint routing and decoupled frontends. - Updated Open Graph description to reflect the addition of endpoint management in plugins. - Changed lead paragraph to highlight the new ten functional plugins and their capabilities. - Adjusted project statistics to indicate the inclusion of Web frontend and endpoint management plugin. - Enhanced architecture section to clarify the role of ten functional plugins and the new web frontend. - Updated command list to include new commands for multi-endpoint management and file operations. - Revised public C API documentation to reflect the addition of the ai_endpoint_mgr service. - Expanded roadmap to include the Boost.Beast Web frontend and multi-endpoint capabilities. - Improved contribution guidelines to reflect the current state of the project and encourage community involvement.
This commit is contained in:
83
en.html
83
en.html
@@ -3,10 +3,10 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="dstalk is a C/C++ AI coding CLI compatible with OpenAI-style APIs and Anthropic APIs, built around a dstalk_core.dll plugin host and decoupled multi-frontends.">
|
||||
<meta name="description" content="dstalk is a C/C++ AI coding CLI compatible with OpenAI-style APIs and Anthropic APIs, built around a dstalk_core.dll plugin host, multi-endpoint routing, and decoupled CLI/GUI/Web frontends.">
|
||||
<meta name="theme-color" content="#0b1020">
|
||||
<meta property="og:title" content="dstalk — C/C++ AI Coding CLI">
|
||||
<meta property="og:description" content="OpenAI-compatible / Anthropic powered, C ABI embeddable. dstalk_core.dll is a plugin host with 9 functional plugins covering AI, networking, sessions, LSP, and tools.">
|
||||
<meta property="og:description" content="OpenAI-compatible / Anthropic powered, C ABI embeddable. dstalk_core.dll is a plugin host with 10 functional plugins covering AI, endpoint management, networking, sessions, LSP, and tools.">
|
||||
<meta property="og:type" content="website">
|
||||
<link rel="alternate" hreflang="zh-CN" href="https://dstalk.top/">
|
||||
<link rel="alternate" hreflang="en" href="https://dstalk.top/en.html">
|
||||
@@ -213,7 +213,7 @@
|
||||
<div>
|
||||
<div class="eyebrow">dstalk.top is the official website for the dstalk project</div>
|
||||
<h1><span>ds</span>talk</h1>
|
||||
<p class="lead">An AI coding CLI compatible with OpenAI-style APIs and Anthropic APIs. The core is written in C11 / C++20 and ships dstalk_core.dll as a plugin host that exposes a stable C ABI. Nine functional plugins (AI, networking, LSP, sessions, files, tools, and more) compile to standalone DLLs and plug into the CLI, the SDL3 GUI, and any third-party host.</p>
|
||||
<p class="lead">An AI coding CLI compatible with OpenAI-style APIs and Anthropic APIs. The core is written in C11 / C++20 and ships dstalk_core.dll as a plugin host that exposes a stable C ABI. Ten functional plugins (AI, endpoint management, networking, LSP, sessions, files, tools, and more) compile to standalone DLLs and plug into the CLI, the SDL3 GUI, the Boost.Beast Web frontend, and any third-party host.</p>
|
||||
<div class="actions">
|
||||
<a class="btn btn-primary" href="#quickstart">Get Started</a>
|
||||
<a class="btn btn-secondary" href="https://git.pulsareon.com/pulsareon/dstalk">View Source</a>
|
||||
@@ -222,13 +222,13 @@
|
||||
<span class="badge">v0.1.0</span>
|
||||
<span class="badge">C11 / C++20</span>
|
||||
<span class="badge">Plugin host + C ABI</span>
|
||||
<span class="badge">9 plugins</span>
|
||||
<span class="badge">10 plugins</span>
|
||||
<span class="badge">GPL v3.0</span>
|
||||
</div>
|
||||
<div class="stats" aria-label="Project status">
|
||||
<span class="stat"><strong>Core</strong>dstalk_core.dll (plugin host)</span>
|
||||
<span class="stat"><strong>Frontends</strong>CLI + SDL3 GUI</span>
|
||||
<span class="stat"><strong>Plugins</strong>openai · anthropic · network · lsp · session · context · config · file-io · tools</span>
|
||||
<span class="stat"><strong>Frontends</strong>CLI + SDL3 GUI + Web</span>
|
||||
<span class="stat"><strong>Plugins</strong>openai · anthropic · endpoint_mgr · network · lsp · session · context · config · file-io · tools</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="terminal" aria-label="dstalk command-line example">
|
||||
@@ -258,10 +258,10 @@ AI: dstalk-core is the plugin host. It handles plugin
|
||||
</div>
|
||||
<div class="cards">
|
||||
<article class="card"><div class="icon">C</div><h3>No Node.js runtime</h3><p>The core is built with C11 / C++20 for fast startup and lower memory usage in long-lived terminal sessions.</p></article>
|
||||
<article class="card"><div class="icon">ABI</div><h3>Stable C ABI</h3><p>Public host functions such as dstalk_init and dstalk_service_query, plus 8 service vtables (AI, session, HTTP, file I/O, LSP, and more) make it easy to embed from C/C++, Python, Rust, C#, and Go.</p></article>
|
||||
<article class="card"><div class="icon">AI</div><h3>Compatible AI APIs</h3><p>Two AI plugins ship in the box: OpenAI-compatible and Anthropic. Switch between OpenAI-style APIs and Anthropic APIs via ai.provider in config.toml.</p></article>
|
||||
<article class="card"><div class="icon">CLI</div><h3>CLI and GUI frontends</h3><p>dstalk-cli is an ANSI terminal UI; dstalk-gui is a cross-platform SDL3 window. Both share the same plugin host and core capabilities.</p></article>
|
||||
<article class="card"><div class="icon">PLG</div><h3>Plugin host</h3><p>The core only handles plugin loading, service registry, event bus, and configuration. AI, networking, LSP, and sessions are independent DLLs you can replace or extend.</p></article>
|
||||
<article class="card"><div class="icon">ABI</div><h3>Stable C ABI</h3><p>Public host functions such as dstalk_init and dstalk_service_query, plus 9 service vtables (AI, endpoint management, session, HTTP, file I/O, LSP, and more) make it easy to embed from C/C++, Python, Rust, C#, and Go.</p></article>
|
||||
<article class="card"><div class="icon">AI</div><h3>Multi-endpoint routing</h3><p>OpenAI-compatible and Anthropic AI plugins ship in the box, while ai_endpoint_mgr manages multiple named endpoints. Frontends route through the active endpoint first, and /status shows sanitized endpoint state.</p></article>
|
||||
<article class="card"><div class="icon">CLI</div><h3>CLI, GUI, and Web frontends</h3><p>dstalk-cli is an ANSI terminal UI, dstalk-gui is a cross-platform SDL3 window, and dstalk-web is powered by Boost.Beast + SSE. All three share the same core capabilities.</p></article>
|
||||
<article class="card"><div class="icon">PLG</div><h3>Plugin host</h3><p>The core only handles plugin loading, service registry, event bus, and configuration. AI, endpoint management, networking, LSP, and sessions are independent DLLs you can replace or extend.</p></article>
|
||||
<article class="card"><div class="icon">OSS</div><h3>Open source and hackable</h3><p>Released under GNU GPL v3.0, with example plugins, unit tests, and tutorial docs. Suitable for learning, customization, and local workflow extensions.</p></article>
|
||||
</div>
|
||||
</section>
|
||||
@@ -287,12 +287,22 @@ setup.bat
|
||||
cd ..
|
||||
build.bat
|
||||
|
||||
<span class="cmd"># Create config.toml</span>
|
||||
<span class="cmd"># Legacy single-provider mode</span>
|
||||
ai.provider = "ai_openai"
|
||||
api.base_url = "https://api.openai.com/v1"
|
||||
api.api_key = "sk-xxxxxxxx"
|
||||
api.model = "gpt-4o"
|
||||
|
||||
<span class="cmd"># Multi-endpoint mode</span>
|
||||
endpoints.names = "openai_main, anthropic_alt"
|
||||
endpoints.active = "openai_main"
|
||||
endpoint.openai_main.provider = "ai_openai"
|
||||
endpoint.openai_main.api_key = "sk-xxxxxxxx"
|
||||
endpoint.openai_main.model = "gpt-4o"
|
||||
endpoint.anthropic_alt.provider = "ai_anthropic"
|
||||
endpoint.anthropic_alt.api_key = "sk-ant-xxxx"
|
||||
endpoint.anthropic_alt.model = "claude-sonnet"
|
||||
|
||||
<span class="cmd"># Run CLI</span>
|
||||
build/bin/dstalk_cli.exe config.toml</code></pre>
|
||||
</div>
|
||||
@@ -302,13 +312,13 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
||||
<section id="architecture" class="container section">
|
||||
<div class="section-head">
|
||||
<h2>Plugin host + decoupled multi-frontend architecture</h2>
|
||||
<p>dstalk_core.dll acts as a plugin host responsible for plugin loading, service registry, event bus, and configuration. Nine functional plugins — AI, networking, LSP, sessions, files, tools, and more — compile to standalone DLLs, while frontends reach the core only through the C ABI. The GUI is opt-in via the CMake option DSTALK_BUILD_GUI.</p>
|
||||
<p>dstalk_core.dll acts as a plugin host responsible for plugin loading, service registry, event bus, and configuration. Ten functional plugins — AI, endpoint management, networking, LSP, sessions, files, tools, and more — compile to standalone DLLs, while frontends reach the core only through the C ABI. The GUI and Web frontends are opt-in via DSTALK_BUILD_GUI / DSTALK_BUILD_WEB.</p>
|
||||
</div>
|
||||
<div class="terminal architecture">
|
||||
<div class="terminal-top"><span class="dot"></span><span class="dot"></span><span class="dot"></span><span class="terminal-title">architecture</span></div>
|
||||
<pre><code>┌─────────────────────────────────────────────────────┐
|
||||
│ Frontends │
|
||||
│ dstalk-cli (ANSI UI) dstalk-gui (SDL3) │
|
||||
│ dstalk-cli (ANSI) dstalk-gui (SDL3) dstalk-web (SSE) │
|
||||
└───────────────────────┬─────────────────────────────┘
|
||||
│ C ABI
|
||||
┌───────────────────────▼─────────────────────────────┐
|
||||
@@ -316,9 +326,9 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
||||
│ Plugin Loader · Service Registry · Event Bus · │
|
||||
│ Config Manager │
|
||||
├───────────────┬───────────────┬─────────────────────┤
|
||||
│ openai (ai) │ anthropic (ai)│ network (http) │
|
||||
│ lsp (client) │ session │ context │
|
||||
│ config │ file-io │ tools │
|
||||
│ openai (ai) │ anthropic (ai)│ endpoint_mgr │
|
||||
│ network(http)│ lsp (client) │ session │
|
||||
│ context │ config │ file-io · tools │
|
||||
└───────────────┴───────────────┴─────────────────────┘
|
||||
Boost.JSON · Boost.Asio / Beast · OpenSSL TLS</code></pre>
|
||||
</div>
|
||||
@@ -335,9 +345,11 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
||||
<tr><td>Core library</td><td>C11 / C++20, dstalk_core.dll, plugin host, public C ABI</td><td><span class="ok">Enabled</span></td></tr>
|
||||
<tr><td>CLI frontend</td><td>ANSI terminal UI using dstalk/dstalk_host.h</td><td><span class="ok">Enabled</span></td></tr>
|
||||
<tr><td>GUI frontend</td><td>SDL3 graphical frontend, enabled via CMake option DSTALK_BUILD_GUI</td><td><span class="todo">Optional build</span></td></tr>
|
||||
<tr><td>Plugins</td><td>9 functional plugins (openai · anthropic · network · lsp · session · context · config · file-io · tools), standalone DLLs</td><td><span class="ok">Enabled</span></td></tr>
|
||||
<tr><td>Tests</td><td>10 test targets covering plugin host, event bus, service registry, plugin loader, and AI plugins, integrated with CTest</td><td><span class="ok">Enabled</span></td></tr>
|
||||
<tr><td>Docs</td><td>docs/tutorial, docs/reference (commands, plugin-abi), docs/explanation (architecture, plugin-lifecycle, security-logging)</td><td><span class="ok">Published</span></td></tr>
|
||||
<tr><td>Web frontend</td><td>Boost.Beast HTTP + SSE streaming frontend, enabled via CMake option DSTALK_BUILD_WEB</td><td><span class="todo">Optional build</span></td></tr>
|
||||
<tr><td>Frontend common</td><td>dstalk_frontend_common reuses config discovery, initialization, and service-query logic</td><td><span class="ok">Enabled</span></td></tr>
|
||||
<tr><td>Plugins</td><td>10 functional plugins (openai · anthropic · endpoint_mgr · network · lsp · session · context · config · file-io · tools), standalone DLLs</td><td><span class="ok">Enabled</span></td></tr>
|
||||
<tr><td>Tests</td><td>11 test targets covering plugin host, event bus, service registry, plugin loader, endpoint manager, and AI plugins, integrated with CTest</td><td><span class="ok">Enabled</span></td></tr>
|
||||
<tr><td>Docs</td><td>docs/tutorial, docs/reference (commands, config, plugin-abi), docs/explanation (architecture, plugin-lifecycle, security-logging)</td><td><span class="ok">Published</span></td></tr>
|
||||
<tr><td>Examples</td><td>examples/example_plugin shows a plugin template</td><td><span class="ok">Available</span></td></tr>
|
||||
<tr><td>Dependencies</td><td>Conan2, boost/1.86.0, openssl/3.4.1</td><td><span class="ok">Configured</span></td></tr>
|
||||
<tr><td>Build system</td><td>CMake 3.21+, Ninja, LLVM/Clang, CMakePresets</td><td><span class="ok">Configured</span></td></tr>
|
||||
@@ -354,10 +366,15 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
||||
<div class="panel table-wrap">
|
||||
<table>
|
||||
<tr><th>Commands</th><th>Description</th><th>Example</th></tr>
|
||||
<tr><td>/help</td><td>Show help</td><td>/help</td></tr>
|
||||
<tr><td>/help / /h</td><td>Show the command list</td><td>/help</td></tr>
|
||||
<tr><td>/quit / /q</td><td>Quit the program</td><td>/quit</td></tr>
|
||||
<tr><td>/clear</td><td>Clear the current conversation context</td><td>/clear</td></tr>
|
||||
<tr><td>/model <name></td><td>Switch the current model</td><td>/model gpt-4o</td></tr>
|
||||
<tr><td>/file read <path></td><td>Read file content and print it to the terminal</td><td>/file read README.md</td></tr>
|
||||
<tr><td>/context</td><td>Show the current token count and message count</td><td>/context</td></tr>
|
||||
<tr><td>/status</td><td>Show sanitized runtime status without printing the full API key</td><td>/status</td></tr>
|
||||
<tr><td>/model <name></td><td>Switch the current model; in multi-endpoint mode it updates the active endpoint</td><td>/model gpt-4o</td></tr>
|
||||
<tr><td>/file list [path]</td><td>List directory contents; omit path to list the current directory</td><td>/file list src/</td></tr>
|
||||
<tr><td>/file show <path></td><td>Show file content</td><td>/file show README.md</td></tr>
|
||||
<tr><td>/file read <path></td><td>Read file content (same as /file show)</td><td>/file read config.toml</td></tr>
|
||||
<tr><td>/file write <path> <content></td><td>Write content to a file</td><td>/file write note.txt hello</td></tr>
|
||||
<tr><td>/save <path> / /load <path></td><td>Save or restore a session</td><td>/save session.json</td></tr>
|
||||
</table>
|
||||
@@ -367,7 +384,7 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
||||
<section id="api" class="container section">
|
||||
<div class="section-head">
|
||||
<h2>Public C API</h2>
|
||||
<p>dstalk exposes its capabilities through four public headers: dstalk_host.h manages the host lifecycle and plugins, dstalk_services.h defines 8 service vtables, dstalk_lsp.h provides a standalone LSP client, and dstalk_types.h shares message and event types. Frontends call dstalk_service_query() to obtain a service pointer, then invoke capabilities through function pointers.</p>
|
||||
<p>dstalk exposes its capabilities through four public headers: dstalk_host.h manages the host lifecycle and plugins, dstalk_services.h defines 9 service vtables including ai_endpoint_mgr, dstalk_lsp.h provides a standalone LSP client, and dstalk_types.h shares message and event types. Frontends call dstalk_service_query() to obtain a service pointer, then invoke capabilities through function pointers.</p>
|
||||
</div>
|
||||
<div class="terminal">
|
||||
<div class="terminal-top"><span class="dot"></span><span class="dot"></span><span class="dot"></span><span class="terminal-title">dstalk_host.h — host API</span></div>
|
||||
@@ -396,7 +413,7 @@ void dstalk_set_diag_callback(dstalk_diag_cb cb);</code></pre>
|
||||
</div>
|
||||
<div class="terminal" style="margin-top:16px">
|
||||
<div class="terminal-top"><span class="dot"></span><span class="dot"></span><span class="dot"></span><span class="terminal-title">dstalk_services.h — service vtable example</span></div>
|
||||
<pre><code><span class="dim">// AI service: dstalk_service_query("ai.openai", 0)</span>
|
||||
<pre><code><span class="dim">// AI service: dstalk_service_query("ai_openai", 1)</span>
|
||||
typedef struct {
|
||||
int (*configure)(const char* provider, const char* base_url,
|
||||
const char* api_key, const char* model,
|
||||
@@ -407,24 +424,26 @@ typedef struct {
|
||||
void (*free_result)(dstalk_chat_result_t* result);
|
||||
} dstalk_ai_service_t;
|
||||
|
||||
<span class="dim">// Same pattern: dstalk_session_service_t, dstalk_http_service_t,</span>
|
||||
<span class="dim">// dstalk_file_io_service_t, dstalk_config_service_t,</span>
|
||||
<span class="dim">// dstalk_tools_service_t, dstalk_lsp_service_t</span></code></pre>
|
||||
<span class="dim">// endpoint manager: dstalk_service_query("ai_endpoint_mgr", 1)</span>
|
||||
<span class="dim">// Same pattern: dstalk_ai_endpoint_mgr_t, dstalk_session_service_t,</span>
|
||||
<span class="dim">// dstalk_http_service_t, dstalk_file_io_service_t,</span>
|
||||
<span class="dim">// dstalk_config_service_t, dstalk_tools_service_t, dstalk_lsp_service_t</span></code></pre>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="roadmap" class="container section">
|
||||
<div class="section-head">
|
||||
<h2>Roadmap</h2>
|
||||
<p>The plugin host, CLI, SDL3 GUI, nine core plugins, tests, and documentation are already in place. Future work focuses on deeper capabilities and ecosystem expansion.</p>
|
||||
<p>The plugin host, CLI, SDL3 GUI, Boost.Beast Web frontend, ten core plugins, tests, and documentation are already in place. Future work focuses on deeper capabilities and ecosystem expansion.</p>
|
||||
</div>
|
||||
<div class="panel table-wrap">
|
||||
<table>
|
||||
<tr><th>Phase</th><th>Scope</th><th>Status</th></tr>
|
||||
<tr><td>Skeleton</td><td>Project skeleton, CMake/Ninja build, Conan dependencies, DLL exports, frontend main loop</td><td><span class="ok">Done</span></td></tr>
|
||||
<tr><td>Plugin host</td><td>Plugin loader, service registry, event bus, configuration; 9 core plugins (openai · anthropic · network · lsp · session · context · config · file-io · tools)</td><td><span class="ok">Done</span></td></tr>
|
||||
<tr><td>Chat capability</td><td>HTTPS networking, OpenAI-compatible / Anthropic API adapters, streaming output, multi-turn sessions, file I/O tools</td><td><span class="ok">Available</span></td></tr>
|
||||
<tr><td>GUI frontend</td><td>SDL3 graphical window (DSTALK_BUILD_GUI), an optional frontend sharing the same plugin host as the CLI</td><td><span class="todo">Optional build</span></td></tr>
|
||||
<tr><td>Plugin host</td><td>Plugin loader, service registry, event bus, configuration; 10 core plugins (openai · anthropic · endpoint_mgr · network · lsp · session · context · config · file-io · tools)</td><td><span class="ok">Done</span></td></tr>
|
||||
<tr><td>Chat capability</td><td>HTTPS networking, OpenAI-compatible / Anthropic API adapters, streaming output, multi-turn sessions, tool calling, and file I/O</td><td><span class="ok">Available</span></td></tr>
|
||||
<tr><td>Multi-endpoint</td><td>ai_endpoint_mgr manages multiple named AI endpoints; frontends route through the active endpoint first and /status returns sanitized state</td><td><span class="ok">Available</span></td></tr>
|
||||
<tr><td>GUI / Web frontends</td><td>SDL3 graphical window and Boost.Beast Web + SSE, optional frontends sharing the same plugin host as the CLI</td><td><span class="todo">Optional build</span></td></tr>
|
||||
<tr><td>Next phase</td><td>Deeper LSP integration, third-party plugin SDK, cross-platform distribution, ongoing documentation</td><td><span class="todo">Planned</span></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -436,7 +455,7 @@ typedef struct {
|
||||
<p>dstalk is an open project. Developers interested in C/C++, terminal UX, AI API adapters, GUI, documentation, and testing are welcome to participate.</p>
|
||||
</div>
|
||||
<div class="cards">
|
||||
<article class="card"><div class="icon">PR</div><h3>Improve the codebase</h3><p>The core, CLI, SDL3 GUI, and nine plugins (AI, networking, LSP, sessions, files, tools, and more) all welcome patches; build scripts and cross-platform compatibility have headroom too.</p></article>
|
||||
<article class="card"><div class="icon">PR</div><h3>Improve the codebase</h3><p>The core, CLI, SDL3 GUI, Web frontend, and 10 plugins (AI, endpoint management, networking, LSP, sessions, files, tools, and more) all welcome patches; build scripts and cross-platform compatibility have headroom too.</p></article>
|
||||
<article class="card"><div class="icon">PLG</div><h3>Build new plugins</h3><p>Use examples/example_plugin and docs/reference/plugin-abi.md as a starting point — register new services through the C ABI to bring your own models, tools, or data sources into dstalk.</p></article>
|
||||
<article class="card"><div class="icon">DOC</div><h3>Improve docs and tests</h3><p>docs/tutorial and docs/reference are taking shape; help expand tutorials, command references, plugin-ABI notes, and the coverage of host_api_test / smoke_test.</p></article>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user