@openclaw/clickclack 2026.7.2-beta.3 → 2026.7.2-beta.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.
@@ -77,6 +77,7 @@ class Receiver extends Writable {
77
77
 
78
78
  this._totalPayloadLength = 0;
79
79
  this._messageLength = 0;
80
+ this._numFragments = 0;
80
81
  this._fragments = [];
81
82
 
82
83
  this._errored = false;
@@ -500,6 +501,19 @@ class Receiver extends Writable {
500
501
  return;
501
502
  }
502
503
 
504
+ if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
505
+ const error = this.createError(
506
+ RangeError,
507
+ 'Too many message fragments',
508
+ false,
509
+ 1008,
510
+ 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
511
+ );
512
+
513
+ cb(error);
514
+ return;
515
+ }
516
+
503
517
  if (this._compressed) {
504
518
  this._state = INFLATING;
505
519
  this.decompress(data, cb);
@@ -507,22 +521,6 @@ class Receiver extends Writable {
507
521
  }
508
522
 
509
523
  if (data.length) {
510
- if (
511
- this._maxFragments > 0 &&
512
- this._fragments.length >= this._maxFragments
513
- ) {
514
- const error = this.createError(
515
- RangeError,
516
- 'Too many message fragments',
517
- false,
518
- 1008,
519
- 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
520
- );
521
-
522
- cb(error);
523
- return;
524
- }
525
-
526
524
  //
527
525
  // This message is not compressed so its length is the sum of the payload
528
526
  // length of all fragments.
@@ -562,22 +560,6 @@ class Receiver extends Writable {
562
560
  return;
563
561
  }
564
562
 
565
- if (
566
- this._maxFragments > 0 &&
567
- this._fragments.length >= this._maxFragments
568
- ) {
569
- const error = this.createError(
570
- RangeError,
571
- 'Too many message fragments',
572
- false,
573
- 1008,
574
- 'WS_ERR_TOO_MANY_BUFFERED_PARTS'
575
- );
576
-
577
- cb(error);
578
- return;
579
- }
580
-
581
563
  this._fragments.push(buf);
582
564
  }
583
565
 
@@ -604,6 +586,7 @@ class Receiver extends Writable {
604
586
  this._totalPayloadLength = 0;
605
587
  this._messageLength = 0;
606
588
  this._fragmented = 0;
589
+ this._numFragments = 0;
607
590
  this._fragments = [];
608
591
 
609
592
  if (this._opcode === 2) {
@@ -43,9 +43,9 @@ class WebSocketServer extends EventEmitter {
43
43
  * called
44
44
  * @param {Function} [options.handleProtocols] A hook to handle protocols
45
45
  * @param {String} [options.host] The hostname where to bind the server
46
- * @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
46
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
47
47
  * buffered data chunks
48
- * @param {Number} [options.maxFragments=131072] The maximum number of message
48
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
49
49
  * fragments
50
50
  * @param {Number} [options.maxPayload=104857600] The maximum allowed message
51
51
  * size
@@ -69,8 +69,8 @@ class WebSocketServer extends EventEmitter {
69
69
  options = {
70
70
  allowSynchronousEvents: true,
71
71
  autoPong: true,
72
- maxBufferedChunks: 1024 * 1024,
73
- maxFragments: 128 * 1024,
72
+ maxBufferedChunks: 256 * 1024,
73
+ maxFragments: 16 * 1024,
74
74
  maxPayload: 100 * 1024 * 1024,
75
75
  skipUTF8Validation: false,
76
76
  perMessageDeflate: false,
@@ -646,9 +646,9 @@ module.exports = WebSocket;
646
646
  * masking key
647
647
  * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
648
648
  * handshake request
649
- * @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
649
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
650
650
  * buffered data chunks
651
- * @param {Number} [options.maxFragments=131072] The maximum number of message
651
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
652
652
  * fragments
653
653
  * @param {Number} [options.maxPayload=104857600] The maximum allowed message
654
654
  * size
@@ -670,8 +670,8 @@ function initAsClient(websocket, address, protocols, options) {
670
670
  autoPong: true,
671
671
  closeTimeout: CLOSE_TIMEOUT,
672
672
  protocolVersion: protocolVersions[1],
673
- maxBufferedChunks: 1024 * 1024,
674
- maxFragments: 128 * 1024,
673
+ maxBufferedChunks: 256 * 1024,
674
+ maxFragments: 16 * 1024,
675
675
  maxPayload: 100 * 1024 * 1024,
676
676
  skipUTF8Validation: false,
677
677
  perMessageDeflate: true,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ws",
3
- "version": "8.21.0",
3
+ "version": "8.21.1",
4
4
  "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
5
5
  "keywords": [
6
6
  "HyBi",
@@ -66,5 +66,9 @@
66
66
  "nyc": "^15.0.0",
67
67
  "prettier": "^3.0.0",
68
68
  "utf-8-validate": "^6.0.0"
69
+ },
70
+ "allowScripts": {
71
+ "bufferutil": true,
72
+ "utf-8-validate": true
69
73
  }
70
74
  }
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@openclaw/clickclack",
3
- "version": "2026.7.2-beta.3",
3
+ "version": "2026.7.2-beta.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/clickclack",
9
- "version": "2026.7.2-beta.3",
9
+ "version": "2026.7.2-beta.4",
10
10
  "dependencies": {
11
- "ws": "8.21.0",
11
+ "ws": "8.21.1",
12
12
  "zod": "4.4.3"
13
13
  },
14
14
  "peerDependencies": {
15
- "openclaw": ">=2026.7.2-beta.3"
15
+ "openclaw": ">=2026.7.2-beta.4"
16
16
  },
17
17
  "peerDependenciesMeta": {
18
18
  "openclaw": {
@@ -21,9 +21,9 @@
21
21
  }
22
22
  },
23
23
  "node_modules/ws": {
24
- "version": "8.21.0",
25
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",
26
- "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
24
+ "version": "8.21.1",
25
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz",
26
+ "integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==",
27
27
  "license": "MIT",
28
28
  "engines": {
29
29
  "node": ">=10.0.0"
@@ -6,9 +6,9 @@
6
6
  "channels": [
7
7
  "clickclack"
8
8
  ],
9
- "channelEnvVars": {
10
- "clickclack": [
11
- "CLICKCLACK_BOT_TOKEN"
9
+ "contracts": {
10
+ "tools": [
11
+ "discussion"
12
12
  ]
13
13
  },
14
14
  "configSchema": {
@@ -32,6 +32,10 @@
32
32
  "type": "string",
33
33
  "format": "uri"
34
34
  },
35
+ "apiBaseUrl": {
36
+ "type": "string",
37
+ "format": "uri"
38
+ },
35
39
  "token": {
36
40
  "anyOf": [
37
41
  {
@@ -135,11 +139,6 @@
135
139
  "systemPrompt": {
136
140
  "type": "string"
137
141
  },
138
- "timeoutSeconds": {
139
- "type": "integer",
140
- "minimum": 1,
141
- "maximum": 3600
142
- },
143
142
  "toolsAllow": {
144
143
  "type": "array",
145
144
  "items": {
@@ -166,6 +165,25 @@
166
165
  "commandMenu": {
167
166
  "type": "boolean"
168
167
  },
168
+ "discussions": {
169
+ "type": "object",
170
+ "properties": {
171
+ "enabled": {
172
+ "type": "boolean"
173
+ },
174
+ "workspace": {
175
+ "type": "string"
176
+ },
177
+ "controlUrlBase": {
178
+ "type": "string",
179
+ "format": "uri"
180
+ },
181
+ "section": {
182
+ "type": "string"
183
+ }
184
+ },
185
+ "additionalProperties": false
186
+ },
169
187
  "accounts": {
170
188
  "type": "object",
171
189
  "propertyNames": {
@@ -184,6 +202,10 @@
184
202
  "type": "string",
185
203
  "format": "uri"
186
204
  },
205
+ "apiBaseUrl": {
206
+ "type": "string",
207
+ "format": "uri"
208
+ },
187
209
  "token": {
188
210
  "anyOf": [
189
211
  {
@@ -287,11 +309,6 @@
287
309
  "systemPrompt": {
288
310
  "type": "string"
289
311
  },
290
- "timeoutSeconds": {
291
- "type": "integer",
292
- "minimum": 1,
293
- "maximum": 3600
294
- },
295
312
  "toolsAllow": {
296
313
  "type": "array",
297
314
  "items": {
@@ -317,6 +334,25 @@
317
334
  },
318
335
  "commandMenu": {
319
336
  "type": "boolean"
337
+ },
338
+ "discussions": {
339
+ "type": "object",
340
+ "properties": {
341
+ "enabled": {
342
+ "type": "boolean"
343
+ },
344
+ "workspace": {
345
+ "type": "string"
346
+ },
347
+ "controlUrlBase": {
348
+ "type": "string",
349
+ "format": "uri"
350
+ },
351
+ "section": {
352
+ "type": "string"
353
+ }
354
+ },
355
+ "additionalProperties": false
320
356
  }
321
357
  },
322
358
  "additionalProperties": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/clickclack",
3
- "version": "2026.7.2-beta.3",
3
+ "version": "2026.7.2-beta.4",
4
4
  "description": "OpenClaw ClickClack channel plugin",
5
5
  "type": "module",
6
6
  "exports": {
@@ -9,11 +9,11 @@
9
9
  "./runtime-api.js": "./dist/runtime-api.js"
10
10
  },
11
11
  "dependencies": {
12
- "ws": "8.21.0",
12
+ "ws": "8.21.1",
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.7.2-beta.3"
16
+ "openclaw": ">=2026.7.2-beta.4"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -27,6 +27,13 @@
27
27
  "setupEntry": "./dist/setup-entry.js",
28
28
  "channel": {
29
29
  "id": "clickclack",
30
+ "configuredState": {
31
+ "env": {
32
+ "anyOf": [
33
+ "CLICKCLACK_BOT_TOKEN"
34
+ ]
35
+ }
36
+ },
30
37
  "label": "ClickClack",
31
38
  "selectionLabel": "ClickClack",
32
39
  "detailLabel": "ClickClack Bot",
@@ -41,16 +48,85 @@
41
48
  "nativeCommandsAutoEnabled": false,
42
49
  "nativeSkillsAutoEnabled": false
43
50
  },
44
- "cliAddOptions": [
45
- {
46
- "flags": "--code <code>",
47
- "description": "ClickClack one-time setup code or setup URL"
48
- },
49
- {
50
- "flags": "--workspace <workspace>",
51
- "description": "ClickClack workspace id, slug, or name"
52
- }
53
- ]
51
+ "setup": {
52
+ "fields": [
53
+ {
54
+ "key": "code",
55
+ "kind": "string",
56
+ "sensitive": true,
57
+ "cli": {
58
+ "flags": "--code <code>",
59
+ "description": "ClickClack one-time setup code or setup URL"
60
+ }
61
+ },
62
+ {
63
+ "key": "token",
64
+ "kind": "string",
65
+ "sensitive": true,
66
+ "cli": {
67
+ "flags": "--token <token>",
68
+ "description": "ClickClack bot token"
69
+ }
70
+ },
71
+ {
72
+ "key": "tokenFile",
73
+ "kind": "string",
74
+ "sensitive": true,
75
+ "cli": {
76
+ "flags": "--token-file <path>",
77
+ "description": "ClickClack bot token file"
78
+ }
79
+ },
80
+ {
81
+ "key": "baseUrl",
82
+ "kind": "string",
83
+ "cli": {
84
+ "flags": "--base-url <url>",
85
+ "description": "ClickClack API base URL"
86
+ }
87
+ },
88
+ {
89
+ "key": "workspace",
90
+ "kind": "string",
91
+ "cli": {
92
+ "flags": "--workspace <workspace>",
93
+ "description": "ClickClack workspace id, slug, or name"
94
+ }
95
+ },
96
+ {
97
+ "key": "defaultTo",
98
+ "kind": "string",
99
+ "cli": {
100
+ "flags": "--default-to <target>",
101
+ "description": "Default ClickClack target"
102
+ }
103
+ },
104
+ {
105
+ "key": "allowFrom",
106
+ "kind": "string-list",
107
+ "cli": {
108
+ "flags": "--allow-from <ids>",
109
+ "description": "Allowed ClickClack senders"
110
+ }
111
+ },
112
+ {
113
+ "key": "agentActivity",
114
+ "kind": "boolean",
115
+ "cli": {
116
+ "flags": "--agent-activity",
117
+ "description": "Enable ClickClack agent activity"
118
+ }
119
+ },
120
+ {
121
+ "key": "useEnv",
122
+ "kind": "boolean",
123
+ "cli": {
124
+ "flags": "--use-env",
125
+ "description": "Use CLICKCLACK_BOT_TOKEN"
126
+ }
127
+ }
128
+ ]
129
+ }
54
130
  },
55
131
  "install": {
56
132
  "clawhubSpec": "clawhub:@openclaw/clickclack",
@@ -60,10 +136,10 @@
60
136
  "allowInvalidConfigRecovery": true
61
137
  },
62
138
  "compat": {
63
- "pluginApi": ">=2026.7.2-beta.3"
139
+ "pluginApi": ">=2026.7.2-beta.4"
64
140
  },
65
141
  "build": {
66
- "openclawVersion": "2026.7.2-beta.3",
142
+ "openclawVersion": "2026.7.2-beta.4",
67
143
  "bundledDist": false
68
144
  },
69
145
  "release": {