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>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<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 name="theme-color" content="#0b1020">
|
||||||
<meta property="og:title" content="dstalk — C/C++ AI Coding CLI">
|
<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">
|
<meta property="og:type" content="website">
|
||||||
<link rel="alternate" hreflang="zh-CN" href="https://dstalk.top/">
|
<link rel="alternate" hreflang="zh-CN" href="https://dstalk.top/">
|
||||||
<link rel="alternate" hreflang="en" href="https://dstalk.top/en.html">
|
<link rel="alternate" hreflang="en" href="https://dstalk.top/en.html">
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="eyebrow">dstalk.top is the official website for the dstalk project</div>
|
<div class="eyebrow">dstalk.top is the official website for the dstalk project</div>
|
||||||
<h1><span>ds</span>talk</h1>
|
<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">
|
<div class="actions">
|
||||||
<a class="btn btn-primary" href="#quickstart">Get Started</a>
|
<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>
|
<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">v0.1.0</span>
|
||||||
<span class="badge">C11 / C++20</span>
|
<span class="badge">C11 / C++20</span>
|
||||||
<span class="badge">Plugin host + C ABI</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>
|
<span class="badge">GPL v3.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="stats" aria-label="Project status">
|
<div class="stats" aria-label="Project status">
|
||||||
<span class="stat"><strong>Core</strong>dstalk_core.dll (plugin host)</span>
|
<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>Frontends</strong>CLI + SDL3 GUI + Web</span>
|
||||||
<span class="stat"><strong>Plugins</strong>openai · anthropic · network · lsp · session · context · config · file-io · tools</span>
|
<span class="stat"><strong>Plugins</strong>openai · anthropic · endpoint_mgr · network · lsp · session · context · config · file-io · tools</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="terminal" aria-label="dstalk command-line example">
|
<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>
|
||||||
<div class="cards">
|
<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">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">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>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">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 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">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, networking, LSP, and sessions are independent DLLs you can replace or extend.</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>
|
<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>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -287,12 +287,22 @@ setup.bat
|
|||||||
cd ..
|
cd ..
|
||||||
build.bat
|
build.bat
|
||||||
|
|
||||||
<span class="cmd"># Create config.toml</span>
|
<span class="cmd"># Legacy single-provider mode</span>
|
||||||
ai.provider = "ai_openai"
|
ai.provider = "ai_openai"
|
||||||
api.base_url = "https://api.openai.com/v1"
|
api.base_url = "https://api.openai.com/v1"
|
||||||
api.api_key = "sk-xxxxxxxx"
|
api.api_key = "sk-xxxxxxxx"
|
||||||
api.model = "gpt-4o"
|
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>
|
<span class="cmd"># Run CLI</span>
|
||||||
build/bin/dstalk_cli.exe config.toml</code></pre>
|
build/bin/dstalk_cli.exe config.toml</code></pre>
|
||||||
</div>
|
</div>
|
||||||
@@ -302,13 +312,13 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
|||||||
<section id="architecture" class="container section">
|
<section id="architecture" class="container section">
|
||||||
<div class="section-head">
|
<div class="section-head">
|
||||||
<h2>Plugin host + decoupled multi-frontend architecture</h2>
|
<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>
|
||||||
<div class="terminal architecture">
|
<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>
|
<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>┌─────────────────────────────────────────────────────┐
|
<pre><code>┌─────────────────────────────────────────────────────┐
|
||||||
│ Frontends │
|
│ Frontends │
|
||||||
│ dstalk-cli (ANSI UI) dstalk-gui (SDL3) │
|
│ dstalk-cli (ANSI) dstalk-gui (SDL3) dstalk-web (SSE) │
|
||||||
└───────────────────────┬─────────────────────────────┘
|
└───────────────────────┬─────────────────────────────┘
|
||||||
│ C ABI
|
│ C ABI
|
||||||
┌───────────────────────▼─────────────────────────────┐
|
┌───────────────────────▼─────────────────────────────┐
|
||||||
@@ -316,9 +326,9 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
|||||||
│ Plugin Loader · Service Registry · Event Bus · │
|
│ Plugin Loader · Service Registry · Event Bus · │
|
||||||
│ Config Manager │
|
│ Config Manager │
|
||||||
├───────────────┬───────────────┬─────────────────────┤
|
├───────────────┬───────────────┬─────────────────────┤
|
||||||
│ openai (ai) │ anthropic (ai)│ network (http) │
|
│ openai (ai) │ anthropic (ai)│ endpoint_mgr │
|
||||||
│ lsp (client) │ session │ context │
|
│ network(http)│ lsp (client) │ session │
|
||||||
│ config │ file-io │ tools │
|
│ context │ config │ file-io · tools │
|
||||||
└───────────────┴───────────────┴─────────────────────┘
|
└───────────────┴───────────────┴─────────────────────┘
|
||||||
Boost.JSON · Boost.Asio / Beast · OpenSSL TLS</code></pre>
|
Boost.JSON · Boost.Asio / Beast · OpenSSL TLS</code></pre>
|
||||||
</div>
|
</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>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>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>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>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>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>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>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>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>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>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>
|
<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">
|
<div class="panel table-wrap">
|
||||||
<table>
|
<table>
|
||||||
<tr><th>Commands</th><th>Description</th><th>Example</th></tr>
|
<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>/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>/context</td><td>Show the current token count and message count</td><td>/context</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>/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>/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>
|
<tr><td>/save <path> / /load <path></td><td>Save or restore a session</td><td>/save session.json</td></tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -367,7 +384,7 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
|||||||
<section id="api" class="container section">
|
<section id="api" class="container section">
|
||||||
<div class="section-head">
|
<div class="section-head">
|
||||||
<h2>Public C API</h2>
|
<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>
|
||||||
<div class="terminal">
|
<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>
|
<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>
|
||||||
<div class="terminal" style="margin-top:16px">
|
<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>
|
<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 {
|
typedef struct {
|
||||||
int (*configure)(const char* provider, const char* base_url,
|
int (*configure)(const char* provider, const char* base_url,
|
||||||
const char* api_key, const char* model,
|
const char* api_key, const char* model,
|
||||||
@@ -407,24 +424,26 @@ typedef struct {
|
|||||||
void (*free_result)(dstalk_chat_result_t* result);
|
void (*free_result)(dstalk_chat_result_t* result);
|
||||||
} dstalk_ai_service_t;
|
} dstalk_ai_service_t;
|
||||||
|
|
||||||
<span class="dim">// Same pattern: dstalk_session_service_t, dstalk_http_service_t,</span>
|
<span class="dim">// endpoint manager: dstalk_service_query("ai_endpoint_mgr", 1)</span>
|
||||||
<span class="dim">// dstalk_file_io_service_t, dstalk_config_service_t,</span>
|
<span class="dim">// Same pattern: dstalk_ai_endpoint_mgr_t, dstalk_session_service_t,</span>
|
||||||
<span class="dim">// dstalk_tools_service_t, dstalk_lsp_service_t</span></code></pre>
|
<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>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="roadmap" class="container section">
|
<section id="roadmap" class="container section">
|
||||||
<div class="section-head">
|
<div class="section-head">
|
||||||
<h2>Roadmap</h2>
|
<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>
|
||||||
<div class="panel table-wrap">
|
<div class="panel table-wrap">
|
||||||
<table>
|
<table>
|
||||||
<tr><th>Phase</th><th>Scope</th><th>Status</th></tr>
|
<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>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>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, file I/O tools</td><td><span class="ok">Available</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>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>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>
|
<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>
|
</table>
|
||||||
</div>
|
</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>
|
<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>
|
||||||
<div class="cards">
|
<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">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>
|
<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>
|
</div>
|
||||||
|
|||||||
83
index.html
83
index.html
@@ -3,10 +3,10 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="dstalk 是兼容 OpenAI 风格接口与 Anthropic API 的 C/C++ AI 编程 CLI,采用 dstalk_core.dll 插件宿主 + 多前端解耦架构。">
|
<meta name="description" content="dstalk 是兼容 OpenAI 风格接口与 Anthropic API 的 C/C++ AI 编程 CLI,采用 dstalk_core.dll 插件宿主、多 endpoint 路由和 CLI/GUI/Web 多前端解耦架构。">
|
||||||
<meta name="theme-color" content="#0b1020">
|
<meta name="theme-color" content="#0b1020">
|
||||||
<meta property="og:title" content="dstalk — C/C++ AI 编程 CLI">
|
<meta property="og:title" content="dstalk — C/C++ AI 编程 CLI">
|
||||||
<meta property="og:description" content="OpenAI-compatible / Anthropic 驱动,C ABI 可嵌入,dstalk_core.dll 作为插件宿主,9 个功能插件覆盖 AI、网络、会话、LSP 与工具。">
|
<meta property="og:description" content="OpenAI-compatible / Anthropic 驱动,C ABI 可嵌入,dstalk_core.dll 作为插件宿主,10 个功能插件覆盖 AI、endpoint 管理、网络、会话、LSP 与工具。">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<link rel="alternate" hreflang="zh-CN" href="https://dstalk.top/">
|
<link rel="alternate" hreflang="zh-CN" href="https://dstalk.top/">
|
||||||
<link rel="alternate" hreflang="en" href="https://dstalk.top/en.html">
|
<link rel="alternate" hreflang="en" href="https://dstalk.top/en.html">
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="eyebrow">dstalk.top 是 dstalk 项目的官方网站</div>
|
<div class="eyebrow">dstalk.top 是 dstalk 项目的官方网站</div>
|
||||||
<h1><span>ds</span>talk</h1>
|
<h1><span>ds</span>talk</h1>
|
||||||
<p class="lead">兼容 OpenAI 风格接口与 Anthropic API 的 AI 编程 CLI。核心采用 C11 / C++20 编写,以 dstalk_core.dll 作为插件宿主暴露稳定 C ABI,9 个功能插件 (AI、网络、LSP、会话、文件、工具等) 编译为独立 DLL,通过统一接口接入 CLI、SDL3 GUI 与第三方宿主。</p>
|
<p class="lead">兼容 OpenAI 风格接口与 Anthropic API 的 AI 编程 CLI。核心采用 C11 / C++20 编写,以 dstalk_core.dll 作为插件宿主暴露稳定 C ABI,10 个功能插件(AI、endpoint 管理、网络、LSP、会话、文件、工具等)编译为独立 DLL,通过统一接口接入 CLI、SDL3 GUI、Boost.Beast Web 前端与第三方宿主。</p>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<a class="btn btn-primary" href="#quickstart">开始使用</a>
|
<a class="btn btn-primary" href="#quickstart">开始使用</a>
|
||||||
<a class="btn btn-secondary" href="https://git.pulsareon.com/pulsareon/dstalk">查看源代码</a>
|
<a class="btn btn-secondary" href="https://git.pulsareon.com/pulsareon/dstalk">查看源代码</a>
|
||||||
@@ -222,13 +222,13 @@
|
|||||||
<span class="badge">v0.1.0</span>
|
<span class="badge">v0.1.0</span>
|
||||||
<span class="badge">C11 / C++20</span>
|
<span class="badge">C11 / C++20</span>
|
||||||
<span class="badge">插件宿主 + C ABI</span>
|
<span class="badge">插件宿主 + C ABI</span>
|
||||||
<span class="badge">9 个插件</span>
|
<span class="badge">10 个插件</span>
|
||||||
<span class="badge">GPL v3.0</span>
|
<span class="badge">GPL v3.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="stats" aria-label="项目状态">
|
<div class="stats" aria-label="项目状态">
|
||||||
<span class="stat"><strong>核心</strong>dstalk_core.dll (插件宿主)</span>
|
<span class="stat"><strong>核心</strong>dstalk_core.dll (插件宿主)</span>
|
||||||
<span class="stat"><strong>前端</strong>CLI + SDL3 GUI</span>
|
<span class="stat"><strong>前端</strong>CLI + SDL3 GUI + Web</span>
|
||||||
<span class="stat"><strong>插件</strong>openai · anthropic · network · lsp · session · context · config · file-io · tools</span>
|
<span class="stat"><strong>插件</strong>openai · anthropic · endpoint_mgr · network · lsp · session · context · config · file-io · tools</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="terminal" aria-label="dstalk 命令行示例">
|
<div class="terminal" aria-label="dstalk 命令行示例">
|
||||||
@@ -256,10 +256,10 @@ AI: dstalk-core 是插件宿主,负责插件加载、服务注册、
|
|||||||
</div>
|
</div>
|
||||||
<div class="cards">
|
<div class="cards">
|
||||||
<article class="card"><div class="icon">C</div><h3>零 Node.js 运行时</h3><p>核心以 C11 / C++20 构建,目标是毫秒级启动和更低内存占用,适合终端长期交互。</p></article>
|
<article class="card"><div class="icon">C</div><h3>零 Node.js 运行时</h3><p>核心以 C11 / C++20 构建,目标是毫秒级启动和更低内存占用,适合终端长期交互。</p></article>
|
||||||
<article class="card"><div class="icon">ABI</div><h3>稳定 C ABI</h3><p>公开 dstalk_init、dstalk_service_query 等宿主函数和 8 种服务 vtable (AI、会话、HTTP、文件、LSP 等),方便 C/C++、Python、Rust、C#、Go 嵌入。</p></article>
|
<article class="card"><div class="icon">ABI</div><h3>稳定 C ABI</h3><p>公开 dstalk_init、dstalk_service_query 等宿主函数和 9 种服务 vtable(AI、endpoint 管理、会话、HTTP、文件、LSP 等),方便 C/C++、Python、Rust、C#、Go 嵌入。</p></article>
|
||||||
<article class="card"><div class="icon">AI</div><h3>多 API 兼容</h3><p>内置 OpenAI-compatible 与 Anthropic 两个 AI 插件;通过 config.toml 中的 ai.provider 在 OpenAI 风格接口与 Anthropic API 之间切换。</p></article>
|
<article class="card"><div class="icon">AI</div><h3>多 endpoint 路由</h3><p>内置 OpenAI-compatible 与 Anthropic 两个 AI 插件,并通过 ai_endpoint_mgr 管理多个命名 endpoint;前端优先按 active endpoint 路由,/status 可查看脱敏状态。</p></article>
|
||||||
<article class="card"><div class="icon">CLI</div><h3>CLI 与 GUI 双前端</h3><p>dstalk-cli 提供 ANSI 终端 UI,dstalk-gui 基于 SDL3 跨平台窗口,共享同一组核心能力。</p></article>
|
<article class="card"><div class="icon">CLI</div><h3>CLI、GUI 与 Web 三前端</h3><p>dstalk-cli 提供 ANSI 终端 UI,dstalk-gui 基于 SDL3 跨平台窗口,dstalk-web 基于 Boost.Beast + SSE;三者共享同一组核心能力。</p></article>
|
||||||
<article class="card"><div class="icon">PLG</div><h3>插件化宿主</h3><p>核心仅做插件加载、服务注册、事件总线和配置管理;AI、网络、LSP、会话等能力均为独立 DLL,可以替换或扩展。</p></article>
|
<article class="card"><div class="icon">PLG</div><h3>插件化宿主</h3><p>核心仅做插件加载、服务注册、事件总线和配置管理;AI、endpoint 管理、网络、LSP、会话等能力均为独立 DLL,可以替换或扩展。</p></article>
|
||||||
<article class="card"><div class="icon">OSS</div><h3>开源可改造</h3><p>项目采用 GNU GPL v3.0,附带示例插件、单元测试与教程文档,适合学习、二次开发和本地工作流定制。</p></article>
|
<article class="card"><div class="icon">OSS</div><h3>开源可改造</h3><p>项目采用 GNU GPL v3.0,附带示例插件、单元测试与教程文档,适合学习、二次开发和本地工作流定制。</p></article>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -285,12 +285,22 @@ setup.bat
|
|||||||
cd ..
|
cd ..
|
||||||
build.bat
|
build.bat
|
||||||
|
|
||||||
<span class="cmd"># 创建 config.toml</span>
|
<span class="cmd"># 单 Provider 模式 / legacy single provider</span>
|
||||||
ai.provider = "ai_openai"
|
ai.provider = "ai_openai"
|
||||||
api.base_url = "https://api.openai.com/v1"
|
api.base_url = "https://api.openai.com/v1"
|
||||||
api.api_key = "sk-xxxxxxxx"
|
api.api_key = "sk-xxxxxxxx"
|
||||||
api.model = "gpt-4o"
|
api.model = "gpt-4o"
|
||||||
|
|
||||||
|
<span class="cmd"># 多 Endpoint 模式 / multi-endpoint</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"># 运行 CLI</span>
|
<span class="cmd"># 运行 CLI</span>
|
||||||
build/bin/dstalk_cli.exe config.toml</code></pre>
|
build/bin/dstalk_cli.exe config.toml</code></pre>
|
||||||
</div>
|
</div>
|
||||||
@@ -300,22 +310,22 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
|||||||
<section id="architecture" class="container section">
|
<section id="architecture" class="container section">
|
||||||
<div class="section-head">
|
<div class="section-head">
|
||||||
<h2>插件宿主 + 多前端解耦架构</h2>
|
<h2>插件宿主 + 多前端解耦架构</h2>
|
||||||
<p>dstalk_core.dll 作为插件宿主,负责插件加载、服务注册、事件总线和配置管理;AI、网络、LSP、会话、文件 IO、工具等 9 个功能插件编译为独立 DLL,前端只通过 C ABI 触达核心能力。GUI 通过 CMake 选项 DSTALK_BUILD_GUI 启用。</p>
|
<p>dstalk_core.dll 作为插件宿主,负责插件加载、服务注册、事件总线和配置管理;AI、endpoint 管理、网络、LSP、会话、文件 IO、工具等 10 个功能插件编译为独立 DLL,前端只通过 C ABI 触达核心能力。GUI 与 Web 分别通过 CMake 选项 DSTALK_BUILD_GUI / DSTALK_BUILD_WEB 启用。</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="terminal architecture">
|
<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>
|
<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>┌─────────────────────────────────────────────────────┐
|
<pre><code>┌─────────────────────────────────────────────────────┐
|
||||||
│ Frontends │
|
│ Frontends │
|
||||||
│ dstalk-cli (ANSI UI) dstalk-gui (SDL3) │
|
│ dstalk-cli (ANSI) dstalk-gui (SDL3) dstalk-web (SSE) │
|
||||||
└───────────────────────┬─────────────────────────────┘
|
└───────────────────────┬─────────────────────────────┘
|
||||||
│ C ABI
|
│ C ABI
|
||||||
┌───────────────────────▼─────────────────────────────┐
|
┌───────────────────────▼─────────────────────────────┐
|
||||||
│ dstalk_core.dll — 插件宿主 │
|
│ dstalk_core.dll — 插件宿主 │
|
||||||
│ 插件加载 · 服务注册 · 事件总线 · 配置管理 │
|
│ 插件加载 · 服务注册 · 事件总线 · 配置管理 │
|
||||||
├───────────────┬───────────────┬─────────────────────┤
|
├───────────────┬───────────────┬─────────────────────┤
|
||||||
│ openai (ai) │ anthropic (ai)│ network (http) │
|
│ openai (ai) │ anthropic (ai)│ endpoint_mgr │
|
||||||
│ lsp (client) │ session │ context │
|
│ network(http)│ lsp (client) │ session │
|
||||||
│ config │ file-io │ tools │
|
│ context │ config │ file-io · tools │
|
||||||
└───────────────┴───────────────┴─────────────────────┘
|
└───────────────┴───────────────┴─────────────────────┘
|
||||||
Boost.JSON · Boost.Asio / Beast · OpenSSL TLS</code></pre>
|
Boost.JSON · Boost.Asio / Beast · OpenSSL TLS</code></pre>
|
||||||
</div>
|
</div>
|
||||||
@@ -332,9 +342,11 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
|||||||
<tr><td>核心库</td><td>C11 / C++20,dstalk_core.dll,插件宿主,公开 C ABI</td><td><span class="ok">已启用</span></td></tr>
|
<tr><td>核心库</td><td>C11 / C++20,dstalk_core.dll,插件宿主,公开 C ABI</td><td><span class="ok">已启用</span></td></tr>
|
||||||
<tr><td>CLI 前端</td><td>ANSI 终端 UI,调用 dstalk/dstalk_host.h</td><td><span class="ok">已启用</span></td></tr>
|
<tr><td>CLI 前端</td><td>ANSI 终端 UI,调用 dstalk/dstalk_host.h</td><td><span class="ok">已启用</span></td></tr>
|
||||||
<tr><td>GUI 前端</td><td>SDL3 图形化前端,CMake 选项 DSTALK_BUILD_GUI 启用</td><td><span class="todo">可选构建</span></td></tr>
|
<tr><td>GUI 前端</td><td>SDL3 图形化前端,CMake 选项 DSTALK_BUILD_GUI 启用</td><td><span class="todo">可选构建</span></td></tr>
|
||||||
<tr><td>插件</td><td>9 个功能插件 (openai · anthropic · network · lsp · session · context · config · file-io · tools),独立 DLL</td><td><span class="ok">已启用</span></td></tr>
|
<tr><td>Web 前端</td><td>Boost.Beast HTTP + SSE 流式前端,CMake 选项 DSTALK_BUILD_WEB 启用</td><td><span class="todo">可选构建</span></td></tr>
|
||||||
<tr><td>测试</td><td>10 个测试目标覆盖插件宿主、事件总线、服务注册、插件加载及各 AI 插件,CTest 集成</td><td><span class="ok">已启用</span></td></tr>
|
<tr><td>前端公共库</td><td>dstalk_frontend_common 复用配置发现、初始化和服务查询逻辑</td><td><span class="ok">已启用</span></td></tr>
|
||||||
<tr><td>文档</td><td>docs/tutorial、docs/reference (commands、plugin-abi)、docs/explanation (architecture、plugin-lifecycle、security-logging)</td><td><span class="ok">已发布</span></td></tr>
|
<tr><td>插件</td><td>10 个功能插件(openai · anthropic · endpoint_mgr · network · lsp · session · context · config · file-io · tools),独立 DLL</td><td><span class="ok">已启用</span></td></tr>
|
||||||
|
<tr><td>测试</td><td>11 个测试目标覆盖插件宿主、事件总线、服务注册、插件加载、endpoint manager 及各 AI 插件,CTest 集成</td><td><span class="ok">已启用</span></td></tr>
|
||||||
|
<tr><td>文档</td><td>docs/tutorial、docs/reference(commands、config、plugin-abi)、docs/explanation(architecture、plugin-lifecycle、security-logging)</td><td><span class="ok">已发布</span></td></tr>
|
||||||
<tr><td>示例</td><td>examples/example_plugin 展示插件开发模板</td><td><span class="ok">已提供</span></td></tr>
|
<tr><td>示例</td><td>examples/example_plugin 展示插件开发模板</td><td><span class="ok">已提供</span></td></tr>
|
||||||
<tr><td>依赖管理</td><td>Conan2,boost/1.86.0,openssl/3.4.1</td><td><span class="ok">已配置</span></td></tr>
|
<tr><td>依赖管理</td><td>Conan2,boost/1.86.0,openssl/3.4.1</td><td><span class="ok">已配置</span></td></tr>
|
||||||
<tr><td>构建系统</td><td>CMake 3.21+,Ninja,LLVM/Clang,CMakePresets</td><td><span class="ok">已配置</span></td></tr>
|
<tr><td>构建系统</td><td>CMake 3.21+,Ninja,LLVM/Clang,CMakePresets</td><td><span class="ok">已配置</span></td></tr>
|
||||||
@@ -351,10 +363,15 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
|||||||
<div class="panel table-wrap">
|
<div class="panel table-wrap">
|
||||||
<table>
|
<table>
|
||||||
<tr><th>命令</th><th>说明</th><th>示例</th></tr>
|
<tr><th>命令</th><th>说明</th><th>示例</th></tr>
|
||||||
<tr><td>/help</td><td>显示帮助</td><td>/help</td></tr>
|
<tr><td>/help / /h</td><td>显示命令列表</td><td>/help</td></tr>
|
||||||
|
<tr><td>/quit / /q</td><td>退出程序</td><td>/quit</td></tr>
|
||||||
<tr><td>/clear</td><td>清空当前会话上下文</td><td>/clear</td></tr>
|
<tr><td>/clear</td><td>清空当前会话上下文</td><td>/clear</td></tr>
|
||||||
<tr><td>/model <name></td><td>切换当前模型</td><td>/model gpt-4o</td></tr>
|
<tr><td>/context</td><td>显示当前 Token 数和消息条数</td><td>/context</td></tr>
|
||||||
<tr><td>/file read <path></td><td>读取文件内容并输出到终端</td><td>/file read README.md</td></tr>
|
<tr><td>/status</td><td>显示当前运行状态(脱敏,不打印完整 API Key)</td><td>/status</td></tr>
|
||||||
|
<tr><td>/model <name></td><td>切换当前模型;多 endpoint 模式下作用于 active endpoint</td><td>/model gpt-4o</td></tr>
|
||||||
|
<tr><td>/file list [path]</td><td>列出目录内容,不填 path 列出当前目录</td><td>/file list src/</td></tr>
|
||||||
|
<tr><td>/file show <path></td><td>查看文件内容</td><td>/file show README.md</td></tr>
|
||||||
|
<tr><td>/file read <path></td><td>读取文件内容(同 /file show)</td><td>/file read config.toml</td></tr>
|
||||||
<tr><td>/file write <path> <content></td><td>写入文件内容</td><td>/file write note.txt hello</td></tr>
|
<tr><td>/file write <path> <content></td><td>写入文件内容</td><td>/file write note.txt hello</td></tr>
|
||||||
<tr><td>/save <path> / /load <path></td><td>保存或恢复会话</td><td>/save session.json</td></tr>
|
<tr><td>/save <path> / /load <path></td><td>保存或恢复会话</td><td>/save session.json</td></tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -364,7 +381,7 @@ build/bin/dstalk_cli.exe config.toml</code></pre>
|
|||||||
<section id="api" class="container section">
|
<section id="api" class="container section">
|
||||||
<div class="section-head">
|
<div class="section-head">
|
||||||
<h2>公开 C API</h2>
|
<h2>公开 C API</h2>
|
||||||
<p>dstalk 通过 4 个公开头文件暴露能力:dstalk_host.h 管理宿主生命周期与插件,dstalk_services.h 定义 8 种服务 vtable,dstalk_lsp.h 提供独立 LSP 客户端,dstalk_types.h 共享消息与事件类型。前端通过 dstalk_service_query() 获取服务指针,再经函数指针调用具体能力。</p>
|
<p>dstalk 通过 4 个公开头文件暴露能力:dstalk_host.h 管理宿主生命周期与插件,dstalk_services.h 定义 9 种服务 vtable(含 ai_endpoint_mgr),dstalk_lsp.h 提供独立 LSP 客户端,dstalk_types.h 共享消息与事件类型。前端通过 dstalk_service_query() 获取服务指针,再经函数指针调用具体能力。</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="terminal">
|
<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 — 宿主 API</span></div>
|
<div class="terminal-top"><span class="dot"></span><span class="dot"></span><span class="dot"></span><span class="terminal-title">dstalk_host.h — 宿主 API</span></div>
|
||||||
@@ -393,7 +410,7 @@ void dstalk_set_diag_callback(dstalk_diag_cb cb);</code></pre>
|
|||||||
</div>
|
</div>
|
||||||
<div class="terminal" style="margin-top:16px">
|
<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 — 服务 vtable 示例</span></div>
|
<div class="terminal-top"><span class="dot"></span><span class="dot"></span><span class="dot"></span><span class="terminal-title">dstalk_services.h — 服务 vtable 示例</span></div>
|
||||||
<pre><code><span class="dim">// AI 服务: dstalk_service_query("ai.openai", 0)</span>
|
<pre><code><span class="dim">// AI 服务: dstalk_service_query("ai_openai", 1)</span>
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int (*configure)(const char* provider, const char* base_url,
|
int (*configure)(const char* provider, const char* base_url,
|
||||||
const char* api_key, const char* model,
|
const char* api_key, const char* model,
|
||||||
@@ -404,24 +421,26 @@ typedef struct {
|
|||||||
void (*free_result)(dstalk_chat_result_t* result);
|
void (*free_result)(dstalk_chat_result_t* result);
|
||||||
} dstalk_ai_service_t;
|
} dstalk_ai_service_t;
|
||||||
|
|
||||||
<span class="dim">// 同模式: dstalk_session_service_t, dstalk_http_service_t,</span>
|
<span class="dim">// endpoint manager: dstalk_service_query("ai_endpoint_mgr", 1)</span>
|
||||||
<span class="dim">// dstalk_file_io_service_t, dstalk_config_service_t,</span>
|
<span class="dim">// 同模式: dstalk_ai_endpoint_mgr_t, dstalk_session_service_t,</span>
|
||||||
<span class="dim">// dstalk_tools_service_t, dstalk_lsp_service_t</span></code></pre>
|
<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>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="roadmap" class="container section">
|
<section id="roadmap" class="container section">
|
||||||
<div class="section-head">
|
<div class="section-head">
|
||||||
<h2>路线图</h2>
|
<h2>路线图</h2>
|
||||||
<p>插件宿主、CLI、SDL3 GUI、9 个核心插件、测试与文档已经就位;后续聚焦在能力深化与生态扩展。</p>
|
<p>插件宿主、CLI、SDL3 GUI、Boost.Beast Web、10 个核心插件、测试与文档已经就位;后续聚焦在能力深化与生态扩展。</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel table-wrap">
|
<div class="panel table-wrap">
|
||||||
<table>
|
<table>
|
||||||
<tr><th>阶段</th><th>内容</th><th>状态</th></tr>
|
<tr><th>阶段</th><th>内容</th><th>状态</th></tr>
|
||||||
<tr><td>骨架</td><td>项目骨架、CMake/Ninja 构建、Conan 依赖、DLL 导出、前端主循环</td><td><span class="ok">已完成</span></td></tr>
|
<tr><td>骨架</td><td>项目骨架、CMake/Ninja 构建、Conan 依赖、DLL 导出、前端主循环</td><td><span class="ok">已完成</span></td></tr>
|
||||||
<tr><td>插件宿主</td><td>插件加载、服务注册、事件总线、配置管理;9 个核心插件 (openai · anthropic · network · lsp · session · context · config · file-io · tools)</td><td><span class="ok">已完成</span></td></tr>
|
<tr><td>插件宿主</td><td>插件加载、服务注册、事件总线、配置管理;10 个核心插件(openai · anthropic · endpoint_mgr · network · lsp · session · context · config · file-io · tools)</td><td><span class="ok">已完成</span></td></tr>
|
||||||
<tr><td>对话能力</td><td>HTTPS 网络层、OpenAI-compatible / Anthropic API 适配、流式输出、多轮会话、文件读写工具</td><td><span class="ok">已可用</span></td></tr>
|
<tr><td>对话能力</td><td>HTTPS 网络层、OpenAI-compatible / Anthropic API 适配、流式输出、多轮会话、工具调用与文件读写</td><td><span class="ok">已可用</span></td></tr>
|
||||||
<tr><td>GUI 前端</td><td>SDL3 图形化窗口 (DSTALK_BUILD_GUI),作为可选前端与 CLI 共享插件宿主</td><td><span class="todo">可选构建</span></td></tr>
|
<tr><td>多 endpoint</td><td>ai_endpoint_mgr 管理多个命名 AI endpoint,前端优先按 active endpoint 路由,/status 输出脱敏状态</td><td><span class="ok">已可用</span></td></tr>
|
||||||
|
<tr><td>GUI / Web 前端</td><td>SDL3 图形化窗口与 Boost.Beast Web + SSE,作为可选前端与 CLI 共享插件宿主</td><td><span class="todo">可选构建</span></td></tr>
|
||||||
<tr><td>下一阶段</td><td>LSP 集成深化、第三方插件 SDK、跨平台分发与文档持续完善</td><td><span class="todo">计划中</span></td></tr>
|
<tr><td>下一阶段</td><td>LSP 集成深化、第三方插件 SDK、跨平台分发与文档持续完善</td><td><span class="todo">计划中</span></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -433,7 +452,7 @@ typedef struct {
|
|||||||
<p>dstalk 是开放项目,欢迎对 C/C++、命令行体验、AI API 适配、GUI、文档和测试感兴趣的开发者一起参与。</p>
|
<p>dstalk 是开放项目,欢迎对 C/C++、命令行体验、AI API 适配、GUI、文档和测试感兴趣的开发者一起参与。</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cards">
|
<div class="cards">
|
||||||
<article class="card"><div class="icon">PR</div><h3>提交代码改进</h3><p>核心、CLI、SDL3 GUI 与 9 个插件 (AI、网络、LSP、会话、文件、工具等) 都欢迎补丁,跨平台兼容与构建脚本也有空间。</p></article>
|
<article class="card"><div class="icon">PR</div><h3>提交代码改进</h3><p>核心、CLI、SDL3 GUI、Web 前端与 10 个插件(AI、endpoint 管理、网络、LSP、会话、文件、工具等)都欢迎补丁,跨平台兼容与构建脚本也有空间。</p></article>
|
||||||
<article class="card"><div class="icon">PLG</div><h3>开发新插件</h3><p>参考 examples/example_plugin 和 docs/reference/plugin-abi.md,通过 C ABI 注册新服务,把自己的模型、工具或数据源接入 dstalk。</p></article>
|
<article class="card"><div class="icon">PLG</div><h3>开发新插件</h3><p>参考 examples/example_plugin 和 docs/reference/plugin-abi.md,通过 C ABI 注册新服务,把自己的模型、工具或数据源接入 dstalk。</p></article>
|
||||||
<article class="card"><div class="icon">DOC</div><h3>完善文档与测试</h3><p>docs/tutorial、docs/reference 已经成形,欢迎补充教程、命令速查、插件 ABI 说明,以及 host_api_test / smoke_test 的覆盖面。</p></article>
|
<article class="card"><div class="icon">DOC</div><h3>完善文档与测试</h3><p>docs/tutorial、docs/reference 已经成形,欢迎补充教程、命令速查、插件 ABI 说明,以及 host_api_test / smoke_test 的覆盖面。</p></article>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user