wingbot 3.76.13 → 3.76.14
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/index.js
CHANGED
|
@@ -25,6 +25,7 @@ const Plugins = require('./src/Plugins');
|
|
|
25
25
|
const NotificationsStorage = require('./src/notifications/NotificationsStorage');
|
|
26
26
|
const Notifications = require('./src/notifications/Notifications');
|
|
27
27
|
const MemoryBotConfigStorage = require('./src/tools/MemoryBotConfigStorage');
|
|
28
|
+
const MemoryChatLogStorage = require('./src/tools/MemoryChatLogStorage');
|
|
28
29
|
const routeToEvents = require('./src/tools/routeToEvents');
|
|
29
30
|
const GraphApi = require('./src/graphApi/GraphApi');
|
|
30
31
|
const validateBotApi = require('./src/graphApi/validateBotApi');
|
|
@@ -91,6 +92,7 @@ module.exports = {
|
|
|
91
92
|
bufferloader,
|
|
92
93
|
asserts,
|
|
93
94
|
MemoryStateStorage,
|
|
95
|
+
MemoryChatLogStorage,
|
|
94
96
|
CallbackAuditLog,
|
|
95
97
|
MemoryBotConfigStorage,
|
|
96
98
|
CachedModel,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wingbot",
|
|
3
|
-
"version": "3.76.
|
|
3
|
+
"version": "3.76.14",
|
|
4
4
|
"description": "Enterprise Messaging Bot Conversation Engine",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"cpy-cli": "^5.0.0",
|
|
44
44
|
"eslint": "^8.56.0",
|
|
45
45
|
"eslint-config-airbnb": "^19.0.4",
|
|
46
|
-
"eslint-
|
|
46
|
+
"eslint-import-resolver-node": "^0.4.0",
|
|
47
|
+
"eslint-plugin-import": "^2.32.0",
|
|
47
48
|
"eslint-plugin-jsdoc": "^48.0.2",
|
|
48
49
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
49
50
|
"eslint-plugin-mocha": "^10.2.0",
|
|
@@ -69,11 +70,15 @@
|
|
|
69
70
|
"jsonwebtoken": "^9.0.2",
|
|
70
71
|
"node-fetch": "^2.6.7",
|
|
71
72
|
"path-to-regexp": "^6.3.0",
|
|
72
|
-
"uuid": "^
|
|
73
|
+
"uuid": "^14.0.2",
|
|
73
74
|
"webalize": "^0.1.0"
|
|
74
75
|
},
|
|
75
76
|
"optionalDependencies": {
|
|
76
77
|
"axios": "^1.6.4",
|
|
77
78
|
"handlebars": "^4.0.0"
|
|
79
|
+
},
|
|
80
|
+
"allowScripts": {
|
|
81
|
+
"fsevents@2.3.2": true,
|
|
82
|
+
"mongodb-memory-server@11.0.1": true
|
|
78
83
|
}
|
|
79
|
-
}
|
|
84
|
+
}
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
const uuid = require('uuid');
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* @typedef {object} Tag
|
|
10
8
|
* @prop {string} tag
|
|
@@ -120,7 +118,7 @@ class NotificationsStorage {
|
|
|
120
118
|
* @param {object} tasks
|
|
121
119
|
* @returns {Promise<Task[]>}
|
|
122
120
|
*/
|
|
123
|
-
pushTasks (tasks) {
|
|
121
|
+
async pushTasks (tasks) {
|
|
124
122
|
|
|
125
123
|
// upsert through unique KEY (only single sliding campaign in queue)
|
|
126
124
|
// [campaignId,senderId,pageId,sent]
|
|
@@ -152,6 +150,9 @@ class NotificationsStorage {
|
|
|
152
150
|
return override;
|
|
153
151
|
});
|
|
154
152
|
|
|
153
|
+
// eslint-disable-next-line import/no-unresolved
|
|
154
|
+
const uuid = await import('uuid');
|
|
155
|
+
|
|
155
156
|
const insert = tasks.map((t) => ({
|
|
156
157
|
...t,
|
|
157
158
|
id: uuid.v4(),
|
|
@@ -162,7 +163,7 @@ class NotificationsStorage {
|
|
|
162
163
|
this._tasks.push(...insert);
|
|
163
164
|
|
|
164
165
|
this._tasks.sort((a, b) => a.enqueue - b.enqueue);
|
|
165
|
-
return
|
|
166
|
+
return ret;
|
|
166
167
|
}
|
|
167
168
|
|
|
168
169
|
popTasks (limit, until = Date.now()) {
|
|
@@ -306,6 +307,8 @@ class NotificationsStorage {
|
|
|
306
307
|
async upsertCampaign (campaign, updateCampaign = null) {
|
|
307
308
|
let insert = campaign;
|
|
308
309
|
if (!insert.id) {
|
|
310
|
+
// eslint-disable-next-line import/no-unresolved
|
|
311
|
+
const uuid = await import('uuid');
|
|
309
312
|
insert = { ...insert, id: uuid.v4() };
|
|
310
313
|
}
|
|
311
314
|
if (!this._campaigns.has(insert.id)) {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(npx mocha:*)",
|
|
5
|
-
"Bash(npx tsc *)",
|
|
6
|
-
"Bash(npm test *)",
|
|
7
|
-
"Bash(node -e \"const p = require\\('./bot/plugins/BTMLLM'\\); console.log\\('factory type:', typeof p\\); console.log\\('factory name:', p.name\\);\")",
|
|
8
|
-
"Bash(grep -n \"prompt\\\\`\\\\|tagged\\\\|render\\\\|compile\\\\|hbs\" /Users/ondrejveres/Wingbot/wingbot-llm/src/prompt.js)"
|
|
9
|
-
]
|
|
10
|
-
}
|
|
11
|
-
}
|