mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
Holistic-review fixes for integration gaps the per-commit reviews missed: - CI now runs `pnpm run test:snapshot` (a step after the coverage gate). It was wired into pre-push but not .github/workflows/ci.yml, so the RFC/AGENTS claim that snapshot replay runs in the default PR gate was only half-true — CI is the real gate. - vitest.snapshot.config.ts loads the repo .env ONLY when DSH_SNAPSHOT=record. Loading it unconditionally contradicted the replay safety story (replay must never reach the network), and runScenario forwards process.env to the child. Non-ENOENT load errors now surface instead of being swallowed. - start.ts: the graceful-shutdown comment said "RECORD runs" but the path applies to both snapshot modes (replay also closes stdin → dispose → exit). - docs/development.md: list the new pre-push snapshot job and the CI snapshot gate.
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.ymlvia@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/flushpattern - A minimal stdio UI consuming
agent/stream-chunkand 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.