dsh-memory-bond 0.3.0-beta.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -7
- package/README.md +125 -91
- package/README.zh-CN.md +122 -92
- package/SECURITY.md +29 -0
- package/dist/audit.js +155 -80
- package/dist/automatic.js +10 -2
- package/dist/client.js +2035 -0
- package/dist/command-scope.js +4 -4
- package/dist/commands.js +15 -9
- package/dist/consolidation-store.js +87 -20
- package/dist/consolidation.js +2 -6
- package/dist/domain.js +8 -4
- package/dist/encoder.js +46 -5
- package/dist/file-import-store.js +120 -0
- package/dist/file-import.js +265 -0
- package/dist/foreground-attempts.js +91 -0
- package/dist/guidance.js +133 -92
- package/dist/host.js +13 -0
- package/dist/index-policy.js +91 -48
- package/dist/index.js +102 -40
- package/dist/knowledge-hooks.js +70 -27
- package/dist/knowledge.js +2 -3
- package/dist/maintenance-store.js +38 -4
- package/dist/maintenance.js +29 -5
- package/dist/personal.js +37 -0
- package/dist/policy.js +45 -47
- package/dist/prompt-copy.js +93 -0
- package/dist/proposal-receipts.js +70 -0
- package/dist/proposal-review.js +656 -0
- package/dist/propose-contract.js +32 -36
- package/dist/question-answers.js +86 -29
- package/dist/retrieval.js +25 -8
- package/dist/scope-narrowing.js +49 -0
- package/dist/search-index.js +93 -13
- package/dist/semantic.js +69 -207
- package/dist/service.js +633 -204
- package/dist/sharing.js +7 -13
- package/dist/sources.js +28 -3
- package/dist/store.js +432 -96
- package/dist/tool-experience.js +87 -0
- package/dist/turn-review-store.js +83 -16
- package/dist/turn-review.js +155 -59
- package/dist/ui.js +128 -26
- package/dist/vector-index.js +69 -33
- package/docs/architecture.zh-CN.md +52 -0
- package/docs/benchmark.zh-CN.md +60 -0
- package/docs/benchmarks/repository-tasks.json +5355 -0
- package/docs/images/bond-memory-principle-en.svg +644 -0
- package/docs/images/bond-memory-principle-zh.svg +644 -0
- package/docs/images/bond-memory-principle.drawio +644 -0
- package/docs/images/memory-settings-en.png +0 -0
- package/docs/images/memory-settings-zh.png +0 -0
- package/docs/images/memory-turn-recalled-en.png +0 -0
- package/docs/images/memory-turn-recalled-zh.png +0 -0
- package/docs/images/memory-turn-saved-en.png +0 -0
- package/docs/images/memory-turn-saved-zh.png +0 -0
- package/docs/media/memory-bond-name-en.gif +0 -0
- package/docs/media/memory-bond-name-en.mp4 +0 -0
- package/docs/media/memory-bond-name-zh.gif +0 -0
- package/docs/media/memory-bond-name-zh.mp4 +0 -0
- package/locale/detail.en.md +5 -1
- package/locale/detail.zh.md +5 -1
- package/locale/en.json +338 -0
- package/locale/zh.json +338 -0
- package/native/embeddings/NOTICE.md +2 -2
- package/package.json +39 -19
- package/scripts/benchmark-bond.mjs +72 -0
- package/scripts/benchmark-conditions.mjs +144 -0
- package/scripts/benchmark-example.mjs +37 -0
- package/scripts/benchmark-scale.mjs +119 -0
- package/scripts/benchmark-scenarios.mjs +57 -0
- package/scripts/benchmark-tasks.mjs +244 -0
- package/src/audit.ts +144 -85
- package/src/automatic.ts +12 -2
- package/src/command-scope.ts +4 -4
- package/src/commands.ts +12 -8
- package/src/consolidation-store.ts +80 -18
- package/src/consolidation.ts +2 -6
- package/src/domain.ts +9 -4
- package/src/encoder.ts +46 -6
- package/src/file-import-store.ts +139 -0
- package/src/file-import.ts +256 -0
- package/src/foreground-attempts.ts +97 -0
- package/src/guidance.ts +138 -102
- package/src/host.ts +22 -2
- package/src/index-policy.ts +93 -46
- package/src/index.ts +87 -43
- package/src/knowledge-hooks.ts +71 -29
- package/src/knowledge.ts +2 -3
- package/src/maintenance-store.ts +37 -4
- package/src/maintenance.ts +25 -5
- package/src/personal.ts +36 -0
- package/src/policy.ts +55 -52
- package/src/prompt-copy.ts +99 -0
- package/src/proposal-receipts.ts +59 -0
- package/src/proposal-review.ts +614 -0
- package/src/propose-contract.ts +31 -35
- package/src/question-answers.ts +99 -29
- package/src/retrieval.ts +26 -9
- package/src/scope-narrowing.ts +58 -0
- package/src/search-index.ts +94 -14
- package/src/semantic.ts +67 -188
- package/src/service.ts +595 -210
- package/src/sharing.ts +7 -14
- package/src/sources.ts +26 -4
- package/src/store.ts +434 -97
- package/src/tool-experience.ts +93 -0
- package/src/turn-review-store.ts +86 -15
- package/src/turn-review.ts +142 -60
- package/src/ui.ts +122 -27
- package/src/vector-index.ts +57 -29
- package/client/index.js +0 -1186
- package/design/dsh-memory-plugin-design.md +0 -46
- package/design/dsh-memory-plugin-evaluation.md +0 -135
- package/design/evaluations/locomo-conv-26-2026-12-03.json +0 -252
- package/design/evaluations/locomo-conv-26-paired-2026-12-03.json +0 -549
- package/design/evaluations/locomo-conv-26-write-replay-2026-12-03.json +0 -289
- package/design/evaluations/project-memory-tasks-2026-12-03.json +0 -1059
- package/design/memory-lifecycle-consolidation.excalidraw +0 -1212
- package/design/memory-lifecycle-consolidation.mobile.excalidraw +0 -1083
- package/design/memory-lifecycle-consolidation.mobile.svg +0 -2
- package/design/memory-lifecycle-consolidation.mobile.zh-CN.excalidraw +0 -1083
- package/design/memory-lifecycle-consolidation.mobile.zh-CN.svg +0 -94
- package/design/memory-lifecycle-consolidation.svg +0 -2
- package/design/memory-lifecycle-consolidation.zh-CN.excalidraw +0 -1212
- package/design/memory-lifecycle-consolidation.zh-CN.svg +0 -94
- package/design/memory-lifecycle.excalidraw +0 -2105
- package/design/memory-lifecycle.mobile.excalidraw +0 -1896
- package/design/memory-lifecycle.mobile.svg +0 -95
- package/design/memory-lifecycle.mobile.zh-CN.excalidraw +0 -1896
- package/design/memory-lifecycle.mobile.zh-CN.svg +0 -97
- package/design/memory-lifecycle.svg +0 -95
- package/design/memory-lifecycle.zh-CN.excalidraw +0 -2105
- package/design/memory-lifecycle.zh-CN.svg +0 -97
- package/native/embeddings/LICENSE +0 -21
- package/native/embeddings/en/model.onnx +0 -4
- package/native/embeddings/en/vocab.txt +0 -30522
- package/native/embeddings/runtime/LICENSE +0 -21
- package/native/embeddings/runtime/ThirdPartyNotices.txt +0 -6156
- package/native/embeddings/runtime/ort-wasm-simd-threaded.mjs +0 -70
- package/native/embeddings/runtime/ort-wasm-simd-threaded.wasm +0 -0
- package/native/embeddings/runtime/ort.wasm.min.mjs +0 -7
- package/native/embeddings/worker.mjs +0 -97
- package/native/embeddings/zh/model.onnx +0 -0
- package/native/embeddings/zh/vocab.txt +0 -21128
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 1.0.0 (2026-12-04)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- The Memory settings entry and the plugin card now share the same heavier-weight icon, which inherits the current theme color.
|
|
7
|
-
- Saved agreements retain their ID across corrections. You can check the original wording, see which revision reached a conversation, and withdraw the agreement. First-save checks now cover explicit ownership, project scope, conditions, negation and one-time requests.
|
|
8
|
-
- Eligible user text can be reviewed after the foreground model exhausts its output budget. End-of-turn recovery observes the profile’s existing limits and skips portions already handled.
|
|
9
|
-
- When standing agreements exceed the prompt budget, the current task can bring relevant older agreements into view. Search accepts Chinese and English wording in the same call and stops offering repeated searches when every accessible scope is empty.
|
|
5
|
+
Install `dsh-memory-bond` from npm using the DSH plugin manager. The core package includes local storage and keyword search. The source checkout also contains optional English and Chinese semantic search models. [npm package](https://www.npmjs.com/package/dsh-memory-bond/v/1.0.0)
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
- Save project agreements and profile-wide preferences with revisions and source evidence. Inspect, correct or withdraw them in Settings.
|
|
8
|
+
- Recall applicable agreements in the prompt or search on demand. Keyword search runs locally, with optional English and Chinese models for semantic search.
|
|
9
|
+
- Inspect chat receipts, review proposed imports from project instruction files, and manage records with `/project-memory`.
|
|
10
|
+
- Review suggested memories in **Settings → Memory**. Chat shows a shortcut for suggestions from that conversation. File imports go straight to settings and skip Markdown index links and standalone rationale paragraphs.
|
package/README.md
CHANGED
|
@@ -1,148 +1,182 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./client/memory-icon.svg" width="88" height="88" alt="DSH Memory Bond logo">
|
|
3
|
+
</p>
|
|
4
|
+
<h1 align="center">DSH Memory Bond</h1>
|
|
5
|
+
<p align="center"><strong>A local memory plugin for DeepSeek Harness.</strong></p>
|
|
6
|
+
<p align="center"><a href="./README.zh-CN.md">简体中文</a> · <a href="#quick-install">Quick install</a> · <a href="#try-it-across-two-projects">Try it across two projects</a> · <a href="#features">Features</a> · <a href="#faq">FAQ</a> · <a href="#repository-task-benchmark">Benchmark</a></p>
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
In one project, tell the assistant “Please call me Alex.” Switch to another project and ask “What should you call me?” It answers “Alex.” Open the receipt beneath the reply to see the preference the model received.
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
[](./docs/media/memory-bond-name-en.mp4)
|
|
6
11
|
|
|
7
|
-
[
|
|
12
|
+
[Watch the full walkthrough](./docs/media/memory-bond-name-en.mp4). Recorded in DSH Web with Memory Bond 1.0.0 and a scripted local assistant. The plugin saves the preference and generates the receipt during the recording.
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
You can check what the assistant remembered, see the words it came from, and change or withdraw it. Optional duplicate checks run when a project chat is idle. They are off by default, and you decide which entries to keep.
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
<a id="install"></a>
|
|
17
|
+
|
|
18
|
+
## Quick install
|
|
19
|
+
|
|
20
|
+
Install `dsh-memory-bond` from the public npm registry. The core package includes local storage and keyword search. Memory Bond 1.0.0 supports DSH `>=0.2.2-rc.3 <0.3.0-0`. [npm package](https://www.npmjs.com/package/dsh-memory-bond) · [Changelog](./CHANGELOG.md)
|
|
21
|
+
|
|
22
|
+
**DSH Desktop**
|
|
23
|
+
|
|
24
|
+
1. In the sidebar, open **Plugins → Add plugin**.
|
|
25
|
+
2. Select the public npm registry and enter `dsh-memory-bond` in **Package name or address**.
|
|
26
|
+
3. Click **Install**, then **Enable now**. Restart DSH if prompted.
|
|
27
|
+
|
|
28
|
+
**Command line**
|
|
29
|
+
|
|
30
|
+
For Desktop, open DSH once to initialize the profile, then quit the app completely. Run the command below and reopen DSH. For DSH Web, use `web` in place of `desktop` and restart the Web host.
|
|
12
31
|
|
|
13
32
|
```sh
|
|
14
|
-
dsh plugin --profile desktop add dsh-memory-bond
|
|
33
|
+
dsh plugin --profile desktop add dsh-memory-bond --registry=https://registry.npmjs.org
|
|
15
34
|
```
|
|
16
35
|
|
|
17
|
-
|
|
36
|
+
<a id="try-it-in-two-chats"></a>
|
|
18
37
|
|
|
19
|
-
|
|
20
|
-
| --- | --- |
|
|
21
|
-
| macOS DSH Desktop host | `0.2.2-rc.5` |
|
|
22
|
-
| Standalone DSH CLI on macOS (tested on Node.js 24.15.0, host requires ≥24.9.0) | `0.2.2-rc.3`, `0.2.2-rc.4` |
|
|
38
|
+
## Try it across two projects
|
|
23
39
|
|
|
24
|
-
|
|
40
|
+
1. In your first project, tell the assistant “Please call me Alex.” Expand **Memory receipts for this turn** beneath its reply to see the saved preference.
|
|
41
|
+
2. Switch to a different project in the same DSH profile. Start a chat there and ask “What should you call me?” The assistant can use the name you gave it in the first project.
|
|
42
|
+
3. Open the receipt beneath the new reply, then expand the name preference. **Full text delivered** shows that the model received that memory for this answer.
|
|
25
43
|
|
|
26
|
-
|
|
44
|
+
If the first chat has no saved entry, run `/project-memory status` and check that `memoryEnabled` is `true`. The turn receipt also shows the reason for an unsuccessful save attempt.
|
|
27
45
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
3. Open **Settings → Memory** (设置 → 记忆), select the project, and inspect the entry. You can see its current version, check its source, change when it is used, or withdraw it.
|
|
46
|
+
<details>
|
|
47
|
+
<summary>See how a project remembers its release-note format</summary>
|
|
31
48
|
|
|
32
|
-
|
|
49
|
+
These screenshots use a local scripted assistant in DSH Web. The first chat records the save.
|
|
33
50
|
|
|
34
|
-
|
|
35
|
-
| --- | --- | --- |
|
|
36
|
-
| “Use make river-suite for this project's integration checks from now on.” | Revision 1 in the first request | `make river-suite` |
|
|
37
|
-
| “Correction: use make lake-suite for this project's integration checks from now on.” | Revision 2 of the same agreement | `make lake-suite` |
|
|
38
|
-
| Switch the agreement to on-demand recall | Revision 3 retrieved before execution | `make lake-suite` |
|
|
39
|
-
| Withdraw the agreement and give `make check` as the fallback for this task | The withdrawn version is absent | `make check` |
|
|
51
|
+
<img src="./docs/images/memory-turn-saved-en.png" width="751" alt="The first chat’s receipt shows the saved project convention for release notes.">
|
|
40
52
|
|
|
41
|
-
|
|
53
|
+
In the new chat, **Full text delivered** shows that the model received the convention while drafting the notes.
|
|
42
54
|
|
|
43
|
-
<
|
|
44
|
-
<source media="(max-width: 600px)" srcset="https://cdn.jsdelivr.net/npm/dsh-memory-bond@0.3.0-beta.0/design/memory-lifecycle.mobile.svg">
|
|
45
|
-
<img src="https://cdn.jsdelivr.net/npm/dsh-memory-bond@0.3.0-beta.0/design/memory-lifecycle.svg" alt="One local SQLite database per profile holds global and project memory. Layer 1 puts applicable rules in the prompt, such as the corrected just integration command at revision 2. Layer 2 retrieves current conclusions, conditions and exceptions on demand. Layer 3 checks an excerpt and its verification status when the user asks for a source. Optional consolidation checks roughly hourly while a project chat stays idle.">
|
|
46
|
-
</picture>
|
|
55
|
+
<img src="./docs/images/memory-turn-recalled-en.png" width="751" alt="The new chat’s receipt shows the full text of the release-note convention reached the model.">
|
|
47
56
|
|
|
48
|
-
|
|
57
|
+
</details>
|
|
49
58
|
|
|
50
|
-
##
|
|
59
|
+
## Features
|
|
51
60
|
|
|
52
|
-
**
|
|
61
|
+
- **Remember across conversations.** Save a preferred name for every project in your DSH profile, or keep a writing convention in just one project. [Memory scopes](./docs/architecture.zh-CN.md)
|
|
62
|
+
- **Keep memories up to date.** Correct an entry in chat or in Settings. The correction gets a new version under the same ID. If a global agreement belongs in just this project, say so in the next turn of the same chat. You can also withdraw a convention. [Revisions](./src/store.ts) · [Scope corrections](./src/scope-narrowing.ts)
|
|
63
|
+
- **See where a memory came from.** Inspect the retained quote, reopen the original chat when available, and expand a reply’s receipt to see which version reached each model request. The receipt distinguishes a lookup hint, delivery of the full text, an explicit citation and a matching Bash command. [Request audit](./src/audit.ts)
|
|
64
|
+
- **Review possible duplicates.** Turn on **Cross-session review** in **Settings → Memory** to compare similar entries from different chats in a project. You can keep both or withdraw one. [Duplicate checks](./src/consolidation.ts)
|
|
65
|
+
- **Keep project rules relevant.** Bond checks the current worktree’s paths, branch, Make or Just targets and repository instructions. A missing target flags a rule for review in that worktree. [Applicability checks](./src/policy.ts)
|
|
66
|
+
- **Move conventions between project memory and repository files.** In a writable project chat, enter `/project-memory import all` to scan `AGENTS.md`, `CLAUDE.md` and Claude Code project memory. Open **Settings → Memory** to review the import suggestions and choose **Remember** or **Ignore**. You can also export a saved project convention to your worktree and include the change in a pull request.
|
|
53
67
|
|
|
54
|
-
|
|
68
|
+
<details>
|
|
69
|
+
<summary>Choose an import source or preview and apply an export</summary>
|
|
55
70
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
- **Choose a source.** Enter `/project-memory import agents` for the root `AGENTS.md`, `/project-memory import claude` for `CLAUDE.md` and `.claude/CLAUDE.md`, or `/project-memory import claude-memory` for Claude Code’s memory for this project.
|
|
72
|
+
- **Preview an export.** Enter `/project-memory status`, find the project entry’s `id` and `rev`, and combine them as `ID@revision`. Enter `/project-memory export agents <ID@revision>` to see the proposed changes to `AGENTS.md`. For a runbook with an observed successful verification, enter `/project-memory export skill <ID@revision> release-check` to preview `.dsh/skills/release-check/SKILL.md`. Replace the angle-bracketed placeholder with the actual reference.
|
|
73
|
+
- **Write the file.** Check the returned `diff`, then copy and run the full command in the `apply` field in the same chat. The preview is valid for 30 minutes. [File import](./src/file-import.ts) · [Export implementation](./src/sharing.ts)
|
|
74
|
+
|
|
75
|
+
</details>
|
|
61
76
|
|
|
62
|
-
|
|
77
|
+
<img src="./docs/images/memory-settings-en.png" width="564" alt="Settings → Memory shows two global preferences and the project’s release-note convention expanded to show the original quote and conversation link.">
|
|
63
78
|
|
|
64
|
-
##
|
|
79
|
+
## How it works
|
|
65
80
|
|
|
66
|
-
|
|
81
|
+
Bond stores each memory in your DSH profile’s SQLite database with a version and a source reference. A chat can receive a standing rule in its prompt (L1), look up a memory when it needs the details (L2), or check the retained quote when someone asks for the source (L3). Each serves a different need.
|
|
67
82
|
|
|
68
|
-
|
|
69
|
-
<source media="(max-width: 600px)" srcset="https://cdn.jsdelivr.net/npm/dsh-memory-bond@0.3.0-beta.0/design/memory-lifecycle-consolidation.mobile.svg">
|
|
70
|
-
<img src="https://cdn.jsdelivr.net/npm/dsh-memory-bond@0.3.0-beta.0/design/memory-lifecycle-consolidation.svg" alt="Once enabled, consolidation checks after a completed project turn, repeats about hourly while idle, and pauses for a new turn. SQLite scans existing entries in batches, then matches new or revised entries against older ones. An empty check makes zero model calls. For an eligible pair, the model compares two summaries. If it flags a duplicate, the user chooses which records to keep.">
|
|
71
|
-
</picture>
|
|
83
|
+

|
|
72
84
|
|
|
73
|
-
[Full-size diagram](
|
|
85
|
+
[Full-size diagram](./docs/images/bond-memory-principle-en.svg) · [Editable draw.io source](./docs/images/bond-memory-principle.drawio) · [Architecture and configuration (Chinese)](./docs/architecture.zh-CN.md)
|
|
74
86
|
|
|
75
|
-
|
|
87
|
+
<details>
|
|
88
|
+
<summary>One command, two Git worktrees — inspect both replies and reproduce them locally</summary>
|
|
89
|
+
|
|
90
|
+
The project first used `make verify` for integration checks. A correction changed the command to `make integration` in revision 2, shared by both worktrees. We removed the `integration` target from the Makefile in `release` alone, then opened a fresh chat in each worktree. On DSH `0.2.2-rc.5`, an offline scripted assistant received the same prompt in both chats, “Run the integration checks for this change.”
|
|
91
|
+
|
|
92
|
+
| Where to look | `main` · target present | `release` · target removed |
|
|
76
93
|
| --- | --- | --- |
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
94
|
+
| `/project-memory status` | Revision 2 is applicable | The same revision appears under `needs_review` |
|
|
95
|
+
| **Memory receipts for this turn** below the reply | Both model requests received the full text of revision 2. The first also records a matching execution. | The assistant searched once. No delivery of this revision was recorded. |
|
|
96
|
+
| Bash tool and marker file | `make integration` ran once and exited with code 0 | No Bash call was attempted |
|
|
97
|
+
|
|
98
|
+
From the source checkout with DSH, Git and Make installed, run the following commands. The demo uses a temporary repository and an isolated DSH profile. It prints both source quotes, the worktree checks and the per-request receipts.
|
|
81
99
|
|
|
82
|
-
|
|
100
|
+
```sh
|
|
101
|
+
npm run build
|
|
102
|
+
npm run verify:dsh -- --worktrees
|
|
103
|
+
```
|
|
83
104
|
|
|
84
|
-
|
|
105
|
+
</details>
|
|
85
106
|
|
|
86
|
-
|
|
107
|
+
## FAQ
|
|
87
108
|
|
|
88
|
-
|
|
89
|
-
| --- | --- |
|
|
90
|
-
| `project_memory_propose` | Propose a scoped memory or correction grounded in the user’s words. |
|
|
91
|
-
| `project_memory_search` | Find current records in the visible scope by ID, subject and topic, keywords, or semantic similarity. |
|
|
92
|
-
| `project_memory_read` | Read the current conclusion, conditions, exceptions and revision. |
|
|
93
|
-
| `project_memory_source` | Look up the retained wording and its verification status when the user asks for the source. |
|
|
94
|
-
| `project_memory_ticket` | Open a short-lived ticket offered by DSH for a matching project fact, reference or runbook. |
|
|
109
|
+
**Do I need another API key or database service?** Bond uses the model already configured in DSH and creates a local SQLite database in your profile.
|
|
95
110
|
|
|
96
|
-
|
|
111
|
+
**What leaves my machine?** Search and optional embedding inference run locally. Your DSH model provider receives the memories included in a chat request. To review a save, it can also receive your message, the proposed wording, relevant memories and applicable project instructions. By default, end-of-turn review can send eligible excerpts and related non-sensitive memories even if you did not ask to save anything. Set `turnReviewBudget` to `0` to turn off that review. Duplicate checks send the two candidates’ summaries and conditions. The local database and its managed backups are unencrypted. [Security and privacy](./SECURITY.md)
|
|
97
112
|
|
|
98
|
-
|
|
113
|
+
**Which chats share a memory?** Global memories are available across projects in the same profile. Project memories follow the Git repository, including its linked worktrees. Separate clones have separate project memories. For a folder outside Git, configure `nonGitRoots`. [Project identity](./src/domain.ts)
|
|
99
114
|
|
|
100
|
-
|
|
115
|
+
**Can I see, change or turn off memory?** Open **Settings → Memory** to inspect sources, edit or withdraw an entry. Turn off **Enable memory** to stop the assistant from saving and using memories. Existing records stay available for you to manage. In chat, `/project-memory help` lists the commands.
|
|
101
116
|
|
|
102
|
-
|
|
117
|
+
**What do the optional models add?** Keyword search matches terms. A local model can also find related wording, including when you phrase the same question differently. You can add either language or both. [Set up model packs](#optional-language-models)
|
|
103
118
|
|
|
104
|
-
|
|
119
|
+
| Installed | What you can use |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| Core package | Local storage and keyword search |
|
|
122
|
+
| Core + English model | Also searches English entries by meaning |
|
|
123
|
+
| Core + Chinese model | Also searches Chinese entries by meaning |
|
|
105
124
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
turnReviewBudget: 0
|
|
110
|
-
```
|
|
125
|
+
**What does “once per hour” cover?** With cross-session review enabled, Bond looks for similar entries when a writable project chat goes idle after a completed turn. Per project, it sends at most one pair to the session model per hour for comparison. Chat requests and memory-write reviews have their own model calls. [Background review](./src/consolidation.ts)
|
|
126
|
+
|
|
127
|
+
<a id="benchmark-results"></a>
|
|
111
128
|
|
|
112
|
-
|
|
129
|
+
## Repository task benchmark
|
|
113
130
|
|
|
114
|
-
|
|
131
|
+
A scripted assistant tried 34 repository tasks with five phrasings each on DSH `0.2.2-rc.5`. Each task started in a fresh chat. When the script selected a Make target, DSH’s Bash tool ran it and the benchmark checked the marker it wrote. In 15 of the 170 tasks per configuration, the correct action was to skip execution.
|
|
115
132
|
|
|
116
|
-
|
|
133
|
+
| Retrieval mode | Correct (including correct skips) | Wrong command | Missed execution |
|
|
134
|
+
| --- | ---: | ---: | ---: |
|
|
135
|
+
| Core package · keyword search | 120/170 (70.6%) | 28 | 22 |
|
|
136
|
+
| Core + English and Chinese models · hybrid search | 137/170 (80.6%) | 32 | 1 |
|
|
117
137
|
|
|
118
|
-
|
|
138
|
+
Adding both models yielded 17 more correct outcomes (**+10 percentage points**). Missed executions fell from 22 to 1, and wrong commands rose from 28 to 32. The benchmark measures retrieval and execution with a fixed selection policy. How often a live model follows a convention needs a separate evaluation. [Per-task results](./docs/benchmarks/repository-tasks.json) · [Method and reproduction (Chinese)](./docs/benchmark.zh-CN.md)
|
|
119
139
|
|
|
120
|
-
|
|
121
|
-
| --- | ---: | ---: | ---: | ---: |
|
|
122
|
-
| Plugin off, question only | 0.0 | 92 | 577,993 | CNY 0.22 |
|
|
123
|
-
| Plugin on, access to 118 saved memories | **27.1** | 54 | 1,031,787 | CNY 0.61 |
|
|
124
|
-
| Plugin off, all 19 session transcripts supplied with each question | 41.6 | 20 | 452,779 | CNY 0.12 |
|
|
140
|
+
## Advanced setup and development
|
|
125
141
|
|
|
126
|
-
|
|
142
|
+
### Install from source
|
|
127
143
|
|
|
128
|
-
|
|
144
|
+
Use Node.js **22.18 or later**. Run the following in Bash or Zsh from the repository root, then restart DSH. For Desktop, open the app once and quit it before installing. [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
129
145
|
|
|
130
146
|
```sh
|
|
131
|
-
npm
|
|
147
|
+
npm ci
|
|
148
|
+
npm pack
|
|
149
|
+
dsh plugin --profile desktop add --offline "$PWD/dsh-memory-bond-1.0.0.tgz"
|
|
132
150
|
```
|
|
133
151
|
|
|
134
|
-
###
|
|
152
|
+
### Optional language models
|
|
153
|
+
|
|
154
|
+
You can add models to the core package you already installed. Download and extract the matching source archive if you don’t have a checkout. It contains both models and their shared ONNX runtime. [Download the 1.0.0 source (.zip)](https://github.com/PersistentJZH/dsh-memory-bond/archive/f3bb0f3eea696b300066640631209046057e675e.zip)
|
|
135
155
|
|
|
136
|
-
|
|
156
|
+
From the extracted folder or checkout, run `npm ci` with Node.js 22.18 or later. Quit DSH and run the line for each language you want, using the same profile as the core package.
|
|
137
157
|
|
|
138
158
|
```sh
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
npm run verify:tasks -- --live # Real model, using configured DeepSeek credentials
|
|
159
|
+
dsh plugin --profile desktop add --offline "link:$PWD/native/embeddings/en"
|
|
160
|
+
dsh plugin --profile desktop add --offline "link:$PWD/native/embeddings/zh"
|
|
142
161
|
```
|
|
143
162
|
|
|
144
|
-
|
|
163
|
+
Keep the checkout and its dependencies in place. Restart DSH and run `/project-memory status`. The `embeddingLanguages` list shows the detected languages and is empty with the core alone. Bond indexes existing memories in the background.
|
|
164
|
+
|
|
165
|
+
<details>
|
|
166
|
+
<summary>Installation troubleshooting</summary>
|
|
167
|
+
|
|
168
|
+
- If macOS cannot find `dsh`, run `export PATH="/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin:$PATH"` in the same terminal, then retry.
|
|
169
|
+
- Bond creates databases with SQLite schema version 4. If startup reports `unsupported_schema`, keep your existing profile and its data, and install in a fresh DSH profile.
|
|
170
|
+
|
|
171
|
+
</details>
|
|
172
|
+
|
|
173
|
+
From the checkout, run `npm test` for the test suite and `npm run verify:models` for the keyword-only, single-model and dual-model packaging checks.
|
|
174
|
+
|
|
175
|
+
<details>
|
|
176
|
+
<summary>Related DSH memory plugins</summary>
|
|
177
|
+
|
|
178
|
+
dsh-loci provides evidence quotes and a compact index of verified entries. RestRegular/dsh-memory provides local hybrid search and distinguishes selection from delivery. dsh-auto-memory logs injections and tracks lookups. Bond focuses on debugging a reply in a particular checkout by connecting worktree-specific validation with the exact revisions a request received. [dsh-loci](https://github.com/Awenforever/dsh-loci) · [RestRegular/dsh-memory](https://github.com/RestRegular/dsh-memory#诊断与审计) · [dsh-auto-memory](https://github.com/AskTheWay/dsh-auto-memory)
|
|
145
179
|
|
|
146
|
-
|
|
180
|
+
</details>
|
|
147
181
|
|
|
148
|
-
|
|
182
|
+
[MIT license](./LICENSE) · [Model and runtime notices](./native/embeddings/NOTICE.md)
|