deepseek-harness/examples/headless-agent
2026-08-10 21:32:13 +08:00
..
tests refactor: remove repository plugin path 2026-08-10 21:32:13 +08:00
advanced.cordis.snapshot.yml cleanup(cli): remove dsh-cli-demo 2026-08-08 15:08:07 +08:00
advanced.cordis.yml cleanup(cli): remove dsh-cli-demo 2026-08-08 15:08:07 +08:00
compaction.cordis.snapshot.yml fix(replay): mark local compaction calls 2026-08-08 15:28:35 +08:00
composition.md cleanup(cli): remove dsh-cli-demo 2026-08-08 15:08:07 +08:00
cordis.yml cleanup(cli): remove dsh-cli-demo 2026-08-08 15:08:07 +08:00
credentials.cordis.snapshot.yml refactor(llm-deepseek)!: rename the provider route to deepseek-official 2026-07-29 16:36:07 +08:00
e2b.cordis.yml fix(e2b): address review round on cadence config, disposal, and SDK edge cases 2026-08-08 22:19:13 +08:00
goal.cordis.snapshot.yml test(headless): isolate goal replay from live adapter 2026-07-27 17:21:40 +08:00
goal.cordis.yml Merge goal tool fixes and align same-session blockers 2026-07-20 17:23:55 +08:00
package.json fix(examples): isolate headless agent example 2026-07-16 16:12:27 +08:00
pty.cordis.snapshot.yml test(sandbox-policy): record cache-safe policy context 2026-07-30 22:15:34 +08:00
ralph.cordis.snapshot.yml test(ralph): snapshot fresh-agent rounds in headless app 2026-07-20 18:18:08 +08:00
README.i18n.yaml docs: replace front door terminology 2026-08-10 13:07:46 +08:00
README.md docs: replace front door terminology 2026-08-10 13:07:46 +08:00
README.zh.md docs(i18n): reconcile source-drifted translations 2026-08-09 10:24:11 +08:00
retry.cordis.snapshot.yml fix(llm): isolate retry policy histories 2026-07-25 15:38:58 +08:00
semantic-checkpoint.cordis.snapshot.yml refactor(subprocess): rename the process seam to subprocess and address review 2026-07-26 12:43:59 +08:00
subagent-diagnostic.cordis.snapshot.yml fix: address PR #1802 review round 2026-08-07 00:05:41 +08:00
subagent-inheritance.cordis.snapshot.yml fix(example): drop the never-activated bash stack from the inheritance fixture 2026-07-30 16:52:14 +08:00
workspace-context-resume.cordis.snapshot.yml fix(workspace-context): deduplicate baseline on resume 2026-08-04 19:55:27 +08:00

headless-agent

English | 中文

This directory owns the replay and real-model test composition for a headless coding agent: DeepSeek V4 + local bash and filesystem tools + subagent delegation + workflows and fresh-agent Ralph iteration + todo_write + JSONL persistence. It explicitly mounts the shared agent spine, one root agent, persistence, and checkpoint policy; it is not a second product entry point.

Run it

# repo root .env (gitignored) or exported env:
#   DEEPSEEK_API_KEY=sk-…
#   DEEPSEEK_BASE_URL=https://…   # optional; defaults to the public API
pnpm run dsh run "fix the failing test in this workspace"

The product command is dsh run: it accepts one nonblank task, creates and persists a fresh session, prints the final assistant text, and exits. The root demo:headless script is only an alias of that command.

Snapshot suites run this directory's configuration through tests/fixtures/headless-driver.ts, an unexported test-only process that emits canonical session events as JSONL before its result record. That stream is test infrastructure, not a supported CLI output format. Child sessions surface only through parent tool events and results.

E2B POC overlay

e2b.cordis.yml replaces the local filesystem and subprocess providers with one shared E2B sandbox while retaining dsh-bash-local and the same model-facing tools. Put E2B_API_KEY beside DEEPSEEK_API_KEY in the gitignored root .env, then run the credential-gated live composition, which drives FS, Bash, PTY, and LSP in one sandbox and proves final deletion:

pnpm exec vitest run --config vitest.e2e.config.ts packages/e2b/e2b/tests/composition.e2e.ts

The overlay creates the same absolute cwd inside the sandbox, but it does not upload or mount the host workspace. File and Bash mutations exist only in E2B; Cordis, model calls, agent/session state, session logs, skills, and SDK buffers remain on the host. The composition kills its sandbox on timeout and disposal. It is a provider-composition POC, not a whole-harness migration or a workspace-sync feature.

Advanced configuration

advanced.cordis.yml adds Code Mode and the Cordis tools to the test composition.