dshbase

插件目录 / Knowledge / dsh-session-pins

dsh-session-pins

已验证 · 实测可装 alooshxl

✓ 持续维护 基于 1 个官方 DSH 包 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

3Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-13最近推送
跨平台平台

功能简介

dsh-session-pins — DSH 插件(会话)

✅
我们的评价
可用 — 实测通过,早期项目

dsh-session-pins — DSH 插件(会话) 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

DSH Session Pins

简体中文

@dsh-external/dsh-session-pins adds a persistent pinned-session menu to the
DeepSeek Harness web sidebar.

The plugin answers
DeepSeek Harness Discussion #63,
which asks to keep valuable sessions easy to reach. Harness does not expose a
public session-row action slot, and replacing the stock session browser would
couple a plugin to private UI source. Session Pins therefore contributes one
root-scoped action through the public sidebar.footer.action slot. It does not
patch or replace the host.

Compatibility status

The source, automated contracts, and package artifacts target
@deepseek-ai/[email protected]. DeepSeek Harness is in developer preview, so a
new release candidate may break this plugin until compatibility is reviewed.

The automated suite includes an isolated, keyless rc.6 profile smoke: it
installs this repository through the published CLI, composes the plugin row,
boots on an ephemeral loopback port, reads the root boot manifest, and fetches
the package-name browser module route. Task 7's manual wide/rail visual
acceptance remains pending and is not claimed here.

User experience

  • Wide sidebar: the footer action shows a pin icon, Pinned sessions, and
    the current pin count.
  • Rail sidebar: the same action is icon-only, with an accessible name and a
    delayed tooltip.
  • Activating the action opens a menu above the footer. Selecting a root row
    opens a same-menu drill-down with Open, Unpin, and Back as
    applicable. An empty list has an explicit empty state.
  • An ordinary current session can be pinned when it is non-blank and not from
    a subagent. The newest pin appears first; pinning an existing id moves it to
    the front without duplicating it. A pinned current session offers Unpin
    current session
    .
  • A blank current session cannot be newly pinned. If a blank id is already
    stored, it remains removable and can be opened only while its non-subagent
    summary still resolves and workspace availability is actionable.
  • A subagent current session cannot be newly pinned or opened by this plugin.
    A previously stored subagent id remains removable; a rejected open is
    contained and leaves the recovery actions usable.
  • Workspace archive state is actionable only when baselinesReady === true,
    phase === 'ready', and state === 'idle'. Until then, every resolvable pin
    detail omits Open, explains that session availability is not ready, and
    keeps Unpin and Back.
  • DeepSeek Harness 0.1.0-rc.6 immediately clears an archived id selected
    through sessions.open() and exposes no public unarchive operation. An
    actionable archived pin therefore keeps its live title, omits Open,
    explains this version limitation, and remains removable.
  • Session Pins does not call sessions.open() for an archived pin or report a
    false success. It does not use a delayed-selection workaround, private API,
    host patch, or timer.
  • A stale id that no longer resolves is shown as Unavailable: id. Its
    drill-down omits Open but keeps Unpin and Back.
  • If an open fails because the session disappears or Harness rejects it, the
    menu stays usable, announces a localized error, and preserves the unpin
    recovery path.

Browser-local persistence

Pins are stored in localStorage under dsh.session-pins.v1 as a versioned,
ordered id list. Input is validated: malformed records fall back to empty,
non-string and blank ids are removed, duplicate ids keep their first
occurrence, and at most 100 pins are retained.

Persistence is browser-local. It does not sync across devices, browser
profiles, browsers, or different origins. Same-origin tabs reconcile
through browser storage events while the plugin is active; the tab that
writes a change updates itself directly because browsers do not send that
storage event back to the writing document. If localStorage is blocked or
throws, pins remain usable in memory for the current page but do not survive a
reload.

Install after release

The GitHub repository and tag are created during the release step. Run these
commands only after the referenced release exists.

Install the v0.1.0 Git tag into the stock web profile:

dsh plugin --profile web add github:alooshxl/dsh-session-pins#v0.1.0

To upgrade to another Git tag, repeat add with that tag; do not use update
to select a Git ref. For example:

dsh plugin --profile web add github:alooshxl/dsh-session-pins#v0.1.1

For an immutable installation, replace the placeholder with the full
40-character commit SHA:

dsh plugin --profile web add github:alooshxl/dsh-session-pins#<40-character-commit-sha>

Remove the plugin:

dsh plugin --profile web remove @dsh-external/dsh-session-pins

Launch the stock web profile:

dsh web

The equivalent explicit launch is:

dsh --profile web

The package tracks reviewed lib/ output. A Git installation therefore needs
neither an install build allowlist nor an install-time prepare, install, or
postinstall lifecycle.

Security and host boundaries

  • No API key or other credential is required to pin, unpin, persist, or open a
    session.
  • The package does not read credential files, ship temporary browser profiles,
    or include private Harness source.
  • Product behavior stays in the browser client entry. The Node entry only
    enables package registration and browser-module discovery.
  • Integration uses published Harness client services and the public
    sidebar.footer.action slot. There is no host patch, monkey patch, or
    compatibility layer.

Local development

Use Node 22 and pnpm 11.7.0:

git clone https://github.com/alooshxl/dsh-session-pins.git
cd dsh-session-pins
pnpm install --frozen-lockfile

The frozen development graph allows lifecycle scripts only for the exact
@deepseek-ai/[email protected] and [email protected] transitive
host dependencies required to boot the published rc.6 Web profile on Linux.
Every other discovered script is denied. These development-only host packages
are not part of the packed plugin or its installation contract.

The GNU Make checkpoint is:

make fmt && make test && make lint

On systems without GNU Make, run its exact commands:

pnpm run format && pnpm run test && pnpm run lint
pnpm run typecheck

Run the complete release-oriented verification:

pnpm run build
pnpm run format:check
pnpm run typecheck
pnpm run verify:self-contained
pnpm run verify:package
git diff --check
git status --short --untracked-files=all -- lib

pnpm run verify:package performs the local dry-run package inventory
validation through a compatible package-manager invocation.

The final git status command must print nothing: tracked and untracked
generated-artifact drift is blocking.

Contributing, discussion, and license

Please report defects or compatibility findings through
GitHub issues, and send
focused changes through
pull requests. Feature
context remains available in
Discussion #63.

This project is available under the MIT License.

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-session-pins」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:alooshxl/dsh-session-pins

Headless(CLI)profile:

dsh plugin --profile headless add github:alooshxl/dsh-session-pins

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

给 agent 一套记忆、知识库或检索层,让它不再跨会话丢上下文。

适合谁

跑长项目、想让 agent 记住决策、文档和偏好而不用每次重讲的人。

二次开发建议

记忆/检索后端是缝——插新存储、调蒸馏策略,或加引用与审计轨迹。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Knowledge 里更多

浏览全部 7797 个插件 →