openclaw-channel-dmwork 0.4.3 → 0.5.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.
Files changed (96) hide show
  1. package/README.md +3 -3
  2. package/index.ts +9 -0
  3. package/package.json +1 -1
  4. package/src/actions.test.ts +728 -0
  5. package/src/actions.ts +452 -0
  6. package/src/agent-tools.test.ts +404 -0
  7. package/src/agent-tools.ts +269 -0
  8. package/src/api-fetch.test.ts +422 -0
  9. package/src/api-fetch.ts +90 -3
  10. package/src/channel.ts +123 -10
  11. package/src/group-md.test.ts +379 -0
  12. package/src/group-md.ts +417 -0
  13. package/src/inbound.test.ts +42 -1
  14. package/src/inbound.ts +180 -47
  15. package/src/types.ts +5 -0
  16. package/node_modules/crypto-js/CONTRIBUTING.md +0 -28
  17. package/node_modules/crypto-js/LICENSE +0 -24
  18. package/node_modules/crypto-js/README.md +0 -275
  19. package/node_modules/crypto-js/aes.js +0 -234
  20. package/node_modules/crypto-js/blowfish.js +0 -471
  21. package/node_modules/crypto-js/bower.json +0 -39
  22. package/node_modules/crypto-js/cipher-core.js +0 -895
  23. package/node_modules/crypto-js/core.js +0 -807
  24. package/node_modules/crypto-js/crypto-js.js +0 -6657
  25. package/node_modules/crypto-js/docs/QuickStartGuide.wiki +0 -470
  26. package/node_modules/crypto-js/enc-base64.js +0 -136
  27. package/node_modules/crypto-js/enc-base64url.js +0 -148
  28. package/node_modules/crypto-js/enc-hex.js +0 -18
  29. package/node_modules/crypto-js/enc-latin1.js +0 -18
  30. package/node_modules/crypto-js/enc-utf16.js +0 -149
  31. package/node_modules/crypto-js/enc-utf8.js +0 -18
  32. package/node_modules/crypto-js/evpkdf.js +0 -134
  33. package/node_modules/crypto-js/format-hex.js +0 -66
  34. package/node_modules/crypto-js/format-openssl.js +0 -18
  35. package/node_modules/crypto-js/hmac-md5.js +0 -18
  36. package/node_modules/crypto-js/hmac-ripemd160.js +0 -18
  37. package/node_modules/crypto-js/hmac-sha1.js +0 -18
  38. package/node_modules/crypto-js/hmac-sha224.js +0 -18
  39. package/node_modules/crypto-js/hmac-sha256.js +0 -18
  40. package/node_modules/crypto-js/hmac-sha3.js +0 -18
  41. package/node_modules/crypto-js/hmac-sha384.js +0 -18
  42. package/node_modules/crypto-js/hmac-sha512.js +0 -18
  43. package/node_modules/crypto-js/hmac.js +0 -143
  44. package/node_modules/crypto-js/index.js +0 -18
  45. package/node_modules/crypto-js/lib-typedarrays.js +0 -76
  46. package/node_modules/crypto-js/md5.js +0 -268
  47. package/node_modules/crypto-js/mode-cfb.js +0 -80
  48. package/node_modules/crypto-js/mode-ctr-gladman.js +0 -116
  49. package/node_modules/crypto-js/mode-ctr.js +0 -58
  50. package/node_modules/crypto-js/mode-ecb.js +0 -40
  51. package/node_modules/crypto-js/mode-ofb.js +0 -54
  52. package/node_modules/crypto-js/package.json +0 -42
  53. package/node_modules/crypto-js/pad-ansix923.js +0 -49
  54. package/node_modules/crypto-js/pad-iso10126.js +0 -44
  55. package/node_modules/crypto-js/pad-iso97971.js +0 -40
  56. package/node_modules/crypto-js/pad-nopadding.js +0 -30
  57. package/node_modules/crypto-js/pad-pkcs7.js +0 -18
  58. package/node_modules/crypto-js/pad-zeropadding.js +0 -47
  59. package/node_modules/crypto-js/pbkdf2.js +0 -145
  60. package/node_modules/crypto-js/rabbit-legacy.js +0 -190
  61. package/node_modules/crypto-js/rabbit.js +0 -192
  62. package/node_modules/crypto-js/rc4.js +0 -139
  63. package/node_modules/crypto-js/ripemd160.js +0 -267
  64. package/node_modules/crypto-js/sha1.js +0 -150
  65. package/node_modules/crypto-js/sha224.js +0 -80
  66. package/node_modules/crypto-js/sha256.js +0 -199
  67. package/node_modules/crypto-js/sha3.js +0 -326
  68. package/node_modules/crypto-js/sha384.js +0 -83
  69. package/node_modules/crypto-js/sha512.js +0 -326
  70. package/node_modules/crypto-js/tripledes.js +0 -779
  71. package/node_modules/crypto-js/x64-core.js +0 -304
  72. package/node_modules/curve25519-js/.prettierrc +0 -6
  73. package/node_modules/curve25519-js/LICENSE +0 -19
  74. package/node_modules/curve25519-js/README.md +0 -111
  75. package/node_modules/curve25519-js/lib/index.d.ts +0 -69
  76. package/node_modules/curve25519-js/lib/index.js +0 -1669
  77. package/node_modules/curve25519-js/package.json +0 -34
  78. package/node_modules/curve25519-js/tsconfig.json +0 -20
  79. package/node_modules/curve25519-js/tslint.json +0 -10
  80. package/node_modules/md5-typescript/.idea/Md5-typescript.iml +0 -13
  81. package/node_modules/md5-typescript/.idea/jsLibraryMappings.xml +0 -6
  82. package/node_modules/md5-typescript/.idea/libraries/tsconfig_roots.xml +0 -13
  83. package/node_modules/md5-typescript/.idea/modules.xml +0 -8
  84. package/node_modules/md5-typescript/.idea/vcs.xml +0 -6
  85. package/node_modules/md5-typescript/.idea/workspace.xml +0 -345
  86. package/node_modules/md5-typescript/LICENSE +0 -21
  87. package/node_modules/md5-typescript/README.md +0 -13
  88. package/node_modules/md5-typescript/dist/bundles/bundle.umd.js +0 -208
  89. package/node_modules/md5-typescript/dist/bundles/bundle.umd.min.js +0 -1
  90. package/node_modules/md5-typescript/dist/index.d.ts +0 -43
  91. package/node_modules/md5-typescript/dist/index.js +0 -198
  92. package/node_modules/md5-typescript/dist/index.js.map +0 -1
  93. package/node_modules/md5-typescript/dist/index.metadata.json +0 -1
  94. package/node_modules/md5-typescript/package.json +0 -31
  95. package/node_modules/md5-typescript/rollup.config.js +0 -7
  96. package/node_modules/md5-typescript/tsconfig.json +0 -28
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # openclaw-channel-dmwork
2
2
 
3
- DMWork channel plugin for OpenClaw. Connects via WuKongIM WebSocket for real-time messaging.
3
+ DMWork channel plugin for OpenClaw. Connects via DMWORK WebSocket for real-time messaging.
4
4
 
5
5
  Repository: https://github.com/yujiawei/dmwork-adapters
6
6
 
@@ -34,7 +34,7 @@ Configuration fields:
34
34
 
35
35
  - `botToken` (required): Bot token from BotFather (`bf_` prefix)
36
36
  - `apiUrl` (required): DMWork server API URL, e.g. `http://192.168.1.100:8090`
37
- - `wsUrl` (optional): WuKongIM WebSocket URL. Auto-detected from register if omitted.
37
+ - `wsUrl` (optional): DMWORK WebSocket URL. Auto-detected from register if omitted.
38
38
 
39
39
  ## Run
40
40
 
@@ -47,7 +47,7 @@ The plugin is loaded automatically by OpenClaw when the gateway starts.
47
47
  ## What it does
48
48
 
49
49
  1. Registers the bot with the DMWork server via REST API
50
- 2. Connects to WuKongIM WebSocket for real-time message receiving
50
+ 2. Connects to DMWORK WebSocket for real-time message receiving
51
51
  3. Auto-reconnects on disconnection
52
52
  4. Sends a greeting to the bot owner on connect
53
53
  5. Dispatches incoming messages to OpenClaw's message handler
package/index.ts CHANGED
@@ -8,6 +8,7 @@
8
8
  import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
9
9
  import { dmworkPlugin } from "./src/channel.js";
10
10
  import { setDmworkRuntime } from "./src/runtime.js";
11
+ import { getGroupMdForPrompt } from "./src/group-md.js";
11
12
 
12
13
  const plugin: {
13
14
  id: string;
@@ -21,6 +22,14 @@ const plugin: {
21
22
  register(api) {
22
23
  setDmworkRuntime(api.runtime);
23
24
  api.registerChannel({ plugin: dmworkPlugin });
25
+
26
+ console.log('[dmwork] registering before_prompt_build hook');
27
+ api.on('before_prompt_build', (_event, ctx) => {
28
+ const content = getGroupMdForPrompt(ctx);
29
+ if (!content) return;
30
+ const result = { prependContext: `[GROUP CONTEXT]\n${content}\n[/GROUP CONTEXT]` };
31
+ return result;
32
+ });
24
33
  },
25
34
  };
26
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-channel-dmwork",
3
- "version": "0.4.3",
3
+ "version": "0.5.0",
4
4
  "description": "DMWork channel plugin for OpenClaw via WuKongIM WebSocket",
5
5
  "main": "index.ts",
6
6
  "type": "module",