Skip to content

feat(sleep): add DeepSeek Harness transcript source - #266

Open
Nuplum (45lab95) wants to merge 1 commit into
microsoft:mainfrom
45lab95:fix/dsh-harvest
Open

feat(sleep): add DeepSeek Harness transcript source#266
Nuplum (45lab95) wants to merge 1 commit into
microsoft:mainfrom
45lab95:fix/dsh-harvest

Conversation

@45lab95

Copy link
Copy Markdown
Contributor

feat(sleep): add DeepSeek Harness transcript source

Closes #225

Summary

Add a local, read-only DeepSeek Harness (DSH) transcript source for SkillOpt-Sleep.

The new explicit --source dsh converts DSH JSONL sessions into the existing
SessionDigest and mined-task pipeline. DSH is not added to --source auto,
and this change does not add a DSH backend, plugin, or UI integration.

Changes

  • Add a DSH JSONL session harvester supporting:
    • uncompressed session.jsonl;
    • default compressed session.jsonl.zstd;
    • concatenated Zstandard frames;
    • packed chunk records and current DSH lifecycle metadata.
  • Keep only human user requests, visible assistant text, short tool names,
    timestamps, and feedback-derived positive/negative signals.
  • Exclude reasoning, tool arguments and results, request/provider metadata,
    attachments, feedback text, injected user-role context, subagent sessions,
    and SkillOpt replay sessions.
  • Retain ordinary fork sessions without merging parent-session content.
  • Silently skip an individual session when its format or event structure cannot
    be safely understood, without blocking other sessions.
  • Add CLI, configuration, and documentation support.

Optional dependency

Add the optional extra:

dsh = ["zstandard>=0.22.0"]

zstandard is only needed to read DSH's default .jsonl.zstd session files.
It is not installed for users who do not use DSH, and uncompressed session.jsonl files remain readable without it.
Install with:

python -m pip install -e ".[dsh]"

Validation

python -m pytest tests/test_harvest_dsh.py -q
python -m ruff check skillopt_sleep/harvest_dsh.py tests/test_harvest_dsh.py
  • Local DSH Web end-to-end validation:
    • harvested 1 session -> 1 task;
    • completed the mock dry-run pipeline successfully.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: add a version-gated DeepSeek Harness transcript source to SkillOpt-Sleep

1 participant