im-connector 1.2.0 → 1.3.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/README.md +3 -4
- package/dist/cli/runner.d.ts.map +1 -1
- package/dist/cli/runner.js +21 -21
- package/dist/cli/runner.js.map +1 -1
- package/dist/providers/dingtalk.d.ts.map +1 -1
- package/dist/providers/dingtalk.js +1 -0
- package/dist/providers/dingtalk.js.map +1 -1
- package/dist/providers/types.d.ts +2 -0
- package/dist/providers/types.d.ts.map +1 -1
- package/mcp-bundle/README.md +6 -15
- package/mcp-bundle/cordis.patch.yml +3 -2
- package/package.json +2 -2
- package/vendor/dws/LICENSE +203 -0
- package/vendor/dws/NOTICE +14 -0
- package/vendor/dws/win32-x64/dws.exe +4 -0
package/README.md
CHANGED
|
@@ -7,11 +7,10 @@
|
|
|
7
7
|
## 前置条件
|
|
8
8
|
|
|
9
9
|
- Node.js >= 18
|
|
10
|
-
-
|
|
10
|
+
- **无需单独安装 CLI**:钉钉 `dws` 的 Windows x64 可执行文件**已内置在包内**(`vendor/dws/win32-x64/dws.exe`,v1.0.65,Apache-2.0);企业微信 `wecom-cli` 通过可选依赖自动安装
|
|
11
|
+
- 其它平台(Linux / macOS / Windows arm64):`npm i -g dingtalk-workspace-cli` 后会被自动使用
|
|
11
12
|
- **登录一次即可**(凭据保存在 CLI 自己的本地登录态,本包不接触凭据)——见下方「登录」
|
|
12
13
|
|
|
13
|
-
> 使用 pnpm 安装时,若提示 CLI 不可用,允许依赖的安装脚本(`pnpm approve-builds`)或手动 `npm i -g dingtalk-workspace-cli @wecom/cli` 即可。
|
|
14
|
-
|
|
15
14
|
## 安装
|
|
16
15
|
|
|
17
16
|
```bash
|
|
@@ -19,7 +18,7 @@ npx -y im-connector # 直接用,无需安装
|
|
|
19
18
|
npm i -g im-connector # 或全局安装
|
|
20
19
|
```
|
|
21
20
|
|
|
22
|
-
>
|
|
21
|
+
> 安装体积约 20MB(只含 Windows 版 dws 二进制 + 企业微信 CLI),不再是原来的 130MB;也不需要 pnpm 允许任何安装脚本。
|
|
23
22
|
|
|
24
23
|
## 登录(扫码即可,不用终端)
|
|
25
24
|
|
package/dist/cli/runner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/cli/runner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/cli/runner.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,oCAAoC;IACpC,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;GAIG;AACH,qBAAa,SAAS;IACR,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,cAAc;IAEjD,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,0CAA0C;IACpC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;IAKrE,sCAAsC;IAChC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAItE,kDAAkD;IAC5C,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAIzE,qCAAqC;IAC/B,aAAa,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK1D,0CAA0C;IACpC,aAAa,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;YAIhD,OAAO;YAuEP,MAAM;CAkCrB"}
|
package/dist/cli/runner.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
4
|
+
import { dirname, join, resolve } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
5
6
|
import { CliError, parseErrorEnvelope } from "./errors.js";
|
|
6
7
|
/**
|
|
7
8
|
* 通用 CLI 透传执行器:按 provider 规格定位 CLI(npm 全局 bin 脚本 → node 直跑,
|
|
@@ -113,11 +114,11 @@ export class CliRunner {
|
|
|
113
114
|
if (bin !== this.spec.bin && existsSync(bin)) {
|
|
114
115
|
return { command: bin, prefix: [], shell: false };
|
|
115
116
|
}
|
|
116
|
-
// 3)
|
|
117
|
+
// 3) 随包携带的 CLI 二进制(如 vendor/dws/win32-x64/dws.exe,开箱即用)
|
|
117
118
|
if (bin === this.spec.bin) {
|
|
118
|
-
const
|
|
119
|
-
if (
|
|
120
|
-
return { command:
|
|
119
|
+
const bundled = bundledCliExecutable(this.spec);
|
|
120
|
+
if (bundled) {
|
|
121
|
+
return { command: bundled, prefix: [], shell: false };
|
|
121
122
|
}
|
|
122
123
|
// 4) 回退:npm 全局安装的 CLI
|
|
123
124
|
const globalRoot = await npmGlobalRoot();
|
|
@@ -137,26 +138,25 @@ export class CliRunner {
|
|
|
137
138
|
return { command: bin, prefix: [], shell: process.platform === "win32" };
|
|
138
139
|
}
|
|
139
140
|
}
|
|
141
|
+
/** 包根目录(dist/cli → 包根;源码运行时为仓库根)。 */
|
|
142
|
+
function packageRoot() {
|
|
143
|
+
return resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
144
|
+
}
|
|
140
145
|
/**
|
|
141
|
-
*
|
|
142
|
-
*
|
|
146
|
+
* 解析随包携带的 CLI 可执行文件:`<包根>/<bundledCliDir>/<platform>-<arch>/<exe>`。
|
|
147
|
+
* 找不到(平台未携带)返回 undefined,由全局安装或 shell 回退。
|
|
143
148
|
*/
|
|
144
|
-
function
|
|
145
|
-
|
|
146
|
-
const require = createRequire(import.meta.url);
|
|
147
|
-
const pkgJson = require.resolve(`${spec.npmPackage}/package.json`);
|
|
148
|
-
const pkgDir = dirname(pkgJson);
|
|
149
|
-
// binScript = "<npmPackage>/bin/xxx.js" → 相对包目录的脚本路径
|
|
150
|
-
const rel = spec.binScript.slice(spec.npmPackage.length + 1);
|
|
151
|
-
const script = join(pkgDir, rel);
|
|
152
|
-
if (existsSync(script))
|
|
153
|
-
return script;
|
|
149
|
+
function bundledCliExecutable(spec) {
|
|
150
|
+
if (spec.bundledCliDir === undefined)
|
|
154
151
|
return undefined;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
152
|
+
const exe = process.platform === "win32" ? `${spec.bin}.exe` : spec.bin;
|
|
153
|
+
const candidate = join(packageRoot(), spec.bundledCliDir, `${process.platform}-${process.arch}`, exe);
|
|
154
|
+
return existsSync(candidate) ? candidate : undefined;
|
|
159
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* 解析随包安装的 CLI 脚本(包内 node_modules,如 optionalDependencies)。
|
|
158
|
+
* 返回可直接用 `node <script>` 执行的脚本路径;找不到返回 undefined。
|
|
159
|
+
*/
|
|
160
160
|
/** 通过包 manifest 的 bin 字段定位脚本(兼容 binScript 与实际 bin 布局不同的情况)。 */
|
|
161
161
|
async function cliScriptFromManifest(spec) {
|
|
162
162
|
try {
|
package/dist/cli/runner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/cli/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/cli/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AA2B3D;;;;GAIG;AACH,MAAM,OAAO,SAAS;IACS;IAA7B,YAA6B,IAAoB;QAApB,SAAI,GAAJ,IAAI,CAAgB;IAAG,CAAC;IAErD,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACtB,CAAC;IAED,0CAA0C;IAC1C,KAAK,CAAC,OAAO,CAAC,IAAc,EAAE,IAAoB;QAChD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,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AO,IAAI,CAAC;IACvB,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,KAAK,UAAU,aAAa;IAC1B,IAAI,CAAC;QACH,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;QACxD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC;QAChD,MAAM,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;QAChC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5F,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO,IAAI,IAAI,IAAI,CAAC;IACtB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dingtalk.d.ts","sourceRoot":"","sources":["../../src/providers/dingtalk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,2CAA2C;AAC3C,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"dingtalk.d.ts","sourceRoot":"","sources":["../../src/providers/dingtalk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,2CAA2C;AAC3C,eAAO,MAAM,QAAQ,EAAE,cAyBtB,CAAC"}
|
|
@@ -7,6 +7,7 @@ export const dingtalk = {
|
|
|
7
7
|
binScript: "dingtalk-workspace-cli/bin/dws.js",
|
|
8
8
|
formatArgs: ["--format", "json"],
|
|
9
9
|
envBin: "DINGTALK_DWS_BIN",
|
|
10
|
+
bundledCliDir: "vendor/dws",
|
|
10
11
|
versionArgs: ["--version"],
|
|
11
12
|
authArgs: ["auth", "status"],
|
|
12
13
|
loginArgs: ["auth", "login", "--recommend"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dingtalk.js","sourceRoot":"","sources":["../../src/providers/dingtalk.ts"],"names":[],"mappings":"AAEA,2CAA2C;AAC3C,MAAM,CAAC,MAAM,QAAQ,GAAmB;IACtC,EAAE,EAAE,UAAU;IACd,WAAW,EAAE,IAAI;IACjB,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,wBAAwB;IACpC,SAAS,EAAE,mCAAmC;IAC9C,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,kBAAkB;IAC1B,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC5B,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC;IAC3C,QAAQ,EAAE;QACR,mBAAmB;QACnB,2CAA2C;QAC3C,uBAAuB;QACvB,0BAA0B;QAC1B,sFAAsF;QACtF,8FAA8F;QAC9F,2EAA2E;QAC3E,gEAAgE;QAChE,wGAAwG;QACxG,wFAAwF;QACxF,oKAAoK;KACrK;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"dingtalk.js","sourceRoot":"","sources":["../../src/providers/dingtalk.ts"],"names":[],"mappings":"AAEA,2CAA2C;AAC3C,MAAM,CAAC,MAAM,QAAQ,GAAmB;IACtC,EAAE,EAAE,UAAU;IACd,WAAW,EAAE,IAAI;IACjB,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,wBAAwB;IACpC,SAAS,EAAE,mCAAmC;IAC9C,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,kBAAkB;IAC1B,aAAa,EAAE,YAAY;IAC3B,WAAW,EAAE,CAAC,WAAW,CAAC;IAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC5B,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC;IAC3C,QAAQ,EAAE;QACR,mBAAmB;QACnB,2CAA2C;QAC3C,uBAAuB;QACvB,0BAA0B;QAC1B,sFAAsF;QACtF,8FAA8F;QAC9F,2EAA2E;QAC3E,gEAAgE;QAChE,wGAAwG;QACxG,wFAAwF;QACxF,oKAAoK;KACrK;CACF,CAAC"}
|
|
@@ -17,6 +17,8 @@ export interface ImProviderSpec {
|
|
|
17
17
|
formatArgs: string[];
|
|
18
18
|
/** 覆盖 bin 的环境变量名(可选),如 "DINGTALK_DWS_BIN"。 */
|
|
19
19
|
envBin?: string;
|
|
20
|
+
/** 随包携带的 CLI 二进制目录(相对包根),按 `<platform>-<arch>/` 子目录查找,如 "vendor/dws"。 */
|
|
21
|
+
bundledCliDir?: string;
|
|
20
22
|
/** 查询 CLI 版本的原始参数(不追加 formatArgs),如 ["--version"]。 */
|
|
21
23
|
versionArgs?: string[];
|
|
22
24
|
/** 查询登录状态的命令(走 JSON 输出),如 ["auth","status"]。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/providers/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,cAAc;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/providers/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,cAAc;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
package/mcp-bundle/README.md
CHANGED
|
@@ -14,7 +14,7 @@ plugin_manager install_bundle target: im-connector
|
|
|
14
14
|
|
|
15
15
|
## 手工安装(已有包或本地调试)
|
|
16
16
|
|
|
17
|
-
把本目录复制到任意位置,直接 `plugin_manager install_bundle`(target 指向该目录)。patch 用的是官方 stdio
|
|
17
|
+
把本目录复制到任意位置,直接 `plugin_manager install_bundle`(target 指向该目录)。patch 用的是官方 stdio 形式,但**用 `node` 直接运行包内 server**(不走 `npx`,避免 Windows 下 Node 无法用管道 spawn `.cmd` shim 的问题):
|
|
18
18
|
|
|
19
19
|
```yaml
|
|
20
20
|
- insert:
|
|
@@ -23,27 +23,18 @@ plugin_manager install_bundle target: im-connector
|
|
|
23
23
|
config:
|
|
24
24
|
serverName: im
|
|
25
25
|
transport: stdio
|
|
26
|
-
command:
|
|
27
|
-
args:
|
|
26
|
+
command: !!js process.execPath
|
|
27
|
+
args:
|
|
28
|
+
- !!js '`${ctx.get("profileContext").dir}/node_modules/im-connector/dist/mcp/server.js`'
|
|
28
29
|
failOnStartupError: true
|
|
29
30
|
```
|
|
30
31
|
|
|
31
32
|
要点:
|
|
32
|
-
- `command:
|
|
33
|
-
- **不需要配 env**:`im-connector`
|
|
33
|
+
- `command: !!js process.execPath`:用运行 DSH 的同一个 node,跨平台;`args` 通过 Loader 的 `profileContext.dir` 定位到 **profile 的 node_modules 里安装的包**,无需绝对路径、无需 npx、无需全局安装。
|
|
34
|
+
- **不需要配 env**:`im-connector` 会通过包内 node_modules / `npm root -g` 自动解析 `dws` / `wecom-cli` 的 bin 脚本。需要覆盖时再加 env,且**不要把凭据写进 patch**(可用 `!!js process.env.X` 引用环境变量)。
|
|
34
35
|
- `failOnStartupError: true`:连接失败时让该行激活失败,便于发现问题(官方模板同款)。
|
|
35
36
|
- 对照官方 `templates/mcp/`:manifest 只需 name/version/`dsh.bundle.patch`(配置型 bundle 无 Host/Client 入口文件),display 元数据走 `locale/*.json` + `icon.svg`。
|
|
36
37
|
|
|
37
|
-
> ⚠️ 个别 Windows 环境下 `npx` 转发 stdio 到本包 server 不稳定(`npx --version` 与其它包正常,但管道下 MCP 握手被关闭)。遇到这种情况改用 node + 绝对路径:
|
|
38
|
-
|
|
39
|
-
```yaml
|
|
40
|
-
config:
|
|
41
|
-
serverName: im
|
|
42
|
-
transport: stdio
|
|
43
|
-
command: node
|
|
44
|
-
args: ['<npm root -g>/im-connector/dist/mcp/server.js']
|
|
45
|
-
```
|
|
46
|
-
|
|
47
38
|
## 验证
|
|
48
39
|
|
|
49
40
|
安装后在会话里调用 `mcp__im__run`(例如 `{ provider: "dingtalk", args: ["contact", "+me"] }`)确认连接可用。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "im-connector",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "MCP server that lets agents drive DingTalk (dws) and WeCom (wecom-cli) CLIs: send messages, write reports, create todos, query calendars and approvals. Extensible provider registry for more IM platforms.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
23
23
|
"mcp-bundle",
|
|
24
|
+
"vendor",
|
|
24
25
|
"README.md",
|
|
25
26
|
"LICENSE"
|
|
26
27
|
],
|
|
@@ -41,7 +42,6 @@
|
|
|
41
42
|
"@modelcontextprotocol/sdk": "^1.12.0"
|
|
42
43
|
},
|
|
43
44
|
"optionalDependencies": {
|
|
44
|
-
"dingtalk-workspace-cli": "^1.0.65",
|
|
45
45
|
"@wecom/cli": "^1.3.4"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
203
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
NOTICE — bundled third-party binary
|
|
2
|
+
|
|
3
|
+
This package bundles the Windows x64 executable of:
|
|
4
|
+
|
|
5
|
+
dws (DingTalk Workspace CLI) v1.0.65
|
|
6
|
+
https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (see ./LICENSE).
|
|
8
|
+
|
|
9
|
+
The binary is redistributed unmodified as `win32-x64/dws.exe`.
|
|
10
|
+
Copyright belongs to the upstream dws project and its contributors.
|
|
11
|
+
|
|
12
|
+
If you are on another platform (Linux / macOS / Windows arm64), install
|
|
13
|
+
dws yourself (`npm i -g dingtalk-workspace-cli`) and it will be picked up
|
|
14
|
+
from PATH / the npm global root.
|