@xgjktech/xg_cwork_im 1.11.3 → 1.11.4
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 +10 -10
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/{index.ts → dist/index.js} +5 -9
- package/dist/index.js.map +1 -0
- package/dist/src/auth.d.ts +25 -0
- package/dist/src/auth.d.ts.map +1 -0
- package/{src/auth.ts → dist/src/auth.js} +55 -79
- package/dist/src/auth.js.map +1 -0
- package/dist/src/channel.d.ts +13 -0
- package/dist/src/channel.d.ts.map +1 -0
- package/{src/channel.ts → dist/src/channel.js} +180 -385
- package/dist/src/channel.js.map +1 -0
- package/dist/src/connection.d.ts +51 -0
- package/dist/src/connection.d.ts.map +1 -0
- package/{src/connection.ts → dist/src/connection.js} +45 -122
- package/dist/src/connection.js.map +1 -0
- package/dist/src/group-history-tool.d.ts +23 -0
- package/dist/src/group-history-tool.d.ts.map +1 -0
- package/{src/group-history-tool.ts → dist/src/group-history-tool.js} +168 -204
- package/dist/src/group-history-tool.js.map +1 -0
- package/dist/src/inbound-media-local.d.ts +40 -0
- package/dist/src/inbound-media-local.d.ts.map +1 -0
- package/{src/inbound-media-local.ts → dist/src/inbound-media-local.js} +52 -90
- package/dist/src/inbound-media-local.js.map +1 -0
- package/dist/src/recommended-system-prompt.d.ts +3 -0
- package/dist/src/recommended-system-prompt.d.ts.map +1 -0
- package/dist/src/recommended-system-prompt.js +3 -0
- package/dist/src/recommended-system-prompt.js.map +1 -0
- package/dist/src/resource-file.d.ts +65 -0
- package/dist/src/resource-file.d.ts.map +1 -0
- package/{src/resource-file.ts → dist/src/resource-file.js} +77 -99
- package/dist/src/resource-file.js.map +1 -0
- package/dist/src/send-group-message-tool.d.ts +16 -0
- package/dist/src/send-group-message-tool.d.ts.map +1 -0
- package/{src/send-group-message-tool.ts → dist/src/send-group-message-tool.js} +17 -34
- package/dist/src/send-group-message-tool.js.map +1 -0
- package/dist/src/send-service.d.ts +34 -0
- package/dist/src/send-service.d.ts.map +1 -0
- package/{src/send-service.ts → dist/src/send-service.js} +60 -146
- package/dist/src/send-service.js.map +1 -0
- package/{src/tool-json-result.ts → dist/src/tool-json-result.d.ts} +14 -24
- package/dist/src/tool-json-result.d.ts.map +1 -0
- package/dist/src/tool-json-result.js +20 -0
- package/dist/src/tool-json-result.js.map +1 -0
- package/{src/types.ts → dist/src/types.d.ts} +26 -94
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +32 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +7 -6
- package/src/recommended-system-prompt.ts +0 -3
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XG-IM Channel Plugin — 类型定义
|
|
3
|
+
*/
|
|
4
|
+
/** 常见 IM format → MIME,供 OpenClaw 媒体理解;未知格式返回 undefined */
|
|
5
|
+
export function imFormatToMimeType(format) {
|
|
6
|
+
const f = format?.trim().toLowerCase();
|
|
7
|
+
if (!f)
|
|
8
|
+
return undefined;
|
|
9
|
+
const map = {
|
|
10
|
+
pdf: "application/pdf",
|
|
11
|
+
png: "image/png",
|
|
12
|
+
jpg: "image/jpeg",
|
|
13
|
+
jpeg: "image/jpeg",
|
|
14
|
+
gif: "image/gif",
|
|
15
|
+
webp: "image/webp",
|
|
16
|
+
doc: "application/msword",
|
|
17
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
18
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
19
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
20
|
+
xls: "application/vnd.ms-excel",
|
|
21
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
22
|
+
txt: "text/plain",
|
|
23
|
+
md: "text/markdown",
|
|
24
|
+
csv: "text/csv",
|
|
25
|
+
zip: "application/zip",
|
|
26
|
+
mp3: "audio/mpeg",
|
|
27
|
+
wav: "audio/wav",
|
|
28
|
+
mp4: "video/mp4",
|
|
29
|
+
};
|
|
30
|
+
return map[f];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AA8LH,2DAA2D;AAC3D,MAAM,UAAU,kBAAkB,CAAC,MAA0B;IACzD,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACvC,IAAI,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACzB,MAAM,GAAG,GAA2B;QAChC,GAAG,EAAE,iBAAiB;QACtB,GAAG,EAAE,WAAW;QAChB,GAAG,EAAE,YAAY;QACjB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,oBAAoB;QACzB,IAAI,EAAE,yEAAyE;QAC/E,GAAG,EAAE,+BAA+B;QACpC,IAAI,EAAE,2EAA2E;QACjF,GAAG,EAAE,0BAA0B;QAC/B,IAAI,EAAE,mEAAmE;QACzE,GAAG,EAAE,YAAY;QACjB,EAAE,EAAE,eAAe;QACnB,GAAG,EAAE,UAAU;QACf,GAAG,EAAE,iBAAiB;QACtB,GAAG,EAAE,YAAY;QACjB,GAAG,EAAE,WAAW;QAChB,GAAG,EAAE,WAAW;KACnB,CAAC;IACF,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xgjktech/xg_cwork_im",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.4",
|
|
4
4
|
"description": "XG CWork IM channel plugin for OpenClaw",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bot",
|
|
@@ -11,18 +11,19 @@
|
|
|
11
11
|
],
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"type": "module",
|
|
14
|
-
"main": "index.
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
15
16
|
"files": [
|
|
16
17
|
".npmrc",
|
|
17
|
-
"
|
|
18
|
-
"src/*.ts",
|
|
18
|
+
"dist/**/*",
|
|
19
19
|
"openclaw.plugin.json"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
+
"build": "tsc -p tsconfig.json",
|
|
22
23
|
"type-check": "tsc -p tsconfig.json --noEmit",
|
|
23
24
|
"lint": "tsc -p tsconfig.json --noEmit",
|
|
24
25
|
"install:prod": "npm install --omit=dev",
|
|
25
|
-
"prepublishOnly": "npm run
|
|
26
|
+
"prepublishOnly": "npm run build"
|
|
26
27
|
},
|
|
27
28
|
"dependencies": {
|
|
28
29
|
"@sinclair/typebox": "^0.32.0",
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
},
|
|
41
42
|
"openclaw": {
|
|
42
43
|
"extensions": [
|
|
43
|
-
"./index.
|
|
44
|
+
"./dist/index.js"
|
|
44
45
|
],
|
|
45
46
|
"channels": [
|
|
46
47
|
"xg_cwork_im"
|