Files
deepseek-harness/packages/examples/README.zh.md
T
Turtle f290a8b851 refactor(cli)!: one shared base config with per-surface overlays
`dsh` shipped two config trees that were 43 rows the same: apps/cli/cordis.yml
composed web as 74 flat rows, while the TUI booted examples/tui-agent/cordis.yml
whose single `@deepseek-ai/dsh-tui-demo` row mounted twelve plugins behind a
twenty-key pass-through Config. Neither file was what its location claimed —
apps/cli hardcoded the "example" as the product default and the "demo" bundle
was the application — and every capability change had to be made twice.

- apps/cli/base.cordis.yml holds the 43 shared rows; tui.cordis.yml and
  web.cordis.yml are patch lists stating only what differs per surface
- overlays apply as SIBLING patch lists at one include level, because include
  patches never cross an include boundary. Precedence: base < surface <
  (--config | personal ~/.dsh/config.yaml) < launcher flag/profile patches
- `--config` now applies an overlay INSTEAD OF the personal one, so a demo or
  test tree never inherits the user's route; new `--config-replace` boots a file
  as the entire tree (the old `--config` behaviour). Both survive /resume
- vendor/include: index each `insert`ed row as it is added so a later patch can
  configure or disable it. Upstream built the id index once before the patch
  loop, leaving every surface-only row — the whole TUI front door — silently
  unpatchable from user config. Logged as local modification 8
- session identity moves to dsh-agent-loop's CONFIGURED_AGENT_IDENTITIES_KEY;
  dsh-tui's MAIN_SESSION_ID_KEY is deleted (only the bundle read it)
- delete examples/tui-agent, examples/cordis-agent, packages/examples/tui-demo;
  TUI tests → apps/cli/tests, cordis e2e → packages/cordis/tool-cordis/tests,
  examples/code-mode survives as an overlay leaf
- `dsh web` gains --config, threaded into AppCLIEntry as an extra overlay

Three latent defects surfaced and are fixed here: the TUI captured the optional
sessionQuery service once at construction and could permanently disable /resume
when it won the mount race; the session-store root silently reverted to a
project-local ./.sessions; --config-replace was dropped by the resume handoff.

Verified by booting each tree through the real Loader (TUI 55 entries, web 75,
zero unsettled) rather than reading YAML. All eight terminal snapshots replay
byte-identically; 14/14 PTY smoke, 112/112 snapshots, 25/25 doc-sync, hygiene
and lint clean.
2026-07-29 21:15:42 +08:00

3.8 KiB
Raw Blame History

examples/:开箱可运行的演示组合包

English | 中文

预先组合的插件 bundle(组合包),供轻量叶节点 cordis.yml 加载,无需手工组装主干和前端入口。这些是 演示/参考 包(package);npm 名称的 -demo 后缀把每个包标为非产品表层,直接查看包名即可辨认。仓库根目录 examples/ 下的可运行叶节点与 Python SDK 运行时 是消费方;每个消费方都只包含可替换后端和一个组合包入口。

npm 名称 角色
<<<<<<< HEAD
agent-spine-demo/ @deepseek-ai/dsh-agent-spine-demo 不含执行器和 UI 的 agent(智能体)主干,打包为一个组合包插件,带后备会话标题和可选择启用的持久化目标栈
tui-demo/ @deepseek-ai/dsh-tui-demo 全屏终端应用组合包:主干 + 持久化目标 + /goal 命令 + JSONL 持久化 + dsh-tui + 预创建的 main agent;没有 bin,由 dsh CLI(命令行界面)启动

======= | agent-spine-demo/ | @deepseek-ai/dsh-agent-spine-demo | 不含执行器和 UI 的 agent 主干,打包为一个组合包插件,带后备会话标题和选用的持久目标栈 |

a1c6a2c3f (refactor(cli)!: one shared base config with per-surface overlays) | cli-demo/ | @deepseek-ai/dsh-cli-demo | 无头单次应用:主干 + JSONL 持久化 + 预创建的 main agent,提供文本和 DSH 原生 JSON 输出 | | acp-demo/ | @deepseek-ai/dsh-acp-demo | ACPAgent Client Protocol)自动化服务器应用:主干 + 持久化目标 + JSONL 持久化 + acp 桥接层(无 stdout logger),带启动 bin | | jsonrpc-demo/ | @deepseek-ai/dsh-jsonrpc-demo | 只有 bin 的运行时,用于启动外部 cordis.yml,供 stdio JSON-RPC SDK 客户端使用 |

<<<<<<< HEAD agent-spine-demo 是共享组合包;tui-democli-demoacp-demo 分别将它与全屏终端、无头单次和 ACP 自动化前端入口组合。cli-demoacp-demo 拥有各自的启动 bintui-demo 只交付组合包插件,产品 dsh CLI 是它的终端前端入口。jsonrpc-demo 自身不挂载任何组合,而是启动部署的 cordis.yml 所指名的任意插件树;Python SDK 运行时会启动它。

agent-spine-demo 是共享组合包;cli-demoacp-demo 分别将它与无头单次和 ACP 自动化前端入口组合,并拥有各自的启动 bin。产品 dsh CLI 不使用组合包:其 TUI 与 web surface 都是一份共享的 base.cordis.yml 加各自一份 overlay。jsonrpc-demo 自身不挂载任何组合,而是启动部署的 cordis.yml 所指名的任意插件树;Python SDK runtime 会启动它。

a1c6a2c3f (refactor(cli)!: one shared base config with per-surface overlays)

这些 不是 产品 API。它们打包的主干组件位于 core/,人类/SDK 通道和启动粘合代码位于 ui/,自动化传输位于 acp/,可替换后端位于各自能力组;演示组合包只选定其中一种具体组合。可以自由替换或 fork。

不要将此组与仓库根目录的 examples/ 混淆:该目录存放可运行的 cordis.yml 叶节点;此组存放这些叶节点加载的 组合包

jsonrpc binexe 名称是历史遗留

jsonrpc-demo 已像同级包一样重命名,但其 bin 仍为 dsh-jsonrpc-agent,单文件可执行程序仍为 dsh-jsonrpc-agent-pkg(在 Python 分发各处被引用)。这些名称属于 SDK 的运行时启动表层;只有 SDK 统一该启动流程时才会协调它们,而不会在此次移动中处理。