npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@z47_rose_1/dsh-session-sync

v0.2.0

Published

Sync Codex / Claude Code sessions into DeepSeek Harness as resumable sessions

Readme

dsh-session-sync

Sync Codex / Claude Code sessions into DeepSeek Harness as resumable sessions. 把 Codex / Claude Code 的历史会话同步到 DeepSeek Harness(DSH),导入后可直接续聊。

Features / 功能

  • One-command import:/sync codex 自动扫描 ~/.codex/sessions,导入最新会话
  • Auto-watch (realtime):启动时自动监听 ~/.codex/sessions,Codex 会话一有变化就增量导入,无需手动操作
  • Incremental:manifest 按 mtime 去重,只导入新增/更新的 rollout,不重复创建
  • Full fidelity:用户消息、助手回复(含工具调用文本)完整保留,导入后可续聊
  • Auto workspace grouping:按源项目目录(cwd)自动归入 DSH 工作区,与 Codex 项目视图一致
  • Validated:写入走 DSH 官方 SessionPersistence 接口,通过全部 load 校验

Install / 安装

# install the plugin into your DSH web profile
cd ~/.dsh/profiles/web
pnpm add @z47_rose_1/dsh-session-sync

Or install directly from GitHub:

pnpm add github:NB4747/dsh-session-sync

Then add to cordis.patch.yml:

- insert:
    - id: session-sync
      name: 'dsh-session-sync'

Restart DSH (dsh web).

Usage / 使用

In the DSH Web UI, run:

/sync codex     # manual incremental import
/sync claude    # import Claude Code sessions (~/.claude/projects)
/sync watch     # start realtime watcher (enabled automatically on boot)
/sync unwatch   # stop the watcher
/sync push <sessionId>  # export new DSH turns back to the source Codex rollout (bidirectional)

Or with an explicit path (file or directory):

/sync codex C:\Users\you\.codex\sessions

Imported sessions appear under their source project workspace. Refresh the session list to see them.

Realtime syncing is enabled by default when the plugin loads — every new or changed Codex rollout / Claude Code session is auto-imported after a 3-second debounce. Set autoWatch: false in the plugin config to disable.

Development / 开发

pnpm install
pnpm run build

How it works / 原理

  1. Parse a Codex rollout JSONL (~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl) — read-only
  2. Map user turns + assistant replies into DSH SessionEvents
  3. Write through DSH's sessionPersistence.create / append (zstd frames, contiguous seq, balanced turns)
  4. DSH workspace bootstrap groups sessions by their source cwd

Roadmap / 路线图

  • [x] MVP: /sync codex incremental import
  • [x] V2 step 1: realtime auto-watch (boot-time, debounced)
  • [x] V2 step 2: Claude Code source support (/sync claude, dual-directory watch)
  • [x] V2 step 3: bidirectional sync (/sync push — DSH → Codex export)
  • [x] V2 step 4: conflict handling (external-change detection, push→watch loop guard)
  • [ ] GUI desktop app

Conflict handling / 冲突处理

  • Push → watch loop guard: after /sync push, the manifest records the post-push mtime so the watcher skips the lines we just wrote — no duplicate sessions.
  • External change detection: if the source rollout gained new turns on the Codex side since import, /sync push warns you and appends your DSH turns after them (chronological order preserved).

License

MIT