DSH / Atlas
2026-08-08implementedsimplification

Remove the separate CLI demo

移除独立的 CLI demo

After [`dsh --profile headless`](../architecture/2026-08-06-app-owned-command-line.md) became the product one-shot command, `@deepseek-ai/dsh-cli-demo` remained a second application package for the same job. It carried another executable, argument grammar, app composition, cancellation lifecycle, text/JSON/stream-JSON output contract, built artifact, documentation surface, and test suite. The two entry points also as

English

Problem

After dsh --profile headless became the product one-shot command, @deepseek-ai/dsh-cli-demo remained a second application package for the same job. It carried another executable, argument grammar, app composition, cancellation lifecycle, text/JSON/stream-JSON output contract, built artifact, documentation surface, and test suite. The two entry points also assembled different trees, so a successful demo did not prove the shipped headless profile and users had to choose between overlapping commands.

The replay suites still need canonical session events to pin assembled backend behavior. That testing need does not require a published command or compatibility contract.

Decision

Delete @deepseek-ai/dsh-cli-demo completely: its package, bin, parser, app plugin, output formats, tests, workspace references, generated-catalog entries, and active documentation. No alias or compatibility package remains. Source users invoke the product command through pnpm dsh --profile headless; it owns final-text stdout, failure diagnostics on stderr, persistence, exit status, and shutdown.

examples/headless-agent becomes an explicit test composition. Its Loader configs mount @deepseek-ai/dsh-agent-spine-demo, one root agent, JSONL persistence, and checkpoint policy as separate rows instead of hiding them behind an app bundle. The support-tier @deepseek-ai/dsh-loader-smoke package owns the shared direct-agent turn helper; unexported example-local drivers select their Loader configuration and render canonical events as JSONL. They are launched only by tests, have no bin, and do not define a supported product output format.

Alternatives considered

  • Keep dsh-cli-demo as an alias or wrapper around dsh --profile headless. Rejected because a second bin and package would preserve two discoverable owners without adding capability.
  • Move JSON and stream-JSON flags onto dsh --profile headless. Rejected because no current product consumer requires them; adopting the old demo protocol would enlarge the canonical CLI contract solely to save test machinery.
  • Delete the canonical-event snapshots with the package. Rejected because they pin model-visible assembled behavior that final-text product acceptance cannot observe.
  • Keep the app plugin but delete only its bin. Rejected because the hidden composition would still duplicate the explicit headless profile and conceal which services the test leaf mounts.

Consequences

This is intentionally breaking. dsh-cli-demo, its --output-format choices, and imports from @deepseek-ai/dsh-cli-demo/src/cli.ts no longer resolve. There is no public event-stream replacement in this change; callers use dsh --profile headless for one-shot execution and must choose an existing protocol API when they need structured automation.

The repository retains backend replay coverage through test-only infrastructure, while product smoke and built-bin acceptance exercise dsh --profile headless. A separate one-shot package may return only if it owns a genuinely independent, versioned protocol that cannot belong to the product launcher; a second spelling or output shim is not enough.

Verification

Focused Loader smokes cover the explicit composition in source and plain-Node built modes, snapshot tests diff its canonical JSONL and persisted logs, product acceptance covers dsh --profile headless, and documentation plus generated graph/catalog gates reject live references to the removed package. The frozen Agent Note archive remains historical evidence and is not rewritten.

中文

问题

dsh --profile headless 成为产品的一次性命令后,@deepseek-ai/dsh-cli-demo 仍是承担同一工作的第二个应用包。它另行拥有一套可执行文件、参数语法、应用组装、取消生命周期、文本/JSON/stream-JSON 输出约定、构建产物、配套文档和测试套件。两个入口组装的树也不相同,因此 demo 成功不能证明已交付的 headless profile 可用,用户还必须在功能重叠的命令之间作出选择。

回放套件仍需要规范会话事件来固定组装后的后端行为。这一测试需求不需要已发布命令或兼容性约定。

决策

彻底删除 @deepseek-ai/dsh-cli-demo:包括它的包、bin、解析器、应用插件、输出格式、测试、workspace 引用、生成目录条目和现行文档。不保留别名或兼容包。源码用户通过 pnpm dsh --profile headless 调用产品命令;stdout 上的最终文本、stderr 上的失败诊断、持久化、退出状态和关闭行为均由该命令负责。

examples/headless-agent 成为显式测试组装。其 Loader 配置把 @deepseek-ai/dsh-agent-spine-demo、一个根 agent(智能体)、JSONL 持久化和检查点策略挂载为独立配置行,不再将其隐藏在应用组合包之后。支持层的 @deepseek-ai/dsh-loader-smoke 包负责共享的直接 agent 轮次 helper;未导出的示例本地 driver 选择各自的 Loader 配置,并将规范事件渲染为 JSONL。这些 driver 只由测试启动,不提供 bin,也不定义受支持的产品输出格式。

考虑过的替代方案

  • 保留 dsh-cli-demo 作为 dsh --profile headless 的别名或包装层。 不予采纳:第二个 bin 和包会让同一功能继续存在两个可发现的归属方,却没有增加任何能力。
  • 把 JSON 和 stream-JSON 标志移到 dsh --profile headless 不予采纳:当前没有产品消费方需要这些标志;沿用旧 demo 协议,只会为了保留测试机制而扩大规范 CLI(命令行界面)约定。
  • 随包一并删除规范事件快照。 不予采纳:这些快照固定了模型可见的组装行为,而只检查最终文本的产品验收无法观察这些行为。
  • 保留应用插件,只删除它的 bin。 不予采纳:隐藏的组装仍会重复显式的 headless profile,并掩盖测试叶节点挂载了哪些服务。

后果

这是有意为之的破坏性变更。dsh-cli-demo、它的 --output-format 选项以及对 @deepseek-ai/dsh-cli-demo/src/cli.ts 的导入都不再可解析。本变更不提供公开的事件流替代接口;调用方使用 dsh --profile headless 执行一次性任务,需要结构化自动化时则必须选择现有的协议接口。

仓库通过仅供测试的基础设施保留后端回放覆盖,产品冒烟测试和 built-bin 验收则运行 dsh --profile headless。只有当独立的一次性包负责一套真正独立、带版本且不能归产品启动器所有的协议时,它才可以重新引入;第二种命令写法或输出 shim 并不足以构成理由。

验证

聚焦的 Loader 冒烟测试在源码模式和由普通 Node 启动的构建模式下覆盖显式组装,快照测试对比其规范 JSONL 和持久化日志,产品验收覆盖 dsh --profile headless,文档检查及生成图谱/目录门禁则拒绝对已移除包的活跃引用。冻结的 Agent Note 归档保留为历史证据,不会被重写。