@klarkxy/dsh-magpie 0.0.0-stage → 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/LICENSE +42 -0
- package/README.md +35 -2
- package/cordis.patch.yml +5 -0
- package/docs/README.zh-CN.md +36 -0
- package/icon.svg +17 -0
- package/lib/client.inner.cjs +967 -0
- package/lib/client.inner.cjs.map +1 -0
- package/lib/client.js +976 -0
- package/lib/contracts.d.ts +104 -0
- package/lib/contracts.js +38 -0
- package/lib/contracts.js.map +1 -0
- package/lib/index.d.ts +191 -0
- package/lib/index.js +806 -0
- package/lib/index.js.map +1 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +137 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
The Star And Thank Author License (SATA)
|
|
2
|
+
Version 2.1, September 2026
|
|
3
|
+
|
|
4
|
+
Copyright © 2026 Klarkxy(278370456@qq.com)
|
|
5
|
+
|
|
6
|
+
Project Url: https://github.com/klarkxy/dsh-editor
|
|
7
|
+
https://github.com/klarkxy/sata-license
|
|
8
|
+
https://github.com/klarkxy/dsh-plugins
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in
|
|
18
|
+
all copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
And wait, one more thing — an invitation, not a condition: it would be best if
|
|
21
|
+
you star/+1/like the project(s) in the project url section above, and thank the
|
|
22
|
+
author(s) in the Copyright section. You may, and arguably you should — but the
|
|
23
|
+
permissions above hold either way, star or no star.
|
|
24
|
+
|
|
25
|
+
Here are some suggested ways:
|
|
26
|
+
|
|
27
|
+
- Email the authors a thank-you letter, and make friends with him/her/them.
|
|
28
|
+
- Report bugs or issues.
|
|
29
|
+
- Tell friends what a wonderful project this is.
|
|
30
|
+
- And, sure, you can just express thanks in your mind without telling the world.
|
|
31
|
+
|
|
32
|
+
Contributors of this project by forking have the option to add his/her name and
|
|
33
|
+
forked project url at copyright and project url sections, but shall not delete
|
|
34
|
+
or modify anything else in these two sections.
|
|
35
|
+
|
|
36
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
37
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
38
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
39
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
40
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
41
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
42
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Magpie
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- release-state-note -->
|
|
4
|
+
|
|
5
|
+
[简体中文](docs/README.zh-CN.md)
|
|
6
|
+
|
|
7
|
+
Connects DSH to a [magpie](https://usemagpie.ai) gateway running on this computer, your local network, or elsewhere. From the plugin's settings page you point DSH at the gateway, and it fetches the gateway's model list and writes the same provider routes that `magpie dsh` writes — Magpie, Magpie · Responses, and Magpie · Anthropic — plus the default model and web search, so the models show up in the model picker.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
dsh plugin --profile <name> add @klarkxy/dsh-magpie
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Replace `<name>` with your profile name and restart the profile.
|
|
16
|
+
|
|
17
|
+
## Use
|
|
18
|
+
|
|
19
|
+
- Open **Plugins → Magpie**. Enter the gateway address (the local default is `http://127.0.0.1:3425`), paste the gateway key if the gateway requires one, and choose **Save**, then **Sync now**.
|
|
20
|
+
- **Test** checks the connection without changing anything.
|
|
21
|
+
- Choose a **default model** for new conversations, and turn on **web search** to run it through the gateway's model.
|
|
22
|
+
- **Sync at startup** refreshes the routes once per profile start.
|
|
23
|
+
- **Disconnect** removes the magpie routes and reverts the default model and web search; your saved key is kept.
|
|
24
|
+
|
|
25
|
+
## Limits
|
|
26
|
+
|
|
27
|
+
- One gateway at a time. The routes are the same ones `magpie dsh` writes, so either tool replaces the other's setup.
|
|
28
|
+
- A gateway on another machine needs **Share on local network** turned on in magpie and a gateway key (`magpie gateway-key add <name>`).
|
|
29
|
+
- The models shown follow magpie's model list for DSH.
|
|
30
|
+
- The default model applies to new conversations; existing sessions keep their model.
|
|
31
|
+
- Web search goes through the gateway's model.
|
|
32
|
+
- On hosts without a credential store (for example headless), the gateway key is read from the `MAGPIE_GATEWAY_KEY` environment variable.
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
[SATA License 2.1](LICENSE)
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Magpie
|
|
2
|
+
|
|
3
|
+
<!-- release-state-note -->
|
|
4
|
+
|
|
5
|
+
[English](../README.md)
|
|
6
|
+
|
|
7
|
+
把 DSH 连接到本机、局域网或其他位置的 [magpie](https://usemagpie.ai) 网关。在插件设置页填写网关地址后,插件会拉取网关的模型列表,写入与 `magpie dsh` 相同的供应商路由——Magpie、Magpie · Responses、Magpie · Anthropic——并同步默认模型和网络搜索,模型随即出现在模型选择器中。
|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
dsh plugin --profile <name> add @klarkxy/dsh-magpie
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
把 `<name>` 换成你的 profile 名,安装后重启 profile。
|
|
16
|
+
|
|
17
|
+
## 使用
|
|
18
|
+
|
|
19
|
+
- 打开「插件 → Magpie」。填写网关地址(本机默认 `http://127.0.0.1:3425`),网关要求时粘贴网关 Key,点「保存」,再点「立即同步」。
|
|
20
|
+
- 「测试」只检查连接,不改动任何配置。
|
|
21
|
+
- 可选一个**默认模型**用于新会话;打开**网络搜索**可用网关模型执行搜索。
|
|
22
|
+
- 「启动时同步」会在每次启动 profile 时刷新一次路由。
|
|
23
|
+
- 「断开连接」移除三条 magpie 路由并还原默认模型与网络搜索;已保存的 Key 保留。
|
|
24
|
+
|
|
25
|
+
## 限制
|
|
26
|
+
|
|
27
|
+
- 同时只接一个网关。路由与 `magpie dsh` 写出的相同,两者可互相替换配置。
|
|
28
|
+
- 其他机器上的网关需要在 magpie 中打开 Share on local network,并创建网关 Key(`magpie gateway-key add <name>`)。
|
|
29
|
+
- 可用模型以 magpie 提供给 DSH 的列表为准。
|
|
30
|
+
- 默认模型作用于新会话;已有会话保持当前模型。
|
|
31
|
+
- 网络搜索经由网关的模型执行。
|
|
32
|
+
- 没有凭据存储的宿主(如 headless)从 `MAGPIE_GATEWAY_KEY` 环境变量读取网关 Key。
|
|
33
|
+
|
|
34
|
+
## 许可证
|
|
35
|
+
|
|
36
|
+
[SATA License 2.1](../LICENSE)
|
package/icon.svg
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="mgp-body" x1="11" y1="5" x2="28" y2="25" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop stop-color="#4D75F5"/>
|
|
5
|
+
<stop offset="1" stop-color="#8EB6FF"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<g transform="translate(3.6 3.6) scale(.8)">
|
|
9
|
+
<path d="M14.5 20.5L4.5 31L8.5 31.6L17 23.5Z" fill="#39ABA9"/>
|
|
10
|
+
<path d="M11 19C11 13 15.5 9 21 9C25.5 9 28 11.5 28 14.5C28 20 23.5 25 17 25C13.5 25 11 22.5 11 19Z" fill="url(#mgp-body)"/>
|
|
11
|
+
<circle cx="24.5" cy="9" r="4.2" fill="#4D75F5"/>
|
|
12
|
+
<path d="M28.4 7.9L32 9.2L28.5 10.6Z" fill="#39ABA9"/>
|
|
13
|
+
<circle cx="25.6" cy="8.3" r=".9" fill="#E0EBFF"/>
|
|
14
|
+
<path d="M17 15.5C19.5 14 23 14.2 25 15.8C23.2 19.8 19.6 21.6 16.2 21.2C15.4 19 15.7 17 17 15.5Z" fill="#E0EBFF" fill-opacity=".9"/>
|
|
15
|
+
<path d="M19 25V28.5M22.5 24.2V28.5M14 28.5H31" stroke="#6392FF" stroke-width="1.8" stroke-linecap="round"/>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|