dsh-reference-anything 0.2.4 → 0.3.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/NOTICE.md CHANGED
@@ -17,38 +17,9 @@ the MIT License. The adapted source paths are:
17
17
  OpenCLI is not redistributed by this package. It is an external runtime
18
18
  dependency licensed under Apache-2.0.
19
19
 
20
- ## dsh-at-file
20
+ ## DeepSeek Harness reference services
21
21
 
22
- Portions of the workspace file/folder autocomplete, path ranking, and
23
- existence-only reference implementation are adapted from `dsh-at-file`:
24
-
25
- - Upstream repository: https://github.com/omdsh-dev/dsh-at-file
26
- - Upstream revision: `898369ece56ae6ec41afd8e014f187bb5b723409`
27
- - Upstream license: MIT
28
-
29
- Copyright (c) 2026 dsh-at-file contributors
30
-
31
- Permission is hereby granted, free of charge, to any person obtaining a copy
32
- of this software and associated documentation files (the "Software"), to deal
33
- in the Software without restriction, including without limitation the rights
34
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35
- copies of the Software, and to permit persons to whom the Software is
36
- furnished to do so, subject to the following conditions:
37
-
38
- The above copyright notice and this permission notice shall be included in all
39
- copies or substantial portions of the Software.
40
-
41
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
47
- SOFTWARE.
48
-
49
- ## DeepSeek Harness session reference
50
-
51
- Cross-session candidate listing, canonical `dsh-session:` references, and
52
- immutable snapshot preparation use the official DeepSeek Harness package
53
- `@deepseek-ai/dsh-session-reference`. That package remains an external/package
54
- dependency and is used under the DeepSeek Harness project's MIT license.
22
+ File candidate formatting and cross-session candidate types use the official
23
+ DeepSeek Harness packages `@deepseek-ai/dsh-file-reference` and
24
+ `@deepseek-ai/dsh-session-reference`. Those packages remain external package
25
+ dependencies and are used under the DeepSeek Harness project's MIT license.
package/README.md CHANGED
@@ -6,9 +6,9 @@
6
6
 
7
7
  <h1>dsh-reference-anything</h1>
8
8
 
9
- One `@` to reference them all.
9
+ One `@` for them all.
10
10
 
11
- **English** · [简体中文](./README_zh-CN.md) · [News](#news) · [Roadmap](#roadmap) · [Installation](#installation) · [Usage](#usage) · [Report Bug][github-issues-link]
11
+ **English** · [简体中文](./README_zh-CN.md) · [📰 News](#-news) · [🧭 Roadmap](#-roadmap) · [📦 Installation](#-installation) · [🚀 Usage](#-usage) · [🐛 Report Bug][github-issues-link]
12
12
 
13
13
  <!-- SHIELD GROUP -->
14
14
 
@@ -22,21 +22,58 @@ One `@` to reference them all.
22
22
 
23
23
  </div>
24
24
 
25
- Within the unified `@` menu of DeepSeek Harness (DSH), reference commands, Skills, workspace files/folders, DSH sessions, and historical conversations from ChatGPT, Claude, Gemini, DeepSeek, Grok, and Kimi.
25
+ <div align="center">
26
+
27
+ <img src="./images/demo.gif" alt="dsh-reference-anything demo" width="800" />
28
+
29
+ </div>
30
+
31
+ **Reference Anything is an enhancement for the DeepSeek Harness (DSH) `@` menu.** It brings multiple reference sources into one searchable menu, so you can mention the context you need without switching tools or copying content manually.
32
+
33
+ Use one `@` menu to reference:
34
+
35
+ - DSH commands and Skills
36
+ - Workspace files and folders
37
+ - DSH session history
38
+ - Historical conversations from ChatGPT, Claude, Gemini, DeepSeek, Grok, and Kimi
39
+
40
+ Beyond extending what `@` can reference, Reference Anything also enhances the `@` menu itself:
41
+
42
+ - Customize visible groups: enable or hide `Commands`, `Skills`, files, DSH sessions, and external conversations, then arrange them in any order
43
+ - Customize result counts: set each group's collapsed row count and hard candidate cap independently
44
+ - Choose how to browse: expand or collapse individual groups, or use DSH's native scrolling list
45
+ - Enhanced visual icons: distinguish reference sources with type icons and platform logos, making menu items easier to identify
46
+
47
+ <table>
48
+ <tr>
49
+ <th width="50%">Native DSH display</th>
50
+ <th width="50%">Reference Anything icon enhancements</th>
51
+ </tr>
52
+ <tr>
53
+ <td width="50%"><img src="./images/at-files-native-comparison.png" alt="Native DSH file list" width="100%" /></td>
54
+ <td width="50%"><img src="./images/at-files-enhanced-comparison.png" alt="Reference Anything file-type icon enhancements" width="100%" /></td>
55
+ </tr>
56
+ </table>
57
+
58
+ Type `@`, search across enabled sources, and insert the selected reference into the current task. Each source keeps its own access and loading behavior: files use DSH's permission-constrained tools, DSH sessions use the native session-reference protocol, and external conversation bodies are read on demand.
26
59
 
27
60
  This plugin uses OpenCLI to access historical conversations through AI chat sessions that are already logged in. By default, only conversation titles are stored locally, and the agent fetches remote content on demand. An optional offline-mirror mode stores the latest complete conversation bodies locally.
28
61
 
62
+ > [!IMPORTANT]
63
+ > This version targets DSH `0.1.0-rc.8` or newer. It uses the native `@` trigger menu, official file/session Remotes, and the native Composer reference renderer.
64
+
29
65
  > [!NOTE]
30
66
  > DSH is currently in Beta, so its underlying capabilities and interfaces may change as it evolves. This plugin will adapt alongside those changes. Because of some current DSH limitations, parts of the implementation may not yet be ideal; we will continue to follow DSH updates and improve the plugin over time. See the relevant sections below for specific limitations and usage notes.
31
67
 
32
- ## News
68
+ ## 📰 News
33
69
 
34
- - **2026-08-19 · v0.2.3** — Added automatic version checks and in-settings updates, Pill/Raw text input rendering modes, and reusable background browser sessions for more reliable OpenCLI synchronization and input interactions.
70
+ - **2026-08-20 · v0.3.0** — Completed the native DSH `@` integration: five independently configurable sources, official file/session Remotes, native Composer references with source logos, in-place expand/collapse and sync actions, and a one-click switch between Reference Anything and the official DSH `@` list. The legacy `dsh-file:` protocol and custom Composer interaction layer were removed.
71
+ - **2026-08-19 · v0.2.4** — Added automatic version checks and in-settings updates, Pill/Raw text input rendering modes, and reusable background browser sessions for more reliable OpenCLI synchronization and input interactions.
35
72
  - **2026-08-18 · v0.2.0** — A redesigned Reference Anything settings page with local session statistics, paginated management, Provider/Profile selection, and sync status checks.
36
73
  - **2026-08-18** — Introduced on-demand read protocol: references default to safe pointers, and the agent reads the body and attachments only after authorization.
37
74
  - **2026-08-17** — Unified ChatGPT, Claude, Gemini, DeepSeek, Grok, and Kimi under the DSH `@` menu.
38
75
 
39
- ## Roadmap
76
+ ## 🧭 Roadmap
40
77
 
41
78
  - [ ] Support referencing historical conversations from other local agents
42
79
  - [ ] Support more keyword matching rules, including blacklists and whitelists, especially for file search
@@ -45,7 +82,7 @@ This plugin uses OpenCLI to access historical conversations through AI chat sess
45
82
  - [ ] Support referencing applications or browser windows currently open on the computer
46
83
  - [ ] More ideas are welcome in Issues
47
84
 
48
- ## Installation
85
+ ## 📦 Installation
49
86
 
50
87
  Prerequisites:
51
88
 
@@ -77,55 +114,62 @@ opencli daemon restart
77
114
 
78
115
  Replace `C:/path/to/dsh-reference-anything` with the repository location. Browser extensions cannot be silently installed from a webpage; confirm the installation in the Chrome Web Store, or download an extension package from [OpenCLI Releases](https://github.com/jackwener/opencli/releases) and use “Load unpacked.” If the browser blocks the store popup, the settings page keeps a normal fallback link. When multiple browser profiles are connected, select and apply one directly in the failed check. Global npm installation remains subject to OS permissions; failures retain their original diagnostic in the settings page.
79
116
 
80
- ## Usage
117
+ ## 🚀 Usage
118
+
119
+ Reference Anything registers five sources in the native DSH `@` menu rather than introducing a separate search interface. Settings let you choose which groups appear, their order, their collapsed row count, their hard candidate cap, and whether groups use plugin-owned collapse actions or the native scrolling list. A separate one-click control switches the visible picker back to DSH's official file/session list without stopping the plugin, synchronization service, local data, or model-facing tools; the same control restores the Reference Anything picker at any time.
81
120
 
82
121
  1. Open `Settings → Reference Anything` in DSH Web.
83
122
  2. Under **Availability check**, confirm that OpenCLI, Browser Bridge, the browser extension, and the conversation adapter are ready.
84
123
  3. Under **External conversation sync settings**, choose a connected browser Profile, history storage mode, and sync mode. Then click **Sync enabled sources now**, or sync an individual Provider from its card.
85
- 4. Type `@` in the input box and choose from the `Files and folders`, `DSH sessions`, or `External conversations` groups.
124
+ 4. Type `@` in the input box and choose from the `Commands`, `Skills`, `Files and folders`, `DSH sessions`, or `External conversations` groups.
86
125
  5. Type a keyword to filter candidates, for example `@cache-design`.
87
126
 
88
- The default **Read bodies on demand** mode stores only the title index locally and uses the browser when an agent reads a reference. Choose **Store full bodies locally** for offline reading and full-text search; this mode keeps only the latest version of each conversation. The settings page also lets you enable or disable each `@` group, reorder groups, set their maximum result counts (six per group by default), and switch between Pill and Raw text input rendering. The plugin checks npm for updates when it loads; restart DSH after installing an update from the settings page.
127
+ The default **Read bodies on demand** mode stores only the title index locally and uses the browser when an agent calls `reference_read`. Choose **Store full bodies locally** for offline reading and full-text search; this mode keeps only the latest version of each conversation. The Composer uses native DSH reference occurrences for files, DSH sessions, and external conversations; Reference Anything adds source-specific logos without replacing native wrapping, caret, selection, deletion, draft, clipboard, or serialization behavior. The plugin checks npm for updates when it loads; restart DSH after installing an update from the settings page.
89
128
 
90
129
  > [!WARNING]
91
- > To protect your account and conversation data, external conversations are imported and synchronized through OpenCLI using your existing logged-in browser session. A browser window may temporarily open during use or synchronization, and it may display OpenCLI debugging information. This is expected—please do not be alarmed or close the window manually; wait for the operation to finish.
130
+ > To protect your account and conversation data, external conversations are imported and synchronized through OpenCLI using your existing logged-in browser session. A browser window may temporarily open during use or synchronization. In most cases, leave it open in the background: the plugin will reuse it without interrupting your work. The window may also display OpenCLI debugging information. This is expected—please do not be alarmed or close it manually; wait for the operation to finish. Due to current OpenCLI limitations, we temporarily use slower serial synchronization to reduce how often browser windows open. Once the upstream OpenCLI repository is updated, we will switch to faster parallel synchronization.
131
+
132
+ ### 🧩 One `@` menu, multiple sources
133
+
134
+ The `@` menu contains five groups: `Commands`, `Skills`, `Files and folders`, `DSH sessions`, and `External conversations`. Each group shows six rows before its expand action by default and accepts a separate hard candidate cap from 1 to 50. In collapse mode, each expand action reveals five more rows and updates the mounted menu without jumping back to the top; collapse restores the configured compact count. The external-conversation group keeps its sync action first and updates that row and the visible results in place while synchronization runs and completes. Under `Settings → Reference Anything → General`, you can enable or disable groups, reorder them, and choose **Collapse / expand** or **Native DSH scrolling**.
92
135
 
93
- ### Search
136
+ #### ⌨️ @Commands — DSH native commands
94
137
 
95
- The `@` menu contains five groups: `Commands`, `Skills`, `Files and folders`, `DSH sessions`, and `External conversations`. The first two appear only when `@` is at the beginning of the draft. Each group shows up to six results by default. Under `Settings → Reference Anything → General`, you can enable or disable groups, reorder them, and set each limit from 1 to 50.
138
+ To browse commands, use `@commands`; selecting one hands `/command` back to DSH's native slash pipeline.
96
139
 
97
- #### @Commands — DSH native commands
140
+ <p align="center"><img src="./images/at-commands.png" alt="Browse DSH commands from the @ menu" width="800" /></p>
98
141
 
99
- Available only at the start of the draft. To browse all commands, use `@commands` or the native DSH `/` panel.
142
+ #### 🛠️ @Skills — DSH skill library
100
143
 
101
- #### @Skills — DSH skill library
144
+ To browse skills, use `@skills:`; selecting one inserts `/skill` for DSH's native skill handling.
102
145
 
103
- Available only at the start of the draft. To browse all skills, use `@skills:` or the native DSH `/` panel.
146
+ <p align="center"><img src="./images/at-skills.png" alt="Browse DSH skills from the @ menu" width="800" /></p>
104
147
 
105
- #### @Files and folders — workspace files and directories
148
+ #### 📁 @Files and folders — workspace files and directories
106
149
 
107
- Type `@files:` in the input box to browse all files and folders in the workspace. Search supports fuzzy matching on titles, so both `@cachedes` and `@cache-design` can match “Cache design notes.”
150
+ Type `@files:` in the input box to browse files and folders through DSH's official file-reference Remote.
151
+
152
+ <p align="center"><img src="./images/at-files.png" alt="Browse workspace files and folders from the @ menu" width="800" /></p>
108
153
 
109
154
  Features:
110
- - Quick reference to workspace files with automatic workspace-boundary validation
111
- - File references only write a validated path and type marker into the model context; file content is not preloaded
112
- - If the model needs file content, it must use the existing permission-constrained file tools
155
+ - Uses the official `@path` / `@"path with spaces"` grammar and canonical file candidate service
156
+ - Files become native atomic references; selecting a directory keeps the path editable and continues completion
157
+ - The plugin no longer creates or parses a custom `dsh-file:` scheme
113
158
 
114
- #### @DSH sessions — DSH session history
159
+ #### 💬 @DSH sessions — DSH session history
115
160
 
116
- Type `@sessions:` to browse locally synced DSH sessions. Sessions are ranked by match quality, with recency as fallback ordering.
161
+ Type `@sessions:` to browse DSH sessions through the official session-reference Remote.
117
162
 
118
- Search capabilities:
119
- - **Title match:** fuzzy search on session titles
120
- - **Content search:** when title matches are insufficient, the synced session body is searched; matching excerpts are shown in the candidate row for UI display only and are not injected into model context
121
- - Auto-generated generic titles such as “New chat” can also be found via body keywords
163
+ <p align="center"><img src="./images/at-sessions.png" alt="Browse DSH sessions from the @ menu" width="800" /></p>
122
164
 
123
- Full browsing is available on the settings page’s paginated list. Session references follow the official `dsh-session:` protocol and immutable snapshot semantics.
165
+ Selected sessions use DSH's canonical `dsh-session:` mention and native session appearance. Snapshot preparation and resolution remain owned by DSH rather than this plugin.
124
166
 
125
- #### @External conversations — external conversation platforms
167
+ #### 🌐 @External conversations — external conversation platforms
126
168
 
127
169
  Supports historical conversations from ChatGPT, Claude, Gemini, DeepSeek, Grok, and Kimi.
128
170
 
171
+ <p align="center"><img src="./images/at-external-conversations.png" alt="Browse external conversations from the @ menu" width="800" /></p>
172
+
129
173
  **Platform filtering:**
130
174
  - Use `@chatgpt:cache` or `@claude:refactor` to filter a specific platform
131
175
  - Short aliases are also accepted, such as `@gpt:` and `@ds:`
@@ -137,24 +181,21 @@ Supports historical conversations from ChatGPT, Claude, Gemini, DeepSeek, Grok,
137
181
  - **Provider and account isolation:** history is maintained separately by Provider and account scope
138
182
  - `@` search uses the account scope cached by the latest sync and never probes the browser; after a sync observes an account switch, it exposes only that account while older rows remain available in conversation management for cleanup
139
183
 
140
- **Reference display:** after selection, the draft shows a removable reference chip:
184
+ **Reference display:** after selection, the draft shows a native removable DSH reference with the Provider logo. Its stable serialized form is:
141
185
  ```text
142
- @[ChatGPT · Conversation title](dsh-ref:<opaque-base64url>)
186
+ @[ChatGPT·Conversation title](dsh-ref:<opaque-base64url>)
143
187
  ```
144
188
 
145
189
  Opening the source URL happens only in the UI; the URL is never injected into model context. The initial reference contains only a safe pointer; if the model needs the body, it calls `reference_read` on demand.
146
190
 
147
- > [!NOTE]
148
- > Due to DSH's current underlying length limit for References, external-conversation references temporarily use a compatibility layer implemented by this plugin instead of relying entirely on DSH's native reference presentation. As a result, some interactions may behave differently or encounter issues in certain scenarios. We have raised this limitation in DSH Discussions; when a future DSH release provides the necessary support, we will update the plugin promptly and migrate to a more native implementation.
149
-
150
191
  ---
151
192
 
152
193
  **General notes:**
153
194
  - Use `:` or `/` as the separator instead of a space: the `@` candidate token ends at a space, so `@chatgpt keyword` closes the menu as soon as you press the space. For multi-word searches, write `@cachedesign` or `@cache-design`.
154
195
  - Without a type prefix, all groups are searched at once.
155
- - For full browsing across groups: sessions are listed on the settings page, while commands and skills use the native `/` panel.
196
+ - Commands and Skills are handed back to DSH's native slash-command handling after selection; the native `/` panel remains available.
156
197
 
157
- ## How External Conversation References Work
198
+ ## 🔄 How External Conversation References Work
158
199
 
159
200
  ```text
160
201
  DSH Web @Conversations
@@ -168,7 +209,7 @@ ChatGPT / Claude / Gemini / DeepSeek / Grok / Kimi
168
209
 
169
210
  This does not include the legacy standalone DeepSeek CDP / `--remote-debugging-port` collector. All six platforms use the OpenCLI Provider adapter path, avoiding duplicate browser-reading implementations.
170
211
 
171
- ### Model-facing Protocol
212
+ ### 🤖 Model-facing Protocol
172
213
 
173
214
  A reference produces an untrusted-data envelope alongside the current user request. The initial envelope contains only pointers and never the conversation body:
174
215
 
@@ -204,7 +245,7 @@ A reference produces an untrusted-data envelope alongside the current user reque
204
245
  - Sync stores attachment metadata and same-origin locators, not temporary signed URLs. Attachments are classified as `image` or `file`; empty URLs and site-root paths are not marked as available.
205
246
  - Unreadable attachments add a model-facing notice such as `[User attached 1 image; image contents were not included]` without altering the original conversation text.
206
247
 
207
- ### Sync and Storage
248
+ ### 💾 Sync and Storage
208
249
 
209
250
  The `reference_anything` storage domain contains:
210
251
 
@@ -218,12 +259,12 @@ Remote records are marked `remoteMissing` only after a full remote pagination pa
218
259
 
219
260
  In `metadata-only` mode, the current browser account is checked inside the same detail operation that reads a referenced body; reads are rejected when it does not match the account scope cached by sync. Conversation management includes bulk actions for records marked `remoteMissing` and for local chats owned by non-current accounts of providers whose current account is known.
220
261
 
221
- ## Acknowledgements
262
+ ## 🙏 Acknowledgements
222
263
 
223
- - Workspace file/folder autocomplete, path ordering, and existence-only reference handling include portions adapted from [omdsh-dev/dsh-at-file](https://github.com/omdsh-dev/dsh-at-file).
224
- - Cross-session DSH candidates, canonical `dsh-session:` references, and immutable snapshot support use the official `@deepseek-ai/dsh-session-reference` package.
264
+ - File candidates and mention formatting use the official `@deepseek-ai/dsh-file-reference` package and DSH Remote.
265
+ - Cross-session candidates and canonical `dsh-session:` mentions use the official `@deepseek-ai/dsh-session-reference` package and DSH Remote.
225
266
 
226
- ## Sources and License
267
+ ## 📄 Sources and License
227
268
 
228
269
  This project is licensed under the [MIT License](./LICENSE). Third-party copyright notices, license texts, porting sources, and pinned upstream commits are documented in [NOTICE.md](./NOTICE.md). OpenCLI is an external Apache-2.0 dependency and is not bundled with this plugin.
229
270
 
package/cordis.patch.yml CHANGED
@@ -1,31 +1,29 @@
1
1
  # dsh-reference-anything — the layer this bundle contributes.
2
2
  #
3
3
  # A patch REPLACES a row's whole `config` rather than merging keys, so when you
4
- # override one of these in your profile's cordis.patch.yml, restate every key
5
- # the row needs.
6
- - insert:
7
- # The harness's own cross-session resolver. It ships with dsh but no shipped
8
- # composition mounts it, so `dsh-session:` mentions resolve to nothing until
9
- # something does. Mounting it here is what makes the mention expander below
10
- # able to serve both schemes.
11
- - id: session-reference
12
- name: '@deepseek-ai/dsh-session-reference'
13
-
14
- # The registry every source registers into.
4
+ # override one of these in your profile's cordis.patch.yml, restate every key
5
+ # the row needs.
6
+ - id: ui-reference
7
+ # Reference Anything re-registers Files and DSH sessions as two independent
8
+ # sources over the same official Remotes. Disabling only this Client source
9
+ # keeps the official file/session services and canonical mention semantics.
10
+ disabled: true
11
+
12
+ - insert:
13
+ # The registry every source registers into.
15
14
  - id: references
16
15
  name: 'dsh-reference-anything'
17
16
  config:
18
17
  listLimit: 20
19
18
 
20
- # Expands `@[label](dsh-ref:…)` and `dsh-session:` mentions in a user's
21
- # prompt into untrusted background, on every surface. It grants the agent
22
- # the exact reference URI but does not fetch a transcript; the agent calls
23
- # reference_read only when the current task needs one.
24
- - id: reference-mention
25
- name: 'dsh-reference-anything/reference'
26
- config:
27
- maxReferences: 3
28
- serveSessionScheme: true
19
+ # Expands plugin-owned `@[label](dsh-ref:…)` mentions into untrusted
20
+ # metadata on every surface. Native file and `dsh-session:` references stay
21
+ # with DSH's official services. External transcripts are not prefetched;
22
+ # the agent calls reference_read only when the current task needs one.
23
+ - id: reference-mention
24
+ name: 'dsh-reference-anything/reference'
25
+ config:
26
+ maxReferences: 3
29
27
 
30
28
  # Lets the model go looking on its own, and page backwards through a
31
29
  # conversation it has only seen the end of.