@futdevpro/nts-dynamo 1.14.8 → 1.14.10
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/build/_collections/global-settings.const.d.ts.map +1 -1
- package/build/_collections/global-settings.const.js +1 -0
- package/build/_collections/global-settings.const.js.map +1 -1
- package/build/_models/interfaces/global-settings.interface.d.ts +18 -2
- package/build/_models/interfaces/global-settings.interface.d.ts.map +1 -1
- package/build/_modules/assistant/_collections/ass-global-settings.const.d.ts +3 -0
- package/build/_modules/assistant/_collections/ass-global-settings.const.d.ts.map +1 -0
- package/build/_modules/assistant/_collections/ass-global-settings.const.js +15 -0
- package/build/_modules/assistant/_collections/ass-global-settings.const.js.map +1 -0
- package/build/_modules/assistant/_collections/ass.util.d.ts +16 -0
- package/build/_modules/assistant/_collections/ass.util.d.ts.map +1 -0
- package/build/_modules/assistant/_collections/ass.util.js +43 -0
- package/build/_modules/assistant/_collections/ass.util.js.map +1 -0
- package/build/_modules/assistant/_models/ass-global-settings.interface.d.ts +14 -0
- package/build/_modules/assistant/_models/ass-global-settings.interface.d.ts.map +1 -0
- package/build/_modules/assistant/_models/ass-global-settings.interface.js +3 -0
- package/build/_modules/assistant/_models/ass-global-settings.interface.js.map +1 -0
- package/build/_modules/assistant/_services/ass-io.control-service.d.ts +23 -0
- package/build/_modules/assistant/_services/ass-io.control-service.d.ts.map +1 -0
- package/build/_modules/assistant/_services/ass-io.control-service.js +59 -0
- package/build/_modules/assistant/_services/ass-io.control-service.js.map +1 -0
- package/build/_modules/assistant/_services/ass-main.control-service.d.ts +15 -0
- package/build/_modules/assistant/_services/ass-main.control-service.d.ts.map +1 -0
- package/build/_modules/assistant/_services/ass-main.control-service.js +12 -0
- package/build/_modules/assistant/_services/ass-main.control-service.js.map +1 -0
- package/build/_modules/assistant/_services/ass.service-base.d.ts +31 -0
- package/build/_modules/assistant/_services/ass.service-base.d.ts.map +1 -0
- package/build/_modules/assistant/_services/ass.service-base.js +56 -0
- package/build/_modules/assistant/_services/ass.service-base.js.map +1 -0
- package/build/_modules/assistant/index.d.ts +7 -0
- package/build/_modules/assistant/index.d.ts.map +1 -0
- package/build/_modules/assistant/index.js +19 -0
- package/build/_modules/assistant/index.js.map +1 -0
- package/build/_modules/bot/_collections/bot-default-commands.const.d.ts +3 -0
- package/build/_modules/bot/_collections/bot-default-commands.const.d.ts.map +1 -0
- package/build/_modules/bot/_collections/bot-default-commands.const.js +14 -0
- package/build/_modules/bot/_collections/bot-default-commands.const.js.map +1 -0
- package/build/_modules/bot/_collections/bot-global-settings.const.d.ts +3 -0
- package/build/_modules/bot/_collections/bot-global-settings.const.d.ts.map +1 -0
- package/build/_modules/bot/_collections/bot-global-settings.const.js +32 -0
- package/build/_modules/bot/_collections/bot-global-settings.const.js.map +1 -0
- package/build/_modules/bot/_collections/bot-operations.util.d.ts +21 -0
- package/build/_modules/bot/_collections/bot-operations.util.d.ts.map +1 -0
- package/build/_modules/bot/_collections/bot-operations.util.js +74 -0
- package/build/_modules/bot/_collections/bot-operations.util.js.map +1 -0
- package/build/_modules/bot/_enums/bot-provider.enum.d.ts +7 -0
- package/build/_modules/bot/_enums/bot-provider.enum.d.ts.map +1 -0
- package/build/_modules/bot/_enums/bot-provider.enum.js +11 -0
- package/build/_modules/bot/_enums/bot-provider.enum.js.map +1 -0
- package/build/_modules/bot/_models/bot-channel.interface.d.ts +8 -0
- package/build/_modules/bot/_models/bot-channel.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-channel.interface.js +3 -0
- package/build/_modules/bot/_models/bot-channel.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-command.interface.d.ts +8 -0
- package/build/_modules/bot/_models/bot-command.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-command.interface.js +3 -0
- package/build/_modules/bot/_models/bot-command.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-global-settings.interface.d.ts +79 -0
- package/build/_modules/bot/_models/bot-global-settings.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-global-settings.interface.js +3 -0
- package/build/_modules/bot/_models/bot-global-settings.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-last-mention-date.interface.d.ts +7 -0
- package/build/_modules/bot/_models/bot-last-mention-date.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-last-mention-date.interface.js +3 -0
- package/build/_modules/bot/_models/bot-last-mention-date.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-last-message-date.interface.d.ts +6 -0
- package/build/_modules/bot/_models/bot-last-message-date.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-last-message-date.interface.js +3 -0
- package/build/_modules/bot/_models/bot-last-message-date.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-message.interface.d.ts +15 -0
- package/build/_modules/bot/_models/bot-message.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-message.interface.js +3 -0
- package/build/_modules/bot/_models/bot-message.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-provider.interface.d.ts +60 -0
- package/build/_modules/bot/_models/bot-provider.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-provider.interface.js +3 -0
- package/build/_modules/bot/_models/bot-provider.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-user.interface.d.ts +8 -0
- package/build/_modules/bot/_models/bot-user.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-user.interface.js +3 -0
- package/build/_modules/bot/_models/bot-user.interface.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts +11 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.js +13 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts +5 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js +19 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.d.ts +8 -0
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js +3 -0
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.d.ts +53 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.js +369 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/index.d.ts +5 -0
- package/build/_modules/bot/_modules/discord-bot/index.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/index.js +16 -0
- package/build/_modules/bot/_modules/discord-bot/index.js.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts +11 -0
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.js +13 -0
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.js.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts +7 -0
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.js +3 -0
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.js.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.d.ts +40 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.js +116 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.js.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/index.d.ts +4 -0
- package/build/_modules/bot/_modules/slack-bot/index.d.ts.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/index.js +15 -0
- package/build/_modules/bot/_modules/slack-bot/index.js.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts +11 -0
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.js +13 -0
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.js.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts +7 -0
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.js +3 -0
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.js.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.d.ts +40 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.js +116 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.js.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/index.d.ts +4 -0
- package/build/_modules/bot/_modules/teams-bot/index.d.ts.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/index.js +15 -0
- package/build/_modules/bot/_modules/teams-bot/index.js.map +1 -0
- package/build/_modules/bot/_services/bot-commands.control-service.d.ts +15 -0
- package/build/_modules/bot/_services/bot-commands.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-commands.control-service.js +72 -0
- package/build/_modules/bot/_services/bot-commands.control-service.js.map +1 -0
- package/build/_modules/bot/_services/bot-io.control-service.d.ts +24 -0
- package/build/_modules/bot/_services/bot-io.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-io.control-service.js +207 -0
- package/build/_modules/bot/_services/bot-io.control-service.js.map +1 -0
- package/build/_modules/bot/_services/bot-main.control-service.d.ts +42 -0
- package/build/_modules/bot/_services/bot-main.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-main.control-service.js +223 -0
- package/build/_modules/bot/_services/bot-main.control-service.js.map +1 -0
- package/build/_modules/bot/_services/bot-provider-factory.service.d.ts +5 -0
- package/build/_modules/bot/_services/bot-provider-factory.service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-provider-factory.service.js +28 -0
- package/build/_modules/bot/_services/bot-provider-factory.service.js.map +1 -0
- package/build/_modules/bot/_services/bot-routines.control-service.d.ts +17 -0
- package/build/_modules/bot/_services/bot-routines.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-routines.control-service.js +40 -0
- package/build/_modules/bot/_services/bot-routines.control-service.js.map +1 -0
- package/build/_modules/bot/index.d.ts +21 -0
- package/build/_modules/bot/index.d.ts.map +1 -0
- package/build/_modules/bot/index.js +35 -0
- package/build/_modules/bot/index.js.map +1 -0
- package/build/_modules/defaults/_models/default-user.data-model.d.ts +20 -0
- package/build/_modules/defaults/_models/default-user.data-model.d.ts.map +1 -0
- package/build/_modules/defaults/_models/default-user.data-model.js +73 -0
- package/build/_modules/defaults/_models/default-user.data-model.js.map +1 -0
- package/build/_modules/defaults/_services/default-auth.service.d.ts +51 -0
- package/build/_modules/defaults/_services/default-auth.service.d.ts.map +1 -0
- package/build/_modules/defaults/_services/default-auth.service.js +159 -0
- package/build/_modules/defaults/_services/default-auth.service.js.map +1 -0
- package/build/_modules/defaults/_services/default-socket-events.service.d.ts +24 -0
- package/build/_modules/defaults/_services/default-socket-events.service.d.ts.map +1 -0
- package/build/_modules/defaults/_services/default-socket-events.service.js +61 -0
- package/build/_modules/defaults/_services/default-socket-events.service.js.map +1 -0
- package/build/_modules/defaults/_services/default-user.data-service.d.ts +25 -0
- package/build/_modules/defaults/_services/default-user.data-service.d.ts.map +1 -0
- package/build/_modules/defaults/_services/default-user.data-service.js +88 -0
- package/build/_modules/defaults/_services/default-user.data-service.js.map +1 -0
- package/build/_modules/defaults/index.d.ts +5 -0
- package/build/_modules/defaults/index.d.ts.map +1 -0
- package/build/_modules/defaults/index.js +16 -0
- package/build/_modules/defaults/index.js.map +1 -0
- package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts +6 -0
- package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts.map +1 -0
- package/build/_modules/messaging/_collections/msg-global-settings.const.js +27 -0
- package/build/_modules/messaging/_collections/msg-global-settings.const.js.map +1 -0
- package/build/_modules/messaging/_collections/msg.util.d.ts +25 -0
- package/build/_modules/messaging/_collections/msg.util.d.ts.map +1 -0
- package/build/_modules/messaging/_collections/msg.util.js +63 -0
- package/build/_modules/messaging/_collections/msg.util.js.map +1 -0
- package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts +38 -0
- package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts.map +1 -0
- package/build/_modules/messaging/_models/msg-global-settings.interface.js +3 -0
- package/build/_modules/messaging/_models/msg-global-settings.interface.js.map +1 -0
- package/build/_modules/messaging/_services/msg-conversation.data-service.d.ts +29 -0
- package/build/_modules/messaging/_services/msg-conversation.data-service.d.ts.map +1 -0
- package/build/_modules/messaging/_services/msg-conversation.data-service.js +110 -0
- package/build/_modules/messaging/_services/msg-conversation.data-service.js.map +1 -0
- package/build/_modules/messaging/_services/msg-events.service.d.ts +62 -0
- package/build/_modules/messaging/_services/msg-events.service.d.ts.map +1 -0
- package/build/_modules/messaging/_services/msg-events.service.js +204 -0
- package/build/_modules/messaging/_services/msg-events.service.js.map +1 -0
- package/build/_modules/messaging/_services/msg-integration.control-service.d.ts +26 -0
- package/build/_modules/messaging/_services/msg-integration.control-service.d.ts.map +1 -0
- package/build/_modules/messaging/_services/msg-integration.control-service.js +126 -0
- package/build/_modules/messaging/_services/msg-integration.control-service.js.map +1 -0
- package/build/_modules/messaging/_services/msg-main.control-service.d.ts +62 -0
- package/build/_modules/messaging/_services/msg-main.control-service.d.ts.map +1 -0
- package/build/_modules/messaging/_services/msg-main.control-service.js +408 -0
- package/build/_modules/messaging/_services/msg-main.control-service.js.map +1 -0
- package/build/_modules/messaging/_services/msg-message.data-service.d.ts +29 -0
- package/build/_modules/messaging/_services/msg-message.data-service.d.ts.map +1 -0
- package/build/_modules/messaging/_services/msg-message.data-service.js +104 -0
- package/build/_modules/messaging/_services/msg-message.data-service.js.map +1 -0
- package/build/_modules/messaging/get-messaging-routing-module.util.d.ts +8 -0
- package/build/_modules/messaging/get-messaging-routing-module.util.d.ts.map +1 -0
- package/build/_modules/messaging/get-messaging-routing-module.util.js +21 -0
- package/build/_modules/messaging/get-messaging-routing-module.util.js.map +1 -0
- package/build/_modules/messaging/index.d.ts +12 -0
- package/build/_modules/messaging/index.d.ts.map +1 -0
- package/build/_modules/messaging/index.js +30 -0
- package/build/_modules/messaging/index.js.map +1 -0
- package/build/_modules/messaging/messaging.controller.d.ts +13 -0
- package/build/_modules/messaging/messaging.controller.d.ts.map +1 -0
- package/build/_modules/messaging/messaging.controller.js +257 -0
- package/build/_modules/messaging/messaging.controller.js.map +1 -0
- package/package.json +72 -4
- package/src/_collections/global-settings.const.ts +2 -0
- package/src/_models/interfaces/global-settings.interface.ts +20 -2
- package/src/_modules/assistant/_collections/ass-global-settings.const.ts +13 -0
- package/src/_modules/assistant/_collections/ass.util.ts +50 -0
- package/src/_modules/assistant/_models/ass-global-settings.interface.ts +15 -0
- package/src/_modules/assistant/_services/ass-io.control-service.ts +100 -0
- package/src/_modules/assistant/_services/ass-main.control-service.ts +38 -0
- package/src/_modules/assistant/_services/ass.service-base.ts +92 -0
- package/src/_modules/assistant/index.ts +19 -0
- package/src/_modules/bot/_collections/bot-default-commands.const.ts +12 -0
- package/src/_modules/bot/_collections/bot-global-settings.const.ts +39 -0
- package/src/_modules/bot/_collections/bot-operations.util.ts +149 -0
- package/src/_modules/bot/_enums/bot-provider.enum.ts +6 -0
- package/src/_modules/bot/_models/bot-channel.interface.ts +7 -0
- package/src/_modules/bot/_models/bot-command.interface.ts +8 -0
- package/src/_modules/bot/_models/bot-global-settings.interface.ts +87 -0
- package/src/_modules/bot/_models/bot-last-mention-date.interface.ts +6 -0
- package/src/_modules/bot/_models/bot-last-message-date.interface.ts +5 -0
- package/src/_modules/bot/_models/bot-message.interface.ts +14 -0
- package/src/_modules/bot/_models/bot-provider.interface.ts +80 -0
- package/src/_modules/bot/_models/bot-user.interface.ts +7 -0
- package/src/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.ts +18 -0
- package/src/_modules/bot/_modules/discord-bot/_collections/dib.util.ts +20 -0
- package/src/_modules/bot/_modules/discord-bot/_models/dib-platform.types.ts +9 -0
- package/src/_modules/bot/_modules/discord-bot/_services/dib-provider.service.ts +462 -0
- package/src/_modules/bot/_modules/discord-bot/index.ts +15 -0
- package/src/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.ts +18 -0
- package/src/_modules/bot/_modules/slack-bot/_models/slb-platform.types.ts +9 -0
- package/src/_modules/bot/_modules/slack-bot/_services/slb-provider.service.ts +152 -0
- package/src/_modules/bot/_modules/slack-bot/index.ts +14 -0
- package/src/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.ts +18 -0
- package/src/_modules/bot/_modules/teams-bot/_models/teb-platform.types.ts +9 -0
- package/src/_modules/bot/_modules/teams-bot/_services/teb-provider.service.ts +152 -0
- package/src/_modules/bot/_modules/teams-bot/index.ts +14 -0
- package/src/_modules/bot/_services/bot-commands.control-service.ts +126 -0
- package/src/_modules/bot/_services/bot-io.control-service.ts +325 -0
- package/src/_modules/bot/_services/bot-main.control-service.ts +344 -0
- package/src/_modules/bot/_services/bot-provider-factory.service.ts +30 -0
- package/src/_modules/bot/_services/bot-routines.control-service.ts +83 -0
- package/src/_modules/bot/index.ts +36 -0
- package/src/_modules/defaults/_models/default-user.data-model.ts +72 -0
- package/src/_modules/defaults/_services/default-auth.service.ts +177 -0
- package/src/_modules/defaults/_services/default-socket-events.service.ts +61 -0
- package/src/_modules/defaults/_services/default-user.data-service.ts +98 -0
- package/src/_modules/defaults/index.ts +14 -0
- package/src/_modules/messaging/_collections/msg-global-settings.const.ts +27 -0
- package/src/_modules/messaging/_collections/msg.util.ts +83 -0
- package/src/_modules/messaging/_models/msg-global-settings.interface.ts +49 -0
- package/src/_modules/messaging/_services/msg-conversation.data-service.ts +146 -0
- package/src/_modules/messaging/_services/msg-events.service.ts +267 -0
- package/src/_modules/messaging/_services/msg-integration.control-service.ts +179 -0
- package/src/_modules/messaging/_services/msg-main.control-service.ts +548 -0
- package/src/_modules/messaging/_services/msg-message.data-service.ts +129 -0
- package/src/_modules/messaging/get-messaging-routing-module.util.ts +26 -0
- package/src/_modules/messaging/index.ts +33 -0
- package/src/_modules/messaging/messaging.controller.ts +370 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futdevpro/nts-dynamo",
|
|
3
|
-
"version": "01.14.
|
|
3
|
+
"version": "01.14.10",
|
|
4
4
|
"description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Program Ltd.",
|
|
5
5
|
"DyBu_settings": {
|
|
6
6
|
"packageType": "server-package",
|
|
@@ -60,13 +60,46 @@
|
|
|
60
60
|
"types": "./build/_modules/ai/_modules/open-ai/index.d.ts",
|
|
61
61
|
"typings": "./build/_modules/ai/_modules/open-ai/index.d.ts"
|
|
62
62
|
},
|
|
63
|
-
|
|
63
|
+
|
|
64
|
+
"./bot": {
|
|
65
|
+
"default": "./build/_modules/bot/index.js",
|
|
66
|
+
"module": "./build/_modules/bot/index.js",
|
|
67
|
+
"types": "./build/_modules/bot/index.d.ts",
|
|
68
|
+
"typings": "./build/_modules/bot/index.d.ts"
|
|
69
|
+
},
|
|
70
|
+
"./bot/discord-bot": {
|
|
71
|
+
"default": "./build/_modules/bot/_modules/discord-bot/index.js",
|
|
72
|
+
"module": "./build/_modules/bot/_modules/discord-bot/index.js",
|
|
73
|
+
"types": "./build/_modules/bot/_modules/discord-bot/index.d.ts",
|
|
74
|
+
"typings": "./build/_modules/bot/_modules/discord-bot/index.d.ts"
|
|
75
|
+
},
|
|
76
|
+
"./bot/slack-bot": {
|
|
77
|
+
"default": "./build/_modules/bot/_modules/slack-bot/index.js",
|
|
78
|
+
"module": "./build/_modules/bot/_modules/slack-bot/index.js",
|
|
79
|
+
"types": "./build/_modules/bot/_modules/slack-bot/index.d.ts",
|
|
80
|
+
"typings": "./build/_modules/bot/_modules/slack-bot/index.d.ts"
|
|
81
|
+
},
|
|
82
|
+
"./bot/teams-bot": {
|
|
83
|
+
"default": "./build/_modules/bot/_modules/teams-bot/index.js",
|
|
84
|
+
"module": "./build/_modules/bot/_modules/teams-bot/index.js",
|
|
85
|
+
"types": "./build/_modules/bot/_modules/teams-bot/index.d.ts",
|
|
86
|
+
"typings": "./build/_modules/bot/_modules/teams-bot/index.d.ts"
|
|
87
|
+
},
|
|
88
|
+
|
|
64
89
|
"./custom-data": {
|
|
65
90
|
"default": "./build/_modules/custom-data/index.js",
|
|
66
91
|
"module": "./build/_modules/custom-data/index.js",
|
|
67
92
|
"types": "./build/_modules/custom-data/index.d.ts",
|
|
68
93
|
"typings": "./build/_modules/custom-data/index.d.ts"
|
|
69
94
|
},
|
|
95
|
+
|
|
96
|
+
"./defaults": {
|
|
97
|
+
"default": "./build/_modules/defaults/index.js",
|
|
98
|
+
"module": "./build/_modules/defaults/index.js",
|
|
99
|
+
"types": "./build/_modules/defaults/index.d.ts",
|
|
100
|
+
"typings": "./build/_modules/defaults/index.d.ts"
|
|
101
|
+
},
|
|
102
|
+
|
|
70
103
|
"./discord-assistant": {
|
|
71
104
|
"default": "./build/_modules/discord-assistant/index.js",
|
|
72
105
|
"module": "./build/_modules/discord-assistant/index.js",
|
|
@@ -85,6 +118,20 @@
|
|
|
85
118
|
"types": "./build/_modules/discord-bot/index.d.ts",
|
|
86
119
|
"typings": "./build/_modules/discord-bot/index.d.ts"
|
|
87
120
|
},
|
|
121
|
+
|
|
122
|
+
"./messaging": {
|
|
123
|
+
"default": "./build/_modules/messaging/index.js",
|
|
124
|
+
"module": "./build/_modules/messaging/index.js",
|
|
125
|
+
"types": "./build/_modules/messaging/index.d.ts",
|
|
126
|
+
"typings": "./build/_modules/messaging/index.d.ts"
|
|
127
|
+
},
|
|
128
|
+
"./messaging/agent": {
|
|
129
|
+
"default": "./build/_modules/messaging/_modules/agent/index.js",
|
|
130
|
+
"module": "./build/_modules/messaging/_modules/agent/index.js",
|
|
131
|
+
"types": "./build/_modules/messaging/_modules/agent/index.d.ts",
|
|
132
|
+
"typings": "./build/_modules/messaging/_modules/agent/index.d.ts"
|
|
133
|
+
},
|
|
134
|
+
|
|
88
135
|
"./mock": {
|
|
89
136
|
"default": "./build/_mock/index.js",
|
|
90
137
|
"module": "./build/_mock/index.js",
|
|
@@ -134,6 +181,19 @@
|
|
|
134
181
|
"build/_modules/ai/_modules/open-ai/index.d.ts"
|
|
135
182
|
],
|
|
136
183
|
|
|
184
|
+
"bot": [
|
|
185
|
+
"build/_modules/bot/index.d.ts"
|
|
186
|
+
],
|
|
187
|
+
"bot/discord-bot": [
|
|
188
|
+
"build/_modules/bot/_modules/discord-bot/index.d.ts"
|
|
189
|
+
],
|
|
190
|
+
"bot/slack-bot": [
|
|
191
|
+
"build/_modules/bot/_modules/slack-bot/index.d.ts"
|
|
192
|
+
],
|
|
193
|
+
"bot/teams-bot": [
|
|
194
|
+
"build/_modules/bot/_modules/teams-bot/index.d.ts"
|
|
195
|
+
],
|
|
196
|
+
|
|
137
197
|
"custom-data": [
|
|
138
198
|
"build/_modules/custom-data/index.d.ts"
|
|
139
199
|
],
|
|
@@ -146,6 +206,14 @@
|
|
|
146
206
|
"discord-bot": [
|
|
147
207
|
"build/_modules/discord-bot/index.d.ts"
|
|
148
208
|
],
|
|
209
|
+
|
|
210
|
+
"messaging": [
|
|
211
|
+
"build/_modules/messaging/index.d.ts"
|
|
212
|
+
],
|
|
213
|
+
"messaging/agent": [
|
|
214
|
+
"build/_modules/messaging/_modules/agent/index.d.ts"
|
|
215
|
+
],
|
|
216
|
+
|
|
149
217
|
"mock": [
|
|
150
218
|
"build/_modules/mock/index.d.ts"
|
|
151
219
|
],
|
|
@@ -185,12 +253,12 @@
|
|
|
185
253
|
},
|
|
186
254
|
"homepage": "https:/futdevpro.hu/projects/dynamo",
|
|
187
255
|
"DISABLED": {
|
|
188
|
-
"@futdevpro/fsm-dynamo": "file:../tgz-collection/dynamo-fsm/futdevpro-fsm-dynamo-01.14.
|
|
256
|
+
"@futdevpro/fsm-dynamo": "file:../tgz-collection/dynamo-fsm/futdevpro-fsm-dynamo-01.14.10.tgz",
|
|
189
257
|
|
|
190
258
|
"empty": ""
|
|
191
259
|
},
|
|
192
260
|
"peerDependencies": {
|
|
193
|
-
"@futdevpro/fsm-dynamo": "1.14.
|
|
261
|
+
"@futdevpro/fsm-dynamo": "1.14.10",
|
|
194
262
|
|
|
195
263
|
"@types/express": "4.17.21",
|
|
196
264
|
"@types/geoip-lite": "~1.4.1",
|
|
@@ -87,10 +87,10 @@ export interface DyNTS_Global_Settings {
|
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* this setting will set the bot settings
|
|
90
|
-
* (this will be set in the {@link
|
|
90
|
+
* (this will be set in the {@link DyNTS_Bot_Main_ControlService} constructor)
|
|
91
91
|
*
|
|
92
92
|
* {@link DyNTS_GlobalBot_Settings}
|
|
93
|
-
* default settings: {@link
|
|
93
|
+
* default settings: {@link DyNTS_Bot_Global_Settings}
|
|
94
94
|
*/
|
|
95
95
|
bot_settings: any;
|
|
96
96
|
|
|
@@ -113,6 +113,15 @@ export interface DyNTS_Global_Settings {
|
|
|
113
113
|
*/
|
|
114
114
|
dias_settings: any;
|
|
115
115
|
|
|
116
|
+
/**
|
|
117
|
+
* this setting will set the assistant settings
|
|
118
|
+
* (this will be set in the {@link DyNTS_Ass_ServiceBase} constructor)
|
|
119
|
+
*
|
|
120
|
+
* {@link DyNTS_Ass_Global_Settings}
|
|
121
|
+
* default settings: {@link DyNTS_Ass_global_settings}
|
|
122
|
+
*/
|
|
123
|
+
assistant_settings?: any;
|
|
124
|
+
|
|
116
125
|
/**
|
|
117
126
|
* this setting will set the doc chunking settings
|
|
118
127
|
*/
|
|
@@ -120,4 +129,13 @@ export interface DyNTS_Global_Settings {
|
|
|
120
129
|
maxChunkSize: number;
|
|
121
130
|
maxChunkCount: number;
|
|
122
131
|
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* this setting will set the messaging settings
|
|
135
|
+
* (this will be set in the {@link DyNTS_Msg_Main_ControlService} constructor)
|
|
136
|
+
*
|
|
137
|
+
* {@link DyNTS_Msg_Global_Settings}
|
|
138
|
+
* default settings: {@link DyNTS_Msg_global_settings}
|
|
139
|
+
*/
|
|
140
|
+
messaging_settings?: any;
|
|
123
141
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DyNTS_Ass_Global_Settings } from '../_models/ass-global-settings.interface';
|
|
2
|
+
|
|
3
|
+
export const DyNTS_Ass_global_settings: DyNTS_Ass_Global_Settings = {
|
|
4
|
+
defaultSystemPrompt: 'You are a helpful assistant.',
|
|
5
|
+
skipConversationMessagesFlags: [
|
|
6
|
+
'[NOISE]',
|
|
7
|
+
'[VOICE|USER|OUTOFCONTEXT]',
|
|
8
|
+
'[DEBUG|'
|
|
9
|
+
],
|
|
10
|
+
userTranslationFlags: [
|
|
11
|
+
'[VOICE|USER'
|
|
12
|
+
],
|
|
13
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DyNTS_Bot_Message } from '../../bot/_models/bot-message.interface';
|
|
2
|
+
import { DyFM_AI_Message, DyFM_AI_MessageRole } from '@futdevpro/fsm-dynamo/ai';
|
|
3
|
+
import { DyNTS_Ass_global_settings } from './ass-global-settings.const';
|
|
4
|
+
|
|
5
|
+
export class DyNTS_Ass_Util {
|
|
6
|
+
/**
|
|
7
|
+
* Convert bot messages (from any comms platform) to AI conversation format
|
|
8
|
+
* Uses EXISTING DyFM_AI_Message type from fsm-dynamo
|
|
9
|
+
* Same logic as DiAs_Util.convertDiscordMessagesToOAIConversation but platform-agnostic
|
|
10
|
+
*/
|
|
11
|
+
static convertBotMessagesToAIConversation<T_BotMessage extends DyNTS_Bot_Message<any>>(
|
|
12
|
+
set: {
|
|
13
|
+
messages: T_BotMessage[],
|
|
14
|
+
botClientId: string,
|
|
15
|
+
botDisplayName: string,
|
|
16
|
+
issuer: string,
|
|
17
|
+
}
|
|
18
|
+
): DyFM_AI_Message[] {
|
|
19
|
+
return set.messages.map(message => {
|
|
20
|
+
const isBot = (
|
|
21
|
+
message.isBot ||
|
|
22
|
+
message.authorId === set.botClientId ||
|
|
23
|
+
message.authorName === set.botDisplayName ||
|
|
24
|
+
message.authorDisplayName === set.botDisplayName
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
if (isBot) {
|
|
28
|
+
// Check if bot message should be treated as user message
|
|
29
|
+
if (DyNTS_Ass_global_settings.userTranslationFlags.some(
|
|
30
|
+
flag => message.content.includes(flag)
|
|
31
|
+
)) {
|
|
32
|
+
return {
|
|
33
|
+
role: DyFM_AI_MessageRole.user,
|
|
34
|
+
content: message.content,
|
|
35
|
+
};
|
|
36
|
+
} else {
|
|
37
|
+
return {
|
|
38
|
+
role: DyFM_AI_MessageRole.assistant,
|
|
39
|
+
content: message.content,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
return {
|
|
44
|
+
role: DyFM_AI_MessageRole.user,
|
|
45
|
+
content: message.content,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface DyNTS_Ass_Global_Settings {
|
|
2
|
+
defaultSystemPrompt: string;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* These flags are used to skip messages from the conversation
|
|
6
|
+
* Default: [ '[NOISE]', '[VOICE|USER|OUTOFCONTEXT]', '[DEBUG|' ]
|
|
7
|
+
*/
|
|
8
|
+
skipConversationMessagesFlags: string[];
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* These flags identify bot messages that should be treated as user messages
|
|
12
|
+
* Default: [ '[VOICE|USER' ]
|
|
13
|
+
*/
|
|
14
|
+
userTranslationFlags: string[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { DyFM_Error, DyFM_Log } from '@futdevpro/fsm-dynamo';
|
|
2
|
+
import { DyFM_AI_Message } from '@futdevpro/fsm-dynamo/ai';
|
|
3
|
+
import { DyNTS_Bot_IO_ControlService } from '../../bot/_services/bot-io.control-service';
|
|
4
|
+
import { DyNTS_Bot_Message } from '../../bot/_models/bot-message.interface';
|
|
5
|
+
import { DyNTS_Bot_Channel } from '../../bot/_models/bot-channel.interface';
|
|
6
|
+
import { DyNTS_Bot_User } from '../../bot/_models/bot-user.interface';
|
|
7
|
+
import { DyNTS_Bot_Provider } from '../../bot/_models/bot-provider.interface';
|
|
8
|
+
import { DyNTS_Ass_Main_ControlService } from './ass-main.control-service';
|
|
9
|
+
import { DyNTS_Ass_Util } from '../_collections/ass.util';
|
|
10
|
+
import { DyNTS_global_settings } from '../../../_collections/global-settings.const';
|
|
11
|
+
import { DyNTS_AI_LLMChat_ServiceBase } from '../../ai/_services/ai-llm-chat.service-base';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Assistant IO Control Service
|
|
15
|
+
* Handles message processing with AI provider
|
|
16
|
+
* EXACT SAME LOGIC as DiAs_IO_ControlService but platform and AI provider agnostic
|
|
17
|
+
*/
|
|
18
|
+
export abstract class DyNTS_Ass_IO_ControlService<
|
|
19
|
+
T_PlatformChannel extends DyNTS_Bot_Channel<any> = DyNTS_Bot_Channel<any>,
|
|
20
|
+
T_PlatformMessage extends DyNTS_Bot_Message<any> = DyNTS_Bot_Message<any>,
|
|
21
|
+
T_PlatformUser extends DyNTS_Bot_User<any> = DyNTS_Bot_User<any>,
|
|
22
|
+
T_CommsProvider extends DyNTS_Bot_Provider<
|
|
23
|
+
T_PlatformChannel,
|
|
24
|
+
T_PlatformMessage,
|
|
25
|
+
T_PlatformUser
|
|
26
|
+
> = DyNTS_Bot_Provider<
|
|
27
|
+
T_PlatformChannel,
|
|
28
|
+
T_PlatformMessage,
|
|
29
|
+
T_PlatformUser
|
|
30
|
+
>
|
|
31
|
+
> extends DyNTS_Bot_IO_ControlService<T_PlatformChannel, T_PlatformMessage, T_PlatformUser, T_CommsProvider> {
|
|
32
|
+
|
|
33
|
+
protected abstract override getMainBotControlService(): DyNTS_Ass_Main_ControlService<
|
|
34
|
+
T_PlatformChannel,
|
|
35
|
+
T_PlatformMessage,
|
|
36
|
+
T_PlatformUser,
|
|
37
|
+
T_CommsProvider
|
|
38
|
+
>;
|
|
39
|
+
|
|
40
|
+
protected abstract override mainBot_CS: DyNTS_Ass_Main_ControlService<
|
|
41
|
+
T_PlatformChannel,
|
|
42
|
+
T_PlatformMessage,
|
|
43
|
+
T_PlatformUser,
|
|
44
|
+
T_CommsProvider
|
|
45
|
+
>;
|
|
46
|
+
|
|
47
|
+
get aiProvider(): DyNTS_AI_LLMChat_ServiceBase {
|
|
48
|
+
return this.mainBot_CS?.aiProvider;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Handle incoming message with AI
|
|
53
|
+
* EXACT SAME LOGIC as dias-io.control-service.ts handleMessage()
|
|
54
|
+
*/
|
|
55
|
+
override async handleMessage(message: T_PlatformMessage, issuer: string): Promise<T_PlatformMessage> {
|
|
56
|
+
try {
|
|
57
|
+
// Gather messages from comms platform
|
|
58
|
+
const messages: T_PlatformMessage[] = await this.mainBot_CS.gatherMessagesForMessage(message);
|
|
59
|
+
|
|
60
|
+
// Convert to AI conversation format (uses EXISTING DyFM_AI_Message)
|
|
61
|
+
const aiMessages: DyFM_AI_Message[] =
|
|
62
|
+
DyNTS_Ass_Util.convertBotMessagesToAIConversation({
|
|
63
|
+
messages: messages,
|
|
64
|
+
botClientId: this.mainBot_CS.botClientId,
|
|
65
|
+
botDisplayName: this.mainBot_CS.botDisplayName,
|
|
66
|
+
issuer: issuer,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// Get AI response using EXISTING getAnswerInConversation method
|
|
70
|
+
const aiResult: string = await this.aiProvider.getAnswerInConversation({
|
|
71
|
+
conversation: aiMessages,
|
|
72
|
+
issuer: issuer,
|
|
73
|
+
settings: {
|
|
74
|
+
systemPrompt: this.mainBot_CS.defaultSystemPrompt,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// Reply via comms platform
|
|
79
|
+
return await this.provider.replyToMessage(message.id, message.channelId, aiResult);
|
|
80
|
+
} catch (error) {
|
|
81
|
+
DyFM_Error.logSimple('❌❌ Error handleMessage:', error);
|
|
82
|
+
|
|
83
|
+
if (!this.dontSendErrorReply && DyNTS_global_settings.bot_settings?.debugLevel >= 1) {
|
|
84
|
+
await this.provider.replyToMessage(
|
|
85
|
+
message.id,
|
|
86
|
+
message.channelId,
|
|
87
|
+
`[SYSTEM|ERROR|${DyNTS_global_settings.systemShortCodeName}|DyNTS-Ass-IOCS-H0] Error occurred while handling the message:\n` +
|
|
88
|
+
DyFM_Error.getAnyMessage(error)
|
|
89
|
+
).catch(error => {
|
|
90
|
+
DyFM_Error.logSimple('❌❌ Error sending error reply:', error);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
throw new DyFM_Error({
|
|
95
|
+
...this.getDefaultErrorSettings('handleMessage', error, issuer),
|
|
96
|
+
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-Ass-IOCS-H0`,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DyNTS_Ass_ServiceBase } from './ass.service-base';
|
|
2
|
+
import { DyNTS_Ass_IO_ControlService } from './ass-io.control-service';
|
|
3
|
+
import { DyNTS_Bot_Channel } from '../../bot/_models/bot-channel.interface';
|
|
4
|
+
import { DyNTS_Bot_Message } from '../../bot/_models/bot-message.interface';
|
|
5
|
+
import { DyNTS_Bot_User } from '../../bot/_models/bot-user.interface';
|
|
6
|
+
import { DyNTS_Bot_Provider } from '../../bot/_models/bot-provider.interface';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Assistant Main Control Service
|
|
10
|
+
* Abstract base for concrete assistant implementations
|
|
11
|
+
*/
|
|
12
|
+
export abstract class DyNTS_Ass_Main_ControlService<
|
|
13
|
+
T_PlatformChannel extends DyNTS_Bot_Channel<any> = DyNTS_Bot_Channel<any>,
|
|
14
|
+
T_PlatformMessage extends DyNTS_Bot_Message<any> = DyNTS_Bot_Message<any>,
|
|
15
|
+
T_PlatformUser extends DyNTS_Bot_User<any> = DyNTS_Bot_User<any>,
|
|
16
|
+
T_CommsProvider extends DyNTS_Bot_Provider<
|
|
17
|
+
T_PlatformChannel,
|
|
18
|
+
T_PlatformMessage,
|
|
19
|
+
T_PlatformUser
|
|
20
|
+
> = DyNTS_Bot_Provider<
|
|
21
|
+
T_PlatformChannel,
|
|
22
|
+
T_PlatformMessage,
|
|
23
|
+
T_PlatformUser
|
|
24
|
+
>
|
|
25
|
+
> extends DyNTS_Ass_ServiceBase<T_PlatformChannel, T_PlatformMessage, T_PlatformUser, T_CommsProvider> {
|
|
26
|
+
protected abstract override getBotIOControlService(): DyNTS_Ass_IO_ControlService<
|
|
27
|
+
T_PlatformChannel,
|
|
28
|
+
T_PlatformMessage,
|
|
29
|
+
T_PlatformUser,
|
|
30
|
+
T_CommsProvider
|
|
31
|
+
>;
|
|
32
|
+
protected abstract override botIO_CS: DyNTS_Ass_IO_ControlService<
|
|
33
|
+
T_PlatformChannel,
|
|
34
|
+
T_PlatformMessage,
|
|
35
|
+
T_PlatformUser,
|
|
36
|
+
T_CommsProvider
|
|
37
|
+
>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { DyNTS_Bot_Main_ControlService } from '../../bot/_services/bot-main.control-service';
|
|
2
|
+
import { DyNTS_Bot_Message } from '../../bot/_models/bot-message.interface';
|
|
3
|
+
import { DyNTS_Bot_Channel } from '../../bot/_models/bot-channel.interface';
|
|
4
|
+
import { DyNTS_Bot_User } from '../../bot/_models/bot-user.interface';
|
|
5
|
+
import { DyNTS_Bot_Provider } from '../../bot/_models/bot-provider.interface';
|
|
6
|
+
import { DyNTS_AI_LLMChat_ServiceBase } from '../../ai/_services/ai-llm-chat.service-base';
|
|
7
|
+
import { DyFM_AI_Message } from '@futdevpro/fsm-dynamo/ai';
|
|
8
|
+
import { DyNTS_Ass_global_settings } from '../_collections/ass-global-settings.const';
|
|
9
|
+
import { DyNTS_global_settings } from '../../../_collections/global-settings.const';
|
|
10
|
+
import { DyNTS_Ass_Util } from '../_collections/ass.util';
|
|
11
|
+
import { DyNTS_Ass_IO_ControlService } from './ass-io.control-service';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Assistant Service Base
|
|
15
|
+
* Integrates commsProvider (bot) and aiProvider (LLMChat) to create AI-powered assistant
|
|
16
|
+
* USES EXISTING AI ABSTRACTIONS - no duplication
|
|
17
|
+
*/
|
|
18
|
+
export abstract class DyNTS_Ass_ServiceBase<
|
|
19
|
+
T_PlatformChannel extends DyNTS_Bot_Channel<any> = DyNTS_Bot_Channel<any>,
|
|
20
|
+
T_PlatformMessage extends DyNTS_Bot_Message<any> = DyNTS_Bot_Message<any>,
|
|
21
|
+
T_PlatformUser extends DyNTS_Bot_User<any> = DyNTS_Bot_User<any>,
|
|
22
|
+
T_CommsProvider extends DyNTS_Bot_Provider<T_PlatformChannel, T_PlatformMessage, T_PlatformUser> = DyNTS_Bot_Provider<T_PlatformChannel, T_PlatformMessage, T_PlatformUser>
|
|
23
|
+
> extends DyNTS_Bot_Main_ControlService<T_PlatformChannel, T_PlatformMessage, T_PlatformUser, T_CommsProvider> {
|
|
24
|
+
|
|
25
|
+
// AI Provider - uses EXISTING abstraction
|
|
26
|
+
protected _aiProvider: DyNTS_AI_LLMChat_ServiceBase;
|
|
27
|
+
|
|
28
|
+
get aiProvider(): DyNTS_AI_LLMChat_ServiceBase {
|
|
29
|
+
return this._aiProvider;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
protected abstract getAIProvider(): DyNTS_AI_LLMChat_ServiceBase;
|
|
33
|
+
|
|
34
|
+
// Override botIO to use assistant IO
|
|
35
|
+
protected abstract override getBotIOControlService(): DyNTS_Ass_IO_ControlService<
|
|
36
|
+
T_PlatformChannel,
|
|
37
|
+
T_PlatformMessage,
|
|
38
|
+
T_PlatformUser,
|
|
39
|
+
T_CommsProvider
|
|
40
|
+
>;
|
|
41
|
+
|
|
42
|
+
// Assistant-specific settings
|
|
43
|
+
defaultSystemPrompt: string = DyNTS_Ass_global_settings.defaultSystemPrompt;
|
|
44
|
+
|
|
45
|
+
protected constructor(setupAutomatically?: boolean) {
|
|
46
|
+
super(setupAutomatically);
|
|
47
|
+
|
|
48
|
+
// Initialize AI provider
|
|
49
|
+
this._aiProvider = this.getAIProvider();
|
|
50
|
+
|
|
51
|
+
// Apply system prompt
|
|
52
|
+
if (this._aiProvider.defaultSettings) {
|
|
53
|
+
this._aiProvider.defaultSettings.systemPrompt = this.defaultSystemPrompt;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Set global settings
|
|
57
|
+
DyNTS_global_settings.assistant_settings ??= DyNTS_Ass_global_settings;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Gather messages from comms platform (any platform)
|
|
62
|
+
* Same as dias.service-base but platform-agnostic
|
|
63
|
+
*/
|
|
64
|
+
async gatherMessagesForMessage(message: T_PlatformMessage, limit: number = 100): Promise<T_PlatformMessage[]> {
|
|
65
|
+
const channelId = message.channelId;
|
|
66
|
+
const messages = await this.provider.fetchMessages(channelId, limit);
|
|
67
|
+
|
|
68
|
+
// Filter out messages with skip flags
|
|
69
|
+
return messages.filter(
|
|
70
|
+
msg => !DyNTS_Ass_global_settings.skipConversationMessagesFlags.some(
|
|
71
|
+
flag => msg.content.includes(flag)
|
|
72
|
+
)
|
|
73
|
+
).sort((a, b) => a.timestamp - b.timestamp);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Convert gathered messages to AI conversation using EXISTING DyFM_AI_Message
|
|
78
|
+
*/
|
|
79
|
+
async gatherMessagesAsAIConversation(
|
|
80
|
+
message: T_PlatformMessage,
|
|
81
|
+
issuer: string,
|
|
82
|
+
): Promise<DyFM_AI_Message[]> {
|
|
83
|
+
const messages = await this.gatherMessagesForMessage(message);
|
|
84
|
+
|
|
85
|
+
return DyNTS_Ass_Util.convertBotMessagesToAIConversation({
|
|
86
|
+
messages: messages,
|
|
87
|
+
botClientId: this.botClientId,
|
|
88
|
+
botDisplayName: this.botDisplayName,
|
|
89
|
+
issuer: issuer,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Assistant module (platform and AI provider agnostic)
|
|
3
|
+
//
|
|
4
|
+
// Integrates commsProvider (bot) with aiProvider (AI LLMChat) to create intelligent assistants
|
|
5
|
+
// REUSES existing AI abstractions - no duplication
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// MODELS
|
|
9
|
+
export * from './_models/ass-global-settings.interface';
|
|
10
|
+
|
|
11
|
+
// COLLECTIONS
|
|
12
|
+
export * from './_collections/ass.util';
|
|
13
|
+
export * from './_collections/ass-global-settings.const';
|
|
14
|
+
|
|
15
|
+
// SERVICES
|
|
16
|
+
export * from './_services/ass.service-base';
|
|
17
|
+
export * from './_services/ass-main.control-service';
|
|
18
|
+
export * from './_services/ass-io.control-service';
|
|
19
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DyNTS_Bot_Command } from '../_models/bot-command.interface';
|
|
2
|
+
|
|
3
|
+
export const DyNTS_Bot_defaultCommands: DyNTS_Bot_Command[] = [
|
|
4
|
+
{
|
|
5
|
+
command: '!ping',
|
|
6
|
+
description: 'Ping the bot',
|
|
7
|
+
commandHandler: async (message) => {
|
|
8
|
+
// This will be handled by the provider's replyToMessage method
|
|
9
|
+
// The actual implementation will be in the provider
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DyNTS_Bot_Global_Settings } from '../_models/bot-global-settings.interface';
|
|
2
|
+
import { minute, week } from '@futdevpro/fsm-dynamo';
|
|
3
|
+
import { DyNTS_Bot_defaultCommands } from './bot-default-commands.const';
|
|
4
|
+
|
|
5
|
+
export const DyNTS_Bot_global_settings: DyNTS_Bot_Global_Settings = {
|
|
6
|
+
debugLevel: 3,
|
|
7
|
+
|
|
8
|
+
allowedUsers: 'all',
|
|
9
|
+
|
|
10
|
+
messageSettings: {
|
|
11
|
+
messageFetchTimeLimit: 3 * week,
|
|
12
|
+
messageFetchCountLimit: 1000,
|
|
13
|
+
messageSendDelay: minute / 3,
|
|
14
|
+
|
|
15
|
+
skipFlags: [
|
|
16
|
+
'[BOT-SKIP]',
|
|
17
|
+
'[SYSTEM|REFUSE|BOT]',
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
channelSettings: {
|
|
22
|
+
reportChannelName: 'bot-reports',
|
|
23
|
+
|
|
24
|
+
defaultChannels: [
|
|
25
|
+
'bot-help',
|
|
26
|
+
],
|
|
27
|
+
|
|
28
|
+
allowedChannels: [],
|
|
29
|
+
dmIsAllowed: false,
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
commandSettings: {
|
|
33
|
+
commandOperator: '',
|
|
34
|
+
|
|
35
|
+
commands: DyNTS_Bot_defaultCommands,
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
allowBotsInteractEachOther: false,
|
|
39
|
+
};
|