dsh-work-components 0.0.0-stage → 0.2.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.
@@ -0,0 +1,41 @@
1
+ """dsh-multimodal 用来拉起 OfficeMCP(stdio)的启动脚本。
2
+
3
+ OfficeMCP 在启动和执行工具时会直接 print 到标准输出,而 stdio 模式下标准输出就是
4
+ MCP 的 JSON-RPC 通道,这些日志会把协议搅乱。这里在导入 OfficeMCP 之前把默认的
5
+ print 改到标准错误(被 redirect_stdout 截获的 print 不受影响),然后照常启动。
6
+
7
+ 用法(由插件经 uv 调用,工作目录是 OfficeMCP 仓库):
8
+ uv run --directory <officemcp 仓库> python launch.py [--folder <绝对路径>]
9
+ """
10
+ import builtins
11
+ import sys
12
+
13
+ _REAL_STDOUT = sys.stdout
14
+ _print = builtins.print
15
+
16
+
17
+ def _safe_print(*args, **kwargs):
18
+ if kwargs.get("file") is None:
19
+ kwargs["file"] = sys.stderr if sys.stdout is _REAL_STDOUT else sys.stdout
20
+ return _print(*args, **kwargs)
21
+
22
+
23
+ builtins.print = _safe_print
24
+
25
+
26
+ def main() -> None:
27
+ argv = sys.argv[1:]
28
+ folder = None
29
+ if "--folder" in argv:
30
+ i = argv.index("--folder")
31
+ if i + 1 < len(argv):
32
+ folder = argv[i + 1]
33
+ # OfficeMCP 只从第二个参数起解析 --folder,第一个参数是传输方式。
34
+ sys.argv = ["officemcp", "stdio"] + (["--folder", folder] if folder else [])
35
+ from officemcp import main as office_main
36
+
37
+ office_main()
38
+
39
+
40
+ if __name__ == "__main__":
41
+ main()
package/package.json CHANGED
@@ -1,6 +1,48 @@
1
1
  {
2
2
  "name": "dsh-work-components",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "DSH 工作组件插件:统一挂载并管理控制其他工作软件的 MCP 服务器(Office / Blender / Unity / Figma / Photoshop / Chrome / Godot / Windows / Notion / Cloudflare / GitHub / ComfyUI / FFmpeg / Obsidian),带「工作组件」设置页;另含多模态工具 mm_send_image。",
5
+ "type": "module",
6
+ "main": "lib/index.mjs",
7
+ "exports": {
8
+ ".": "./lib/index.mjs",
9
+ "./client": "./lib/client.js",
10
+ "./cordis.patch.yml": "./cordis.patch.yml",
11
+ "./package.json": "./package.json"
12
+ },
13
+ "files": [
14
+ "lib/index.mjs",
15
+ "lib/client.js",
16
+ "cordis.patch.yml",
17
+ "office/launch.py",
18
+ "LICENSE",
19
+ "NOTICE",
20
+ "vendor/dsh-tools/LICENSE"
21
+ ],
22
+ "dsh": {
23
+ "bundle": {
24
+ "patch": "./cordis.patch.yml"
25
+ },
26
+ "client": {
27
+ "inject": [
28
+ "@deepseek-ai/dsh-client-runtime",
29
+ "@deepseek-ai/dsh-client-ui-slots"
30
+ ],
31
+ "platform": "web"
32
+ }
33
+ },
34
+ "scripts": {
35
+ "build": "node scripts/build.mjs",
36
+ "smoke": "node scripts/smoke.mjs",
37
+ "vendor:sync": "node scripts/vendor-sync.mjs",
38
+ "smoke:office": "node scripts/office-smoke.mjs",
39
+ "smoke:tools": "node scripts/tools-smoke.mjs",
40
+ "smoke:connect": "node scripts/connect-smoke.mjs",
41
+ "smoke:local": "node scripts/localcomp-smoke.mjs"
42
+ },
43
+ "devDependencies": {
44
+ "esbuild": "^0.25.0",
45
+ "schemastery": "^3.18.0"
46
+ },
47
+ "license": "MIT"
48
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
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.