@zleap-ai/dsh-sag 0.1.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 +10 -0
- package/LICENSE +21 -0
- package/README.md +58 -0
- package/README.zh.md +58 -0
- package/THIRD_PARTY_NOTICES +671 -0
- package/cordis.patch.yml +5 -0
- package/docs/embedded.md +61 -0
- package/lib/brand.d.ts +13 -0
- package/lib/brand.js +15 -0
- package/lib/cli/runtime.d.ts +40 -0
- package/lib/cli/runtime.js +121 -0
- package/lib/cli.d.ts +21 -0
- package/lib/cli.js +265 -0
- package/lib/config.d.ts +60 -0
- package/lib/config.js +120 -0
- package/lib/connection/descriptor.d.ts +4 -0
- package/lib/connection/descriptor.js +66 -0
- package/lib/connection/discovery.d.ts +40 -0
- package/lib/connection/discovery.js +139 -0
- package/lib/connection/guidance.d.ts +7 -0
- package/lib/connection/guidance.js +7 -0
- package/lib/connection/manager.d.ts +67 -0
- package/lib/connection/manager.js +273 -0
- package/lib/connection/store.d.ts +42 -0
- package/lib/connection/store.js +164 -0
- package/lib/connection/types.d.ts +35 -0
- package/lib/connection/types.js +2 -0
- package/lib/dsh-sag-cli.js +32202 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +68 -0
- package/lib/local/api-client.d.ts +157 -0
- package/lib/local/api-client.js +338 -0
- package/lib/local/gateway.d.ts +43 -0
- package/lib/local/gateway.js +34 -0
- package/lib/local/mcp-probe.d.ts +27 -0
- package/lib/local/mcp-probe.js +92 -0
- package/lib/presentation.d.ts +8 -0
- package/lib/presentation.js +7 -0
- package/lib/runtime/client.d.ts +22 -0
- package/lib/runtime/client.js +117 -0
- package/lib/runtime/protocol.d.ts +113 -0
- package/lib/runtime/protocol.js +118 -0
- package/lib/runtime/supervisor.d.ts +30 -0
- package/lib/runtime/supervisor.js +107 -0
- package/lib/tools/documents.d.ts +8 -0
- package/lib/tools/documents.js +134 -0
- package/lib/tools/ingest.d.ts +5 -0
- package/lib/tools/ingest.js +35 -0
- package/lib/tools/local.d.ts +40 -0
- package/lib/tools/local.js +111 -0
- package/lib/tools/output.d.ts +96 -0
- package/lib/tools/output.js +67 -0
- package/lib/tools/read.d.ts +6 -0
- package/lib/tools/read.js +84 -0
- package/lib/tools/search.d.ts +6 -0
- package/lib/tools/search.js +107 -0
- package/lib/tools/sources.d.ts +5 -0
- package/lib/tools/sources.js +61 -0
- package/lib/tools/status.d.ts +5 -0
- package/lib/tools/status.js +28 -0
- package/lib/tools/upload.d.ts +6 -0
- package/lib/tools/upload.js +68 -0
- package/package.json +96 -0
- package/runtime/pyproject.toml +29 -0
- package/runtime/src/dsh_sag_runtime/__init__.py +3 -0
- package/runtime/src/dsh_sag_runtime/__main__.py +80 -0
- package/runtime/src/dsh_sag_runtime/engines.py +139 -0
- package/runtime/src/dsh_sag_runtime/errors.py +47 -0
- package/runtime/src/dsh_sag_runtime/evidence.py +53 -0
- package/runtime/src/dsh_sag_runtime/protocol.py +161 -0
- package/runtime/src/dsh_sag_runtime/read.py +61 -0
- package/runtime/src/dsh_sag_runtime/search.py +76 -0
- package/runtime/src/dsh_sag_runtime/server.py +136 -0
- package/runtime/uv.lock +2310 -0
- package/scripts/setup-runtime.mjs +47 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 - 2026-08-29
|
|
4
|
+
|
|
5
|
+
- Validate the published bundle against the npm `latest` DeepSeek Harness `0.1.1-rc.2` release.
|
|
6
|
+
- Publish dsh-sag as an installable DeepSeek Harness profile bundle.
|
|
7
|
+
- Discover and configure a running local SAG through `setup` and `doctor`.
|
|
8
|
+
- Expose search, reading, knowledge-source, upload, ingestion, and document-management tools.
|
|
9
|
+
- Store connection metadata and credentials through dsh host services.
|
|
10
|
+
- Keep the Python sidecar available as an explicit advanced embedded mode.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zleap
|
|
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
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @zleap-ai/dsh-sag
|
|
2
|
+
|
|
3
|
+
dsh-sag lets DeepSeek Harness use the local SAG personal knowledge base for search, reading, upload, note ingestion, and document management.
|
|
4
|
+
|
|
5
|
+
Compatible with DeepSeek Harness `0.1.1-rc.2`, the current npm `latest` (there is no final `0.1.1` release yet). SAG must include the Connect dsh setting and local connector API. The unmodified SAG `1.8.3` release does not include this capability; use the build from [SAG PR #154](https://github.com/Zleap-AI/SAG/pull/154), or a later SAG release that includes it.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
Install and start SAG first, then install the plugin:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
dsh plugin --profile web add @zleap-ai/dsh-sag
|
|
13
|
+
dsh plugin --profile web exec dsh-sag doctor
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
You can start using the plugin when `doctor` reports that SAG is connected. The command runs inside the `web` profile, so `dsh-sag` does not need to be on the system PATH. The plugin discovers common local addresses automatically; the normal setup does not require Python or manual credentials.
|
|
17
|
+
|
|
18
|
+
## Connect SAG
|
|
19
|
+
|
|
20
|
+
If `doctor` cannot find SAG, save a connection with any one of these routes:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
# Discover a running local SAG automatically
|
|
24
|
+
dsh plugin --profile web exec dsh-sag setup
|
|
25
|
+
|
|
26
|
+
# Use a connection file exported by SAG
|
|
27
|
+
dsh plugin --profile web exec dsh-sag setup ./sag-dsh.json
|
|
28
|
+
|
|
29
|
+
# Use the local SAG address directly
|
|
30
|
+
dsh plugin --profile web exec dsh-sag setup --url http://127.0.0.1:8000
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Check the saved connection:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
dsh plugin --profile web exec dsh-sag doctor
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Ask dsh naturally
|
|
40
|
+
|
|
41
|
+
- “Search my SAG knowledge base for the DW-2412P30 upload limit and cite the source text.”
|
|
42
|
+
- “Upload `/Users/me/Documents/product-manual.pdf` to SAG, then summarize it after processing finishes.”
|
|
43
|
+
- “Save the following meeting decisions as a note in SAG: …”
|
|
44
|
+
|
|
45
|
+
The plugin provides status checks, knowledge-source creation and listing, search and source-text reading, file upload, text ingestion, and document listing, reprocessing, and deletion. SAG advertises the operations available in the current installation; the plugin does not call capabilities that SAG has not enabled.
|
|
46
|
+
|
|
47
|
+
## Update or remove
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
dsh plugin --profile web update @zleap-ai/dsh-sag
|
|
51
|
+
dsh plugin --profile web remove @zleap-ai/dsh-sag
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Connection recovery
|
|
55
|
+
|
|
56
|
+
Make sure SAG is running, then run `dsh plugin --profile web exec dsh-sag setup` and `dsh plugin --profile web exec dsh-sag doctor`. If automatic discovery fails, export `sag-dsh.json` from SAG or connect with the local-address command above.
|
|
57
|
+
|
|
58
|
+
To let dsh manage the Python engine directly, see [advanced embedded mode](docs/embedded.md).
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @zleap-ai/dsh-sag
|
|
2
|
+
|
|
3
|
+
dsh-sag 让 DeepSeek Harness 直接使用运行在本机的 SAG 个人知识库,包括检索、阅读、上传、写入和文档管理。
|
|
4
|
+
|
|
5
|
+
适用于 DeepSeek Harness `0.1.1-rc.2`(当前 npm `latest`;目前没有正式的 `0.1.1` 稳定版)。SAG 需要包含“连接 dsh”设置和本地连接器 API;当前未修改的 SAG `1.8.3` 尚未包含该能力,请使用 [SAG PR #154](https://github.com/Zleap-AI/SAG/pull/154) 对应构建,或后续包含该能力的正式版本。
|
|
6
|
+
|
|
7
|
+
## 开始使用
|
|
8
|
+
|
|
9
|
+
请先安装并启动 SAG,再安装插件:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
dsh plugin --profile web add @zleap-ai/dsh-sag
|
|
13
|
+
dsh plugin --profile web exec dsh-sag doctor
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`doctor` 显示“SAG 已连接”即可开始使用。命令由 `web` profile 执行,不需要把 `dsh-sag` 加入系统 PATH。插件会自动发现常见本机地址;不需要准备 Python 环境或手工填写密钥。
|
|
17
|
+
|
|
18
|
+
## 连接 SAG
|
|
19
|
+
|
|
20
|
+
如果 `doctor` 没有找到 SAG,任选一种方式保存连接:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
# 自动发现已经启动的 SAG
|
|
24
|
+
dsh plugin --profile web exec dsh-sag setup
|
|
25
|
+
|
|
26
|
+
# 使用 SAG 导出的连接文件
|
|
27
|
+
dsh plugin --profile web exec dsh-sag setup ./sag-dsh.json
|
|
28
|
+
|
|
29
|
+
# 指定 SAG 的本机地址
|
|
30
|
+
dsh plugin --profile web exec dsh-sag setup --url http://127.0.0.1:8000
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
配置完成后再次检查:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
dsh plugin --profile web exec dsh-sag doctor
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 直接告诉 dsh
|
|
40
|
+
|
|
41
|
+
- “在我的 SAG 知识库里查找 DW-2412P30 的上传限制,并给出原文依据。”
|
|
42
|
+
- “把 `/Users/me/Documents/产品手册.pdf` 上传到 SAG,处理完成后总结主要内容。”
|
|
43
|
+
- “把下面这段会议结论作为一篇笔记写入 SAG:……”
|
|
44
|
+
|
|
45
|
+
插件提供状态检查、知识源创建与查询、知识检索与原文读取、文件上传、文本写入,以及文档查询、重处理和删除能力。SAG 会通过能力清单告诉插件当前可用的操作;未启用的能力不会被调用。
|
|
46
|
+
|
|
47
|
+
## 更新或卸载
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
dsh plugin --profile web update @zleap-ai/dsh-sag
|
|
51
|
+
dsh plugin --profile web remove @zleap-ai/dsh-sag
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 连接失败
|
|
55
|
+
|
|
56
|
+
确认 SAG 正在运行,然后执行 `dsh plugin --profile web exec dsh-sag setup` 和 `dsh plugin --profile web exec dsh-sag doctor`。如果自动发现失败,可以从 SAG 导出 `sag-dsh.json`,或使用上面的本机地址方式连接。
|
|
57
|
+
|
|
58
|
+
需要由 dsh 直接托管 Python 引擎时,请参阅[高级 embedded 模式](docs/embedded.md)。
|