DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Compaction Optical — DeepSeek Harness 插件(DSH Plugin)
← Plugins
C

dsh-compaction-optical

Compaction Optical

面向 DeepSeek Harness 的实验性光学内存压缩提供程序

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:cyijun/dsh-compaction-optical#cf7814bf0c8d2651db87475a3b6a519fb62d6504
README兼容性版本

兼容性与来源证明

Compaction Optical 以 dsh-compaction-optical 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/8/21

版本

0.1.0stable
2026/8/21

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/8/23
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Contextdsh-context用于上下文洞察和管理的 DeepSeek Harness 插件,提供上下文仪表板和上下文命令,帮助了解上下文的构成及其演变过程。Mnemondsh-mnemon面向 DeepSeek Harness 的可组合三层记忆控制平面:持久化运行时上下文、可搜索的项目文档、可插拔的长期记忆、受保护的策略、WebUI 和无头工具。Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。Memory@furongjun1999/dsh-memory灵枢(Lingshu·líng shū)DeepSeek Harness 插件:完整大脑——长期记忆/知识飞轮/自我认知/递归反思接入 DSH,对话自动沉淀进 md_cg 认知图(md 文档)

README

dsh-compaction-optical

English | 中文

An independent, experimental optical-memory compaction provider for DeepSeek Harness. It keeps the released @deepseek-ai/dsh-compaction-basic pressure policy, retention selection, overflow recovery, lock, retry, and durable replacement transaction, but overrides the existing protected summarize() hook so the replacement summary contains generated PNG pages.

This project is not an official DeepSeek release. It currently targets the 0.1.1-rc.2 Harness packages and the exact model id deepseek-v4-flash-vision-exp.

The package is marked private only to prevent accidental npm publication; GitHub source and tarball installation remain supported.

The design explores the historical-memory direction proposed by the DeepSeek-OCR technical report: text is mapped into a two-dimensional visual representation, and older pages may be progressively resized. This plugin is a Harness-level memory format, not DeepSeek-OCR's learned DeepEncoder, and it does not claim equivalent OCR or agent-task accuracy.

Modes

ModeRenderer inputAuxiliary model call
directSelected canonical messages with role labels, text, reasoning, tool calls, and tool results. Native images remain independent image blocks.None.
summaryThe safe text output from the inherited basic summarizer, then rasterized as optical memory.One ordinary purpose: compaction call. Its provider, model, cap, usage, and raw output remain in the standard compaction/summary fields.

Both modes write a versioned JSON manifest as the first summary text block, followed by generated pages and preserved native images. The stock compaction transaction records those blocks and places the same references in its replacement user message, so replay needs no Harness schema patch.

In direct mode, a later compaction recognizes an earlier optical checkpoint by CompactionId, validates its recorded summary blocks, and reads the page attachments directly. It does not OCR them back to text. When the page count exceeds maxPages, the oldest eligible contiguous group becomes an ordered 2x2 contact sheet and its generation increments. The operation fails instead of discarding content after maxGeneration prevents further aging.

Install from GitHub

The repository ships a dsh.bundle patch that disables the default compaction-basic provider, inserts compaction-optical, and adds the invariant companion:

dsh plugin --profile headless add github:cyijun/dsh-compaction-optical

A git dependency runs this package's prepare build. pnpm 10 and later require explicit authorization before executing package code. After the first command reports the blocked package, copy its complete printed key into the profile's pnpm-workspace.yaml, then run it again. For a pinned commit, the setting resembles:

allowBuilds:
  'dsh-compaction-optical@https://codeload.github.com/cyijun/dsh-compaction-optical/tar.gz/<commit>': true

Replace <commit> with the full commit SHA from the install command. Do not grant broad authorization to arbitrary sources.

Verify the effective layer and model route before starting a task:

dsh --profile headless --dump-config
dsh --profile headless "your task"

Pin a commit in production, for example github:cyijun/dsh-compaction-optical#<commit>. The active conversation route must resolve to deepseek-v4-flash-vision-exp and declare image input; missing routing, a different model, or a text-only catalog entry fails before the summary commits.

The included bundle is supported only in the headless profile. The shipped Web bundle keeps compaction inside Agent Presets; installing this bundle into Web would add a Host-plane provider without rewriting those preset definitions, so that composition is intentionally unsupported.

Configuration

The bundle defaults to:

- id: compaction-optical
  name: dsh-compaction-optical
  config:
    mode: direct
    thresholdRatio: 0.8
    retainRatio: 0.16
    maxPages: 8
    maxGeneration: 1

All BasicCompactionConfig fields remain available. Optical fields are:

KeyDefaultMeaning
modedirectRender selected messages directly, or render the existing text compact result with summary.
rendererProfiledeepseek-v4-flash-vision-exp-v1Fixed renderer/target profile; other values fail load.
pageWidthPx / pageHeightPx800 / 800Generated PNG dimensions.
marginPx24Inset on every edge.
fontSizePx / lineHeightPx12 / 16Text size and baseline distance.
characterWidthRatio0.62Monospace width multiplier used for deterministic wrapping.
tabWidth2Spaces used to expose one tab.
fontFamilyCJK-capable fallback listSVG font-family list used by sharp.
maxPages8Maximum generated pages retained in one checkpoint.
maxGeneration1Maximum number of 2x2 aging composites applied to a page.

Native images consume the attachment service's per-message image count and aggregate byte limits. The generated-page budget shrinks to leave slots for those images, and duplicate attachment ids are retained once in first-seen order.

Token accounting

DeepSeek's V4 Vision release note says each image is tokenized for billing at up to 384 tokens. That is a billing ceiling, not a guarantee about semantic capacity.

The released Harness 0.1.1-rc.2 compaction hook prices the replacement through the generic token-meter estimator, which currently estimates an ImageBlock from its serialized attachment reference. It has no provider-specific image-price override. Consequently, the basic backend's shrink check and projected context pressure are heuristic and do not reproduce the official 384-token ceiling. maxPages is the practical bound until the upstream compaction seam exposes producer-specific replacement pricing.

Verification

pnpm install
pnpm run check

The keyless suite covers renderer validation, CJK-width wrapping, PNG dimensions, cancellation, recursive aging, direct and text-first modes, replay manifests, attachment limits, target-model failures, the invariant companion, and Loader composition.

A real API calibration checks whether the default renderer recovers one exact literal. It runs only when both environment variables are present:

DEEPSEEK_API_KEY=... DEEPSEEK_VISION_E2E=1 pnpm run test:e2e

Model experience

The model sees one user-role compact checkpoint with the basic backend's framing, then the optical manifest, ordered page images, and any preserved native images. Recent retained messages follow unchanged. In summary mode, only the rasterized safe summary is visible; the summarizer's reasoning and raw output remain log-only.

Replacing the first selected message invalidates KV-cache reuse after that position. Reused attachment identities make recursive checkpoints auditable but do not guarantee provider-side image-cache reuse.

Known limitations

  • Optical compression is lossy. DeepSeek-OCR reconstruction measurements do not establish long-horizon agent recall, code fidelity, or tool-use accuracy for this renderer and model.
  • The renderer uses host fonts. Wrapping, manifest fields, page order, and source digests are stable, but exact raster bytes may vary across machines.
  • Page aging is ordered and bounded, not learned or salience-aware.
  • The public Harness hook cannot persist a dedicated optical encoding union or exact provider-specific replacement price without upstream changes.
  • The included bundle supports the headless profile only; Web Agent Preset integration is not included.