@xgjktech/xg_cwork_im 1.17.9 → 1.17.10
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 +433 -433
- package/dist/src/deliver-text.test.js +22 -22
- package/dist/src/plan-store-access.test.js +9 -9
- package/dist/src/plan-tool-middleware.d.ts +1 -1
- package/dist/src/plan-tool-middleware.d.ts.map +1 -1
- package/dist/src/plan-tool-middleware.js +11 -14
- package/dist/src/plan-tool-middleware.js.map +1 -1
- package/dist/src/plan-tool-middleware.test.js +108 -26
- package/dist/src/plan-tool-middleware.test.js.map +1 -1
- package/dist/src/plan-tool-result.d.ts +1 -3
- package/dist/src/plan-tool-result.d.ts.map +1 -1
- package/dist/src/plan-tool-result.js +3 -4
- package/dist/src/plan-tool-result.js.map +1 -1
- package/dist/src/plan-tool-result.test.js +25 -3
- package/dist/src/plan-tool-result.test.js.map +1 -1
- package/dist/src/turn-deliver-buffer.test.js +25 -25
- package/openclaw.plugin.json +27 -27
- package/package.json +76 -76
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
2
|
import { describe, it } from "node:test";
|
|
3
3
|
import { isDeliverPayloadSendable, isDeliverTextRevision, snapshotSupersedesBufferText, TurnDeliverBuffer, } from "./turn-deliver-buffer.js";
|
|
4
|
-
const HOUTONG_BODY_LOOSE = `确实是这个问题:昨天那版虽然用了内嵌 SVG,但你现在的文档预览器没有把 SVG 正常渲染出来,所以流程看不到。
|
|
5
|
-
|
|
6
|
-
我已经重新生成了一版**纯 Markdown 可读版**:
|
|
7
|
-
|
|
8
|
-
- 不用 SVG
|
|
9
|
-
新文件:
|
|
10
|
-
|
|
4
|
+
const HOUTONG_BODY_LOOSE = `确实是这个问题:昨天那版虽然用了内嵌 SVG,但你现在的文档预览器没有把 SVG 正常渲染出来,所以流程看不到。
|
|
5
|
+
|
|
6
|
+
我已经重新生成了一版**纯 Markdown 可读版**:
|
|
7
|
+
|
|
8
|
+
- 不用 SVG
|
|
9
|
+
新文件:
|
|
10
|
+
|
|
11
11
|
-----`;
|
|
12
|
-
const HOUTONG_BODY_TIGHT = `确实是这个问题:昨天那版虽然用了内嵌 SVG,但你现在的文档预览器没有把 SVG 正常渲染出来,所以流程看不到。
|
|
13
|
-
我已经重新生成了一版**纯 Markdown 可读版**:
|
|
14
|
-
- 不用 SVG
|
|
12
|
+
const HOUTONG_BODY_TIGHT = `确实是这个问题:昨天那版虽然用了内嵌 SVG,但你现在的文档预览器没有把 SVG 正常渲染出来,所以流程看不到。
|
|
13
|
+
我已经重新生成了一版**纯 Markdown 可读版**:
|
|
14
|
+
- 不用 SVG
|
|
15
15
|
新文件:`;
|
|
16
|
-
const WORLD_CUP_PARTIAL = `| 场次 | 时间 |
|
|
17
|
-
| --- | --- |
|
|
18
|
-
| 1 | 21:00 |
|
|
16
|
+
const WORLD_CUP_PARTIAL = `| 场次 | 时间 |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| 1 | 21:00 |
|
|
19
19
|
| 2 |`;
|
|
20
|
-
const WORLD_CUP_FULL = `| 场次 | 时间 |
|
|
21
|
-
| --- | --- |
|
|
22
|
-
| 1 | 21:00 |
|
|
23
|
-
| 2 | 00:00 |
|
|
20
|
+
const WORLD_CUP_FULL = `| 场次 | 时间 |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| 1 | 21:00 |
|
|
23
|
+
| 2 | 00:00 |
|
|
24
24
|
| 3 | 03:00 |`;
|
|
25
|
-
const RT002_PART1 = `BEGIN_123
|
|
26
|
-
|
|
27
|
-
## 一、背景
|
|
28
|
-
|
|
25
|
+
const RT002_PART1 = `BEGIN_123
|
|
26
|
+
|
|
27
|
+
## 一、背景
|
|
28
|
+
|
|
29
29
|
随着人工智能技术的快速发展,企业级AI助手在提升工作效率中发挥着日益重要的作用。`;
|
|
30
|
-
const RT002_PART2 = `- 工具调用的完整日志必须被记录,包括调用时间、调用者、工具名称。
|
|
31
|
-
|
|
32
|
-
## 六、审计
|
|
33
|
-
|
|
30
|
+
const RT002_PART2 = `- 工具调用的完整日志必须被记录,包括调用时间、调用者、工具名称。
|
|
31
|
+
|
|
32
|
+
## 六、审计
|
|
33
|
+
|
|
34
34
|
审计是AI助手治理的监督机制。`;
|
|
35
35
|
function entry(textPart, hasMedia = false) {
|
|
36
36
|
return {
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "xg_cwork_im",
|
|
3
|
-
"channels": [
|
|
4
|
-
"xg_cwork_im"
|
|
5
|
-
],
|
|
6
|
-
"channelConfigs": {
|
|
7
|
-
"xg_cwork_im": {
|
|
8
|
-
"schema": {
|
|
9
|
-
"type": "object",
|
|
10
|
-
"additionalProperties": true,
|
|
11
|
-
"properties": {}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"configSchema": {
|
|
16
|
-
"type": "object",
|
|
17
|
-
"additionalProperties": true,
|
|
18
|
-
"properties": {}
|
|
19
|
-
},
|
|
20
|
-
"contracts": {
|
|
21
|
-
"tools": [
|
|
22
|
-
"xg_cwork_im_get_group_chat_history",
|
|
23
|
-
"xg_cwork_im_send_group_message",
|
|
24
|
-
"xg_cwork_im_send_file"
|
|
25
|
-
],
|
|
26
|
-
"agentToolResultMiddleware": ["openclaw"]
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "xg_cwork_im",
|
|
3
|
+
"channels": [
|
|
4
|
+
"xg_cwork_im"
|
|
5
|
+
],
|
|
6
|
+
"channelConfigs": {
|
|
7
|
+
"xg_cwork_im": {
|
|
8
|
+
"schema": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": true,
|
|
11
|
+
"properties": {}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"configSchema": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": true,
|
|
18
|
+
"properties": {}
|
|
19
|
+
},
|
|
20
|
+
"contracts": {
|
|
21
|
+
"tools": [
|
|
22
|
+
"xg_cwork_im_get_group_chat_history",
|
|
23
|
+
"xg_cwork_im_send_group_message",
|
|
24
|
+
"xg_cwork_im_send_file"
|
|
25
|
+
],
|
|
26
|
+
"agentToolResultMiddleware": ["openclaw"]
|
|
27
|
+
}
|
|
28
28
|
}
|
package/package.json
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@xgjktech/xg_cwork_im",
|
|
3
|
-
"version": "1.17.
|
|
4
|
-
"description": "XG CWork IM channel plugin for OpenClaw",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"bot",
|
|
7
|
-
"channel",
|
|
8
|
-
"openclaw",
|
|
9
|
-
"xg_cwork_im",
|
|
10
|
-
"im"
|
|
11
|
-
],
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"type": "module",
|
|
14
|
-
"main": "dist/index.js",
|
|
15
|
-
"types": "dist/index.d.ts",
|
|
16
|
-
"engines": {
|
|
17
|
-
"node": ">=22.19.0"
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
".npmrc",
|
|
21
|
-
"dist/**/*",
|
|
22
|
-
"openclaw.plugin.json"
|
|
23
|
-
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc -p tsconfig.json",
|
|
26
|
-
"type-check": "tsc -p tsconfig.json --noEmit",
|
|
27
|
-
"lint": "tsc -p tsconfig.json --noEmit",
|
|
28
|
-
"test": "npm run build && node --test dist/src/inbound-terminal-state.test.js dist/src/user-facing-errors.test.js dist/src/deliver-text.test.js dist/src/agent-context-types.test.js dist/src/block-streaming-config.test.js dist/src/per-message-fallback-notice.test.js dist/src/thinking-ws-progress.test.js dist/src/resource-file.test.js dist/src/turn-deliver-buffer.test.js dist/src/run-usage.test.js dist/src/ws-run-event-unmapped.test.js dist/src/send-service.test.js dist/src/send-file-tool.test.js dist/src/plan-tool-result.test.js dist/src/plan-blocked-notice.test.js dist/src/plan-store-access.test.js dist/src/plan-tool-middleware.test.js dist/src/plan-event-subscription.test.js dist/src/plan-ws-registry.test.js dist/src/plan-stat-event.test.js",
|
|
29
|
-
"install:prod": "npm install --omit=dev",
|
|
30
|
-
"prepublishOnly": "npm run build"
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@sinclair/typebox": "^0.32.0",
|
|
34
|
-
"@xgjktech/xg-openclaw-shared": "^0.2.0",
|
|
35
|
-
"axios": "^1.6.0",
|
|
36
|
-
"ws": "^8.17.0",
|
|
37
|
-
"zod": "^3.22.0"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@types/node": "^22.19.0",
|
|
41
|
-
"@types/ws": "^8.5.10",
|
|
42
|
-
"openclaw": "^2026.6.10",
|
|
43
|
-
"typescript": "^5.3.0"
|
|
44
|
-
},
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"openclaw": ">=2026.6.10"
|
|
47
|
-
},
|
|
48
|
-
"peerDependenciesMeta": {
|
|
49
|
-
"openclaw": {
|
|
50
|
-
"optional": true
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"openclaw": {
|
|
54
|
-
"extensions": [
|
|
55
|
-
"./dist/index.js"
|
|
56
|
-
],
|
|
57
|
-
"channels": [
|
|
58
|
-
"xg_cwork_im"
|
|
59
|
-
],
|
|
60
|
-
"installDependencies": false,
|
|
61
|
-
"channel": {
|
|
62
|
-
"id": "xg_cwork_im",
|
|
63
|
-
"label": "XG CWork IM",
|
|
64
|
-
"selectionLabel": "XG CWork IM (工作说说)",
|
|
65
|
-
"blurb": "工作说说 IM 机器人 Channel 插件,通过 WebSocket 长连接接收消息。",
|
|
66
|
-
"aliases": [
|
|
67
|
-
"xg_cwork_im",
|
|
68
|
-
"im"
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
"install": {
|
|
72
|
-
"localPath": ".",
|
|
73
|
-
"defaultChoice": "local"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@xgjktech/xg_cwork_im",
|
|
3
|
+
"version": "1.17.10",
|
|
4
|
+
"description": "XG CWork IM channel plugin for OpenClaw",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"bot",
|
|
7
|
+
"channel",
|
|
8
|
+
"openclaw",
|
|
9
|
+
"xg_cwork_im",
|
|
10
|
+
"im"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=22.19.0"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
".npmrc",
|
|
21
|
+
"dist/**/*",
|
|
22
|
+
"openclaw.plugin.json"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc -p tsconfig.json",
|
|
26
|
+
"type-check": "tsc -p tsconfig.json --noEmit",
|
|
27
|
+
"lint": "tsc -p tsconfig.json --noEmit",
|
|
28
|
+
"test": "npm run build && node --test dist/src/inbound-terminal-state.test.js dist/src/user-facing-errors.test.js dist/src/deliver-text.test.js dist/src/agent-context-types.test.js dist/src/block-streaming-config.test.js dist/src/per-message-fallback-notice.test.js dist/src/thinking-ws-progress.test.js dist/src/resource-file.test.js dist/src/turn-deliver-buffer.test.js dist/src/run-usage.test.js dist/src/ws-run-event-unmapped.test.js dist/src/send-service.test.js dist/src/send-file-tool.test.js dist/src/plan-tool-result.test.js dist/src/plan-blocked-notice.test.js dist/src/plan-store-access.test.js dist/src/plan-tool-middleware.test.js dist/src/plan-event-subscription.test.js dist/src/plan-ws-registry.test.js dist/src/plan-stat-event.test.js",
|
|
29
|
+
"install:prod": "npm install --omit=dev",
|
|
30
|
+
"prepublishOnly": "npm run build"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@sinclair/typebox": "^0.32.0",
|
|
34
|
+
"@xgjktech/xg-openclaw-shared": "^0.2.0",
|
|
35
|
+
"axios": "^1.6.0",
|
|
36
|
+
"ws": "^8.17.0",
|
|
37
|
+
"zod": "^3.22.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^22.19.0",
|
|
41
|
+
"@types/ws": "^8.5.10",
|
|
42
|
+
"openclaw": "^2026.6.10",
|
|
43
|
+
"typescript": "^5.3.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"openclaw": ">=2026.6.10"
|
|
47
|
+
},
|
|
48
|
+
"peerDependenciesMeta": {
|
|
49
|
+
"openclaw": {
|
|
50
|
+
"optional": true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"openclaw": {
|
|
54
|
+
"extensions": [
|
|
55
|
+
"./dist/index.js"
|
|
56
|
+
],
|
|
57
|
+
"channels": [
|
|
58
|
+
"xg_cwork_im"
|
|
59
|
+
],
|
|
60
|
+
"installDependencies": false,
|
|
61
|
+
"channel": {
|
|
62
|
+
"id": "xg_cwork_im",
|
|
63
|
+
"label": "XG CWork IM",
|
|
64
|
+
"selectionLabel": "XG CWork IM (工作说说)",
|
|
65
|
+
"blurb": "工作说说 IM 机器人 Channel 插件,通过 WebSocket 长连接接收消息。",
|
|
66
|
+
"aliases": [
|
|
67
|
+
"xg_cwork_im",
|
|
68
|
+
"im"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"install": {
|
|
72
|
+
"localPath": ".",
|
|
73
|
+
"defaultChoice": "local"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|