Replies: 1 comment
|
这个需求和 SandBase Harness 的“可审计会话”边界比较接近,但实现层次不同:SandBase 不声称读取 DSH 的 zstd session 文件,也没有把它包装成 当前可用的路径是:
参考:
如果 DSH 最终提供 CLI,我会建议把“文件格式解析”和“稳定导出契约”分开:先做完整 frame/尾部完整性检查,再输出版本化 JSONL;损坏尾部时保留可解码前缀并明确报告,而不是让整条 session 不可读。 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Session logs (
<workspace>/<session-id>/session.jsonl.zstd) are a concatenation of zstd frames, so standard text tooling cannot read them:grep,tail,jqand friends all fail on the binary container. Any audit, debugging, or forensic pass over session history currently requires hand-rolling a frame-by-frame decompressor against a fast-moving rc-version internal package. We would love official CLI subcommands to list, inspect, and export sessions as plain JSONL. This would also make incident triage (for example, sessions damaged by a torn tail after a crash) dramatically easier.Background & Evidence
28 b5 2f fd), decompressed each frame, and re-assembled the JSONL records. There is no supported way to do this today.Failure Mode or Reproduction
grep <needle> <workspace>/<session-id>/session.jsonl.zstdproduces binary-match noise or nothing useful; the compressed container cannot be searched or diffed.Proposed Fix
Add CLI subcommands, suggested shape:
dsh session list— id, workspace, size, record count, mtime, health flag.dsh session inspect <session-id>— header/meta summary, frame count, integrity check (reports a torn tail if present), optionally per-frame offsets/sizes via--framesfor forensics.dsh session export <session-id> --format jsonl [--out <file>]— streaming decompression to plain JSONL, pipe-friendly; optional--redactto strip message bodies and keep metadata only, for sharing sanitized samples in bug reports.Implementation can live in the CLI layer over the existing persistence reader, so the on-disk format stays an internal detail while the export contract remains stable.
Additional Context
@deepseek-ai/dsh0.1.1-rc.2 (developer preview)All reactions