tr1v3r/dsh-ltm ↗★ 0

@tr1v3r/dsh-ltm

Structured long-term memory for DeepSeek Harness: CJK-aware tokenized search, hybrid rerank, dedupe, expiry review, and migration from dsh-memory — zero mandatory network 适合需要本地化、无网依赖的长期记忆搜索与去重管理。

패키지
@tr1v3r/dsh-ltm
호환성
미검증
Harness peer 범위
>=0.1.0-rc.6 <0.2.0
Cordis peer 범위
^4.0.1
버전
0.2.1
라이선스
MIT
최근 업데이트
2026. 9. 23.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:tr1v3r/dsh-ltm

Configuration

keydefaultmeaning
path(required)SQLite file, or :memory:
defaultScope""fallback scope, or fixed scope when automatic detection is disabled
autoProjectScopetruederive the active project from each agent session's cwd/Git repository
escapeSequences[]optional output sequences broken with a zero-width space before prompt rendering
promptRecentCount10unpinned recent memories in the recall section
promptMaxChars2000hard UTF-16 character budget of the section; pinned survive first
promptMaxTokens(unset)optional positive safe-integer hard token cap, alongside characters
promptTokenizerPath(unset)local supported Hugging Face tokenizer.json; required together with promptMaxTokens
maxTextChars2000max characters per memory
searchLimitDefault / searchLimitMax10 / 50search result limits
promptOrder50recall section order
dedupeThreshold0.8Jaccard similarity ≥ this marks a near-duplicate on write
dedupeCosineThreshold0.92cosine similarity ≥ this also marks a near-duplicate
staleAfterDays90memories unconfirmed for this long render as stale

Memory text is preserved exactly in recalled prompts by default. escapeSequences is an explicit deployment-level opt-in for environments that pass rendered prompts through an additional delimiter-based parser; DSH itself does not require it.

Invalid values (empty path, non-integer bounds, thresholds outside [0,1], escape sequences shorter than 2 chars or containing a zero-width space) throw at plugin load — fail loud, not at first tool call.

Automatic project isolation

With autoProjectScope: true, every agent resolves its own session.header.cwd; the shared DSH process cwd is never used. A Git checkout is identified by its canonical common Git directory, so subdirectories and linked worktrees share one project scope. A non-Git workspace is identified by its canonical directory. Git scope names contain only a short SHA-256 digest so every linked-worktree layout stays identical; directory scopes also include a readable basename. Absolute paths are never stored.

Model-facing defaults are intentionally narrow:

  • writes and near-duplicate checks use the active project scope;
  • search and automatic prompt recall see only the active project plus global memories (scope="");
  • update, forget, confirm, and merge reject records outside those visible scopes, and merge never crosses scope boundaries;
  • memory_list and the CLI remain explicit cross-project aggregation/administration surfaces.

Set autoProjectScope: false to use only defaultScope as a fixed deployment scope (use "" for global-only operation). Scope is a context-isolation boundary, not an operating-system permission boundary; anyone with direct access to the SQLite file or CLI can still administer every record.

Optional offline prompt token budget