Перейти к основному содержимому
M

dsh-plugins (sessions-insight)

mt-youya/dsh-plugins/plugins/sessions-insight

Browse Claude Code, DSH and Codex session logs by working directory, with per-turn context composition, token usage, compaction markers and cost estimates.

Установка

dsh plugin --profile web add github:mt-youya/dsh-plugins

Этот плагин находится в подкаталоге plugins/sessions-insight репозитория.

README

English | 简体中文

Cyrus Plugins · @cyrus/dsh-plugins

A plugin collection for DeepSeek Harness (DSH). Install this one bundle to get every plugin listed below; each plugin can also be installed on its own.

The Sessions Insight panel

Plugins

Pluginnpm packageWhat it does
Sessions Insight@cyrus/dsh-sessions-insightOpens up what each turn of a Claude Code, DSH or Codex session actually fed the model: composition, tool calls, compactions, cost. Includes confirmed session deletion.

Install

Requires DSH 0.2.1-rc.2 or newer (see docs/adr/0002-asar-021-is-the-contract.md). First decide which profile to install into: the desktop app uses desktop, dsh web on the command line uses web. Installing into the wrong profile does not error; the plugin just never shows up.

Install the collection (recommended) to get every plugin at once; when a plugin is added to the collection later, upgrading the collection brings it in.

dsh plugin --profile desktop add @cyrus/dsh-plugins

Install a single plugin:

dsh plugin --profile desktop add @cyrus/dsh-sessions-insight

Then fully quit and reopen DSH. "Cyrus Plugins" or "Sessions Insight" in the plugin manager means it worked.

Pick one of the two. The collection and the standalone plugin insert the same id into the loader tree; with both in dsh.profile.bundles, DSH fails at boot with duplicate loader entry id. Run dsh plugin --profile <name> remove on one before switching to the other.

Do not install from the git URL (pnpm add https://github.com/...): the root depends on workspace:^, which is only rewritten to a version number when publishing to npm.

Installing from this working tree (developing the collection): the desktop plugin manager's "Add plugin" also accepts a local directory — point it at this checkout's absolute path. DSH records it as "@cyrus/dsh-plugins": "link:<that path>": a symlink into your working tree, not a copy, and nothing is built for you. The host resolves lib/index.js through that link, and lib/ is gitignored, so build it first:

npx tsdown

Then fully quit and reopen DSH. Later edits only need a rebuild and a restart — there is no need to reinstall.

Each plugin's usage, permission boundary and known limitations live in its own README.

Repository layout

This is a pnpm monorepo. Only the collection and plugins/* are published; the rest is inlined into the plugins at build time.

PathContentsPublished
/ (root)The collection bundle: cordis.patch.yml + locale/yes, @cyrus/dsh-plugins
plugins/sessions-insightThe Sessions Insight plugin: host half and browser halfyes, @cyrus/dsh-sessions-insight
packages/session-contractThe unified IR, wire types and their guardsno
packages/session-readersClaude Code / Codex / DSH readersno
packages/plugin-kitPlugin-agnostic JSON envelope and URL spellingno
packages/plugin-kit-hostHost-half plumbing: route table, same-origin gate, envelope, LRUno
packages/plugin-kit-clientBrowser-half plumbing: decoding fetch, style injection, slot registrationno
apps/previewLocal preview harness on :5178no
scriptsCSS build, bundle-contract check, install script, session probesno
toolingPackage alias table, tsconfig base, tsdown configno

Dependencies point one way only: plugins/* → packages/*. The package-name-to-source mapping lives in tooling/aliases.ts, and tsconfig.json's paths mirrors it, so tests, the preview app and the build never need the internal packages built first.

Development

pnpm install
pnpm dev

The preview runs at http://localhost:5178 and reads your real local sessions; add ?theme=light or ?theme=dark to switch themes.

Run the gates before you commit:

npx tsc --noEmit && npx tsc --noEmit -p tsconfig.client.json && npx vitest run && npx tsdown && node scripts/check-bundle.mjs plugins/sessions-insight

Rebuild the artifacts and check that the profile's link really points at your build (this does not install — installation happens in the DSH plugin manager):

pnpm install:plugin

Regenerate the README screenshots from the preview (headless Chrome, 1440×900; add -- --theme light for the light theme). They show the sessions on your machine, so look at them before committing:

pnpm screenshots

Publishing

Follow docs/RELEASE.md: the plugin first, then the collection.

Documentation

  • docs/RELEASE.md — publishing to npm
  • docs/PLAN.md — decisions and milestones (Chinese)
  • docs/IR.md — the unified turn IR, the adapter contract (Chinese)
  • docs/API.md — host route contract (Chinese)
  • docs/HANDOFF.md — handoff contract (Chinese)
  • docs/adr/ — architecture decision records (Chinese)
  • GLOSSARY.md — vocabulary (Chinese)

License

MIT

Похожие плагины