Files
deepseek-harness/examples/echo-agent/composition.md
imccyu 6f77da4c8c refactor: relocate demo app bundles to packages/examples/*-demo
Move the agent-spine bundle and the stdio/ACP/JSON-RPC app packages out of
core/ and ui/ into a new packages/examples/ group, renamed with a -demo
suffix so the npm name marks them as non-product surface:

  core/agent-core   -> examples/agent-spine-demo  (dsh-agent-spine-demo)
  ui/stdio-agent    -> examples/stdio-demo        (dsh-stdio-demo)
  ui/acp-agent      -> examples/acp-demo          (dsh-acp-demo)
  ui/jsonrpc-agent  -> examples/jsonrpc-demo      (dsh-jsonrpc-demo)

Update every code/config/test reference and reference-only doc mentions, and
regenerate module-graph, config-catalog, and doc-graphs. The jsonrpc bin
(dsh-jsonrpc-agent) and single-file exe (dsh-jsonrpc-agent-pkg) keep their
names; the SDK runtime-startup surface is reconciled separately.
2026-07-15 16:46:05 +08:00

1.7 KiB

Echo Agent App Composition

The echo demo swaps in a local mock LLM and teaching echo tool, then loads the stdio app package for the shared spine and terminal front door.

flowchart LR
  cfg["examples/echo-agent<br/>cordis.yml"]
  plugin_echo_hmr["hmr<br/>@cordisjs/plugin-hmr"]
  cfg --> plugin_echo_hmr
  plugin_echo_mock_llm["mock-llm<br/>./src/mock-llm.ts"]
  cfg --> plugin_echo_mock_llm
  plugin_echo_echo_tool["echo-tool<br/>./src/echo-tool.ts"]
  cfg --> plugin_echo_echo_tool
  plugin_echo_bash["bash<br/>@deepseek-ai/dsh-bash-local"]
  cfg --> plugin_echo_bash
  plugin_echo_stdio_agent["stdio-agent<br/>@deepseek-ai/dsh-stdio-demo"]
  cfg --> plugin_echo_stdio_agent
  plugin_echo_stdio_agent --> bundle_agent_core["@deepseek-ai/dsh-agent-spine-demo"]
  plugin_echo_stdio_agent --> bundle_jsonl["@deepseek-ai/dsh-session-persistence-jsonl"]
  plugin_echo_stdio_agent --> frontdoor_stdio["readline UI<br/>console logger<br/>pre-created main agent"]
  bundle_agent_core --> spine_llm["ctx.llm"]
  bundle_agent_core --> spine_sessions["ctx.sessions"]
  bundle_agent_core --> spine_tools["ctx.tools + tool-bash"]
  bundle_agent_core --> spine_loop["ctx.agents + ctx.agentLoop"]
Plugin id Package / module
hmr @cordisjs/plugin-hmr
mock-llm ./src/mock-llm.ts
echo-tool ./src/echo-tool.ts
bash @deepseek-ai/dsh-bash-local
stdio-agent @deepseek-ai/dsh-stdio-demo

Source config: examples/echo-agent/cordis.yml.

Maintenance mode: hybrid: the leaf plugin list is parsed from its cordis.yml; app package expansion is curated from package source.