@workclaw/openclaw-workchat 1.0.0 → 1.0.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 +210 -210
- package/index.js +49568 -0
- package/index.ts +19 -19
- package/openclaw.plugin.json +25 -25
- package/package.json +64 -63
- package/src/api/api.ts +260 -260
- package/src/api/types.ts +56 -56
- package/src/auth/accounts.ts +279 -290
- package/src/auth/bind-agent.ts +52 -70
- package/src/auth/login-qr-terminal.ts +16 -16
- package/src/auth/login-qr.ts +477 -475
- package/src/auth/pairing.ts +133 -133
- package/src/channel.ts +282 -282
- package/src/compat.ts +75 -75
- package/src/config/config-schema.ts +29 -29
- package/src/messaging/debug-mode.ts +57 -57
- package/src/messaging/error-notice.ts +30 -30
- package/src/messaging/inbound.ts +174 -174
- package/src/messaging/markdown-filter.ts +361 -361
- package/src/messaging/outbound-hooks.ts +84 -84
- package/src/messaging/process-message.ts +530 -530
- package/src/messaging/send.ts +119 -119
- package/src/messaging/slash-commands.ts +105 -105
- package/src/monitor/monitor.ts +261 -261
- package/src/storage/state-dir.ts +11 -11
- package/src/util/logger.ts +147 -147
- package/src/util/random.ts +9 -9
- package/src/util/redact.ts +39 -39
- package/src/vendor.d.ts +10 -10
package/index.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry";
|
|
2
|
-
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
3
|
-
|
|
4
|
-
import { workchatPlugin } from "./src/channel.js";
|
|
5
|
-
import { assertHostCompatibility } from "./src/compat.js";
|
|
6
|
-
import { WorkChatConfigSchema } from "./src/config/config-schema.js";
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
id: "openclaw-workchat",
|
|
10
|
-
name: "WorkChat",
|
|
11
|
-
description: "WorkChat channel (binding QR + WebSocket upstream, reply/push downstream)",
|
|
12
|
-
configSchema: buildChannelConfigSchema(WorkChatConfigSchema),
|
|
13
|
-
register(api: OpenClawPluginApi) {
|
|
14
|
-
// Fail-fast: reject incompatible host versions before any side-effects.
|
|
15
|
-
assertHostCompatibility(api.runtime?.version);
|
|
16
|
-
|
|
17
|
-
api.registerChannel({ plugin: workchatPlugin });
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry";
|
|
2
|
+
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
3
|
+
|
|
4
|
+
import { workchatPlugin } from "./src/channel.js";
|
|
5
|
+
import { assertHostCompatibility } from "./src/compat.js";
|
|
6
|
+
import { WorkChatConfigSchema } from "./src/config/config-schema.js";
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
id: "openclaw-workchat",
|
|
10
|
+
name: "WorkChat",
|
|
11
|
+
description: "WorkChat channel (binding QR + WebSocket upstream, reply/push downstream)",
|
|
12
|
+
configSchema: buildChannelConfigSchema(WorkChatConfigSchema),
|
|
13
|
+
register(api: OpenClawPluginApi) {
|
|
14
|
+
// Fail-fast: reject incompatible host versions before any side-effects.
|
|
15
|
+
assertHostCompatibility(api.runtime?.version);
|
|
16
|
+
|
|
17
|
+
api.registerChannel({ plugin: workchatPlugin });
|
|
18
|
+
},
|
|
19
|
+
};
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "openclaw-workchat",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"channels": [
|
|
5
|
-
"openclaw-workchat"
|
|
6
|
-
],
|
|
7
|
-
"channelConfigs": {
|
|
8
|
-
"openclaw-workchat": {
|
|
9
|
-
"schema": {
|
|
10
|
-
"type": "object",
|
|
11
|
-
"additionalProperties": true
|
|
12
|
-
},
|
|
13
|
-
"label": "openclaw-workchat",
|
|
14
|
-
"description": "WorkChat channel configuration."
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"configSchema": {
|
|
18
|
-
"type": "object",
|
|
19
|
-
"additionalProperties": false,
|
|
20
|
-
"properties": {}
|
|
21
|
-
},
|
|
22
|
-
"activation": {
|
|
23
|
-
"onStartup": true
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "openclaw-workchat",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"channels": [
|
|
5
|
+
"openclaw-workchat"
|
|
6
|
+
],
|
|
7
|
+
"channelConfigs": {
|
|
8
|
+
"openclaw-workchat": {
|
|
9
|
+
"schema": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"additionalProperties": true
|
|
12
|
+
},
|
|
13
|
+
"label": "openclaw-workchat",
|
|
14
|
+
"description": "WorkChat channel configuration."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"configSchema": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"properties": {}
|
|
21
|
+
},
|
|
22
|
+
"activation": {
|
|
23
|
+
"onStartup": true
|
|
24
|
+
}
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,63 +1,64 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@workclaw/openclaw-workchat",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "OpenClaw WorkChat channel plugin: QR binding + WebSocket messaging with the WorkChat open platform",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"publishConfig": {
|
|
8
|
-
"access": "public"
|
|
9
|
-
},
|
|
10
|
-
"engines": {
|
|
11
|
-
"node": ">=22"
|
|
12
|
-
},
|
|
13
|
-
"peerDependencies": {
|
|
14
|
-
"openclaw": ">=2026.3.22"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"qrcode-terminal": "0.12.0",
|
|
18
|
-
"undici": "^7.16.0",
|
|
19
|
-
"zod": "4.
|
|
20
|
-
},
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@workclaw/openclaw-workchat",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "OpenClaw WorkChat channel plugin: QR binding + WebSocket messaging with the WorkChat open platform",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=22"
|
|
12
|
+
},
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"openclaw": ">=2026.3.22"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"qrcode-terminal": "0.12.0",
|
|
18
|
+
"undici": "^7.16.0",
|
|
19
|
+
"zod": "^4.3.6"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"index.js",
|
|
23
|
+
"index.ts",
|
|
24
|
+
"src",
|
|
25
|
+
"openclaw.plugin.json",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"test": "vitest run",
|
|
31
|
+
"bundle": "node scripts/bundle.mjs",
|
|
32
|
+
"prepare": "node scripts/bundle.mjs",
|
|
33
|
+
"sync": "node scripts/sync-to-desktop.mjs"
|
|
34
|
+
},
|
|
35
|
+
"openclaw": {
|
|
36
|
+
"extensions": [
|
|
37
|
+
"./index.ts"
|
|
38
|
+
],
|
|
39
|
+
"channel": {
|
|
40
|
+
"id": "openclaw-workchat",
|
|
41
|
+
"label": "openclaw-workchat",
|
|
42
|
+
"selectionLabel": "WorkChat",
|
|
43
|
+
"docsPath": "/channels/openclaw-workchat",
|
|
44
|
+
"docsLabel": "WorkChat",
|
|
45
|
+
"blurb": "WorkChat 开放平台通道:扫码绑定智能体,WebSocket 收发消息",
|
|
46
|
+
"aliases": [
|
|
47
|
+
"openclaw-workchat"
|
|
48
|
+
],
|
|
49
|
+
"order": 80
|
|
50
|
+
},
|
|
51
|
+
"install": {
|
|
52
|
+
"npmSpec": "@workclaw/openclaw-workchat",
|
|
53
|
+
"localPath": "extensions/openclaw-workchat",
|
|
54
|
+
"defaultChoice": "npm"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"esbuild": "^0.21.5",
|
|
59
|
+
"openclaw": "^2026.3.23",
|
|
60
|
+
"typescript": "^5.8.0",
|
|
61
|
+
"vite": "^8.3.4",
|
|
62
|
+
"vitest": "^5.0.5"
|
|
63
|
+
}
|
|
64
|
+
}
|