docs: distinguish readline and TUI demos

This commit is contained in:
Tianyi Cui
2026-07-19 02:16:43 +08:00
parent 64e920fad7
commit 3760f198f3
12 changed files with 48 additions and 17 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write
extension-cookbook.md: 02dc22ff72807629a89d602f49752e6f429587b5
extension-cookbook.zh.md: a204abdf6656312aea94640c60038af9f81f4f7b
extension-cookbook.md: c500aac230b6efc224c9d9e54bce75ef09b7173a
extension-cookbook.zh.md: d886b8ed40e32b2697e82172a86ca3b9653f287d

View File

@@ -87,7 +87,7 @@ export function apply(ctx: Context) {
## Runnable wirings
Three complete examples load their plugin trees from `cordis.yml`: [`examples/echo-agent`](../../examples/echo-agent) (mock model + echo tool — the all-mock skeleton check, `pnpm run demo:echo`), [`examples/coding-agent`](../../examples/coding-agent) (DeepSeek V4 + the bash tool suite behind a pi-tui coding interface with a readline fallback, `pnpm run demo:repl`), and [`examples/acp-agent`](../../examples/acp-agent) (an agent exposed as an ACP server over JSON-RPC stdio — the client-driver shape, `pnpm run demo:acp`). Each leaf is just its swappable backends plus an app-package entry: the stdio demos load [`@deepseek-ai/dsh-stdio-demo`](../../packages/examples/stdio-demo), the ACP demo loads [`@deepseek-ai/dsh-acp-demo`](../../packages/examples/acp-demo), and both app packages share the spine via the [`@deepseek-ai/dsh-agent-spine-demo`](../../packages/examples/agent-spine-demo) bundle.
Five runnable leaves load their plugin trees from `cordis.yml`: [`examples/echo-agent`](../../examples/echo-agent) (mock model + echo tool, `pnpm run demo:echo`), [`examples/coding-agent`](../../examples/coding-agent) (DeepSeek V4 + coding tools through a line-oriented readline REPL, `pnpm run demo:repl`), [`examples/tui-agent`](../../examples/tui-agent) (the same coding composition through full-screen pi-tui, `pnpm run demo:tui`), [`examples/cordis-agent`](../../examples/cordis-agent) (self-inspection and dynamic plugin mounting, `pnpm run demo:cordis`), and [`examples/acp-agent`](../../examples/acp-agent) (an ACP server over JSON-RPC stdio, `pnpm run demo:acp`). The terminal leaves load [`@deepseek-ai/dsh-stdio-demo`](../../packages/examples/stdio-demo), the ACP leaf loads [`@deepseek-ai/dsh-acp-demo`](../../packages/examples/acp-demo), and both app packages share the spine through [`@deepseek-ai/dsh-agent-spine-demo`](../../packages/examples/agent-spine-demo).
## The feature → mechanism map

View File

@@ -87,7 +87,7 @@ export function apply(ctx: Context) {
## 可运行的组装示例
三个完整示例`cordis.yml` 加载各自的插件树:[`examples/echo-agent`](../../examples/echo-agent)mock 模型 + echo 工具——全 mock 骨架检查`pnpm run demo:echo`)、[`examples/coding-agent`](../../examples/coding-agent)DeepSeek V4 + bash 工具套件,配合 pi-tui 编码界面,并为管道输入保留 readline 回退`pnpm run demo:repl`[`examples/acp-agent`](../../examples/acp-agent)(通过 JSON-RPC stdio 暴露 ACP 服务器的 agent——客户端驱动形态`pnpm run demo:acp`)。每个叶子只是其可替换后端加一个 app 包入口stdio 演示加载 [`@deepseek-ai/dsh-stdio-demo`](../../packages/examples/stdio-demo)ACP 演示加载 [`@deepseek-ai/dsh-acp-demo`](../../packages/examples/acp-demo),两个 app 包通过 [`@deepseek-ai/dsh-agent-spine-demo`](../../packages/examples/agent-spine-demo) bundle 共享主干。
五个可运行叶子`cordis.yml` 加载各自的插件树:[`examples/echo-agent`](../../examples/echo-agent)mock 模型 + echo 工具,`pnpm run demo:echo`)、[`examples/coding-agent`](../../examples/coding-agent)DeepSeek V4 + coding 工具,通过面向行的 readline REPL 交互,`pnpm run demo:repl`)、[`examples/tui-agent`](../../examples/tui-agent)(通过全屏 pi-tui 复用相同的 coding 组装,`pnpm run demo:tui`)、[`examples/cordis-agent`](../../examples/cordis-agent)(自我检查和动态插件挂载`pnpm run demo:cordis`[`examples/acp-agent`](../../examples/acp-agent)(通过 JSON-RPC stdio 暴露 ACP 服务器,`pnpm run demo:acp`)。终端叶子加载 [`@deepseek-ai/dsh-stdio-demo`](../../packages/examples/stdio-demo)ACP 叶子加载 [`@deepseek-ai/dsh-acp-demo`](../../packages/examples/acp-demo),两个 app 包通过 [`@deepseek-ai/dsh-agent-spine-demo`](../../packages/examples/agent-spine-demo) 共享主干。
## 功能→机制映射

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write
development.md: 512fdcd89b4d481dd2033bc4f4c2816a04b5feaa
development.zh.md: 9f2038a99b289d06f16d7d51f0d043caa34a300e
development.md: 79caf482d0d104ed170a57812dd4f34e2329de8b
development.zh.md: 75781932acedabd2e3593a89aed8360a9a18ca5b

View File

@@ -109,12 +109,24 @@ The echo demo does not need API credentials:
pnpm run demo:echo
```
The coding-agent demo uses pi-tui interactively, falls back to readline for pipes, and needs `DEEPSEEK_API_KEY` in the environment or repo-root `.env`:
The coding-agent REPL uses the line-oriented readline front door and needs `DEEPSEEK_API_KEY` in the environment or repo-root `.env`:
```sh
pnpm run demo:repl
```
The full-screen TUI reuses the coding-agent composition through the pi-tui front door and needs the same credentials:
```sh
pnpm run demo:tui
```
The self-referential cordis-agent demo can inspect and modify its live plugin runtime and needs the same credentials:
```sh
pnpm run demo:cordis
```
The ACP server agent demo exposes the agent over JSON-RPC stdio and also needs `DEEPSEEK_API_KEY`:
```sh

View File

@@ -109,12 +109,24 @@ echo 演示不需要 API 凭证:
pnpm run demo:echo
```
coding-agent 演示在交互终端中使用 pi-tui对管道输入回退到 readline并需要环境变量或仓库根目录 `.env` 中的 `DEEPSEEK_API_KEY`
coding-agent REPL 使用面向行的 readline 前端,并需要环境变量或仓库根目录 `.env` 中的 `DEEPSEEK_API_KEY`
```sh
pnpm run demo:repl
```
全屏 TUI 通过 pi-tui 前端复用 coding-agent 组装,并需要相同的凭证:
```sh
pnpm run demo:tui
```
自指的 cordis-agent 演示可以检查并修改其实时插件运行时,并需要相同的凭证:
```sh
pnpm run demo:cordis
```
ACP 服务器 agent 演示通过 JSON-RPC stdio 暴露 agent同样需要 `DEEPSEEK_API_KEY`
```sh

View File

@@ -123,9 +123,9 @@ Follow the Good versions; these sentence-level examples illustrate error categor
- Good: `A green gate does not mean the translation is correct.`
### Code block comments — never translate
- Source code block contains: `# interactive pi-tui coding agent (needs DEEPSEEK_API_KEY)`
- Bad: `# 交互式 pi-tui 编码 agent需要 DEEPSEEK_API_KEY`
- Good: `# interactive pi-tui coding agent (needs DEEPSEEK_API_KEY)` (byte-identical)
- Source code block contains: `# readline coding agent (needs DEEPSEEK_API_KEY)`
- Bad: `# readline 编码 agent需要 DEEPSEEK_API_KEY`
- Good: `# readline coding agent (needs DEEPSEEK_API_KEY)` (byte-identical)
### Language switcher — English to Chinese
- Source: `English | [中文](README.zh.md)`