@elizaos/plugin-whatsapp 2.0.0-alpha.9 → 2.0.3-beta.5

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 (56) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +176 -0
  3. package/auto-enable.ts +21 -0
  4. package/dist/.tsbuildinfo +1 -0
  5. package/dist/accounts.d.ts +205 -0
  6. package/dist/accounts.d.ts.map +1 -0
  7. package/dist/api/whatsapp-routes.d.ts +53 -0
  8. package/dist/api/whatsapp-routes.d.ts.map +1 -0
  9. package/dist/baileys/auth.d.ts +10 -0
  10. package/dist/baileys/auth.d.ts.map +1 -0
  11. package/dist/baileys/connection.d.ts +19 -0
  12. package/dist/baileys/connection.d.ts.map +1 -0
  13. package/dist/baileys/message-adapter.d.ts +14 -0
  14. package/dist/baileys/message-adapter.d.ts.map +1 -0
  15. package/dist/baileys/qr-code.d.ts +6 -0
  16. package/dist/baileys/qr-code.d.ts.map +1 -0
  17. package/dist/client.d.ts +99 -0
  18. package/dist/client.d.ts.map +1 -0
  19. package/dist/clients/baileys-client.d.ts +18 -0
  20. package/dist/clients/baileys-client.d.ts.map +1 -0
  21. package/dist/clients/factory.d.ts +6 -0
  22. package/dist/clients/factory.d.ts.map +1 -0
  23. package/dist/clients/interface.d.ts +10 -0
  24. package/dist/clients/interface.d.ts.map +1 -0
  25. package/dist/config.d.ts +135 -0
  26. package/dist/config.d.ts.map +1 -0
  27. package/dist/connector-account-provider.d.ts +19 -0
  28. package/dist/connector-account-provider.d.ts.map +1 -0
  29. package/dist/index.d.ts +14 -2
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +2526 -854
  32. package/dist/index.js.map +23 -19
  33. package/dist/media.d.ts +2 -0
  34. package/dist/media.d.ts.map +1 -0
  35. package/dist/normalize.d.ts +69 -0
  36. package/dist/normalize.d.ts.map +1 -0
  37. package/dist/pairing-service.d.ts +41 -0
  38. package/dist/pairing-service.d.ts.map +1 -0
  39. package/dist/qrcode-terminal-types.d.ts +6 -0
  40. package/dist/qrcode-terminal-types.d.ts.map +1 -0
  41. package/dist/runtime-service.d.ts +125 -0
  42. package/dist/runtime-service.d.ts.map +1 -0
  43. package/dist/services/whatsapp-pairing.d.ts +41 -0
  44. package/dist/services/whatsapp-pairing.d.ts.map +1 -0
  45. package/dist/setup-routes.d.ts +26 -0
  46. package/dist/setup-routes.d.ts.map +1 -0
  47. package/dist/types.d.ts +370 -0
  48. package/dist/types.d.ts.map +1 -0
  49. package/dist/utils/config-detector.d.ts +3 -0
  50. package/dist/utils/config-detector.d.ts.map +1 -0
  51. package/dist/webhook-auth.d.ts +11 -0
  52. package/dist/webhook-auth.d.ts.map +1 -0
  53. package/dist/workflow-credential-provider.d.ts +21 -0
  54. package/dist/workflow-credential-provider.d.ts.map +1 -0
  55. package/package.json +162 -131
  56. package/registry-entry.json +128 -0
package/package.json CHANGED
@@ -1,133 +1,164 @@
1
1
  {
2
- "name": "@elizaos/plugin-whatsapp",
3
- "description": "WhatsApp plugin for ElizaOS (Cloud API + Baileys QR auth)",
4
- "version": "2.0.0-alpha.9",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "module": "dist/index.js",
8
- "types": "dist/index.d.ts",
9
- "packageType": "plugin",
10
- "platform": "node",
11
- "license": "MIT",
12
- "keywords": [
13
- "plugin",
14
- "elizaos",
15
- "whatsapp"
16
- ],
17
- "repository": {
18
- "type": "git",
19
- "url": "https://github.com/elizaos/eliza"
20
- },
21
- "exports": {
22
- "./package.json": "./package.json",
23
- ".": {
24
- "import": {
25
- "types": "./dist/index.d.ts",
26
- "default": "./dist/index.js"
27
- }
28
- }
29
- },
30
- "files": [
31
- "dist",
32
- "README.md",
33
- "package.json"
34
- ],
35
- "dependencies": {
36
- "@hapi/boom": "^10.0.1",
37
- "@whiskeysockets/baileys": "^7.0.0-rc.9",
38
- "axios": "1.7.8",
39
- "pino": "^9.6.0",
40
- "qrcode": "^1.5.4",
41
- "qrcode-terminal": "^0.12.0"
42
- },
43
- "peerDependencies": {
44
- "@elizaos/core": "2.0.0-alpha.3"
45
- },
46
- "devDependencies": {
47
- "@biomejs/biome": "^2.3.11",
48
- "@types/node": "^25.0.3",
49
- "@types/qrcode": "^1.5.6",
50
- "@types/qrcode-terminal": "^0.12.2",
51
- "typescript": "^5.9.3",
52
- "vitest": "^3.2.4"
53
- },
54
- "scripts": {
55
- "dev": "bun --hot build.ts",
56
- "test": "vitest run --passWithNoTests",
57
- "lint": "echo \"Lint skipped for release\"",
58
- "typecheck": "echo \"Typecheck skipped for release\"",
59
- "clean": "rm -rf dist .turbo",
60
- "lint:check": "bun run lint",
61
- "build": "bun run build.ts",
62
- "build:ts": "bun run build.ts",
63
- "format": "bunx @biomejs/biome format --write .",
64
- "format:check": "bunx @biomejs/biome format ."
65
- },
66
- "publishConfig": {
67
- "access": "public"
68
- },
69
- "agentConfig": {
70
- "pluginParameters": {
71
- "WHATSAPP_ACCESS_TOKEN": {
72
- "type": "string",
73
- "description": "Access token for WhatsApp Cloud API (required for cloudapi auth)",
74
- "required": false,
75
- "sensitive": true
76
- },
77
- "WHATSAPP_PHONE_NUMBER_ID": {
78
- "type": "string",
79
- "description": "Phone number ID for WhatsApp Cloud API (required for cloudapi auth)",
80
- "required": false,
81
- "sensitive": false
82
- },
83
- "WHATSAPP_AUTH_METHOD": {
84
- "type": "string",
85
- "description": "Authentication method: cloudapi or baileys",
86
- "required": false,
87
- "sensitive": false
88
- },
89
- "WHATSAPP_AUTH_DIR": {
90
- "type": "string",
91
- "description": "Directory used to persist Baileys session files (required for baileys auth)",
92
- "required": false,
93
- "sensitive": false
94
- },
95
- "WHATSAPP_PRINT_QR": {
96
- "type": "boolean",
97
- "description": "Print QR code in terminal when using Baileys auth",
98
- "required": false,
99
- "sensitive": false
100
- },
101
- "WHATSAPP_WEBHOOK_VERIFY_TOKEN": {
102
- "type": "string",
103
- "description": "Webhook verification token",
104
- "required": false,
105
- "sensitive": true
106
- },
107
- "WHATSAPP_BUSINESS_ACCOUNT_ID": {
108
- "type": "string",
109
- "description": "Business account ID",
110
- "required": false,
111
- "sensitive": false
112
- },
113
- "WHATSAPP_API_VERSION": {
114
- "type": "string",
115
- "description": "API version string",
116
- "required": false,
117
- "sensitive": false
118
- },
119
- "WHATSAPP_DM_POLICY": {
120
- "type": "string",
121
- "description": "DM policy (e.g. allow, deny, allowlist)",
122
- "required": false,
123
- "sensitive": false
124
- },
125
- "WHATSAPP_GROUP_POLICY": {
126
- "type": "string",
127
- "description": "Group message policy",
128
- "required": false,
129
- "sensitive": false
130
- }
131
- }
132
- }
2
+ "name": "@elizaos/plugin-whatsapp",
3
+ "description": "WhatsApp plugin for ElizaOS (Cloud API + Baileys QR auth)",
4
+ "version": "2.0.3-beta.5",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.js",
8
+ "types": "dist/src/index.d.ts",
9
+ "packageType": "plugin",
10
+ "platform": "node",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "plugin",
14
+ "elizaos",
15
+ "whatsapp"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/elizaos/eliza"
20
+ },
21
+ "exports": {
22
+ "./package.json": "./package.json",
23
+ ".": {
24
+ "eliza-source": {
25
+ "types": "./src/index.ts",
26
+ "import": "./src/index.ts",
27
+ "default": "./src/index.ts"
28
+ },
29
+ "import": {
30
+ "types": "./dist/src/index.d.ts",
31
+ "default": "./dist/index.js"
32
+ }
33
+ },
34
+ "./*.css": "./dist/*.css",
35
+ "./*": {
36
+ "types": "./dist/*.d.ts",
37
+ "eliza-source": {
38
+ "types": "./src/*.ts",
39
+ "import": "./src/*.ts",
40
+ "default": "./src/*.ts"
41
+ },
42
+ "import": "./dist/*.js",
43
+ "default": "./dist/*.js"
44
+ }
45
+ },
46
+ "files": [
47
+ "registry-entry.json",
48
+ "dist",
49
+ "README.md",
50
+ "package.json",
51
+ "auto-enable.ts"
52
+ ],
53
+ "elizaos": {
54
+ "plugin": {
55
+ "autoEnableModule": "./auto-enable.ts",
56
+ "capabilities": [
57
+ "messaging"
58
+ ]
59
+ }
60
+ },
61
+ "dependencies": {
62
+ "@hapi/boom": "^10.0.1",
63
+ "@whiskeysockets/baileys": "^7.0.0-rc.9",
64
+ "pino": "^10.3.1",
65
+ "qrcode": "^1.5.4",
66
+ "qrcode-terminal": "^0.12.0"
67
+ },
68
+ "peerDependencies": {
69
+ "@elizaos/core": "2.0.3-beta.5"
70
+ },
71
+ "devDependencies": {
72
+ "@biomejs/biome": "^2.4.14",
73
+ "@types/node": "^25.0.3",
74
+ "@types/qrcode": "^1.5.5",
75
+ "typescript": "^6.0.3",
76
+ "vitest": "^4.0.0"
77
+ },
78
+ "scripts": {
79
+ "dev": "bun --hot build.ts",
80
+ "test": "vitest run --config ./vitest.config.ts",
81
+ "lint": "bunx @biomejs/biome check --write --config-path ./biome.json .",
82
+ "typecheck": "tsgo --noEmit -p tsconfig.json",
83
+ "clean": "node ../../packages/scripts/rm-path-recursive.mjs dist .turbo",
84
+ "lint:check": "bunx @biomejs/biome check --config-path ./biome.json .",
85
+ "build": "bun run build.ts",
86
+ "build:ts": "bun run build.ts",
87
+ "format": "bunx @biomejs/biome format --write --config-path ./biome.json .",
88
+ "format:check": "bunx @biomejs/biome format --config-path ./biome.json ."
89
+ },
90
+ "publishConfig": {
91
+ "access": "public"
92
+ },
93
+ "agentConfig": {
94
+ "pluginParameters": {
95
+ "WHATSAPP_ACCESS_TOKEN": {
96
+ "type": "string",
97
+ "description": "Access token for WhatsApp Cloud API (required for cloudapi auth)",
98
+ "required": false,
99
+ "sensitive": true
100
+ },
101
+ "WHATSAPP_PHONE_NUMBER_ID": {
102
+ "type": "string",
103
+ "description": "Phone number ID for WhatsApp Cloud API (required for cloudapi auth)",
104
+ "required": false,
105
+ "sensitive": false
106
+ },
107
+ "WHATSAPP_AUTH_METHOD": {
108
+ "type": "string",
109
+ "description": "Authentication method: cloudapi or baileys",
110
+ "required": false,
111
+ "sensitive": false
112
+ },
113
+ "WHATSAPP_AUTH_DIR": {
114
+ "type": "string",
115
+ "description": "Directory used to persist Baileys session files (required for baileys auth)",
116
+ "required": false,
117
+ "sensitive": false
118
+ },
119
+ "WHATSAPP_PRINT_QR": {
120
+ "type": "boolean",
121
+ "description": "Print QR code in terminal when using Baileys auth",
122
+ "required": false,
123
+ "sensitive": false
124
+ },
125
+ "WHATSAPP_WEBHOOK_VERIFY_TOKEN": {
126
+ "type": "string",
127
+ "description": "Webhook verification token",
128
+ "required": false,
129
+ "sensitive": true
130
+ },
131
+ "WHATSAPP_APP_SECRET": {
132
+ "type": "string",
133
+ "description": "WhatsApp App Secret used to verify X-Hub-Signature-256 on webhook POSTs (required for Cloud API webhooks)",
134
+ "required": false,
135
+ "sensitive": true
136
+ },
137
+ "WHATSAPP_BUSINESS_ACCOUNT_ID": {
138
+ "type": "string",
139
+ "description": "Business account ID",
140
+ "required": false,
141
+ "sensitive": false
142
+ },
143
+ "WHATSAPP_API_VERSION": {
144
+ "type": "string",
145
+ "description": "API version string",
146
+ "required": false,
147
+ "sensitive": false
148
+ },
149
+ "WHATSAPP_DM_POLICY": {
150
+ "type": "string",
151
+ "description": "DM policy (e.g. allow, deny, allowlist)",
152
+ "required": false,
153
+ "sensitive": false
154
+ },
155
+ "WHATSAPP_GROUP_POLICY": {
156
+ "type": "string",
157
+ "description": "Group message policy",
158
+ "required": false,
159
+ "sensitive": false
160
+ }
161
+ }
162
+ },
163
+ "gitHead": "ff6157011c9459670021cc28a6797592a78b8817"
133
164
  }
@@ -0,0 +1,128 @@
1
+ {
2
+ "id": "whatsapp",
3
+ "name": "Whatsapp",
4
+ "description": "A plugin for integrating WhatsApp Cloud API with applications, enabling messaging capabilities and webhook handling.",
5
+ "npmName": "@elizaos/plugin-whatsapp",
6
+ "version": "2.0.0-beta.0",
7
+ "source": "bundled",
8
+ "tags": [
9
+ "whatsapp",
10
+ "connector",
11
+ "social",
12
+ "social-chat",
13
+ "messaging"
14
+ ],
15
+ "config": {
16
+ "WHATSAPP_ACCESS_TOKEN": {
17
+ "type": "secret",
18
+ "required": false,
19
+ "sensitive": true,
20
+ "label": "Access Token",
21
+ "help": "Access token for WhatsApp Cloud API (required for cloudapi auth)",
22
+ "advanced": false
23
+ },
24
+ "WHATSAPP_PHONE_NUMBER_ID": {
25
+ "type": "string",
26
+ "required": false,
27
+ "sensitive": false,
28
+ "label": "Phone Number Id",
29
+ "help": "Phone number ID for WhatsApp Cloud API (required for cloudapi auth)",
30
+ "advanced": false
31
+ },
32
+ "WHATSAPP_AUTH_METHOD": {
33
+ "type": "string",
34
+ "required": false,
35
+ "sensitive": false,
36
+ "label": "Auth Method",
37
+ "help": "Authentication method: cloudapi or baileys",
38
+ "advanced": false
39
+ },
40
+ "WHATSAPP_AUTH_DIR": {
41
+ "type": "file-path",
42
+ "required": false,
43
+ "sensitive": false,
44
+ "label": "Auth Dir",
45
+ "help": "Directory used to persist Baileys session files (required for baileys auth)",
46
+ "advanced": false
47
+ },
48
+ "WHATSAPP_PRINT_QR": {
49
+ "type": "boolean",
50
+ "required": false,
51
+ "sensitive": false,
52
+ "label": "Print Qr",
53
+ "help": "Print QR code in terminal when using Baileys auth",
54
+ "advanced": false
55
+ },
56
+ "WHATSAPP_WEBHOOK_VERIFY_TOKEN": {
57
+ "type": "secret",
58
+ "required": false,
59
+ "sensitive": true,
60
+ "label": "Webhook Verify Token",
61
+ "help": "Webhook verification token",
62
+ "advanced": false
63
+ },
64
+ "WHATSAPP_BUSINESS_ACCOUNT_ID": {
65
+ "type": "number",
66
+ "required": false,
67
+ "sensitive": false,
68
+ "label": "Business Account Id",
69
+ "help": "Business account ID",
70
+ "advanced": false,
71
+ "min": 0
72
+ },
73
+ "WHATSAPP_API_VERSION": {
74
+ "type": "string",
75
+ "required": false,
76
+ "sensitive": false,
77
+ "label": "Api Version",
78
+ "help": "API version string",
79
+ "advanced": false
80
+ },
81
+ "WHATSAPP_DM_POLICY": {
82
+ "type": "string",
83
+ "required": false,
84
+ "sensitive": false,
85
+ "label": "Dm Policy",
86
+ "help": "DM policy (e.g. allow, deny, allowlist)",
87
+ "advanced": false
88
+ },
89
+ "WHATSAPP_GROUP_POLICY": {
90
+ "type": "string",
91
+ "required": false,
92
+ "sensitive": false,
93
+ "label": "Group Policy",
94
+ "help": "Group message policy",
95
+ "advanced": false
96
+ }
97
+ },
98
+ "render": {
99
+ "visible": true,
100
+ "pinTo": [],
101
+ "style": "setup-panel",
102
+ "icon": "Smartphone",
103
+ "group": "connector",
104
+ "groupOrder": 1,
105
+ "actions": [
106
+ "enable",
107
+ "configure",
108
+ "setup-guide"
109
+ ]
110
+ },
111
+ "resources": {
112
+ "homepage": "https://github.com/elizaos/eliza#readme",
113
+ "repository": "https://github.com/elizaos/eliza",
114
+ "setupGuideUrl": "https://docs.eliza.ai/plugin-setup-guide#whatsapp"
115
+ },
116
+ "dependsOn": [],
117
+ "kind": "connector",
118
+ "subtype": "messaging",
119
+ "auth": {
120
+ "kind": "token",
121
+ "credentialKeys": [
122
+ "WHATSAPP_ACCESS_TOKEN"
123
+ ]
124
+ },
125
+ "channels": [
126
+ "whatsapp"
127
+ ]
128
+ }