@openclaw/whatsapp 2026.8.1 → 2026.8.2

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 (55) hide show
  1. package/dist/{action-runtime-YA_Yvunu.js → action-runtime-Bw0loEdy.js} +1 -1
  2. package/dist/action-runtime-api.js +1 -1
  3. package/dist/action-runtime.runtime.js +1 -1
  4. package/dist/agent-tools-api.js +2 -2
  5. package/dist/api.js +9 -9
  6. package/dist/{approval-handler.runtime-C7jZ8rsD.js → approval-handler.runtime-DeyPb57-.js} +2 -2
  7. package/dist/{approval-reactions-rpaNVHzZ.js → approval-reactions-DGDA6hQ7.js} +6 -4
  8. package/dist/{auth-store-CtpBqH5S.js → auth-store-DTj1H9pv.js} +5 -3
  9. package/dist/{channel-Dx09AAmX.js → channel-DxMmDjqK.js} +23 -19
  10. package/dist/channel-config-api.js +1 -1
  11. package/dist/channel-plugin-api.js +1 -1
  12. package/dist/{channel-react-action-n9a8Hk5i.js → channel-react-action-BUp7Wbfr.js} +2 -2
  13. package/dist/{channel.runtime-D_PjmeMT.js → channel.runtime-BwSnyXRX.js} +4 -4
  14. package/dist/{channel.setup-CRJQiWbh.js → channel.setup-aOFLSQyw.js} +1 -1
  15. package/dist/{config-schema-BQP5YCeK.js → config-schema-BYA6e_Ii.js} +6 -4
  16. package/dist/{connection-controller-CIYuBJrs.js → connection-controller-BvkxsbWi.js} +2 -2
  17. package/dist/{constants-HU41RHGI.js → constants-C7m81BNe.js} +1 -1
  18. package/dist/{directory-config-Ci8Jjsw4.js → directory-config-LgxYJLWY.js} +2 -2
  19. package/dist/directory-contract-api.js +1 -1
  20. package/dist/{group-session-key-CH9jJIVQ.js → group-session-key-KUguLmSZ.js} +3 -3
  21. package/dist/light-runtime-api.js +1 -1
  22. package/dist/{login-1u5WcfTn.js → login-Bk_jiXKD.js} +5 -4
  23. package/dist/{login-qr-B_1sr0hk.js → login-qr-B3m61NqA.js} +8 -6
  24. package/dist/login-qr-runtime.js +1 -1
  25. package/dist/{monitor-CySzv38g.js → monitor-CTsyo-HE.js} +77 -61
  26. package/dist/runtime-api.js +8 -8
  27. package/dist/{send-C3S-NqyO.js → send-DiPjiygK.js} +52 -27
  28. package/dist/{send-api-C-FFC1p_.js → send-api-kFcuhSiY.js} +42 -40
  29. package/dist/{setup-finalize-CRzMpx84.js → setup-finalize-CqH5wTK5.js} +5 -4
  30. package/dist/setup-plugin-api.js +1 -1
  31. package/dist/{setup-surface-ym4doiv3.js → setup-surface-Dm3T6S8t.js} +2 -2
  32. package/dist/{shared-D3B14d45.js → shared-DDjonGys.js} +6 -5
  33. package/dist/{socket-close-2T0_jZTN.js → socket-close-CpkkJZCU.js} +9 -6
  34. package/dist/{targets-runtime-TMk0lGuy.js → targets-runtime-RBjx3pg_.js} +1 -2
  35. package/dist/{text-runtime-CaKLhowd.js → text-runtime-DyfmcATV.js} +1 -1
  36. package/node_modules/baileys/node_modules/process-warning/.github/dependabot.yml +42 -2
  37. package/node_modules/baileys/node_modules/process-warning/.github/workflows/ci.yml +12 -1
  38. package/node_modules/baileys/node_modules/process-warning/.github/workflows/lock-threads.yml +19 -0
  39. package/node_modules/baileys/node_modules/process-warning/LICENSE +1 -1
  40. package/node_modules/baileys/node_modules/process-warning/README.md +41 -2
  41. package/node_modules/baileys/node_modules/process-warning/index.js +85 -17
  42. package/node_modules/baileys/node_modules/process-warning/package.json +6 -7
  43. package/node_modules/baileys/node_modules/process-warning/test/emit-once-only.test.js +3 -3
  44. package/node_modules/baileys/node_modules/process-warning/test/emit-reset.test.js +4 -4
  45. package/node_modules/baileys/node_modules/process-warning/test/emit-unlimited.test.js +2 -2
  46. package/node_modules/baileys/node_modules/process-warning/test/spy-warning.test.js +143 -0
  47. package/node_modules/baileys/node_modules/process-warning/types/index.d.ts +15 -1
  48. package/node_modules/baileys/node_modules/process-warning/types/index.tst.ts +48 -0
  49. package/node_modules/baileys/node_modules/ws/lib/permessage-deflate.js +3 -1
  50. package/node_modules/baileys/node_modules/ws/package.json +1 -1
  51. package/node_modules/typebox/build/format/email.mjs +1 -1
  52. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
  53. package/node_modules/typebox/package.json +1 -1
  54. package/package.json +5 -5
  55. package/node_modules/baileys/node_modules/process-warning/types/index.test-d.ts +0 -36
@@ -0,0 +1,143 @@
1
+ 'use strict'
2
+
3
+ const { test } = require('node:test')
4
+ const { createWarning } = require('..')
5
+ const { spyWarning } = require('..')
6
+
7
+ test('Spy ProcessWarning - unlimited: false', t => {
8
+ const warning = createWarning({
9
+ name: 'Warning',
10
+ code: 'WRN',
11
+ message: 'Hello %s'
12
+ })
13
+ const spyData = spyWarning(warning)
14
+
15
+ t.assert.strictEqual(warning.emitted, false)
16
+ t.assert.deepStrictEqual(spyData.calls, [])
17
+ t.assert.strictEqual(spyData.callCount(), 0)
18
+
19
+ warning('World')
20
+ t.assert.strictEqual(warning.emitted, true)
21
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
22
+ t.assert.strictEqual(spyData.calls[0].result, true)
23
+ t.assert.strictEqual(spyData.callCount(), 1)
24
+
25
+ warning('World')
26
+ t.assert.strictEqual(warning.emitted, true)
27
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
28
+ t.assert.strictEqual(spyData.calls[0].result, true)
29
+ t.assert.deepStrictEqual(spyData.calls[1].arguments, ['World'])
30
+ t.assert.strictEqual(spyData.calls[1].result, false)
31
+ t.assert.strictEqual(spyData.callCount(), 2)
32
+
33
+ spyData.reset()
34
+ t.assert.strictEqual(warning.emitted, false)
35
+ t.assert.deepStrictEqual(spyData.calls, [])
36
+ t.assert.strictEqual(spyData.callCount(), 0)
37
+
38
+ warning('World')
39
+ t.assert.strictEqual(warning.emitted, true)
40
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
41
+ t.assert.strictEqual(spyData.calls[0].result, true)
42
+ t.assert.strictEqual(spyData.callCount(), 1)
43
+
44
+ spyData.restore()
45
+ t.assert.strictEqual(warning.emitted, false)
46
+ t.assert.deepStrictEqual(spyData.calls, [])
47
+ t.assert.strictEqual(spyData.callCount(), 0)
48
+
49
+ warning('World')
50
+ t.assert.strictEqual(warning.emitted, true)
51
+ t.assert.deepStrictEqual(spyData.calls, [])
52
+ t.assert.strictEqual(spyData.callCount(), 0)
53
+ })
54
+
55
+ test('Spy ProcessWarning - unlimited: true', t => {
56
+ const warning = createWarning({
57
+ name: 'Warning',
58
+ code: 'WRN',
59
+ message: 'Hello %s',
60
+ unlimited: true
61
+ })
62
+ const spyData = spyWarning(warning)
63
+
64
+ t.assert.strictEqual(warning.emitted, false)
65
+ t.assert.deepStrictEqual(spyData.calls, [])
66
+ t.assert.strictEqual(spyData.callCount(), 0)
67
+
68
+ warning('World')
69
+ t.assert.strictEqual(warning.emitted, true)
70
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
71
+ t.assert.strictEqual(spyData.calls[0].result, true)
72
+ t.assert.strictEqual(spyData.callCount(), 1)
73
+
74
+ warning('World')
75
+ t.assert.strictEqual(warning.emitted, true)
76
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
77
+ t.assert.strictEqual(spyData.calls[0].result, true)
78
+ t.assert.deepStrictEqual(spyData.calls[1].arguments, ['World'])
79
+ t.assert.strictEqual(spyData.calls[1].result, true)
80
+ t.assert.strictEqual(spyData.callCount(), 2)
81
+
82
+ spyData.reset()
83
+ t.assert.strictEqual(warning.emitted, false)
84
+ t.assert.deepStrictEqual(spyData.calls, [])
85
+ t.assert.strictEqual(spyData.callCount(), 0)
86
+
87
+ warning('World')
88
+ t.assert.strictEqual(warning.emitted, true)
89
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
90
+ t.assert.strictEqual(spyData.calls[0].result, true)
91
+ t.assert.strictEqual(spyData.callCount(), 1)
92
+
93
+ spyData.restore()
94
+ t.assert.strictEqual(warning.emitted, false)
95
+ t.assert.deepStrictEqual(spyData.calls, [])
96
+ t.assert.strictEqual(spyData.callCount(), 0)
97
+
98
+ warning('World')
99
+ t.assert.strictEqual(warning.emitted, true)
100
+ t.assert.deepStrictEqual(spyData.calls, [])
101
+ t.assert.strictEqual(spyData.callCount(), 0)
102
+ })
103
+
104
+ test('Spy ProcessWarning - calls[].arguments', t => {
105
+ const warning = createWarning({
106
+ name: 'Warning',
107
+ code: 'WRN',
108
+ message: 'Hello %s'
109
+ })
110
+ const spyData = spyWarning(warning)
111
+
112
+ warning(undefined)
113
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, [])
114
+ spyData.reset()
115
+
116
+ warning()
117
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, [])
118
+ spyData.reset()
119
+
120
+ warning('World')
121
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
122
+ spyData.reset()
123
+
124
+ warning('World', 'Hello')
125
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World', 'Hello'])
126
+ spyData.reset()
127
+
128
+ warning(undefined, 'Hello')
129
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, [undefined, 'Hello'])
130
+ spyData.reset()
131
+
132
+ warning('World', 'Hello', 'World')
133
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World', 'Hello', 'World'])
134
+ spyData.reset()
135
+
136
+ warning('World', undefined, 'World')
137
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World', undefined, 'World'])
138
+ spyData.reset()
139
+
140
+ warning(undefined, 'Hello', 'World')
141
+ t.assert.deepStrictEqual(spyData.calls[0].arguments, [undefined, 'Hello', 'World'])
142
+ spyData.reset()
143
+ })
@@ -1,6 +1,6 @@
1
1
  declare namespace processWarning {
2
2
  export interface WarningItem {
3
- (a?: any, b?: any, c?: any): void;
3
+ (a?: any, b?: any, c?: any): boolean;
4
4
  name: string;
5
5
  code: string;
6
6
  message: string;
@@ -22,13 +22,27 @@ declare namespace processWarning {
22
22
  unlimited?: boolean;
23
23
  }
24
24
 
25
+ export type WarningSpyData = {
26
+ calls: WarningCallData[],
27
+ callCount(): number
28
+ reset(): void
29
+ restore(): void
30
+ }
31
+
32
+ export type WarningCallData = {
33
+ arguments: unknown[]
34
+ result: boolean
35
+ }
36
+
25
37
  export type ProcessWarning = {
26
38
  createWarning(params: WarningOptions): WarningItem;
27
39
  createDeprecation(params: DeprecationOptions): WarningItem;
40
+ spyWarning(warning: WarningItem): WarningSpyData
28
41
  }
29
42
 
30
43
  export function createWarning (params: WarningOptions): WarningItem
31
44
  export function createDeprecation (params: DeprecationOptions): WarningItem
45
+ export function spyWarning (warning: WarningItem): WarningSpyData
32
46
 
33
47
  const processWarning: ProcessWarning
34
48
  export { processWarning as default }
@@ -0,0 +1,48 @@
1
+ import { expect } from 'tstyche'
2
+ import { createDeprecation, createWarning, spyWarning, WarningCallData, WarningSpyData } from '..'
3
+
4
+ const WarnInstance = createWarning({
5
+ name: 'TypeScriptWarning',
6
+ code: 'CODE',
7
+ message: 'message'
8
+ })
9
+
10
+ expect(WarnInstance.code).type.toBe<string>()
11
+ expect(WarnInstance.message).type.toBe<string>()
12
+ expect(WarnInstance.name).type.toBe<string>()
13
+ expect(WarnInstance.emitted).type.toBe<boolean>()
14
+ expect(WarnInstance.unlimited).type.toBe<boolean>()
15
+
16
+ expect(WarnInstance()).type.toBe<boolean>()
17
+ expect(WarnInstance('foo')).type.toBe<boolean>()
18
+ expect(WarnInstance('foo', 'bar')).type.toBe<boolean>()
19
+
20
+ const buildWarnUnlimited = createWarning({
21
+ name: 'TypeScriptWarning',
22
+ code: 'CODE',
23
+ message: 'message',
24
+ unlimited: true
25
+ })
26
+
27
+ expect(buildWarnUnlimited.unlimited).type.toBe<boolean>()
28
+
29
+ const DeprecationInstance = createDeprecation({
30
+ code: 'CODE',
31
+ message: 'message'
32
+ })
33
+
34
+ expect(DeprecationInstance.code).type.toBe<string>()
35
+
36
+ expect(DeprecationInstance()).type.toBe<boolean>()
37
+ expect(DeprecationInstance('foo')).type.toBe<boolean>()
38
+ expect(DeprecationInstance('foo', 'bar')).type.toBe<boolean>()
39
+
40
+ const spyData = spyWarning(WarnInstance)
41
+ expect(spyData).type.toBe<WarningSpyData>()
42
+ expect(spyData.calls).type.toBe<WarningCallData[]>()
43
+ expect(spyData.callCount).type.toBe<(() => number)>()
44
+ expect(spyData.callCount()).type.toBe<number>()
45
+ expect(spyData.reset).type.toBe<(() => void)>()
46
+ expect(spyData.reset()).type.toBe<void>()
47
+ expect(spyData.restore).type.toBe<(() => void)>()
48
+ expect(spyData.restore()).type.toBe<void>()
@@ -167,7 +167,9 @@ class PerMessageDeflate {
167
167
  (typeof opts.serverMaxWindowBits === 'number' &&
168
168
  opts.serverMaxWindowBits > params.server_max_window_bits))) ||
169
169
  (typeof opts.clientMaxWindowBits === 'number' &&
170
- !params.client_max_window_bits)
170
+ (typeof params.client_max_window_bits === 'number'
171
+ ? opts.clientMaxWindowBits > params.client_max_window_bits
172
+ : !params.client_max_window_bits))
171
173
  ) {
172
174
  return false;
173
175
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ws",
3
- "version": "8.21.1",
3
+ "version": "8.21.3",
4
4
  "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
5
5
  "keywords": [
6
6
  "HyBi",
@@ -1,4 +1,4 @@
1
- const Email = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\.)*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;
1
+ const Email = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;
2
2
  /**
3
3
  * Returns true if the value is an Email
4
4
  * @specification https://datatracker.ietf.org/doc/html/rfc5322
@@ -1,6 +1,9 @@
1
1
  import * as FormatBidi from './format/bidi.mjs';
2
2
  import * as LabelUnicode from './label/unicode.mjs';
3
3
  import * as LabelPuny from './label/puny.mjs';
4
+ // ------------------------------------------------------------------
5
+ // IsLabel
6
+ // ------------------------------------------------------------------
4
7
  function IsValidLabelLength(value) {
5
8
  return value.length > 0 && value.length <= 63;
6
9
  }
@@ -8,9 +11,24 @@ function IsLabel(value) {
8
11
  return IsValidLabelLength(value) && (LabelPuny.IsPunyLabel(value) ||
9
12
  LabelUnicode.IsUnicodeLabel(value));
10
13
  }
14
+ // ------------------------------------------------------------------
15
+ // NormalizeHostname
16
+ //
17
+ // Normalizes a hostname for label validation. Normalizes for NFC
18
+ // such that equivalent codepoint sequences can be uniformly
19
+ // compared. It also removes codepoints that IDNA mapping ignores,
20
+ // and converts full stop variants to ASCII '.' so the hostname can
21
+ // be split into labels.
22
+ // ------------------------------------------------------------------
11
23
  function NormalizeHostname(value) {
12
- return value.normalize('NFC').replace(/[\u002E\u3002\uFF0E\uFF61]/g, '.');
24
+ return value
25
+ .normalize('NFC')
26
+ .replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu, '') // RE_IGNORED_MAPPING
27
+ .replace(/[\u002E\u3002\uFF0E\uFF61]/g, '.'); // RE_FULL_STOP_MAPPING
13
28
  }
29
+ // ------------------------------------------------------------------
30
+ // IsIdnHostname
31
+ // ------------------------------------------------------------------
14
32
  export function IsIdnHostname(value) {
15
33
  if (value.length === 0 || value.includes(' '))
16
34
  return false;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
4
- "version": "1.3.16",
4
+ "version": "1.3.17",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "jsonschema"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/whatsapp",
3
- "version": "2026.8.1",
3
+ "version": "2026.8.2",
4
4
  "description": "OpenClaw WhatsApp channel plugin for WhatsApp Web chats.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,10 +10,10 @@
10
10
  "dependencies": {
11
11
  "audio-decode": "2.2.3",
12
12
  "baileys": "7.0.0-rc14",
13
- "typebox": "1.3.16"
13
+ "typebox": "1.3.17"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.8.1"
16
+ "openclaw": ">=2026.8.2"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -65,10 +65,10 @@
65
65
  "minHostVersion": ">=2026.4.25"
66
66
  },
67
67
  "compat": {
68
- "pluginApi": ">=2026.8.1"
68
+ "pluginApi": ">=2026.8.2"
69
69
  },
70
70
  "build": {
71
- "openclawVersion": "2026.8.1"
71
+ "openclawVersion": "2026.8.2"
72
72
  },
73
73
  "release": {
74
74
  "publishToClawHub": true,
@@ -1,36 +0,0 @@
1
- import { expectType } from 'tsd'
2
- import { createWarning, createDeprecation } from '..'
3
-
4
- const WarnInstance = createWarning({
5
- name: 'TypeScriptWarning',
6
- code: 'CODE',
7
- message: 'message'
8
- })
9
-
10
- expectType<string>(WarnInstance.code)
11
- expectType<string>(WarnInstance.message)
12
- expectType<string>(WarnInstance.name)
13
- expectType<boolean>(WarnInstance.emitted)
14
- expectType<boolean>(WarnInstance.unlimited)
15
-
16
- expectType<void>(WarnInstance())
17
- expectType<void>(WarnInstance('foo'))
18
- expectType<void>(WarnInstance('foo', 'bar'))
19
-
20
- const buildWarnUnlimited = createWarning({
21
- name: 'TypeScriptWarning',
22
- code: 'CODE',
23
- message: 'message',
24
- unlimited: true
25
- })
26
- expectType<boolean>(buildWarnUnlimited.unlimited)
27
-
28
- const DeprecationInstance = createDeprecation({
29
- code: 'CODE',
30
- message: 'message'
31
- })
32
- expectType<string>(DeprecationInstance.code)
33
-
34
- DeprecationInstance()
35
- DeprecationInstance('foo')
36
- DeprecationInstance('foo', 'bar')