Skip to content

dsh: add DeepSeek Harness external agent integration - #109

Open
ngeorger wants to merge 1 commit into
entireio:mainfrom
ngeorger:feat/entire-agent-dsh
Open

ngeorger wants to merge 1 commit into
entireio:mainfrom
ngeorger:feat/entire-agent-dsh

Conversation

@ngeorger

@ngeorger ngeorger commented Nov 5, 2026

Copy link
Copy Markdown

Summary

Adds entire-agent-dsh, an external agent integration for DeepSeek Harness (DSH).

DSH has no repository-local hook command. The integration pairs with the
@sredevopsorg/dsh-entire
Host plugin: the plugin reads .entire/dsh-hooks.json and forwards lifecycle
events to entire hooks dsh <hook>. entire-agent-dsh resolves the native DSH
session log ($DSH_HOME/sessions/<project>/<session>/session.vN.jsonl.zstd),
decodes its concatenated Zstandard frames, and materializes a normalized JSONL
cache for Entire.

What it implements

  • Hooks: session-start, turn-start, turn-end, compaction, session-end,
    subagent-start, subagent-end (the last two declared for forward
    compatibility; the host bridge does not emit them yet). Marker installation is
    idempotent and rewrites stale hook sets.
  • Transcript analysis: line-position tracking, prompts (context-form
    injections excluded), modified files (write, edit, str_replace_editor,
    apply_patch), summaries, and per-call token usage.
  • Compact transcripts: emits Entire Transcript Format v1 with inlined tool
    results and per-call usage/model.
  • Session storage: normalized cache under $DSH_HOME/entire/sessions/, with
    tolerant zstd decoding, symlink-resolved lookup/containment, and safe filenames
    for unsafe/Windows-device session IDs.
  • Resume: entire session resume re-frames a restored transcript into DSH's
    native store (rewriting header id/cwd to the current physical checkout)
    when no native generation exists. Existing live generations are never
    overwritten.

Verification

  • gofmt, go vet, golangci-lint — clean.
  • go test ./... — pass (unit tests cover paths, zstd/torn tails, hooks,
    analyzers, compact format, symlinked checkouts, native restore).
  • external-agents-tests verify — all suites pass: hooks, mandatory, optional,
    subagent, transcript.
  • scripts/verify-dsh.sh against Entire CLI 0.12.2 — creates a session,
    checkpoint, compact transcript, token usage, and Entire-Checkpoint trailer.
  • Verified against a live DSH 0.2.2-rc.1 session on disk.

Dependency

github.com/klauspost/compress (BSD-3-Clause) for Zstandard decoding; a
doc/dependency_decisions.yml entry is included. The Entire CLI already uses the
same package.

Known limitations / follow-ups

  • The DSH Host plugin is required for capture and checks the marker relative to
    the session workspace; start DSH at the repository root. The plugin also
    resolves entire/entire-agent-dsh from the Host PATH.
  • The current bridge emits turn-start only for human/user/prompt sources.
    Scheduled/webhook/team turns need a companion change in dsh-plugins to widen
    the source-kind set.
  • session-end depends on session/disposed, which long-lived Web Hosts may not
    emit.
  • DSH has no interactive --resume; interactive resume remains opening the
    session in dsh web.
  • Sessions above Entire's 10 MB subcommand stdout cap cannot be returned in one
    read-transcript call.

This is a new-agent integration; happy to adjust naming, capability choices, or
test wiring to match maintainer preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant