Files
deepseek-harness/examples
Tianyi Cui e04ca55374 fix review findings: require session.jsonl for every snapshot scenario
The per-kind fixture guard claimed no-model scenarios need no session.jsonl, but
the replay path requires one for ALL scenarios: runScenario() passes
`fixtureFile: <dir>/session.jsonl` unconditionally and llm-replay's
loadReplayScript() throws "fixture not found" when it is absent and no override
replaces it. A no-model scenario ships a header-only session.jsonl that derives
to an empty script. The guard + its comment now match that reality, so a future
no-model scenario following them won't fail at subprocess startup.
2026-06-21 15:46:38 +08:00
..
2026-06-16 14:55:37 +08:00

Examples

Runnable demos (not workspaces) that showcase how the harness is wired.

echo-agent

A mock model + echo tool + stdio UI + JSONL persistence demo. Demonstrates:

  • Loading plugins from a cordis.yml via @cordisjs/plugin-loader + @cordisjs/plugin-include
  • Registering a mock LlmAdapter (streaming scripted responses)
  • Registering a tool via ctx.tools.register()
  • Persisting session events to JSONL via the session/event + session/flush pattern
  • A minimal stdio UI consuming agent/stream-chunk and session events

Run with: pnpm run demo:echo

When prompted, type "echo " to trigger a tool call round-trip.

coding-agent

The real thing: DeepSeek V4 + the bash tool suite + stdio chat + JSONL persistence, wired from cordis.yml. Where echo-agent proves the skeleton with mocks, this is a usable coding assistant.

Run with: pnpm run demo:coding (needs DEEPSEEK_API_KEY in the environment or a gitignored repo-root .env). See coding-agent/README.md for details.