@whiteplusms/dsh-redis 0.0.0-stage → 0.1.3
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/LICENSE +21 -0
- package/README.md +184 -2
- package/README.zh.md +185 -0
- package/cordis.patch.yml +4 -0
- package/icon.svg +1 -0
- package/lib/client/index.d.ts +4 -0
- package/lib/client.js +7684 -0
- package/lib/connection-errors.d.ts +66 -0
- package/lib/connection-errors.js +21 -0
- package/lib/domain.d.ts +451 -0
- package/lib/domain.js +20 -0
- package/lib/host/ai-answer.d.ts +7 -0
- package/lib/host/ai-answer.js +132 -0
- package/lib/host/ai-budget.d.ts +43 -0
- package/lib/host/ai-budget.js +78 -0
- package/lib/host/ai-connection-tools.d.ts +8 -0
- package/lib/host/ai-connection-tools.js +49 -0
- package/lib/host/ai-hash-filter.d.ts +13 -0
- package/lib/host/ai-hash-filter.js +97 -0
- package/lib/host/ai-hash-pages.d.ts +15 -0
- package/lib/host/ai-hash-pages.js +42 -0
- package/lib/host/ai-key-pages.d.ts +14 -0
- package/lib/host/ai-key-pages.js +27 -0
- package/lib/host/ai-locate-tool.d.ts +6 -0
- package/lib/host/ai-locate-tool.js +234 -0
- package/lib/host/ai-match-tools.d.ts +7 -0
- package/lib/host/ai-match-tools.js +112 -0
- package/lib/host/ai-page-coordinator.d.ts +21 -0
- package/lib/host/ai-page-coordinator.js +81 -0
- package/lib/host/ai-page-store.d.ts +40 -0
- package/lib/host/ai-page-store.js +104 -0
- package/lib/host/ai-profile-tools.d.ts +7 -0
- package/lib/host/ai-profile-tools.js +44 -0
- package/lib/host/ai-query-scope.d.ts +42 -0
- package/lib/host/ai-query-scope.js +104 -0
- package/lib/host/ai-reader.d.ts +219 -0
- package/lib/host/ai-reader.js +1221 -0
- package/lib/host/ai-report-samples.d.ts +26 -0
- package/lib/host/ai-report-samples.js +77 -0
- package/lib/host/ai-report-tools.d.ts +11 -0
- package/lib/host/ai-report-tools.js +70 -0
- package/lib/host/ai-set-pages.d.ts +15 -0
- package/lib/host/ai-set-pages.js +40 -0
- package/lib/host/ai-stream-pages.d.ts +15 -0
- package/lib/host/ai-stream-pages.js +42 -0
- package/lib/host/ai-tools.d.ts +4 -0
- package/lib/host/ai-tools.js +106 -0
- package/lib/host/ai-ui-tools.d.ts +10 -0
- package/lib/host/ai-ui-tools.js +72 -0
- package/lib/host/ai-value.d.ts +12 -0
- package/lib/host/ai-value.js +15 -0
- package/lib/host/ai-write-tools.d.ts +5 -0
- package/lib/host/ai-write-tools.js +101 -0
- package/lib/host/ai-writer.d.ts +25 -0
- package/lib/host/ai-writer.js +77 -0
- package/lib/host/ai-zset-pages.d.ts +15 -0
- package/lib/host/ai-zset-pages.js +40 -0
- package/lib/host/byte-identity.d.ts +3 -0
- package/lib/host/byte-identity.js +12 -0
- package/lib/host/client-list.d.ts +13 -0
- package/lib/host/client-list.js +35 -0
- package/lib/host/connection-service.d.ts +71 -0
- package/lib/host/connection-service.js +468 -0
- package/lib/host/database-reader.d.ts +10 -0
- package/lib/host/database-reader.js +62 -0
- package/lib/host/hash-reader.d.ts +12 -0
- package/lib/host/hash-reader.js +91 -0
- package/lib/host/key-reader.d.ts +20 -0
- package/lib/host/key-reader.js +65 -0
- package/lib/host/list-reader.d.ts +8 -0
- package/lib/host/list-reader.js +61 -0
- package/lib/host/match-preset-store.d.ts +36 -0
- package/lib/host/match-preset-store.js +201 -0
- package/lib/host/profile-snapshots.d.ts +32 -0
- package/lib/host/profile-snapshots.js +187 -0
- package/lib/host/profile-store.d.ts +15 -0
- package/lib/host/profile-store.js +120 -0
- package/lib/host/read-context.d.ts +23 -0
- package/lib/host/read-context.js +41 -0
- package/lib/host/redis-transport.d.ts +34 -0
- package/lib/host/redis-transport.js +262 -0
- package/lib/host/redis-write-transaction.d.ts +28 -0
- package/lib/host/redis-write-transaction.js +180 -0
- package/lib/host/resp.d.ts +38 -0
- package/lib/host/resp.js +174 -0
- package/lib/host/scan-cursors.d.ts +25 -0
- package/lib/host/scan-cursors.js +59 -0
- package/lib/host/selected-reader.d.ts +22 -0
- package/lib/host/selected-reader.js +84 -0
- package/lib/host/set-reader.d.ts +12 -0
- package/lib/host/set-reader.js +85 -0
- package/lib/host/stream-groups.d.ts +17 -0
- package/lib/host/stream-groups.js +42 -0
- package/lib/host/stream-reader.d.ts +12 -0
- package/lib/host/stream-reader.js +105 -0
- package/lib/host/string-reader.d.ts +9 -0
- package/lib/host/string-reader.js +81 -0
- package/lib/host/ui-action-channel.d.ts +4 -0
- package/lib/host/ui-action-channel.js +182 -0
- package/lib/host/ui-action-coordinator.d.ts +28 -0
- package/lib/host/ui-action-coordinator.js +188 -0
- package/lib/host/value-prefix.d.ts +5 -0
- package/lib/host/value-prefix.js +11 -0
- package/lib/host/write-bytes.d.ts +3 -0
- package/lib/host/write-bytes.js +9 -0
- package/lib/host/write-history.d.ts +18 -0
- package/lib/host/write-history.js +79 -0
- package/lib/host/write-proposals.d.ts +46 -0
- package/lib/host/write-proposals.js +132 -0
- package/lib/host/zset-reader.d.ts +12 -0
- package/lib/host/zset-reader.js +103 -0
- package/lib/host/zset-values.d.ts +6 -0
- package/lib/host/zset-values.js +26 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +5 -0
- package/lib/redis-answer.d.ts +32 -0
- package/lib/redis-answer.js +215 -0
- package/lib/redis-databases.d.ts +3 -0
- package/lib/redis-databases.js +21 -0
- package/lib/redis-read-tools.d.ts +2 -0
- package/lib/redis-read-tools.js +7 -0
- package/lib/redis-result.d.ts +4 -0
- package/lib/redis-result.js +18 -0
- package/lib/redis-score.d.ts +2 -0
- package/lib/redis-score.js +6 -0
- package/lib/remote-service.d.ts +69 -0
- package/lib/remote-service.js +187 -0
- package/lib/runtime.d.ts +3 -0
- package/lib/runtime.js +29 -0
- package/lib/stream-id.d.ts +7 -0
- package/lib/stream-id.js +19 -0
- package/lib/typert.host.d.ts +13 -0
- package/lib/typert.host.js +7 -0
- package/lib/typert.remote-client.d.ts +98 -0
- package/lib/typert.remote-client.js +3 -0
- package/lib/typert.shared.d.ts +62 -0
- package/lib/typert.shared.js +735 -0
- package/lib/ui-action-selection.d.ts +3 -0
- package/lib/ui-action-selection.js +12 -0
- package/licenses/THIRD_PARTY_NOTICES.txt +9 -0
- package/licenses/deepseek-harness-MIT.txt +21 -0
- package/licenses/dsh-database-MIT.txt +21 -0
- package/licenses/dsh-git-graph-MIT.txt +21 -0
- package/licenses/lucide-react-LICENSE.txt +43 -0
- package/licenses/phosphor-icons-MIT.txt +21 -0
- package/package.json +132 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-git-graph contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,185 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/WhitePlusMS/dsh-redis/6f2bb22152465ad66192c63a906f296cb5f9901c/assets/readme/readme-header.svg" width="100%" alt="DSH Redis — Redis browsing and AI access in DeepSeek Harness">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
# DSH Redis
|
|
6
|
+
|
|
7
|
+
English | [简体中文](README.zh.md)
|
|
8
|
+
|
|
9
|
+
**DSH Redis is a Redis workspace for DeepSeek Harness (DSH).** Connect to Redis, explore databases and Keys, inspect values, and work with your data in the same conversation.
|
|
10
|
+
|
|
11
|
+
**Connections · Key explorer · Data preview · Conversation tools · Diagnostics**
|
|
12
|
+
|
|
13
|
+
## Install and update
|
|
14
|
+
|
|
15
|
+
In DSH Web `0.2.2-rc.1` or `0.2.2-rc.5`, open **Plugins → Add plugin**, paste this URL, choose **Install**, then **Enable now**. Open **Redis** in the right sidebar of a conversation.
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
https://github.com/WhitePlusMS/dsh-redis/releases/latest/download/dsh-redis.tgz
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or run one command on the DSH Host with Node.js 24.9+, the DSH CLI and pnpm.
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
dsh plugin --profile web add https://github.com/WhitePlusMS/dsh-redis/releases/latest/download/dsh-redis.tgz
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
<details>
|
|
28
|
+
<summary>Updates, pinned versions and rollback</summary>
|
|
29
|
+
|
|
30
|
+
The stable URL follows the latest release. To update an installed copy, install again and restart the same DSH profile. When upgrading from 0.1.2 or earlier, run `dsh plugin --profile web remove dsh-redis` first. Your saved connection profiles carry over.
|
|
31
|
+
|
|
32
|
+
To pin **0.1.3**, use the command below. To roll back, choose the versioned package from [Releases](https://github.com/WhitePlusMS/dsh-redis/releases) and check its `SHA256SUMS.txt`. Remove `@whiteplusms/dsh-redis` first when returning to 0.1.2.
|
|
33
|
+
|
|
34
|
+
```powershell
|
|
35
|
+
dsh plugin --profile web add https://github.com/WhitePlusMS/dsh-redis/releases/download/v0.1.3/dsh-redis-0.1.3.tgz
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
</details>
|
|
39
|
+
|
|
40
|
+
[Install](#install-and-update) · [First use](#first-use) · [Work in conversation](#work-in-conversation) · [Features](#features) · [Requirements](#requirements) · [Limits](#data-and-limits) · [FAQ](#faq)
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
[Connection settings](https://raw.githubusercontent.com/WhitePlusMS/dsh-redis/6f2bb22152465ad66192c63a906f296cb5f9901c/assets/readme/redis-connection.png) · [Hash fields](https://raw.githubusercontent.com/WhitePlusMS/dsh-redis/6f2bb22152465ad66192c63a906f296cb5f9901c/assets/readme/redis-hash.png) · [List elements](https://raw.githubusercontent.com/WhitePlusMS/dsh-redis/6f2bb22152465ad66192c63a906f296cb5f9901c/assets/readme/redis-list.png) · [Stream messages](https://raw.githubusercontent.com/WhitePlusMS/dsh-redis/6f2bb22152465ad66192c63a906f296cb5f9901c/assets/readme/redis-stream.png)
|
|
45
|
+
|
|
46
|
+
- **Connect and organize:** connect to standalone Redis with ACL and TLS, and save named connection profiles.
|
|
47
|
+
- **Explore your data:** navigate DBs and Keys in a tree or list, then inspect String, Hash, List, Set, ZSet and Stream values.
|
|
48
|
+
- **Work in conversation:** ask about a Key or selection, find matching Keys, inspect diagnostics and make supported updates.
|
|
49
|
+
- **Make the workspace yours:** use the sidebar or expanded view, choose a light or dark theme, and switch between English and Chinese.
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
## First use
|
|
54
|
+
|
|
55
|
+
1. Open a DSH conversation, then select **Redis** in its right sidebar.
|
|
56
|
+
2. Choose **Select or create connection**. Enter address, port and optional ACL credentials; expand TLS when needed. A name and optional group let you save non-password settings.
|
|
57
|
+
3. Choose **Connect**. A new connection starts at DB 0 and loads Keys automatically in batches. Saving settings alone does not connect.
|
|
58
|
+
4. Select the DB, folder and Key. Select a collection row to inspect it directly; change preview format, find or copy from its toolbar.
|
|
59
|
+
5. Auto-refresh starts off, with a 5-second interval selected. Enable it with the refresh control. Key/DB/session changes, hiding the view, cancellation or a read failure stop it; showing the view again does not turn it back on automatically.
|
|
60
|
+
6. In the current version, ask “What is the status field of `order:1001`?” directly, or ask “Explain the selected field” after selecting one. Ask explicitly to switch DB; the sidebar follows the Host's new DB.
|
|
61
|
+
7. To write, open **Plugin info → Enable AI writes** in the sidebar and specify the existing Key or Hash field and complete new value in the same conversation. Execution follows DSH tool permissions: an allow policy can execute directly, while an ask policy uses the DSH approval flow. Use the returned operation ID in Plugin info to check its result.
|
|
62
|
+
|
|
63
|
+
Editing or saving a profile while connected does not change the active server. In the current version you can explicitly ask AI to connect a uniquely identified saved profile; passwords are entered through the local connection form.
|
|
64
|
+
|
|
65
|
+
## Work in conversation
|
|
66
|
+
|
|
67
|
+
Connect to Redis in a DSH conversation, then ask about a specific Key or the current selection:
|
|
68
|
+
|
|
69
|
+
- “What is the `status` field of `order:1001`?”
|
|
70
|
+
- “Find Keys matching `order:*`.”
|
|
71
|
+
- “Are there recent slow queries?”
|
|
72
|
+
- “Replace the existing `status` field of `order:1001` with `shipped`.”
|
|
73
|
+
|
|
74
|
+
For the update example, enable **Plugin info → Enable AI writes** and provide the complete new value. DSH applies its tool permission policy, and the operation ID can be used to look up the result. Supported targets and other operating conditions are described in [Data and limits](#data-and-limits).
|
|
75
|
+
|
|
76
|
+
## Features
|
|
77
|
+
|
|
78
|
+
<details>
|
|
79
|
+
<summary>Full feature list and six-type views</summary>
|
|
80
|
+
|
|
81
|
+
| Area | Available behavior |
|
|
82
|
+
| --- | --- |
|
|
83
|
+
| Connections | Standalone Redis address/port, optional ACL username/password, TLS with optional private CA; manual connect/disconnect |
|
|
84
|
+
| Saved profiles | Select, create, name, group, update and delete local connection settings; passwords are not saved |
|
|
85
|
+
| DB and Keys | DB directory and counts, manual DB selection, automatic batched `SCAN`, MATCH filtering, loaded count and bounded progress |
|
|
86
|
+
| Navigation | Namespace tree or flat list, configurable separator, locate and keyboard navigation; cyan DB, purple folder and orange Key icons |
|
|
87
|
+
| Data | String, Hash, List, Set, ZSet and Stream; select a row to inspect it on the same screen, scroll to append collection results |
|
|
88
|
+
| Previews | Text, JSON, Hex and Base64, find, JSON folding and copying currently read content |
|
|
89
|
+
| Refresh | Manual refresh and optional 1/5/10/30-second refresh; selected content and view state are preserved when still present |
|
|
90
|
+
| DSH integration | Native sidebar, expanded workbench, light/dark theme, English/Chinese, Lucide action icons |
|
|
91
|
+
| Conversation | Native DSH tools for explicit Key reads, bounded search and filtering; it also has diagnostic, connection and optional UI actions |
|
|
92
|
+
| Updates | Replace a supported existing String value or Hash field through conversation; inspect the operation result |
|
|
93
|
+
|
|
94
|
+
| Type | View |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| String | Bounded byte-window preview |
|
|
97
|
+
| Hash | Field/value table with separate field and value previews |
|
|
98
|
+
| List | Index/value table and selected element preview |
|
|
99
|
+
| Set | Member table and selected member preview |
|
|
100
|
+
| ZSet | Member/score table, range or scan, selected member preview |
|
|
101
|
+
| Stream | Message table, ordered field/value pairs and selected pair previews; duplicate field names remain distinct |
|
|
102
|
+
|
|
103
|
+

|
|
104
|
+
|
|
105
|
+
</details>
|
|
106
|
+
|
|
107
|
+
## Requirements
|
|
108
|
+
|
|
109
|
+
- **Host:** DSH Web `0.2.2-rc.1` or `0.2.2-rc.5`.
|
|
110
|
+
- **Runtime/build:** Node.js `>=24.9.0`; verified locally with Node.js `24.22.1` and pnpm `11.22.0`.
|
|
111
|
+
- **Redis:** a standalone server reachable from the DSH Host. Existing evidence covers isolated Redis `8.2.6` for six types and live Redis `8.10.0` for Hash, rather than an exhaustive version matrix.
|
|
112
|
+
- **Chat:** an available model configured in DSH and permission to use the plugin's tools. Sidebar browsing does not require a separate model API key.
|
|
113
|
+
|
|
114
|
+
Desktop, macOS and Linux operation have not been verified. The declared Node.js range is broader than the versions actually tested.
|
|
115
|
+
|
|
116
|
+
## Conversation tools
|
|
117
|
+
|
|
118
|
+
| Tool | Purpose |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| `redis_viewer_status` | Report this conversation's connection, DB and current selected identity |
|
|
121
|
+
| `redis_viewer_keys` | Search Keys with bounded, independently paged results |
|
|
122
|
+
| `redis_viewer_value` | Read a named Key or, with no Key argument, the current sidebar selection |
|
|
123
|
+
| `redis_viewer_select_db` | Switch this conversation's DB when explicitly requested and synchronize the sidebar |
|
|
124
|
+
| `redis_viewer_prepare_write` / `redis_viewer_execute_write` | Prepare and execute an enabled, controlled String or Hash-field replacement |
|
|
125
|
+
| `redis_viewer_write_status` | Look up a retained operation result in the same conversation |
|
|
126
|
+
|
|
127
|
+
The plugin also registers bounded Hash filtering, memory/slow-log/server/client/consumer-group diagnostics, RedisJSON paths, TimeSeries samples, Bitmap ranges and GEO coordinates/distances, plus saved-profile and UI tools. On explicit request it can save a diagnostic sample with restricted fields locally. These additions are not part of the historical v0.1.0 Release claim.
|
|
128
|
+
|
|
129
|
+
An initial Key-name search, Hash filter, or AI request to apply a saved MATCH preset requires DSH's native scope confirmation. The prompt shows the server, DB and actual query conditions. If the host also requires approval, DSH presents both in one prompt. Continuation pages retain the same scope. Direct reads of a known Key do not require this scan confirmation. Denial or cancellation stops the query. `SCAN MATCH` can still traverse the current DB's entire keyspace and does not produce a consistent snapshot.
|
|
130
|
+
|
|
131
|
+
Expand a tool call to inspect its **Redis read record**: returned values, query conditions, timestamps, completeness and raw results come from that call. Model explanations can still contain unsupported claims or mix in historical results; the record does not validate the model's prose. If the cumulative read allowance is exhausted, open **Plugin information → Continue reading** after pending calls finish. A new message, DB switch or reconnection does not reset that allowance.
|
|
132
|
+
|
|
133
|
+
These are custom tools registered through DSH's native Tool API, **not an MCP server**. The Client uses Typert RPC to synchronize selection identifiers; values are read from Redis when a tool is called. UI and AI paging state are separate, while both use the same session-owned network connection.
|
|
134
|
+
|
|
135
|
+
Example requests, rather than recorded model answers: “Read the `status` field of `order:1001`”, “Find Keys matching `order:*`”, or “Are there recent slow queries?”. A conversation cannot borrow another conversation's connection.
|
|
136
|
+
|
|
137
|
+
## Data and limits
|
|
138
|
+
|
|
139
|
+
Saved profiles live at `<DSH_HOME>/profiles/<profile>/data/dsh-redis/connections.json`. They contain names/groups, address, port, username and TLS/CA settings, **not passwords**. Profiles are shared within that DSH profile; connections and selections belong to individual conversations. A restarted connection does not automatically restore the previous DB or Key.
|
|
140
|
+
|
|
141
|
+
AI tool output becomes part of DSH conversation history and may be sent to the model provider configured for that conversation. Selecting a Key does not automatically send the whole DB to the model. Uninstalling retains saved profiles and does not erase conversation history.
|
|
142
|
+
|
|
143
|
+
The Key list caches at most 5,000 Keys or 2 MiB of encoded results. Each automatic scan starts at most 1,000 batches and does not start another batch after 60 seconds; you can continue it manually. If the cache limit causes part of a batch to be dropped, narrow the filter and scan again. A filtered or interrupted scan is not a full DB snapshot, and `SCAN` is not a consistent snapshot during concurrent changes. AI replies have a 64 KiB result budget; the default String window and some collection value prefixes are 4,096 bytes. Completion and value truncation are reported separately.
|
|
144
|
+
|
|
145
|
+
The AI write MVP requires Redis 7.4 or later and no TTL on the target Key or Hash field. Key, field, old value and new value are each limited to 4,096 bytes. It replaces one complete value on an existing target; it cannot create or delete targets, perform bulk writes or change TTLs. Proposals expire after at most five minutes, or earlier when the turn ends, connection changes or writes are disabled; the target and old value are checked again before execution. Checks do not establish business intent or prevent later changes by other clients. Operation records are temporarily kept in Host memory. If the result is unknown, do not retry automatically; inspect the current target first.
|
|
146
|
+
|
|
147
|
+
DSH session history can retain the full proposal in the prepare tool's result and the execute tool's arguments, including the Key, optional field, old value and new value in Base64. Base64 preserves the bytes and can be decoded. The proposal's expiry and the Host's short-lived operation lookup do not erase those session events.
|
|
148
|
+
|
|
149
|
+
Not included: a free-form command console, direct RDB/AOF loading, snapshots, dedicated special-type views, charts, URI import, profile import/export, Cluster, Sentinel, built-in SSH tunnels or client-certificate authentication. Diagnostics are bounded samples, not a full server snapshot. JSON in a normal String can still be formatted.
|
|
150
|
+
|
|
151
|
+
## Verification
|
|
152
|
+
|
|
153
|
+
DSH Web `0.2.2-rc.1` has been exercised with an isolated Redis instance and a separate DSH profile.
|
|
154
|
+
|
|
155
|
+
A missing style node and oversized icons were observed once during native testing; reloading restored styling. The root cause remains unresolved.
|
|
156
|
+
|
|
157
|
+
## Uninstall
|
|
158
|
+
|
|
159
|
+
In DSH, uninstall **dsh-redis** from **Plugins**, or stop the target profile as required and run:
|
|
160
|
+
|
|
161
|
+
```powershell
|
|
162
|
+
dsh plugin --profile web remove @whiteplusms/dsh-redis
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Reload/restart that same profile when required. Uninstalling retains saved connection profiles and DSH conversation history; settings cleanup is a separate operation.
|
|
166
|
+
|
|
167
|
+
## FAQ
|
|
168
|
+
|
|
169
|
+
**Why does the Release URL return 404?**
|
|
170
|
+
|
|
171
|
+
Check that the tag and `.tgz` asset exist, and that the DSH Host can reach GitHub. If direct installation fails, download the archive, verify its checksum and install it from a Host path.
|
|
172
|
+
|
|
173
|
+
**Can I install GitHub's Source code archive instead?**
|
|
174
|
+
|
|
175
|
+
The current Git tree omits `lib/`, while the package entry points require it. Use the built Release `.tgz`. A source tag alone does not make a loadable Redis package.
|
|
176
|
+
|
|
177
|
+
**Why does `cannot resolve profile bundle "dsh-redis"` appear?**
|
|
178
|
+
|
|
179
|
+
Check whether the profile still points to a moved/deleted development directory or archive. In that same profile, remove the old source and add the verified built package, then reload/restart as required. A plain dependency `install` retains the old source.
|
|
180
|
+
|
|
181
|
+
## Documentation and license
|
|
182
|
+
|
|
183
|
+
- [Repository issues](https://github.com/WhitePlusMS/dsh-redis/issues)
|
|
184
|
+
|
|
185
|
+
MIT licensed; see [LICENSE](LICENSE). Attributions are retained in [third-party notices](licenses/THIRD_PARTY_NOTICES.txt) and the [license directory](licenses/). This is a community plugin, not an official Redis or DeepSeek product.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/WhitePlusMS/dsh-redis/6f2bb22152465ad66192c63a906f296cb5f9901c/assets/readme/readme-header.svg" width="100%" alt="DSH Redis — 在 DeepSeek Harness 中查看 Redis 和使用 AI 读写">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# DSH Redis
|
|
6
|
+
|
|
7
|
+
[English](README.md) | 简体中文
|
|
8
|
+
|
|
9
|
+
**DSH Redis 是 DeepSeek Harness(DSH)中的 Redis 工作区。** 连接 Redis、浏览数据库和 Key、查看数据,也可以在同一个对话中处理日常查询与操作。
|
|
10
|
+
|
|
11
|
+
**连接管理 · Key 浏览 · 数据预览 · 对话工具 · 诊断信息**
|
|
12
|
+
|
|
13
|
+
## 安装与更新
|
|
14
|
+
|
|
15
|
+
适用于 DSH Web `0.2.2-rc.1` 和 `0.2.2-rc.5`。打开 **插件 → 添加插件**,粘贴下面的地址,点击**安装**并选择**立即启用**。回到对话,在右侧栏打开 **Redis**。
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
https://github.com/WhitePlusMS/dsh-redis/releases/latest/download/dsh-redis.tgz
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
也可以在 DSH Host 终端执行这一条命令(需要 Node.js 24.9+、DSH CLI 和 pnpm)。
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
dsh plugin --profile web add https://github.com/WhitePlusMS/dsh-redis/releases/latest/download/dsh-redis.tgz
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
<details>
|
|
28
|
+
<summary>升级、指定版本与回退</summary>
|
|
29
|
+
|
|
30
|
+
固定地址始终指向最新正式版。升级时重新安装并重启同一个 DSH profile。已安装的插件不会自动升级。从 0.1.2 或更早版本升级时,先运行 `dsh plugin --profile web remove dsh-redis` 再安装新版。已保存的连接资料会保留。
|
|
31
|
+
|
|
32
|
+
要固定到 **0.1.3**,执行下面的命令。回退时从[发布列表](https://github.com/WhitePlusMS/dsh-redis/releases)选取目标版本的成品包,校验值见同页的 `SHA256SUMS.txt`。回到 0.1.2 时先移除 `@whiteplusms/dsh-redis`。
|
|
33
|
+
|
|
34
|
+
```powershell
|
|
35
|
+
dsh plugin --profile web add https://github.com/WhitePlusMS/dsh-redis/releases/download/v0.1.3/dsh-redis-0.1.3.tgz
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
</details>
|
|
39
|
+
|
|
40
|
+
[安装](#安装与更新) · [开始使用](#开始使用) · [对话中使用](#对话中使用) · [功能](#功能) · [环境要求](#环境要求) · [使用边界](#数据与边界) · [常见问题](#常见问题)
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
[连接配置](https://raw.githubusercontent.com/WhitePlusMS/dsh-redis/6f2bb22152465ad66192c63a906f296cb5f9901c/assets/readme/redis-connection.png) · [Hash 字段](https://raw.githubusercontent.com/WhitePlusMS/dsh-redis/6f2bb22152465ad66192c63a906f296cb5f9901c/assets/readme/redis-hash.png) · [List 元素](https://raw.githubusercontent.com/WhitePlusMS/dsh-redis/6f2bb22152465ad66192c63a906f296cb5f9901c/assets/readme/redis-list.png) · [Stream 消息](https://raw.githubusercontent.com/WhitePlusMS/dsh-redis/6f2bb22152465ad66192c63a906f296cb5f9901c/assets/readme/redis-stream.png)
|
|
45
|
+
|
|
46
|
+
- **连接与整理**:连接单机 Redis,支持 ACL、TLS 和命名连接资料。
|
|
47
|
+
- **浏览数据**:通过目录树或列表查看 DB 和 Key,浏览 String、Hash、List、Set、ZSet 和 Stream。
|
|
48
|
+
- **对话中操作**:围绕指定 Key 或当前选中项提问、查找数据、查看诊断信息和执行支持的更新。
|
|
49
|
+
- **适应工作习惯**:在侧栏或展开工作区中操作,切换明暗主题和中英文界面。
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
## 开始使用
|
|
54
|
+
|
|
55
|
+
1. 打开一个 DSH 对话,在右侧栏选择 **Redis**。
|
|
56
|
+
2. 打开**选择或新建连接**,填写地址、端口和可选 ACL 认证,按需展开 TLS。填写名称和可选分组后可保存不含密码的连接资料。
|
|
57
|
+
3. 点击**连接**。新连接从 DB 0 开始,自动分批加载 Key;单独保存资料不会连接。
|
|
58
|
+
4. 选择目标 DB、目录和 Key,点击集合中的行即可同屏查看详情;通过工具栏切换格式、查找或复制。
|
|
59
|
+
5. 自动刷新默认关闭,间隔预选 5 秒,通过刷新控件开启。切换 Key/DB/会话、隐藏视图、取消或读取失败会停止;重新显示不会自行开启。
|
|
60
|
+
6. 在当前版本中可直接询问“`order:1001` 的 `status` 是什么?”,也可在选中字段后询问“解释当前选中的字段”。需要切 DB 时明确提出,侧栏会跟随 Host 的新 DB。
|
|
61
|
+
7. 如需修改,在侧栏顶部打开**插件信息 → 开启 AI 写入**,在当前对话中明确指定已有 Key 或 Hash 字段及完整新值。写入按照当前 DSH 工具权限执行:策略允许时可以直接执行,策略要求询问时由 DSH 处理。可用工具返回的操作 ID 在插件信息中查询结果。
|
|
62
|
+
|
|
63
|
+
连接期间编辑或保存资料不会改变实际服务器。开发版支持明确要求 AI 连接唯一确定的已保存资料;需要密码时在本地连接表单填写。
|
|
64
|
+
|
|
65
|
+
## 对话中使用
|
|
66
|
+
|
|
67
|
+
在 DSH 对话中连接 Redis 后,可以围绕指定 Key 或当前选中项提问:
|
|
68
|
+
|
|
69
|
+
- “`order:1001` 的 `status` 字段是什么?”
|
|
70
|
+
- “查找 `order:*` 的 Key。”
|
|
71
|
+
- “最近有没有慢查询?”
|
|
72
|
+
- “把已有的 `order:1001` 的 `status` 字段完整替换为 `shipped`。”
|
|
73
|
+
|
|
74
|
+
使用更新示例时,在侧栏打开**插件信息 → 开启 AI 写入**并提供完整新值。DSH 会按工具权限策略执行,可以使用操作 ID 查询结果。支持的目标和使用条件见[数据与边界](#数据与边界)。
|
|
75
|
+
|
|
76
|
+
## 功能
|
|
77
|
+
|
|
78
|
+
<details>
|
|
79
|
+
<summary>展开完整功能与六类型查看方式</summary>
|
|
80
|
+
|
|
81
|
+
| 模块 | 已实现能力 |
|
|
82
|
+
| --- | --- |
|
|
83
|
+
| 连接 | 单机 Redis 地址、端口、可选 ACL 用户名/密码、TLS 与可选私有 CA;手动连接、断开 |
|
|
84
|
+
| 连接资料 | 本地选择、新建、命名、分组、更新和删除;不保存密码 |
|
|
85
|
+
| DB 与 Key | DB 目录与数量、手动切库、自动分批 `SCAN`、MATCH 筛选、加载数量与有上限的进度 |
|
|
86
|
+
| 导航 | 目录树或平铺列表、可配置分隔符、定位与键盘操作;青色 DB、紫色目录、橘色 Key |
|
|
87
|
+
| 数据查看 | String、Hash、List、Set、ZSet、Stream;选行同屏查看详情,集合滚动追加下一批 |
|
|
88
|
+
| 内容预览 | Text、JSON、Hex、Base64、查找、JSON 折叠、复制当前已读内容 |
|
|
89
|
+
| 刷新 | 手动刷新,可选 1/5/10/30 秒自动刷新;原内容仍存在时保留选中和查看状态 |
|
|
90
|
+
| DSH 界面 | 原生侧栏、展开工作区、明暗主题、中英文、Lucide 操作图标 |
|
|
91
|
+
| 对话 | DSH 原生工具支持直接读取、有限范围查找与筛选;开发版还包含诊断、连接及按需界面动作 |
|
|
92
|
+
| 数据更新 | 在对话中替换支持的已有 String 值或 Hash 字段,并查询操作结果 |
|
|
93
|
+
|
|
94
|
+
| 类型 | 查看方式 |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| String | 有界字节窗口预览 |
|
|
97
|
+
| Hash | 字段/值表格,独立字段与值预览 |
|
|
98
|
+
| List | 下标/值表格与选中元素预览 |
|
|
99
|
+
| Set | 成员表格与选中成员预览 |
|
|
100
|
+
| ZSet | 成员/分数表格,范围或扫描,选中成员预览 |
|
|
101
|
+
| Stream | 消息表格、有序字段对、字段与值预览;同名字段保留独立身份 |
|
|
102
|
+
|
|
103
|
+

|
|
104
|
+
|
|
105
|
+
</details>
|
|
106
|
+
|
|
107
|
+
## 环境要求
|
|
108
|
+
|
|
109
|
+
- **宿主:** DSH Web `0.2.2-rc.1` 或 `0.2.2-rc.5`。
|
|
110
|
+
- **运行与构建:** Node.js `>=24.9.0`;实际使用 Node.js `24.22.1`、pnpm `11.22.0` 验证。
|
|
111
|
+
- **Redis:** Host 能访问的单机服务器。已有 Redis `8.2.6` 六类型隔离验收及 Redis `8.10.0` 真实 Hash 验收,不声明完整的 Redis 版本兼容矩阵。
|
|
112
|
+
- **对话:** DSH 已配置可用模型,并允许使用插件工具。侧栏查看不需要另配模型 API Key。
|
|
113
|
+
|
|
114
|
+
Desktop、macOS、Linux 尚未验收。Node.js 声明范围也不等于范围内每个版本都已实际验证。
|
|
115
|
+
|
|
116
|
+
## 对话工具
|
|
117
|
+
|
|
118
|
+
| 工具 | 用途 |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| `redis_viewer_status` | 查询本对话的连接、DB 与当前选择标识 |
|
|
121
|
+
| `redis_viewer_keys` | 有界检索 Key,使用独立分页状态 |
|
|
122
|
+
| `redis_viewer_value` | 读取指定 Key;不传 Key 时读取侧栏当前选择 |
|
|
123
|
+
| `redis_viewer_select_db` | 用户明确要求时切换本对话的 DB,并同步侧栏 |
|
|
124
|
+
| `redis_viewer_prepare_write` / `redis_viewer_execute_write` | 准备并执行已启用的受控 String 或 Hash 字段替换 |
|
|
125
|
+
| `redis_viewer_write_status` | 查询当前对话中仍保留的操作结果 |
|
|
126
|
+
|
|
127
|
+
开发版还注册了有界 Hash 筛选、内存/慢日志/服务器/客户端/消费组诊断、RedisJSON 路径、TimeSeries 样本、Bitmap 位范围及 GEO 坐标/距离读取,以及连接资料和界面工具。用户明确要求时可在本地保存经过字段限制的诊断采样。这些新增能力不代表旧版 v0.1.0 Release 已包含。
|
|
128
|
+
|
|
129
|
+
名称搜索和 Hash 筛选的首批,以及 AI 应用已保存的 MATCH 预设,都需要 DSH 原生范围确认,显示服务器、DB 与实际查询条件。宿主同时要求询问时,一次提示显示两项确认内容。同条件续页沿用该查询,已知 Key 的直接读取不需要这项扫描确认。拒绝或取消会停止查询。`SCAN MATCH` 仍可能遍历当前 DB 整个键空间,结果不是一致性快照。
|
|
130
|
+
|
|
131
|
+
展开工具调用可查看“Redis 读取记录”,其中值、查询条件、时间、完整性及原始结果直接来自本次调用。模型解释仍可能无依据推断或混用历史结果,记录不代表已校验模型文字。累计读取额度耗尽时,待在途调用结束后打开“插件信息 → 继续读取”;新消息、切库或重连不会重置该额度。
|
|
132
|
+
|
|
133
|
+
这是通过 DSH 原生 Tool API 注册的自定义工具,**不是 MCP 服务**。Client 通过 Typert RPC 同步选择标识,工具实际调用时才从 Redis 读取值。界面和 AI 的分页状态分开,复用同一会话所属的网络连接。
|
|
134
|
+
|
|
135
|
+
可以这样询问:“读取 `order:1001` 的 `status` 字段”“查找 `order:*` 的 Key”“最近有没有慢查询”。这些是使用示例,不是记录下来的模型回答。对话不能借用另一个对话的连接。
|
|
136
|
+
|
|
137
|
+
## 数据与边界
|
|
138
|
+
|
|
139
|
+
资料保存在 `<DSH_HOME>/profiles/<profile>/data/dsh-redis/connections.json`,包含名称、分组、地址、端口、用户名、TLS/CA,**不含密码**。资料在同一个 DSH profile 内共用,网络连接与选择按对话隔离;重新连接不会自动恢复以前的 DB 或 Key。
|
|
140
|
+
|
|
141
|
+
AI 工具输出会进入 DSH 对话记录,并可能发送到该对话配置的模型服务。选择 Key 不会自动把整个 DB 发送给模型。卸载插件会保留资料,也不会清除对话历史。
|
|
142
|
+
|
|
143
|
+
Key 列表最多缓存 5,000 个 Key 或 2 MiB 编码结果。每轮自动扫描最多启动 1,000 批,或在 60 秒到期后不再启动下一批;暂停后可手动继续。达到缓存上限并丢弃批尾时需缩小筛选范围并重新扫描。筛选或中断的结果不代表完整 DB,Redis `SCAN` 在数据并发变化时也不提供一致性快照。AI 返回预算为 64 KiB;String 默认窗口及部分集合值前缀为 4,096 字节。扫描完成与值是否截断分别表达,扫描完成不代表每个值都已完整读取。
|
|
144
|
+
|
|
145
|
+
AI 写入 MVP 要求 Redis 7.4 或以上,目标 Key 和 Hash 字段均不得有 TTL;Key、字段及前后值各不超过 4,096 字节。仅支持已有目标的单次完整值替换,不支持创建、删除、批量或修改 TTL。提案最多有效 5 分钟,轮次结束、连接变化或关闭写入后提前失效;执行前仍会重新检查目标和原值。写入前后检查不能保证业务语义正确,也不能保证之后不被其他客户端修改。操作记录只在宿主内存短暂保留;结果未知时不要自动重试,需先检查目标当前值。
|
|
146
|
+
|
|
147
|
+
当前不包含:自由命令控制台、直接打开 RDB/AOF、快照、特殊类型专用视图、曲线、URI 导入、资料导入导出、Cluster、Sentinel、内置 SSH 隧道或客户端证书认证。开发版诊断是有范围的采样,不是完整服务器快照。普通 String 内的 JSON 仍可格式化。
|
|
148
|
+
|
|
149
|
+
DSH 会话历史可以保留完整提案,包括准备工具结果和执行工具入参中的 Key、可选字段、原值和新值。Base64 保留原始字节,可以解码还原。提案过期和 Host 短期操作记录清除均不会清除这些会话事件。
|
|
150
|
+
|
|
151
|
+
## 验证记录
|
|
152
|
+
|
|
153
|
+
项目已在独立 DSH profile 和隔离 Redis 环境中验证。
|
|
154
|
+
|
|
155
|
+
原生联调曾出现一次样式节点缺失、图标放大,刷新后恢复,根因仍未定位。
|
|
156
|
+
|
|
157
|
+
## 卸载
|
|
158
|
+
|
|
159
|
+
在 DSH 的**插件**页面卸载 **dsh-redis**;或按要求停止目标 profile 后执行:
|
|
160
|
+
|
|
161
|
+
```powershell
|
|
162
|
+
dsh plugin --profile web remove @whiteplusms/dsh-redis
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
需要时重载或重启同一个 profile。卸载会保留连接资料和 DSH 对话历史;清理已保存资料是另一个操作。
|
|
166
|
+
|
|
167
|
+
## 常见问题
|
|
168
|
+
|
|
169
|
+
**为什么 Release 地址返回 404?**
|
|
170
|
+
|
|
171
|
+
先核对 tag、`.tgz` 附件是否存在,以及 DSH Host 能否访问 GitHub。若直接安装失败,可下载安装包、校验后从 Host 本地路径安装。
|
|
172
|
+
|
|
173
|
+
**可以安装 GitHub 的 Source code 源码归档吗?**
|
|
174
|
+
|
|
175
|
+
当前 Git 树不包含 `lib/`,包入口却需要这些构建产物。使用 Release 成品 `.tgz`;仅创建源码 tag 不会得到可加载的 Redis 安装包。
|
|
176
|
+
|
|
177
|
+
**为什么提示 `cannot resolve profile bundle "dsh-redis"`?**
|
|
178
|
+
|
|
179
|
+
检查 profile 是否仍指向已经移动、删除的开发目录或归档。在同一个 profile 移除旧来源,再添加核对过的成品包,按要求重载或重启。单独执行依赖 `install` 会沿用原来源。
|
|
180
|
+
|
|
181
|
+
## 文档与许可
|
|
182
|
+
|
|
183
|
+
- [问题反馈](https://github.com/WhitePlusMS/dsh-redis/issues)
|
|
184
|
+
|
|
185
|
+
使用 MIT 许可,见 [LICENSE](LICENSE)。第三方来源见 [第三方声明](licenses/THIRD_PARTY_NOTICES.txt) 和[许可目录](licenses/)。这是社区插件,不是 Redis 或 DeepSeek 官方产品。
|
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="14" fill="#bf3535"/><g fill="none" stroke="#fff" stroke-width="3.5"><ellipse cx="32" cy="18" rx="19" ry="7"/><path d="M13 18v14c0 9 38 9 38 0V18M13 32v14c0 9 38 9 38 0V32"/></g></svg>
|