dsh-matlab-mcp 0.7.1 → 0.7.2
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 +8 -2
- package/LICENSE +55 -55
- package/README.en.md +13 -0
- package/README.md +17 -4
- package/docs/release.md +80 -0
- package/lib/client.js +1 -1
- package/lib/index.js +13 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,10 +7,15 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.2] - 2026-10-15
|
|
11
|
+
|
|
10
12
|
### 发布
|
|
11
13
|
|
|
12
|
-
-
|
|
14
|
+
- **已发布到 npm:`dsh-matlab-mcp@0.7.1`**(2026-10-14,35 文件 / 压缩 421.9 kB;含自包含 `lib/`、`cordis.patch.yml`、README、LICENSE;`dependencies` 为空 → 安装即用、无需构建)。
|
|
15
|
+
- **踩坑记录(staged publishing)**:npm 现在要求发布时提供 2FA;不带 `--otp` 时它不会直接发布,而是先建一个占位版本 `0.0.0-stage`(336 B,描述为 *Temporary package placeholder for staged publishing*)并把真实版本置于「等待分阶段发布」状态 —— 此时 `dsh-matlab-mcp-0.7.1.tgz` 仍是 404。补带 `--otp` 重发,或 `npm stage list` + `npm stage approve <id>` 后即为 `latest`。完整维护者流程见 [`docs/release.md`](docs/release.md)。
|
|
16
|
+
- 本机 npm 默认 registry 是只读镜像 `registry.npmmirror.com`,**发布必须显式 `--registry=https://registry.npmjs.org`**;发布后可用 `PUT https://registry.npmmirror.com/-/package/dsh-matlab-mcp/syncs` 让国内镜像立刻同步。
|
|
13
17
|
- 新增 `.github/workflows/publish.yml`:推 tag 即发布,优先走 **npm trusted publishing(OIDC,无 token、带 provenance)**;`workflow_dispatch` 可只打包不发布。首次发布因包尚不存在,需手动 `--otp` 完成,之后在 npmjs.com 配置 Trusted Publisher 即可交给 CI。
|
|
18
|
+
|
|
14
19
|
## [0.7.1] - 2026-10-14
|
|
15
20
|
|
|
16
21
|
### 修复
|
|
@@ -176,7 +181,8 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
176
181
|
- 本仓库不携带任何 MathWorks 制品;二进制、`.mltbx` 与技能文本均在安装时从 MathWorks 官方 GitHub 下载且不修改。
|
|
177
182
|
- **profile 联接**:DSH 通过 profile 的 `node_modules` 解析插件包。pnpm 对 `link:D:/...`(与 profile 不同盘符)会生成无效联接,导致重启后所有本地插件都不加载。请使用 `link:C:/Users/<user>/.dsh/<name>-plugin` 形态(该路径做 `mklink /J` 指向仓库),或在 `pnpm install` 后用 `mklink /J` 修复 `node_modules/<name>`。
|
|
178
183
|
|
|
179
|
-
[Unreleased]: https://github.com/MCviseron/dsh-matlab-mcp/compare/v0.7.
|
|
184
|
+
[Unreleased]: https://github.com/MCviseron/dsh-matlab-mcp/compare/v0.7.2...HEAD
|
|
185
|
+
[0.7.2]: https://github.com/MCviseron/dsh-matlab-mcp/compare/v0.7.1...v0.7.2
|
|
180
186
|
[0.7.1]: https://github.com/MCviseron/dsh-matlab-mcp/compare/v0.7.0...v0.7.1
|
|
181
187
|
[0.7.0]: https://github.com/MCviseron/dsh-matlab-mcp/compare/v0.6.1...v0.7.0
|
|
182
188
|
[0.6.1]: https://github.com/MCviseron/dsh-matlab-mcp/compare/v0.6.0...v0.6.1
|
package/LICENSE
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
|
|
5
|
-
http://www.apache.org/licenses/
|
|
6
|
-
|
|
7
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
-
|
|
9
|
-
1. Definitions.
|
|
10
|
-
|
|
11
|
-
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
16
|
-
|
|
17
|
-
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
18
|
-
|
|
19
|
-
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
20
|
-
|
|
21
|
-
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
22
|
-
|
|
23
|
-
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
24
|
-
|
|
25
|
-
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
26
|
-
|
|
27
|
-
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
28
|
-
|
|
29
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
30
|
-
|
|
31
|
-
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
32
|
-
|
|
33
|
-
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
34
|
-
|
|
35
|
-
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
36
|
-
|
|
37
|
-
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
38
|
-
|
|
39
|
-
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
40
|
-
|
|
41
|
-
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
42
|
-
|
|
43
|
-
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
-
|
|
45
|
-
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
-
|
|
47
|
-
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
-
|
|
49
|
-
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
-
|
|
51
|
-
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
-
|
|
53
|
-
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
-
|
|
55
|
-
END OF TERMS AND CONDITIONS
|
|
1
|
+
Apache License
|
|
2
|
+
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
16
|
+
|
|
17
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
18
|
+
|
|
19
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
20
|
+
|
|
21
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
22
|
+
|
|
23
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
24
|
+
|
|
25
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
26
|
+
|
|
27
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
28
|
+
|
|
29
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
30
|
+
|
|
31
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
32
|
+
|
|
33
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
34
|
+
|
|
35
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
36
|
+
|
|
37
|
+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
38
|
+
|
|
39
|
+
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
40
|
+
|
|
41
|
+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
42
|
+
|
|
43
|
+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|
package/README.en.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[中文](README.md) | **English**
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-matlab-mcp) [](LICENSE) [](package.json)
|
|
6
|
+
|
|
5
7
|
A DeepSeek Harness (DSH) plugin that lets the agent **actually drive MATLAB and Simulink**: run MATLAB code, execute `.m` scripts and unit tests, statically check code quality, and read/edit/query/check/simulate Simulink models — all through the **official MathWorks MATLAB MCP Server**, with the **MATLAB / Simulink Agentic Toolkit** skills injected into the session.
|
|
6
8
|
|
|
7
9
|
> This is not "an AI inside MATLAB". It is the other way round: **MATLAB is exposed as an MCP server that DSH calls**. The plugin only mounts the official server, provisions the official artifacts, and registers the official skills.
|
|
@@ -51,6 +53,17 @@ you ──natural language──▶ DSH agent
|
|
|
51
53
|
|
|
52
54
|
## Install
|
|
53
55
|
|
|
56
|
+
### From npm (simplest)
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
cd "$env:DSH_HOME\profiles\<your profile>"
|
|
60
|
+
pnpm add dsh-matlab-mcp
|
|
61
|
+
# add "dsh-matlab-mcp" to that profile's dsh.profile.bundles, then restart DeepSeek Harness
|
|
62
|
+
# finally: Settings → MATLAB / Simulink MCP → Install / repair
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The plugin row needs no hand-editing — the package ships its own `cordis.patch.yml` (`dsh.bundle.patch`). `dependencies` is empty and the bundle is self-contained, so installing needs neither a build nor a toolchain.
|
|
66
|
+
|
|
54
67
|
### Direct install (recommended, two commands)
|
|
55
68
|
|
|
56
69
|
```powershell
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
**中文** | [English](README.en.md)
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-matlab-mcp) [](LICENSE) [](package.json)
|
|
6
|
+
|
|
5
7
|
让 DeepSeek Harness(DSH)的 Agent **直接动手操作 MATLAB 与 Simulink** 的插件:执行 MATLAB 代码、运行 `.m` 脚本与单元测试、做代码静态检查、读写/查询/检查/仿真 Simulink 模型 —— 全部通过 **MathWorks 官方 MATLAB MCP Server** 完成,并注入 **MATLAB / Simulink Agentic Toolkit** 的专家技能。
|
|
6
8
|
|
|
7
9
|
> 这不是"在 MATLAB 里塞一个 AI",而是反过来:**MATLAB 作为 MCP 服务器被 DSH 调用**。DSH 侧只做三件事:挂载官方 MCP 服务器、一键供给官方制品、把官方技能注册进技能目录。
|
|
@@ -75,7 +77,18 @@
|
|
|
75
77
|
|
|
76
78
|
## 安装
|
|
77
79
|
|
|
78
|
-
###
|
|
80
|
+
### 从 npm 安装(最省事)
|
|
81
|
+
|
|
82
|
+
```powershell
|
|
83
|
+
cd "$env:DSH_HOME\profiles\<你的 profile>"
|
|
84
|
+
pnpm add dsh-matlab-mcp
|
|
85
|
+
# 再把 "dsh-matlab-mcp" 加进该 profile package.json 的 dsh.profile.bundles,重启 DeepSeek Harness
|
|
86
|
+
# 然后 设置 → MATLAB / Simulink MCP → 点「一键安装 / 修复」
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
插件行**不用手写**:包内自带 `cordis.patch.yml`(`dsh.bundle.patch`),DSH 组合时会自动插入。`dependencies` 为空、bundle 自包含 —— 安装无需构建,也无需任何编译工具链。
|
|
90
|
+
|
|
91
|
+
### 从 git clone 安装(可离线 / 想改代码时用)
|
|
79
92
|
|
|
80
93
|
```powershell
|
|
81
94
|
git clone https://github.com/MCviseron/dsh-matlab-mcp.git D:\dsh-matlab-mcp
|
|
@@ -89,11 +102,11 @@ node D:\dsh-matlab-mcp\scripts\install.mjs # 加 --dry-run 可先预演
|
|
|
89
102
|
3. 直接建立(或修复)`node_modules` 里的联接 —— 有 pnpm 时顺带跑一次 `pnpm install`,**没有 pnpm 也能装**;顺带修复其它本地插件失效的 `link:` 联接;
|
|
90
103
|
4. 打印后续步骤。
|
|
91
104
|
|
|
92
|
-
跑完**重启 DeepSeek Harness
|
|
105
|
+
跑完**重启 DeepSeek Harness**,再做下面「一键安装运行时」。
|
|
93
106
|
|
|
94
107
|
> 兼容性说明:`lib/` 随仓库提交,CI(`.github/workflows/check.yml`)会在每次 push 时重新构建并校验 `lib/` 与 `src/` 一致、且 bundle 里不再有 `@deepseek-ai/*` 外部 import —— 所以「提交构建产物」不会变成悄悄过期的坑。
|
|
95
108
|
|
|
96
|
-
###
|
|
109
|
+
### 手动接线(不用脚本)
|
|
97
110
|
|
|
98
111
|
不想用脚本就手工接线(同样**不需要构建**,仓库自带 `lib/`):
|
|
99
112
|
|
|
@@ -127,7 +140,7 @@ cd "$env:DSH_HOME\profiles\web"; pnpm install
|
|
|
127
140
|
|
|
128
141
|
然后**重启 DeepSeek Harness**(新增 bundle 需要重新读取插件清单)。
|
|
129
142
|
|
|
130
|
-
###
|
|
143
|
+
### 一键安装运行时(在 DSH 设置里)
|
|
131
144
|
|
|
132
145
|
打开 **设置 → MATLAB / Simulink MCP**,点 **「一键安装 / 修复」**。它会:
|
|
133
146
|
|
package/docs/release.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# 发布流程(维护者)
|
|
2
|
+
|
|
3
|
+
> 面向仓库维护者。普通用户只需「安装」,见 [README](../README.md)。
|
|
4
|
+
|
|
5
|
+
## 一次发布:完整步骤
|
|
6
|
+
|
|
7
|
+
1. 改代码 → `pnpm check`(typecheck + 7 套测试 + build;CI 也会跑同样的检查)
|
|
8
|
+
2. `git status` 必须干净 —— `lib/` 是**提交进仓库的构建产物**(DSH 直接加载它),CI 会校验它与全新构建一致
|
|
9
|
+
3. 更新 `CHANGELOG.md` 与 `package.json` 版本(SemVer)
|
|
10
|
+
4. 提交并打 tag,两者一致:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
git commit -am "feat: ..." && git tag v0.7.2 && git push origin main v0.7.2
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
5. 发布到 npm(**必须带 2FA 动态码**):
|
|
17
|
+
|
|
18
|
+
```powershell
|
|
19
|
+
npx --yes npm@12 publish --access public --registry=https://registry.npmjs.org --otp=<6位动态码>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
6. 让国内镜像立刻同步:
|
|
23
|
+
|
|
24
|
+
```powershell
|
|
25
|
+
curl.exe -X PUT "https://registry.npmmirror.com/-/package/dsh-matlab-mcp/syncs"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
7. 验证:
|
|
29
|
+
|
|
30
|
+
```powershell
|
|
31
|
+
curl.exe -s https://registry.npmjs.org/dsh-matlab-mcp | Select-String '"latest"'
|
|
32
|
+
curl.exe -sI https://registry.npmjs.org/dsh-matlab-mcp/-/dsh-matlab-mcp-<version>.tgz | Select-Object -First 1
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 坑 1:npm 要求 2FA —— 不带码会被「暂存」
|
|
36
|
+
|
|
37
|
+
不带 `--otp` 发布时,npm **不会**直接发布,而是:
|
|
38
|
+
|
|
39
|
+
- 建一个占位版本 `0.0.0-stage`(336 B,描述 *Temporary package placeholder for staged publishing*),并把它设为 `latest`;
|
|
40
|
+
- 你的真实版本进入「等待分阶段发布」状态 —— 此时 `.../<version>.tgz` **是 404**。
|
|
41
|
+
|
|
42
|
+
补救二选一:
|
|
43
|
+
|
|
44
|
+
```powershell
|
|
45
|
+
npx --yes npm@12 publish --access public --registry=https://registry.npmjs.org --otp=<码> # 带码重发
|
|
46
|
+
npx --yes npm@12 stage list # 或先看暂存了什么
|
|
47
|
+
npx --yes npm@12 stage approve <stage-id> # 批准即发布(会要码)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`npm stage` 需要 npm ≥ 11.6(本机 10.9.3 没有该命令 → 用 `npx npm@12`;npm 12 要求 Node ≥ 22.22.2)。
|
|
51
|
+
发布成功后可选清理占位版:
|
|
52
|
+
|
|
53
|
+
```powershell
|
|
54
|
+
npx --yes npm@12 unpublish dsh-matlab-mcp@0.0.0-stage --registry=https://registry.npmjs.org
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 坑 2:本机默认 registry 是只读镜像
|
|
58
|
+
|
|
59
|
+
`npm config get registry` 是 `registry.npmmirror.com`(只读镜像,**不能发布**)→ 发布命令必须显式带
|
|
60
|
+
`--registry=https://registry.npmjs.org`。
|
|
61
|
+
|
|
62
|
+
## 以后:交给 CI(推荐)
|
|
63
|
+
|
|
64
|
+
首次发布完成后,到 npmjs.com → 该包 → **Settings → Trusted Publisher → GitHub Actions**:
|
|
65
|
+
|
|
66
|
+
| 字段 | 值 |
|
|
67
|
+
|---|---|
|
|
68
|
+
| Organization/user | `MCviseron` |
|
|
69
|
+
| Repository | `dsh-matlab-mcp` |
|
|
70
|
+
| Workflow filename | `publish.yml` |
|
|
71
|
+
|
|
72
|
+
之后推 tag 即自动发布:`.github/workflows/publish.yml` 会先 `pnpm check`、校验 tag 与 `package.json` 版本一致,再 `npm publish --provenance`(OIDC,无 token,带来源证明)。手动触发该 workflow 默认只 `npm pack --dry-run`。
|
|
73
|
+
|
|
74
|
+
## 产物与版本约定
|
|
75
|
+
|
|
76
|
+
- **npm 版本 = git tag = `package.json` 版本**(CI 强制校验)
|
|
77
|
+
- `lib/` 随仓库提交(DSH 直接加载);CI 校验其与全新构建一致,且宿主 bundle 依然是自包含的
|
|
78
|
+
- `files` 只含 `lib/ src/ test/ docs/ README* CHANGELOG cordis.patch.yml` ——
|
|
79
|
+
`deploy/`(服务器部署工具)与 `scripts/`(本地安装/验证脚本)**不进包**
|
|
80
|
+
- `dependencies` 为空:bundle 自包含,安装即用、无需构建
|
package/lib/client.js
CHANGED
|
@@ -817,7 +817,7 @@ function currentImpl(value) {
|
|
|
817
817
|
var immer = new Immer2();
|
|
818
818
|
var produce = immer.produce;
|
|
819
819
|
|
|
820
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-client-
|
|
820
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-client-store@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4/node_modules/@deepseek-ai/dsh-client-store/lib/index.js
|
|
821
821
|
function notifySubscribers(listeners, label, ...args) {
|
|
822
822
|
for (const listener of [...listeners]) try {
|
|
823
823
|
listener(...args);
|
package/lib/index.js
CHANGED
|
@@ -7810,7 +7810,7 @@ var require_content_type = __commonJS({
|
|
|
7810
7810
|
// src/index.ts
|
|
7811
7811
|
import { existsSync as existsSync6, mkdirSync } from "node:fs";
|
|
7812
7812
|
|
|
7813
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-mcp-
|
|
7813
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-mcp-client@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4_@deepseek-ai+dsh-attac_619ac5bd782a43efa75cbc1d05bcd2ff/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js
|
|
7814
7814
|
var lib_exports = {};
|
|
7815
7815
|
__export(lib_exports, {
|
|
7816
7816
|
Config: () => Config,
|
|
@@ -10406,7 +10406,7 @@ var Service = class Service2 {
|
|
|
10406
10406
|
}
|
|
10407
10407
|
};
|
|
10408
10408
|
|
|
10409
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-scope@0.1.
|
|
10409
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-scope@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4_@deepseek-ai+dsh-invariants_a69b551e7dcd886861b058b7f33c78f7/node_modules/@deepseek-ai/dsh-scope/lib/index.js
|
|
10410
10410
|
var NamedEntries = class {
|
|
10411
10411
|
duplicateError;
|
|
10412
10412
|
data = /* @__PURE__ */ new Map();
|
|
@@ -10622,7 +10622,7 @@ function scopeTarget(base, key) {
|
|
|
10622
10622
|
return carrier;
|
|
10623
10623
|
}
|
|
10624
10624
|
|
|
10625
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-timeout@0.
|
|
10625
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-timeout@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4/node_modules/@deepseek-ai/dsh-timeout/lib/index.js
|
|
10626
10626
|
var MAX_TIMER_DELAY_MS = 2147483647;
|
|
10627
10627
|
|
|
10628
10628
|
// node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/index.js
|
|
@@ -35530,7 +35530,7 @@ var StreamableHTTPClientTransport = class {
|
|
|
35530
35530
|
}
|
|
35531
35531
|
};
|
|
35532
35532
|
|
|
35533
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-http-
|
|
35533
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-http-proxy@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4/node_modules/@deepseek-ai/dsh-http-proxy/lib/index.js
|
|
35534
35534
|
var POLICY_ENV_NAMES = {
|
|
35535
35535
|
httpProxy: ["http_proxy", "HTTP_PROXY"],
|
|
35536
35536
|
httpsProxy: ["https_proxy", "HTTPS_PROXY"],
|
|
@@ -35564,7 +35564,7 @@ function proxyEnvironmentForChild() {
|
|
|
35564
35564
|
return overlay;
|
|
35565
35565
|
}
|
|
35566
35566
|
|
|
35567
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-
|
|
35567
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-subprocess@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4_@deepseek-ai+dsh-http-_08b6d7d477d0e2ad4551660b2d6cd25e/node_modules/@deepseek-ai/dsh-subprocess/lib/index.js
|
|
35568
35568
|
var SENSITIVE_ENV_PATTERN = /KEY|PASSWORD|SECRET|TOKEN/i;
|
|
35569
35569
|
function scrubbedParentEnv() {
|
|
35570
35570
|
const env = {};
|
|
@@ -35574,11 +35574,11 @@ function scrubbedParentEnv() {
|
|
|
35574
35574
|
return env;
|
|
35575
35575
|
}
|
|
35576
35576
|
|
|
35577
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-mcp-
|
|
35577
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-mcp-client@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4_@deepseek-ai+dsh-attac_619ac5bd782a43efa75cbc1d05bcd2ff/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js
|
|
35578
35578
|
import { createHash } from "node:crypto";
|
|
35579
35579
|
import { isDeepStrictEqual } from "node:util";
|
|
35580
35580
|
|
|
35581
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-
|
|
35581
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-attachment@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4_@deepseek-ai+dsh-brand_a90ecb8953c78d05c9d010a20d6e1231/node_modules/@deepseek-ai/dsh-attachment/lib/index.js
|
|
35582
35582
|
var IMAGE_ADMISSION_ERROR_CODES = [
|
|
35583
35583
|
"TOO_MANY_IMAGES",
|
|
35584
35584
|
"IMAGES_TOO_LARGE",
|
|
@@ -35610,7 +35610,7 @@ function isImageAdmissionError(error62) {
|
|
|
35610
35610
|
// node_modules/.pnpm/@deepseek-ai+dsh-llm@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4/node_modules/@deepseek-ai/dsh-llm/lib/index.js
|
|
35611
35611
|
import { createRequire } from "node:module";
|
|
35612
35612
|
|
|
35613
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-typert-
|
|
35613
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-typert-protocol@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4/node_modules/@deepseek-ai/dsh-typert-protocol/lib/index.js
|
|
35614
35614
|
var RemoteError = class extends Error {
|
|
35615
35615
|
code;
|
|
35616
35616
|
details;
|
|
@@ -35728,7 +35728,7 @@ function validateName(subject, value) {
|
|
|
35728
35728
|
if (!isTypertRemoteSegment(value)) throw new TypeError(`typert-protocol: ${subject} must contain only RPC endpoint segment characters`);
|
|
35729
35729
|
}
|
|
35730
35730
|
|
|
35731
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-util-
|
|
35731
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-util-values@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4/node_modules/@deepseek-ai/dsh-util-values/lib/index.js
|
|
35732
35732
|
function assertNever2(value, context) {
|
|
35733
35733
|
const rendered = JSON.stringify(value) ?? String(value);
|
|
35734
35734
|
throw new Error(`unreachable variant${context ? ` in ${context}` : ""}: ${rendered}`);
|
|
@@ -35922,7 +35922,7 @@ function deepFreeze(value) {
|
|
|
35922
35922
|
return value;
|
|
35923
35923
|
}
|
|
35924
35924
|
|
|
35925
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-util-
|
|
35925
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-util-crypto@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4/node_modules/@deepseek-ai/dsh-util-crypto/lib/index.js
|
|
35926
35926
|
function randomUUID() {
|
|
35927
35927
|
const bytes = globalThis.crypto.getRandomValues(new Uint8Array(16));
|
|
35928
35928
|
const hex3 = Array.from(bytes, (byte, index) => {
|
|
@@ -36911,7 +36911,7 @@ function adapterFailureChunk(error62, signal) {
|
|
|
36911
36911
|
};
|
|
36912
36912
|
}
|
|
36913
36913
|
|
|
36914
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-tools@0.1.
|
|
36914
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-tools@0.1.5-rc.3_8f54d72fd50bf534b3efa4c20c8451e2/node_modules/@deepseek-ai/dsh-tools/lib/index.js
|
|
36915
36915
|
var JsonSchemaError = class extends HarnessError {
|
|
36916
36916
|
/** Individual schema violations in walk order. */
|
|
36917
36917
|
violations;
|
|
@@ -39784,7 +39784,7 @@ function toolAbortedBeforeDispatchResult(prior) {
|
|
|
39784
39784
|
};
|
|
39785
39785
|
}
|
|
39786
39786
|
|
|
39787
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-mcp-
|
|
39787
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-mcp-client@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4_@deepseek-ai+dsh-attac_619ac5bd782a43efa75cbc1d05bcd2ff/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js
|
|
39788
39788
|
function buildChildEnv(extra3) {
|
|
39789
39789
|
return {
|
|
39790
39790
|
...scrubbedParentEnv(),
|
|
@@ -40988,7 +40988,7 @@ var MATLAB_MCP_GUIDANCE = [
|
|
|
40988
40988
|
"\u4F1A\u8BDD\u6A21\u5F0F\uFF1A\u9ED8\u8BA4 matlab-session-mode=new\uFF08\u63D2\u4EF6\u81EA\u5DF1\u542F\u52A8\u4E00\u4E2A MATLAB\uFF0C\u684C\u9762\u53EF\u89C1\uFF0C\u96F6\u624B\u52A8\uFF09\uFF1Bauto/existing \u4F1A\u8FDE\u63A5\u7528\u6237\u5DF2\u5171\u4EAB\u7684 MATLAB \u4F1A\u8BDD\uFF08\u9700\u5148\u5728 MATLAB \u91CC\u6267\u884C shareMATLABSession\uFF0C\u5DE5\u5177\u7BB1\u5B89\u88C5\u540E\u53EF\u81EA\u52A8\u5B8C\u6210\uFF09\u3002\u63D2\u4EF6\u5378\u8F7D/\u5173\u95ED\u65F6\u82E5\u5F00\u542F\u4E86\u300C\u9000\u51FA\u65F6\u5173\u95ED MATLAB\u300D\uFF0C\u5B83\u4F1A\u6E05\u7406\u81EA\u5DF1\u542F\u52A8\u7684 MATLAB \u8FDB\u7A0B\uFF0C\u907F\u514D\u7559\u4E0B\u5B64\u513F\u8FDB\u7A0B\u3002"
|
|
40989
40989
|
].join("\n");
|
|
40990
40990
|
|
|
40991
|
-
// node_modules/.pnpm/@deepseek-ai+dsh-settings@0_66094cdad89d90ab7528a261f3ede8ba/node_modules/@deepseek-ai/dsh-settings/lib/index.js
|
|
40991
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-settings@0.1.5-rc.3_@deepseek-ai+cordis@4.0.4_@deepseek-ai+dsh-brand@0_66094cdad89d90ab7528a261f3ede8ba/node_modules/@deepseek-ai/dsh-settings/lib/index.js
|
|
40992
40992
|
function isRecord2(value) {
|
|
40993
40993
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
40994
40994
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-matlab-mcp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "DeepSeek Harness (DSH) plugin — connects DSH to MATLAB and Simulink through the official MathWorks MATLAB MCP Server, injects MATLAB/Simulink Agentic Toolkit skills, and provisions everything with one click.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|