@futdevpro/nts-dynamo 1.15.136 → 1.15.137

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 (1333) hide show
  1. package/.c8rc.json +26 -26
  2. package/.copilot/patterns.json +7 -7
  3. package/.cursor/rules/__assistant_guide.mdc +30 -30
  4. package/.cursor/rules/_ag_backend-structure.mdc +85 -85
  5. package/.cursor/rules/_ag_backend.mdc +16 -16
  6. package/.cursor/rules/_ag_frontend-structure.mdc +86 -86
  7. package/.cursor/rules/_ag_frontend.mdc +39 -39
  8. package/.cursor/rules/_ag_import-rules.mdc +44 -44
  9. package/.cursor/rules/_ag_naming.mdc +115 -115
  10. package/.cursor/rules/_ag_should-be.mdc +6 -6
  11. package/.cursor/rules/ai_development_guide.md +60 -60
  12. package/.cursor/rules/cursor-rules.md +160 -160
  13. package/.cursor/rules/default-command.mdc +464 -464
  14. package/.cursor/rules/error_code_pattern.md +39 -39
  15. package/.cursor/rules/saved rule mcp server use.md +15 -15
  16. package/.vscode/settings.json +10 -10
  17. package/HOWTO.md +15 -15
  18. package/LICENSE +21 -21
  19. package/__documentations/nts-integration-tests-2026-03-17.md +26 -26
  20. package/__documentations/plans/BEDROCK-HYPERPLAN.md +95 -95
  21. package/_specifications/BACKLOG.md +92 -92
  22. package/_specifications/TODO.md +15 -15
  23. package/_specifications/agent.md +138 -138
  24. package/build/_collections/app-version-header.util.spec.d.ts +2 -0
  25. package/build/_collections/app-version-header.util.spec.d.ts.map +1 -0
  26. package/build/_collections/app-version-header.util.spec.js +82 -0
  27. package/build/_collections/app-version-header.util.spec.js.map +1 -0
  28. package/build/_collections/archive.util.spec.d.ts +2 -0
  29. package/build/_collections/archive.util.spec.d.ts.map +1 -0
  30. package/build/_collections/archive.util.spec.js +51 -0
  31. package/build/_collections/archive.util.spec.js.map +1 -0
  32. package/build/_collections/client-safe-error.util.spec.d.ts +2 -0
  33. package/build/_collections/client-safe-error.util.spec.d.ts.map +1 -0
  34. package/build/_collections/client-safe-error.util.spec.js +124 -0
  35. package/build/_collections/client-safe-error.util.spec.js.map +1 -0
  36. package/build/_collections/default-fallback-cache-max-age.const.spec.d.ts +2 -0
  37. package/build/_collections/default-fallback-cache-max-age.const.spec.d.ts.map +1 -0
  38. package/build/_collections/default-fallback-cache-max-age.const.spec.js +12 -0
  39. package/build/_collections/default-fallback-cache-max-age.const.spec.js.map +1 -0
  40. package/build/_collections/default-not-found-page.const.spec.d.ts +2 -0
  41. package/build/_collections/default-not-found-page.const.spec.d.ts.map +1 -0
  42. package/build/_collections/default-not-found-page.const.spec.js +19 -0
  43. package/build/_collections/default-not-found-page.const.spec.js.map +1 -0
  44. package/build/_collections/default-socket-path.const.spec.d.ts +2 -0
  45. package/build/_collections/default-socket-path.const.spec.d.ts.map +1 -0
  46. package/build/_collections/default-socket-path.const.spec.js +13 -0
  47. package/build/_collections/default-socket-path.const.spec.js.map +1 -0
  48. package/build/_collections/field-encryption.util.spec.d.ts +2 -0
  49. package/build/_collections/field-encryption.util.spec.d.ts.map +1 -0
  50. package/build/_collections/field-encryption.util.spec.js +156 -0
  51. package/build/_collections/field-encryption.util.spec.js.map +1 -0
  52. package/build/_collections/get-environment-settings.util.spec.d.ts +2 -0
  53. package/build/_collections/get-environment-settings.util.spec.d.ts.map +1 -0
  54. package/build/_collections/get-environment-settings.util.spec.js +165 -0
  55. package/build/_collections/get-environment-settings.util.spec.js.map +1 -0
  56. package/build/_collections/load-shed.util.spec.d.ts +2 -0
  57. package/build/_collections/load-shed.util.spec.d.ts.map +1 -0
  58. package/build/_collections/load-shed.util.spec.js +48 -0
  59. package/build/_collections/load-shed.util.spec.js.map +1 -0
  60. package/build/_collections/mongo-reconnect-guard.util.spec.d.ts +2 -0
  61. package/build/_collections/mongo-reconnect-guard.util.spec.d.ts.map +1 -0
  62. package/build/_collections/mongo-reconnect-guard.util.spec.js +46 -0
  63. package/build/_collections/mongo-reconnect-guard.util.spec.js.map +1 -0
  64. package/build/_collections/security-headers.util.spec.d.ts +2 -0
  65. package/build/_collections/security-headers.util.spec.d.ts.map +1 -0
  66. package/build/_collections/security-headers.util.spec.js +66 -0
  67. package/build/_collections/security-headers.util.spec.js.map +1 -0
  68. package/build/_collections/signed-url.util.spec.d.ts +2 -0
  69. package/build/_collections/signed-url.util.spec.d.ts.map +1 -0
  70. package/build/_collections/signed-url.util.spec.js +161 -0
  71. package/build/_collections/signed-url.util.spec.js.map +1 -0
  72. package/build/_collections/star.controller.spec.d.ts +2 -0
  73. package/build/_collections/star.controller.spec.d.ts.map +1 -0
  74. package/build/_collections/star.controller.spec.js +194 -0
  75. package/build/_collections/star.controller.spec.js.map +1 -0
  76. package/build/_collections/static-cache-control.util.spec.d.ts +2 -0
  77. package/build/_collections/static-cache-control.util.spec.d.ts.map +1 -0
  78. package/build/_collections/static-cache-control.util.spec.js +41 -0
  79. package/build/_collections/static-cache-control.util.spec.js.map +1 -0
  80. package/build/_models/control-models/api-call-params.control-model.spec.d.ts +2 -0
  81. package/build/_models/control-models/api-call-params.control-model.spec.d.ts.map +1 -0
  82. package/build/_models/control-models/api-call-params.control-model.spec.js +128 -0
  83. package/build/_models/control-models/api-call-params.control-model.spec.js.map +1 -0
  84. package/build/_models/control-models/app-ext-system-controls.control-model.spec.d.ts +2 -0
  85. package/build/_models/control-models/app-ext-system-controls.control-model.spec.d.ts.map +1 -0
  86. package/build/_models/control-models/app-ext-system-controls.control-model.spec.js +43 -0
  87. package/build/_models/control-models/app-ext-system-controls.control-model.spec.js.map +1 -0
  88. package/build/_models/control-models/app-params.control-model.spec.d.ts +2 -0
  89. package/build/_models/control-models/app-params.control-model.spec.d.ts.map +1 -0
  90. package/build/_models/control-models/app-params.control-model.spec.js +180 -0
  91. package/build/_models/control-models/app-params.control-model.spec.js.map +1 -0
  92. package/build/_models/control-models/app-system-controls.control-model.spec.d.ts +2 -0
  93. package/build/_models/control-models/app-system-controls.control-model.spec.d.ts.map +1 -0
  94. package/build/_models/control-models/app-system-controls.control-model.spec.js +26 -0
  95. package/build/_models/control-models/app-system-controls.control-model.spec.js.map +1 -0
  96. package/build/_models/control-models/endpoint-params.control-model.spec.d.ts +2 -0
  97. package/build/_models/control-models/endpoint-params.control-model.spec.d.ts.map +1 -0
  98. package/build/_models/control-models/endpoint-params.control-model.spec.js +569 -0
  99. package/build/_models/control-models/endpoint-params.control-model.spec.js.map +1 -0
  100. package/build/_models/control-models/http-settings.control-model.spec.d.ts +2 -0
  101. package/build/_models/control-models/http-settings.control-model.spec.d.ts.map +1 -0
  102. package/build/_models/control-models/http-settings.control-model.spec.js +71 -0
  103. package/build/_models/control-models/http-settings.control-model.spec.js.map +1 -0
  104. package/build/_models/control-models/system-control.control-model.spec.d.ts +2 -0
  105. package/build/_models/control-models/system-control.control-model.spec.d.ts.map +1 -0
  106. package/build/_models/control-models/system-control.control-model.spec.js +24 -0
  107. package/build/_models/control-models/system-control.control-model.spec.js.map +1 -0
  108. package/build/_models/interfaces/cors-settings.interface.spec.d.ts +2 -0
  109. package/build/_models/interfaces/cors-settings.interface.spec.d.ts.map +1 -0
  110. package/build/_models/interfaces/cors-settings.interface.spec.js +48 -0
  111. package/build/_models/interfaces/cors-settings.interface.spec.js.map +1 -0
  112. package/build/_models/interfaces/static-client-settings.interface.spec.d.ts +2 -0
  113. package/build/_models/interfaces/static-client-settings.interface.spec.d.ts.map +1 -0
  114. package/build/_models/interfaces/static-client-settings.interface.spec.js +28 -0
  115. package/build/_models/interfaces/static-client-settings.interface.spec.js.map +1 -0
  116. package/build/_modules/admin-auth/admin-api-key.auth-service.spec.d.ts +2 -0
  117. package/build/_modules/admin-auth/admin-api-key.auth-service.spec.d.ts.map +1 -0
  118. package/build/_modules/admin-auth/admin-api-key.auth-service.spec.js +185 -0
  119. package/build/_modules/admin-auth/admin-api-key.auth-service.spec.js.map +1 -0
  120. package/build/_modules/ai/_collections/ai-model-config-validator.util.spec.d.ts +2 -0
  121. package/build/_modules/ai/_collections/ai-model-config-validator.util.spec.d.ts.map +1 -0
  122. package/build/_modules/ai/_collections/ai-model-config-validator.util.spec.js +132 -0
  123. package/build/_modules/ai/_collections/ai-model-config-validator.util.spec.js.map +1 -0
  124. package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.spec.d.ts +2 -0
  125. package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.spec.d.ts.map +1 -0
  126. package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.spec.js +56 -0
  127. package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.spec.js.map +1 -0
  128. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.spec.d.ts +2 -0
  129. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.spec.d.ts.map +1 -0
  130. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.spec.js +43 -0
  131. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.spec.js.map +1 -0
  132. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.spec.d.ts +2 -0
  133. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.spec.d.ts.map +1 -0
  134. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.spec.js +47 -0
  135. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.spec.js.map +1 -0
  136. package/build/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.spec.d.ts +2 -0
  137. package/build/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.spec.d.ts.map +1 -0
  138. package/build/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.spec.js +98 -0
  139. package/build/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.spec.js.map +1 -0
  140. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.spec.d.ts +2 -0
  141. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.spec.d.ts.map +1 -0
  142. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.spec.js +117 -0
  143. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.spec.js.map +1 -0
  144. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-pipeline.spec.d.ts +2 -0
  145. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-pipeline.spec.d.ts.map +1 -0
  146. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-pipeline.spec.js +87 -0
  147. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-pipeline.spec.js.map +1 -0
  148. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.spec.d.ts +2 -0
  149. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.spec.d.ts.map +1 -0
  150. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.spec.js +42 -0
  151. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.spec.js.map +1 -0
  152. package/build/_modules/ai/_modules/ai-mock/_services/aim-integration-proof.spec.d.ts +2 -0
  153. package/build/_modules/ai/_modules/ai-mock/_services/aim-integration-proof.spec.d.ts.map +1 -0
  154. package/build/_modules/ai/_modules/ai-mock/_services/aim-integration-proof.spec.js +74 -0
  155. package/build/_modules/ai/_modules/ai-mock/_services/aim-integration-proof.spec.js.map +1 -0
  156. package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.spec.d.ts +2 -0
  157. package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.spec.d.ts.map +1 -0
  158. package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.spec.js +95 -0
  159. package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.spec.js.map +1 -0
  160. package/build/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.spec.d.ts +2 -0
  161. package/build/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.spec.d.ts.map +1 -0
  162. package/build/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.spec.js +207 -0
  163. package/build/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.spec.js.map +1 -0
  164. package/build/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.spec.d.ts +2 -0
  165. package/build/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.spec.d.ts.map +1 -0
  166. package/build/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.spec.js +244 -0
  167. package/build/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.spec.js.map +1 -0
  168. package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.spec.d.ts +2 -0
  169. package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.spec.d.ts.map +1 -0
  170. package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.spec.js +162 -0
  171. package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.spec.js.map +1 -0
  172. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.spec.d.ts +2 -0
  173. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.spec.d.ts.map +1 -0
  174. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.spec.js +279 -0
  175. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.spec.js.map +1 -0
  176. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.spec.d.ts +2 -0
  177. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.spec.d.ts.map +1 -0
  178. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.spec.js +452 -0
  179. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.spec.js.map +1 -0
  180. package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.spec.d.ts +2 -0
  181. package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.spec.d.ts.map +1 -0
  182. package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.spec.js +293 -0
  183. package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.spec.js.map +1 -0
  184. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.spec.d.ts +2 -0
  185. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.spec.d.ts.map +1 -0
  186. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.spec.js +395 -0
  187. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.spec.js.map +1 -0
  188. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.spec.d.ts +2 -0
  189. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.spec.d.ts.map +1 -0
  190. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.spec.js +411 -0
  191. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.spec.js.map +1 -0
  192. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.tools.spec.d.ts +2 -0
  193. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.tools.spec.d.ts.map +1 -0
  194. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.tools.spec.js +143 -0
  195. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.tools.spec.js.map +1 -0
  196. package/build/_modules/ai/_services/ai-embedding-provider.registry.spec.d.ts +2 -0
  197. package/build/_modules/ai/_services/ai-embedding-provider.registry.spec.d.ts.map +1 -0
  198. package/build/_modules/ai/_services/ai-embedding-provider.registry.spec.js +98 -0
  199. package/build/_modules/ai/_services/ai-embedding-provider.registry.spec.js.map +1 -0
  200. package/build/_modules/ai/_services/ai-embedding.service-base.spec.d.ts +2 -0
  201. package/build/_modules/ai/_services/ai-embedding.service-base.spec.d.ts.map +1 -0
  202. package/build/_modules/ai/_services/ai-embedding.service-base.spec.js +80 -0
  203. package/build/_modules/ai/_services/ai-embedding.service-base.spec.js.map +1 -0
  204. package/build/_modules/ai/_services/ai-llm-chat.service-base.spec.d.ts +2 -0
  205. package/build/_modules/ai/_services/ai-llm-chat.service-base.spec.d.ts.map +1 -0
  206. package/build/_modules/ai/_services/ai-llm-chat.service-base.spec.js +186 -0
  207. package/build/_modules/ai/_services/ai-llm-chat.service-base.spec.js.map +1 -0
  208. package/build/_modules/ai/_services/ai-llm.service-base.reconciler.spec.d.ts +2 -0
  209. package/build/_modules/ai/_services/ai-llm.service-base.reconciler.spec.d.ts.map +1 -0
  210. package/build/_modules/ai/_services/ai-llm.service-base.reconciler.spec.js +108 -0
  211. package/build/_modules/ai/_services/ai-llm.service-base.reconciler.spec.js.map +1 -0
  212. package/build/_modules/ai/_services/ai-llm.service-base.spec.d.ts +2 -0
  213. package/build/_modules/ai/_services/ai-llm.service-base.spec.d.ts.map +1 -0
  214. package/build/_modules/ai/_services/ai-llm.service-base.spec.js +185 -0
  215. package/build/_modules/ai/_services/ai-llm.service-base.spec.js.map +1 -0
  216. package/build/_modules/ai/_services/ai-provider.service-base.spec.d.ts +2 -0
  217. package/build/_modules/ai/_services/ai-provider.service-base.spec.d.ts.map +1 -0
  218. package/build/_modules/ai/_services/ai-provider.service-base.spec.js +128 -0
  219. package/build/_modules/ai/_services/ai-provider.service-base.spec.js.map +1 -0
  220. package/build/_modules/ai/_services/lmstudio-embedding.control-service.spec.d.ts +2 -0
  221. package/build/_modules/ai/_services/lmstudio-embedding.control-service.spec.d.ts.map +1 -0
  222. package/build/_modules/ai/_services/lmstudio-embedding.control-service.spec.js +159 -0
  223. package/build/_modules/ai/_services/lmstudio-embedding.control-service.spec.js.map +1 -0
  224. package/build/_modules/assistant/_collections/ass.util.spec.d.ts +2 -0
  225. package/build/_modules/assistant/_collections/ass.util.spec.d.ts.map +1 -0
  226. package/build/_modules/assistant/_collections/ass.util.spec.js +153 -0
  227. package/build/_modules/assistant/_collections/ass.util.spec.js.map +1 -0
  228. package/build/_modules/assistant/_services/ass-io.control-service.spec.d.ts +2 -0
  229. package/build/_modules/assistant/_services/ass-io.control-service.spec.d.ts.map +1 -0
  230. package/build/_modules/assistant/_services/ass-io.control-service.spec.js +99 -0
  231. package/build/_modules/assistant/_services/ass-io.control-service.spec.js.map +1 -0
  232. package/build/_modules/assistant/_services/ass-main.control-service.spec.d.ts +2 -0
  233. package/build/_modules/assistant/_services/ass-main.control-service.spec.d.ts.map +1 -0
  234. package/build/_modules/assistant/_services/ass-main.control-service.spec.js +146 -0
  235. package/build/_modules/assistant/_services/ass-main.control-service.spec.js.map +1 -0
  236. package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.spec.d.ts +2 -0
  237. package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.spec.d.ts.map +1 -0
  238. package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.spec.js +356 -0
  239. package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.spec.js.map +1 -0
  240. package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.spec.d.ts +2 -0
  241. package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.spec.d.ts.map +1 -0
  242. package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.spec.js +93 -0
  243. package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.spec.js.map +1 -0
  244. package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.spec.d.ts +2 -0
  245. package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.spec.d.ts.map +1 -0
  246. package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.spec.js +304 -0
  247. package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.spec.js.map +1 -0
  248. package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.spec.d.ts +2 -0
  249. package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.spec.d.ts.map +1 -0
  250. package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.spec.js +336 -0
  251. package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.spec.js.map +1 -0
  252. package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.spec.d.ts +2 -0
  253. package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.spec.d.ts.map +1 -0
  254. package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.spec.js +337 -0
  255. package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.spec.js.map +1 -0
  256. package/build/_modules/bot/_services/bot-commands.control-service.spec.d.ts +2 -0
  257. package/build/_modules/bot/_services/bot-commands.control-service.spec.d.ts.map +1 -0
  258. package/build/_modules/bot/_services/bot-commands.control-service.spec.js +84 -0
  259. package/build/_modules/bot/_services/bot-commands.control-service.spec.js.map +1 -0
  260. package/build/_modules/bot/_services/bot-io.control-service.spec.d.ts +2 -0
  261. package/build/_modules/bot/_services/bot-io.control-service.spec.d.ts.map +1 -0
  262. package/build/_modules/bot/_services/bot-io.control-service.spec.js +228 -0
  263. package/build/_modules/bot/_services/bot-io.control-service.spec.js.map +1 -0
  264. package/build/_modules/bot/_services/bot-main.control-service.spec.d.ts +2 -0
  265. package/build/_modules/bot/_services/bot-main.control-service.spec.d.ts.map +1 -0
  266. package/build/_modules/bot/_services/bot-main.control-service.spec.js +164 -0
  267. package/build/_modules/bot/_services/bot-main.control-service.spec.js.map +1 -0
  268. package/build/_modules/bot/_services/bot-messaging-provider.service-base.spec.d.ts +2 -0
  269. package/build/_modules/bot/_services/bot-messaging-provider.service-base.spec.d.ts.map +1 -0
  270. package/build/_modules/bot/_services/bot-messaging-provider.service-base.spec.js +267 -0
  271. package/build/_modules/bot/_services/bot-messaging-provider.service-base.spec.js.map +1 -0
  272. package/build/_modules/bot/_services/bot-routines.control-service.spec.d.ts +2 -0
  273. package/build/_modules/bot/_services/bot-routines.control-service.spec.d.ts.map +1 -0
  274. package/build/_modules/bot/_services/bot-routines.control-service.spec.js +82 -0
  275. package/build/_modules/bot/_services/bot-routines.control-service.spec.js.map +1 -0
  276. package/build/_modules/custom-data/custom-data.controller.spec.d.ts +2 -0
  277. package/build/_modules/custom-data/custom-data.controller.spec.d.ts.map +1 -0
  278. package/build/_modules/custom-data/custom-data.controller.spec.js +38 -0
  279. package/build/_modules/custom-data/custom-data.controller.spec.js.map +1 -0
  280. package/build/_modules/custom-data/custom-data.data-service.spec.d.ts +2 -0
  281. package/build/_modules/custom-data/custom-data.data-service.spec.d.ts.map +1 -0
  282. package/build/_modules/custom-data/custom-data.data-service.spec.js +45 -0
  283. package/build/_modules/custom-data/custom-data.data-service.spec.js.map +1 -0
  284. package/build/_modules/custom-data/get-custom-data-routing-module.util.spec.d.ts +2 -0
  285. package/build/_modules/custom-data/get-custom-data-routing-module.util.spec.d.ts.map +1 -0
  286. package/build/_modules/custom-data/get-custom-data-routing-module.util.spec.js +23 -0
  287. package/build/_modules/custom-data/get-custom-data-routing-module.util.spec.js.map +1 -0
  288. package/build/_modules/data-readers/_collections/dynts-sqlite-reader.util.spec.d.ts +2 -0
  289. package/build/_modules/data-readers/_collections/dynts-sqlite-reader.util.spec.d.ts.map +1 -0
  290. package/build/_modules/data-readers/_collections/dynts-sqlite-reader.util.spec.js +124 -0
  291. package/build/_modules/data-readers/_collections/dynts-sqlite-reader.util.spec.js.map +1 -0
  292. package/build/_modules/defaults/_services/default-auth.service.spec.d.ts +2 -0
  293. package/build/_modules/defaults/_services/default-auth.service.spec.d.ts.map +1 -0
  294. package/build/_modules/defaults/_services/default-auth.service.spec.js +210 -0
  295. package/build/_modules/defaults/_services/default-auth.service.spec.js.map +1 -0
  296. package/build/_modules/defaults/_services/default-socket-events.service.spec.d.ts +2 -0
  297. package/build/_modules/defaults/_services/default-socket-events.service.spec.d.ts.map +1 -0
  298. package/build/_modules/defaults/_services/default-socket-events.service.spec.js +34 -0
  299. package/build/_modules/defaults/_services/default-socket-events.service.spec.js.map +1 -0
  300. package/build/_modules/defaults/_services/default-user.data-service.spec.d.ts +2 -0
  301. package/build/_modules/defaults/_services/default-user.data-service.spec.d.ts.map +1 -0
  302. package/build/_modules/defaults/_services/default-user.data-service.spec.js +133 -0
  303. package/build/_modules/defaults/_services/default-user.data-service.spec.js.map +1 -0
  304. package/build/_modules/discord-assistant/_collections/dias.util.spec.d.ts +2 -0
  305. package/build/_modules/discord-assistant/_collections/dias.util.spec.d.ts.map +1 -0
  306. package/build/_modules/discord-assistant/_collections/dias.util.spec.js +307 -0
  307. package/build/_modules/discord-assistant/_collections/dias.util.spec.js.map +1 -0
  308. package/build/_modules/discord-assistant/_services/dias-io.control-service.spec.d.ts +2 -0
  309. package/build/_modules/discord-assistant/_services/dias-io.control-service.spec.d.ts.map +1 -0
  310. package/build/_modules/discord-assistant/_services/dias-io.control-service.spec.js +76 -0
  311. package/build/_modules/discord-assistant/_services/dias-io.control-service.spec.js.map +1 -0
  312. package/build/_modules/discord-assistant/_services/dias-main.control-service.spec.d.ts +2 -0
  313. package/build/_modules/discord-assistant/_services/dias-main.control-service.spec.d.ts.map +1 -0
  314. package/build/_modules/discord-assistant/_services/dias-main.control-service.spec.js +17 -0
  315. package/build/_modules/discord-assistant/_services/dias-main.control-service.spec.js.map +1 -0
  316. package/build/_modules/discord-assistant/_services/dias.service-base.spec.d.ts +2 -0
  317. package/build/_modules/discord-assistant/_services/dias.service-base.spec.d.ts.map +1 -0
  318. package/build/_modules/discord-assistant/_services/dias.service-base.spec.js +151 -0
  319. package/build/_modules/discord-assistant/_services/dias.service-base.spec.js.map +1 -0
  320. package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.spec.d.ts +2 -0
  321. package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.spec.d.ts.map +1 -0
  322. package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.spec.js +29 -0
  323. package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.spec.js.map +1 -0
  324. package/build/_modules/discord-bot/_collections/dibo-operations.util.spec.d.ts +2 -0
  325. package/build/_modules/discord-bot/_collections/dibo-operations.util.spec.d.ts.map +1 -0
  326. package/build/_modules/discord-bot/_collections/dibo-operations.util.spec.js +172 -0
  327. package/build/_modules/discord-bot/_collections/dibo-operations.util.spec.js.map +1 -0
  328. package/build/_modules/discord-bot/_services/dibo-commands.control-service.spec.d.ts +2 -0
  329. package/build/_modules/discord-bot/_services/dibo-commands.control-service.spec.d.ts.map +1 -0
  330. package/build/_modules/discord-bot/_services/dibo-commands.control-service.spec.js +133 -0
  331. package/build/_modules/discord-bot/_services/dibo-commands.control-service.spec.js.map +1 -0
  332. package/build/_modules/discord-bot/_services/dibo-io.control-service.spec.d.ts +2 -0
  333. package/build/_modules/discord-bot/_services/dibo-io.control-service.spec.d.ts.map +1 -0
  334. package/build/_modules/discord-bot/_services/dibo-io.control-service.spec.js +215 -0
  335. package/build/_modules/discord-bot/_services/dibo-io.control-service.spec.js.map +1 -0
  336. package/build/_modules/discord-bot/_services/dibo-main.control-service.spec.d.ts +2 -0
  337. package/build/_modules/discord-bot/_services/dibo-main.control-service.spec.d.ts.map +1 -0
  338. package/build/_modules/discord-bot/_services/dibo-main.control-service.spec.js +342 -0
  339. package/build/_modules/discord-bot/_services/dibo-main.control-service.spec.js.map +1 -0
  340. package/build/_modules/discord-bot/_services/dibo-routines.control-service.spec.d.ts +2 -0
  341. package/build/_modules/discord-bot/_services/dibo-routines.control-service.spec.d.ts.map +1 -0
  342. package/build/_modules/discord-bot/_services/dibo-routines.control-service.spec.js +87 -0
  343. package/build/_modules/discord-bot/_services/dibo-routines.control-service.spec.js.map +1 -0
  344. package/build/_modules/local-vector-search/_services/lvs-bm25.util.spec.d.ts +2 -0
  345. package/build/_modules/local-vector-search/_services/lvs-bm25.util.spec.d.ts.map +1 -0
  346. package/build/_modules/local-vector-search/_services/lvs-bm25.util.spec.js +137 -0
  347. package/build/_modules/local-vector-search/_services/lvs-bm25.util.spec.js.map +1 -0
  348. package/build/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.spec.d.ts +2 -0
  349. package/build/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.spec.d.ts.map +1 -0
  350. package/build/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.spec.js +345 -0
  351. package/build/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.spec.js.map +1 -0
  352. package/build/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.spec.d.ts +2 -0
  353. package/build/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.spec.d.ts.map +1 -0
  354. package/build/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.spec.js +407 -0
  355. package/build/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.spec.js.map +1 -0
  356. package/build/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.spec.d.ts +2 -0
  357. package/build/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.spec.d.ts.map +1 -0
  358. package/build/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.spec.js +160 -0
  359. package/build/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.spec.js.map +1 -0
  360. package/build/_modules/local-vector-search/_services/lvs-vector-persist.data-service.spec.d.ts +2 -0
  361. package/build/_modules/local-vector-search/_services/lvs-vector-persist.data-service.spec.d.ts.map +1 -0
  362. package/build/_modules/local-vector-search/_services/lvs-vector-persist.data-service.spec.js +122 -0
  363. package/build/_modules/local-vector-search/_services/lvs-vector-persist.data-service.spec.js.map +1 -0
  364. package/build/_modules/local-vector-search/_services/lvs-vector-pool.control-service.spec.d.ts +2 -0
  365. package/build/_modules/local-vector-search/_services/lvs-vector-pool.control-service.spec.d.ts.map +1 -0
  366. package/build/_modules/local-vector-search/_services/lvs-vector-pool.control-service.spec.js +388 -0
  367. package/build/_modules/local-vector-search/_services/lvs-vector-pool.control-service.spec.js.map +1 -0
  368. package/build/_modules/logs/file-log.service.spec.d.ts +2 -0
  369. package/build/_modules/logs/file-log.service.spec.d.ts.map +1 -0
  370. package/build/_modules/logs/file-log.service.spec.js +300 -0
  371. package/build/_modules/logs/file-log.service.spec.js.map +1 -0
  372. package/build/_modules/logs/file-logs.controller.spec.d.ts +2 -0
  373. package/build/_modules/logs/file-logs.controller.spec.d.ts.map +1 -0
  374. package/build/_modules/logs/file-logs.controller.spec.js +203 -0
  375. package/build/_modules/logs/file-logs.controller.spec.js.map +1 -0
  376. package/build/_modules/mcp/_services/dynts-mcp-server.service-base.spec.d.ts +2 -0
  377. package/build/_modules/mcp/_services/dynts-mcp-server.service-base.spec.d.ts.map +1 -0
  378. package/build/_modules/mcp/_services/dynts-mcp-server.service-base.spec.js +125 -0
  379. package/build/_modules/mcp/_services/dynts-mcp-server.service-base.spec.js.map +1 -0
  380. package/build/_modules/messaging/_collections/msg.util.spec.d.ts +2 -0
  381. package/build/_modules/messaging/_collections/msg.util.spec.d.ts.map +1 -0
  382. package/build/_modules/messaging/_collections/msg.util.spec.js +157 -0
  383. package/build/_modules/messaging/_collections/msg.util.spec.js.map +1 -0
  384. package/build/_modules/messaging/_services/msg-events.service.spec.d.ts +2 -0
  385. package/build/_modules/messaging/_services/msg-events.service.spec.d.ts.map +1 -0
  386. package/build/_modules/messaging/_services/msg-events.service.spec.js +122 -0
  387. package/build/_modules/messaging/_services/msg-events.service.spec.js.map +1 -0
  388. package/build/_modules/messaging/_services/msg-main.control-service.spec.d.ts +2 -0
  389. package/build/_modules/messaging/_services/msg-main.control-service.spec.d.ts.map +1 -0
  390. package/build/_modules/messaging/_services/msg-main.control-service.spec.js +121 -0
  391. package/build/_modules/messaging/_services/msg-main.control-service.spec.js.map +1 -0
  392. package/build/_modules/messaging/_services/msg.controller.spec.d.ts +2 -0
  393. package/build/_modules/messaging/_services/msg.controller.spec.d.ts.map +1 -0
  394. package/build/_modules/messaging/_services/msg.controller.spec.js +165 -0
  395. package/build/_modules/messaging/_services/msg.controller.spec.js.map +1 -0
  396. package/build/_modules/mock/app-params.mock.spec.d.ts +2 -0
  397. package/build/_modules/mock/app-params.mock.spec.d.ts.map +1 -0
  398. package/build/_modules/mock/app-params.mock.spec.js +19 -0
  399. package/build/_modules/mock/app-params.mock.spec.js.map +1 -0
  400. package/build/_modules/mock/auth-service.mock.spec.d.ts +2 -0
  401. package/build/_modules/mock/auth-service.mock.spec.d.ts.map +1 -0
  402. package/build/_modules/mock/auth-service.mock.spec.js +40 -0
  403. package/build/_modules/mock/auth-service.mock.spec.js.map +1 -0
  404. package/build/_modules/mock/controller.mock.spec.d.ts +2 -0
  405. package/build/_modules/mock/controller.mock.spec.d.ts.map +1 -0
  406. package/build/_modules/mock/controller.mock.spec.js +23 -0
  407. package/build/_modules/mock/controller.mock.spec.js.map +1 -0
  408. package/build/_modules/mock/data-model.mock.spec.d.ts +2 -0
  409. package/build/_modules/mock/data-model.mock.spec.d.ts.map +1 -0
  410. package/build/_modules/mock/data-model.mock.spec.js +101 -0
  411. package/build/_modules/mock/data-model.mock.spec.js.map +1 -0
  412. package/build/_modules/mock/email-service-collection.mock.spec.d.ts +2 -0
  413. package/build/_modules/mock/email-service-collection.mock.spec.d.ts.map +1 -0
  414. package/build/_modules/mock/email-service-collection.mock.spec.js +21 -0
  415. package/build/_modules/mock/email-service-collection.mock.spec.js.map +1 -0
  416. package/build/_modules/mock/email-service.mock.spec.d.ts +2 -0
  417. package/build/_modules/mock/email-service.mock.spec.d.ts.map +1 -0
  418. package/build/_modules/mock/email-service.mock.spec.js +14 -0
  419. package/build/_modules/mock/email-service.mock.spec.js.map +1 -0
  420. package/build/_modules/mock/socket-client.mock.spec.d.ts +2 -0
  421. package/build/_modules/mock/socket-client.mock.spec.d.ts.map +1 -0
  422. package/build/_modules/mock/socket-client.mock.spec.js +32 -0
  423. package/build/_modules/mock/socket-client.mock.spec.js.map +1 -0
  424. package/build/_modules/mock/socket-server.mock.spec.d.ts +2 -0
  425. package/build/_modules/mock/socket-server.mock.spec.d.ts.map +1 -0
  426. package/build/_modules/mock/socket-server.mock.spec.js +36 -0
  427. package/build/_modules/mock/socket-server.mock.spec.js.map +1 -0
  428. package/build/_modules/oauth2/_routes/oauth2.controller.spec.d.ts +2 -0
  429. package/build/_modules/oauth2/_routes/oauth2.controller.spec.d.ts.map +1 -0
  430. package/build/_modules/oauth2/_routes/oauth2.controller.spec.js +89 -0
  431. package/build/_modules/oauth2/_routes/oauth2.controller.spec.js.map +1 -0
  432. package/build/_modules/oauth2/_services/oauth2.auth-service.spec.d.ts +2 -0
  433. package/build/_modules/oauth2/_services/oauth2.auth-service.spec.d.ts.map +1 -0
  434. package/build/_modules/oauth2/_services/oauth2.auth-service.spec.js +195 -0
  435. package/build/_modules/oauth2/_services/oauth2.auth-service.spec.js.map +1 -0
  436. package/build/_modules/oauth2/_services/oauth2.control-service.spec.d.ts +2 -0
  437. package/build/_modules/oauth2/_services/oauth2.control-service.spec.d.ts.map +1 -0
  438. package/build/_modules/oauth2/_services/oauth2.control-service.spec.js +432 -0
  439. package/build/_modules/oauth2/_services/oauth2.control-service.spec.js.map +1 -0
  440. package/build/_modules/rate-limit/rate-limit.middleware.spec.d.ts +2 -0
  441. package/build/_modules/rate-limit/rate-limit.middleware.spec.d.ts.map +1 -0
  442. package/build/_modules/rate-limit/rate-limit.middleware.spec.js +277 -0
  443. package/build/_modules/rate-limit/rate-limit.middleware.spec.js.map +1 -0
  444. package/build/_modules/scheduler/scheduler.controller.spec.d.ts +2 -0
  445. package/build/_modules/scheduler/scheduler.controller.spec.d.ts.map +1 -0
  446. package/build/_modules/scheduler/scheduler.controller.spec.js +35 -0
  447. package/build/_modules/scheduler/scheduler.controller.spec.js.map +1 -0
  448. package/build/_modules/scheduler/scheduler.service.spec.d.ts +2 -0
  449. package/build/_modules/scheduler/scheduler.service.spec.d.ts.map +1 -0
  450. package/build/_modules/scheduler/scheduler.service.spec.js +123 -0
  451. package/build/_modules/scheduler/scheduler.service.spec.js.map +1 -0
  452. package/build/_modules/scoped-config/_services/dynts-scoped-config.control-service.spec.d.ts +2 -0
  453. package/build/_modules/scoped-config/_services/dynts-scoped-config.control-service.spec.d.ts.map +1 -0
  454. package/build/_modules/scoped-config/_services/dynts-scoped-config.control-service.spec.js +229 -0
  455. package/build/_modules/scoped-config/_services/dynts-scoped-config.control-service.spec.js.map +1 -0
  456. package/build/_modules/scoped-config/_services/dynts-scoped-config.data-service.spec.d.ts +2 -0
  457. package/build/_modules/scoped-config/_services/dynts-scoped-config.data-service.spec.d.ts.map +1 -0
  458. package/build/_modules/scoped-config/_services/dynts-scoped-config.data-service.spec.js +88 -0
  459. package/build/_modules/scoped-config/_services/dynts-scoped-config.data-service.spec.js.map +1 -0
  460. package/build/_modules/server/errors/errors.control-service.spec.d.ts +2 -0
  461. package/build/_modules/server/errors/errors.control-service.spec.d.ts.map +1 -0
  462. package/build/_modules/server/errors/errors.control-service.spec.js +198 -0
  463. package/build/_modules/server/errors/errors.control-service.spec.js.map +1 -0
  464. package/build/_modules/server/errors/errors.controller.spec.d.ts +2 -0
  465. package/build/_modules/server/errors/errors.controller.spec.d.ts.map +1 -0
  466. package/build/_modules/server/errors/errors.controller.spec.js +287 -0
  467. package/build/_modules/server/errors/errors.controller.spec.js.map +1 -0
  468. package/build/_modules/server/errors/errors.data-service.spec.d.ts +2 -0
  469. package/build/_modules/server/errors/errors.data-service.spec.d.ts.map +1 -0
  470. package/build/_modules/server/errors/errors.data-service.spec.js +390 -0
  471. package/build/_modules/server/errors/errors.data-service.spec.js.map +1 -0
  472. package/build/_modules/server/server-status/server-status-snapshot.control-service.spec.d.ts +2 -0
  473. package/build/_modules/server/server-status/server-status-snapshot.control-service.spec.d.ts.map +1 -0
  474. package/build/_modules/server/server-status/server-status-snapshot.control-service.spec.js +59 -0
  475. package/build/_modules/server/server-status/server-status-snapshot.control-service.spec.js.map +1 -0
  476. package/build/_modules/server/server-status/server-status-snapshot.data-service.spec.d.ts +2 -0
  477. package/build/_modules/server/server-status/server-status-snapshot.data-service.spec.d.ts.map +1 -0
  478. package/build/_modules/server/server-status/server-status-snapshot.data-service.spec.js +58 -0
  479. package/build/_modules/server/server-status/server-status-snapshot.data-service.spec.js.map +1 -0
  480. package/build/_modules/server/server-status/server-status.control-service.spec.d.ts +2 -0
  481. package/build/_modules/server/server-status/server-status.control-service.spec.d.ts.map +1 -0
  482. package/build/_modules/server/server-status/server-status.control-service.spec.js +537 -0
  483. package/build/_modules/server/server-status/server-status.control-service.spec.js.map +1 -0
  484. package/build/_modules/server/server-status/server-status.controller.spec.d.ts +2 -0
  485. package/build/_modules/server/server-status/server-status.controller.spec.d.ts.map +1 -0
  486. package/build/_modules/server/server-status/server-status.controller.spec.js +223 -0
  487. package/build/_modules/server/server-status/server-status.controller.spec.js.map +1 -0
  488. package/build/_modules/socket/_models/socket-client-service-params.control-model.spec.d.ts +2 -0
  489. package/build/_modules/socket/_models/socket-client-service-params.control-model.spec.d.ts.map +1 -0
  490. package/build/_modules/socket/_models/socket-client-service-params.control-model.spec.js +25 -0
  491. package/build/_modules/socket/_models/socket-client-service-params.control-model.spec.js.map +1 -0
  492. package/build/_modules/socket/_models/socket-presence.control-model.d.ts.map +1 -1
  493. package/build/_modules/socket/_models/socket-presence.control-model.js +1 -0
  494. package/build/_modules/socket/_models/socket-presence.control-model.js.map +1 -1
  495. package/build/_modules/socket/_models/socket-presence.control-model.spec.d.ts +2 -0
  496. package/build/_modules/socket/_models/socket-presence.control-model.spec.d.ts.map +1 -0
  497. package/build/_modules/socket/_models/socket-presence.control-model.spec.js +137 -0
  498. package/build/_modules/socket/_models/socket-presence.control-model.spec.js.map +1 -0
  499. package/build/_modules/socket/_models/socket-server-service-params.control-model.spec.d.ts +2 -0
  500. package/build/_modules/socket/_models/socket-server-service-params.control-model.spec.d.ts.map +1 -0
  501. package/build/_modules/socket/_models/socket-server-service-params.control-model.spec.js +58 -0
  502. package/build/_modules/socket/_models/socket-server-service-params.control-model.spec.js.map +1 -0
  503. package/build/_modules/socket/_services/socket-client.service.spec.d.ts +2 -0
  504. package/build/_modules/socket/_services/socket-client.service.spec.d.ts.map +1 -0
  505. package/build/_modules/socket/_services/socket-client.service.spec.js +12 -0
  506. package/build/_modules/socket/_services/socket-client.service.spec.js.map +1 -0
  507. package/build/_modules/socket/_services/socket-server.service.d.ts +3 -1
  508. package/build/_modules/socket/_services/socket-server.service.d.ts.map +1 -1
  509. package/build/_modules/socket/_services/socket-server.service.js +32 -50
  510. package/build/_modules/socket/_services/socket-server.service.js.map +1 -1
  511. package/build/_modules/socket/_services/socket-server.service.spec.d.ts +2 -0
  512. package/build/_modules/socket/_services/socket-server.service.spec.d.ts.map +1 -0
  513. package/build/_modules/socket/_services/socket-server.service.spec.js +126 -0
  514. package/build/_modules/socket/_services/socket-server.service.spec.js.map +1 -0
  515. package/build/_modules/socket/app-extended.integration.spec.d.ts +2 -0
  516. package/build/_modules/socket/app-extended.integration.spec.d.ts.map +1 -0
  517. package/build/_modules/socket/app-extended.integration.spec.js +76 -0
  518. package/build/_modules/socket/app-extended.integration.spec.js.map +1 -0
  519. package/build/_modules/test/get-test-routing-module.util.spec.d.ts +2 -0
  520. package/build/_modules/test/get-test-routing-module.util.spec.d.ts.map +1 -0
  521. package/build/_modules/test/get-test-routing-module.util.spec.js +23 -0
  522. package/build/_modules/test/get-test-routing-module.util.spec.js.map +1 -0
  523. package/build/_modules/test/test.controller.spec.d.ts +2 -0
  524. package/build/_modules/test/test.controller.spec.d.ts.map +1 -0
  525. package/build/_modules/test/test.controller.spec.js +54 -0
  526. package/build/_modules/test/test.controller.spec.js.map +1 -0
  527. package/build/_modules/test-email-sink/_services/dynts-test-email-sink.service.spec.d.ts +2 -0
  528. package/build/_modules/test-email-sink/_services/dynts-test-email-sink.service.spec.d.ts.map +1 -0
  529. package/build/_modules/test-email-sink/_services/dynts-test-email-sink.service.spec.js +91 -0
  530. package/build/_modules/test-email-sink/_services/dynts-test-email-sink.service.spec.js.map +1 -0
  531. package/build/_modules/usage/usage.controller.spec.d.ts +2 -0
  532. package/build/_modules/usage/usage.controller.spec.d.ts.map +1 -0
  533. package/build/_modules/usage/usage.controller.spec.js +82 -0
  534. package/build/_modules/usage/usage.controller.spec.js.map +1 -0
  535. package/build/_modules/usage/usage.data-service.spec.d.ts +2 -0
  536. package/build/_modules/usage/usage.data-service.spec.d.ts.map +1 -0
  537. package/build/_modules/usage/usage.data-service.spec.js +284 -0
  538. package/build/_modules/usage/usage.data-service.spec.js.map +1 -0
  539. package/build/_services/base/api.service-base.spec.d.ts +2 -0
  540. package/build/_services/base/api.service-base.spec.d.ts.map +1 -0
  541. package/build/_services/base/api.service-base.spec.js +91 -0
  542. package/build/_services/base/api.service-base.spec.js.map +1 -0
  543. package/build/_services/base/archive-data.service.spec.d.ts +2 -0
  544. package/build/_services/base/archive-data.service.spec.d.ts.map +1 -0
  545. package/build/_services/base/archive-data.service.spec.js +149 -0
  546. package/build/_services/base/archive-data.service.spec.js.map +1 -0
  547. package/build/_services/base/data.service.spec.d.ts +2 -0
  548. package/build/_services/base/data.service.spec.d.ts.map +1 -0
  549. package/build/_services/base/data.service.spec.js +614 -0
  550. package/build/_services/base/data.service.spec.js.map +1 -0
  551. package/build/_services/base/db.service.encryption.spec.d.ts +2 -0
  552. package/build/_services/base/db.service.encryption.spec.d.ts.map +1 -0
  553. package/build/_services/base/db.service.encryption.spec.js +66 -0
  554. package/build/_services/base/db.service.encryption.spec.js.map +1 -0
  555. package/build/_services/base/db.service.spec.d.ts +2 -0
  556. package/build/_services/base/db.service.spec.d.ts.map +1 -0
  557. package/build/_services/base/db.service.spec.js +127 -0
  558. package/build/_services/base/db.service.spec.js.map +1 -0
  559. package/build/_services/base/singleton.service-base.spec.d.ts +2 -0
  560. package/build/_services/base/singleton.service-base.spec.d.ts.map +1 -0
  561. package/build/_services/base/singleton.service-base.spec.js +24 -0
  562. package/build/_services/base/singleton.service-base.spec.js.map +1 -0
  563. package/build/_services/base/singleton.service.spec.d.ts +2 -0
  564. package/build/_services/base/singleton.service.spec.d.ts.map +1 -0
  565. package/build/_services/base/singleton.service.spec.js +88 -0
  566. package/build/_services/base/singleton.service.spec.js.map +1 -0
  567. package/build/_services/core/api.service.spec.d.ts +2 -0
  568. package/build/_services/core/api.service.spec.d.ts.map +1 -0
  569. package/build/_services/core/api.service.spec.js +150 -0
  570. package/build/_services/core/api.service.spec.js.map +1 -0
  571. package/build/_services/core/auth.service.spec.d.ts +2 -0
  572. package/build/_services/core/auth.service.spec.d.ts.map +1 -0
  573. package/build/_services/core/auth.service.spec.js +129 -0
  574. package/build/_services/core/auth.service.spec.js.map +1 -0
  575. package/build/_services/core/collection-growth-monitor.service.spec.d.ts +2 -0
  576. package/build/_services/core/collection-growth-monitor.service.spec.d.ts.map +1 -0
  577. package/build/_services/core/collection-growth-monitor.service.spec.js +51 -0
  578. package/build/_services/core/collection-growth-monitor.service.spec.js.map +1 -0
  579. package/build/_services/core/diagnostics.service.spec.d.ts +2 -0
  580. package/build/_services/core/diagnostics.service.spec.d.ts.map +1 -0
  581. package/build/_services/core/diagnostics.service.spec.js +40 -0
  582. package/build/_services/core/diagnostics.service.spec.js.map +1 -0
  583. package/build/_services/core/email.service.spec.d.ts +2 -0
  584. package/build/_services/core/email.service.spec.d.ts.map +1 -0
  585. package/build/_services/core/email.service.spec.js +77 -0
  586. package/build/_services/core/email.service.spec.js.map +1 -0
  587. package/build/_services/core/event-loop-diag.service.spec.d.ts +2 -0
  588. package/build/_services/core/event-loop-diag.service.spec.d.ts.map +1 -0
  589. package/build/_services/core/event-loop-diag.service.spec.js +18 -0
  590. package/build/_services/core/event-loop-diag.service.spec.js.map +1 -0
  591. package/build/_services/core/global.service.spec.d.ts +2 -0
  592. package/build/_services/core/global.service.spec.d.ts.map +1 -0
  593. package/build/_services/core/global.service.spec.js +235 -0
  594. package/build/_services/core/global.service.spec.js.map +1 -0
  595. package/build/_services/core/memory-guard.service.spec.d.ts +2 -0
  596. package/build/_services/core/memory-guard.service.spec.d.ts.map +1 -0
  597. package/build/_services/core/memory-guard.service.spec.js +219 -0
  598. package/build/_services/core/memory-guard.service.spec.js.map +1 -0
  599. package/build/_services/core/migration-runner.service.spec.d.ts +2 -0
  600. package/build/_services/core/migration-runner.service.spec.d.ts.map +1 -0
  601. package/build/_services/core/migration-runner.service.spec.js +77 -0
  602. package/build/_services/core/migration-runner.service.spec.js.map +1 -0
  603. package/build/_services/core/request-hunter.service.spec.d.ts +2 -0
  604. package/build/_services/core/request-hunter.service.spec.d.ts.map +1 -0
  605. package/build/_services/core/request-hunter.service.spec.js +101 -0
  606. package/build/_services/core/request-hunter.service.spec.js.map +1 -0
  607. package/build/_services/core/service-collection.service.spec.d.ts +2 -0
  608. package/build/_services/core/service-collection.service.spec.d.ts.map +1 -0
  609. package/build/_services/core/service-collection.service.spec.js +39 -0
  610. package/build/_services/core/service-collection.service.spec.js.map +1 -0
  611. package/build/_services/route/controller.service.spec.d.ts +2 -0
  612. package/build/_services/route/controller.service.spec.d.ts.map +1 -0
  613. package/build/_services/route/controller.service.spec.js +48 -0
  614. package/build/_services/route/controller.service.spec.js.map +1 -0
  615. package/build/_services/route/routing-module.service.spec.d.ts +2 -0
  616. package/build/_services/route/routing-module.service.spec.d.ts.map +1 -0
  617. package/build/_services/route/routing-module.service.spec.js +81 -0
  618. package/build/_services/route/routing-module.service.spec.js.map +1 -0
  619. package/build/_services/server/app.server-retention.spec.d.ts +2 -0
  620. package/build/_services/server/app.server-retention.spec.d.ts.map +1 -0
  621. package/build/_services/server/app.server-retention.spec.js +93 -0
  622. package/build/_services/server/app.server-retention.spec.js.map +1 -0
  623. package/build/_services/shared.static-service.spec.d.ts +2 -0
  624. package/build/_services/shared.static-service.spec.d.ts.map +1 -0
  625. package/build/_services/shared.static-service.spec.js +82 -0
  626. package/build/_services/shared.static-service.spec.js.map +1 -0
  627. package/coverage/_collections/archive.util.ts.html +139 -0
  628. package/coverage/_collections/get-environment-settings.util.ts.html +229 -0
  629. package/coverage/_collections/index.html +146 -0
  630. package/coverage/_collections/star.controller.ts.html +472 -0
  631. package/coverage/_models/control-models/api-call-params.control-model.ts.html +511 -0
  632. package/coverage/_models/control-models/app-ext-system-controls.control-model.ts.html +112 -0
  633. package/coverage/_models/control-models/app-params.control-model.ts.html +475 -0
  634. package/coverage/_models/control-models/app-system-controls.control-model.ts.html +112 -0
  635. package/coverage/_models/control-models/endpoint-params.control-model.ts.html +1618 -0
  636. package/coverage/_models/control-models/http-settings.control-model.ts.html +172 -0
  637. package/coverage/_models/control-models/index.html +206 -0
  638. package/coverage/_models/control-models/system-control.control-model.ts.html +121 -0
  639. package/coverage/_modules/ai/_models/ai-input-interfaces.ts.html +436 -0
  640. package/coverage/_modules/ai/_models/index.html +116 -0
  641. package/coverage/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.ts.html +1993 -0
  642. package/coverage/_modules/ai/_modules/document-ai/_collections/dai-document.util.ts.html +340 -0
  643. package/coverage/_modules/ai/_modules/document-ai/_collections/index.html +131 -0
  644. package/coverage/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.ts.html +523 -0
  645. package/coverage/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.ts.html +571 -0
  646. package/coverage/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.ts.html +382 -0
  647. package/coverage/_modules/ai/_modules/document-ai/_models/data-models/index.html +146 -0
  648. package/coverage/_modules/ai/_modules/open-ai/_collections/index.html +131 -0
  649. package/coverage/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.ts.html +331 -0
  650. package/coverage/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.ts.html +310 -0
  651. package/coverage/_modules/ai/_modules/open-ai/_services/data-services/index.html +161 -0
  652. package/coverage/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-chunk-data.service.ts.html +958 -0
  653. package/coverage/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-page.data-service.ts.html +1801 -0
  654. package/coverage/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.ts.html +1390 -0
  655. package/coverage/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.ts.html +1915 -0
  656. package/coverage/_modules/ai/_modules/open-ai/_services/index.html +146 -0
  657. package/coverage/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.ts.html +334 -0
  658. package/coverage/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts.html +1822 -0
  659. package/coverage/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts.html +2584 -0
  660. package/coverage/_modules/ai/_services/ai-embedding.service-base.ts.html +208 -0
  661. package/coverage/_modules/ai/_services/ai-llm-chat.service-base.ts.html +289 -0
  662. package/coverage/_modules/ai/_services/ai-llm.service-base.ts.html +1060 -0
  663. package/coverage/_modules/ai/_services/ai-provider.service-base.ts.html +172 -0
  664. package/coverage/_modules/ai/_services/index.html +161 -0
  665. package/coverage/_modules/assistant/_collections/ass.util.ts.html +235 -0
  666. package/coverage/_modules/assistant/_collections/index.html +116 -0
  667. package/coverage/_modules/assistant/_services/ass-io.control-service.ts.html +307 -0
  668. package/coverage/_modules/assistant/_services/ass-main.control-service.ts.html +406 -0
  669. package/coverage/_modules/assistant/_services/index.html +131 -0
  670. package/coverage/_modules/bot/_modules/discord-bot/_models/dib-platform.types.ts.html +112 -0
  671. package/coverage/_modules/bot/_modules/discord-bot/_models/index.html +116 -0
  672. package/coverage/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.ts.html +1978 -0
  673. package/coverage/_modules/bot/_modules/discord-bot/_services/index.html +116 -0
  674. package/coverage/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.ts.html +250 -0
  675. package/coverage/_modules/bot/_modules/dynamo-bot/_collections/index.html +116 -0
  676. package/coverage/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.ts.html +130 -0
  677. package/coverage/_modules/bot/_modules/dynamo-bot/_models/index.html +116 -0
  678. package/coverage/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.ts.html +1414 -0
  679. package/coverage/_modules/bot/_modules/dynamo-bot/_services/index.html +116 -0
  680. package/coverage/_modules/bot/_modules/slack-bot/_models/index.html +116 -0
  681. package/coverage/_modules/bot/_modules/slack-bot/_models/slb-platform.types.ts.html +112 -0
  682. package/coverage/_modules/bot/_modules/slack-bot/_services/index.html +116 -0
  683. package/coverage/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.ts.html +664 -0
  684. package/coverage/_modules/bot/_modules/teams-bot/_models/index.html +116 -0
  685. package/coverage/_modules/bot/_modules/teams-bot/_models/teb-platform.types.ts.html +112 -0
  686. package/coverage/_modules/bot/_modules/teams-bot/_services/index.html +116 -0
  687. package/coverage/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.ts.html +664 -0
  688. package/coverage/_modules/bot/_services/bot-commands.control-service.ts.html +559 -0
  689. package/coverage/_modules/bot/_services/bot-io.control-service.ts.html +1072 -0
  690. package/coverage/_modules/bot/_services/bot-main.control-service.ts.html +1552 -0
  691. package/coverage/_modules/bot/_services/bot-messaging-provider.service-base.ts.html +556 -0
  692. package/coverage/_modules/bot/_services/bot-routines.control-service.ts.html +319 -0
  693. package/coverage/_modules/bot/_services/index.html +176 -0
  694. package/coverage/_modules/custom-data/custom-data.controller.ts.html +292 -0
  695. package/coverage/_modules/custom-data/custom-data.data-service.ts.html +148 -0
  696. package/coverage/_modules/custom-data/get-custom-data-routing-module.util.ts.html +157 -0
  697. package/coverage/_modules/custom-data/index.html +146 -0
  698. package/coverage/_modules/defaults/_models/default-user.data-model.ts.html +301 -0
  699. package/coverage/_modules/defaults/_models/index.html +116 -0
  700. package/coverage/_modules/defaults/_services/default-auth.service.ts.html +616 -0
  701. package/coverage/_modules/defaults/_services/default-socket-events.service.ts.html +268 -0
  702. package/coverage/_modules/defaults/_services/default-user.data-service.ts.html +379 -0
  703. package/coverage/_modules/defaults/_services/index.html +146 -0
  704. package/coverage/_modules/discord-assistant/_collections/dias.util.ts.html +481 -0
  705. package/coverage/_modules/discord-assistant/_collections/index.html +116 -0
  706. package/coverage/_modules/discord-assistant/_models/dias-knowledge.data-model.ts.html +241 -0
  707. package/coverage/_modules/discord-assistant/_models/index.html +116 -0
  708. package/coverage/_modules/discord-assistant/_services/dias-chunk.data-service.ts.html +616 -0
  709. package/coverage/_modules/discord-assistant/_services/dias-io.control-service.ts.html +292 -0
  710. package/coverage/_modules/discord-assistant/_services/dias-main.control-service.ts.html +166 -0
  711. package/coverage/_modules/discord-assistant/_services/dias.service-base.ts.html +313 -0
  712. package/coverage/_modules/discord-assistant/_services/index.html +161 -0
  713. package/coverage/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.ts.html +118 -0
  714. package/coverage/_modules/discord-assistant-voiced/_services/index.html +116 -0
  715. package/coverage/_modules/discord-bot/_collections/dibo-global-settings.conts.ts.html +250 -0
  716. package/coverage/_modules/discord-bot/_collections/dibo-operations.util.ts.html +1246 -0
  717. package/coverage/_modules/discord-bot/_collections/index.html +131 -0
  718. package/coverage/_modules/discord-bot/_models/dibo-last-mention-date.inteface.ts.html +106 -0
  719. package/coverage/_modules/discord-bot/_models/index.html +116 -0
  720. package/coverage/_modules/discord-bot/_services/dibo-commands.control-service.ts.html +544 -0
  721. package/coverage/_modules/discord-bot/_services/dibo-io.control-service.ts.html +1003 -0
  722. package/coverage/_modules/discord-bot/_services/dibo-main.control-service.ts.html +1546 -0
  723. package/coverage/_modules/discord-bot/_services/dibo-routines.control-service.ts.html +376 -0
  724. package/coverage/_modules/discord-bot/_services/index.html +161 -0
  725. package/coverage/_modules/messaging/_collections/get-messaging-routing-module.util.ts.html +163 -0
  726. package/coverage/_modules/messaging/_collections/index.html +131 -0
  727. package/coverage/_modules/messaging/_collections/msg.util.ts.html +334 -0
  728. package/coverage/_modules/messaging/_services/index.html +191 -0
  729. package/coverage/_modules/messaging/_services/msg-conversation.data-service.ts.html +523 -0
  730. package/coverage/_modules/messaging/_services/msg-events.service.ts.html +886 -0
  731. package/coverage/_modules/messaging/_services/msg-integration.control-service.ts.html +622 -0
  732. package/coverage/_modules/messaging/_services/msg-main.control-service.ts.html +1738 -0
  733. package/coverage/_modules/messaging/_services/msg-message.data-service.ts.html +472 -0
  734. package/coverage/_modules/messaging/_services/msg.controller.ts.html +1195 -0
  735. package/coverage/_modules/mock/app-extended-server.mock.ts.html +688 -0
  736. package/coverage/_modules/mock/app-params.mock.ts.html +112 -0
  737. package/coverage/_modules/mock/app-server.mock.ts.html +649 -0
  738. package/coverage/_modules/mock/auth-service.mock.ts.html +169 -0
  739. package/coverage/_modules/mock/controller.mock.ts.html +133 -0
  740. package/coverage/_modules/mock/data-model.mock.ts.html +331 -0
  741. package/coverage/_modules/mock/email-service-collection.mock.ts.html +130 -0
  742. package/coverage/_modules/mock/email-service.mock.ts.html +145 -0
  743. package/coverage/_modules/mock/endpoint.mock.ts.html +358 -0
  744. package/coverage/_modules/mock/index.html +266 -0
  745. package/coverage/_modules/mock/socket-client.mock.ts.html +220 -0
  746. package/coverage/_modules/mock/socket-server.mock.ts.html +247 -0
  747. package/coverage/_modules/oauth2/_routes/index.html +116 -0
  748. package/coverage/_modules/oauth2/_routes/oauth2.controller.ts.html +379 -0
  749. package/coverage/_modules/oauth2/_services/index.html +131 -0
  750. package/coverage/_modules/oauth2/_services/oauth2.auth-service.ts.html +781 -0
  751. package/coverage/_modules/oauth2/_services/oauth2.control-service.ts.html +2044 -0
  752. package/coverage/_modules/server/errors/errors.control-service.ts.html +292 -0
  753. package/coverage/_modules/server/errors/errors.controller.ts.html +895 -0
  754. package/coverage/_modules/server/errors/errors.data-service.ts.html +1666 -0
  755. package/coverage/_modules/server/errors/index.html +146 -0
  756. package/coverage/_modules/server/server-status/index.html +161 -0
  757. package/coverage/_modules/server/server-status/server-status-snapshot.control-service.ts.html +136 -0
  758. package/coverage/_modules/server/server-status/server-status-snapshot.data-service.ts.html +196 -0
  759. package/coverage/_modules/server/server-status/server-status.control-service.ts.html +1093 -0
  760. package/coverage/_modules/server/server-status/server-status.controller.ts.html +478 -0
  761. package/coverage/_modules/socket/_models/index.html +146 -0
  762. package/coverage/_modules/socket/_models/socket-client-service-params.control-model.ts.html +151 -0
  763. package/coverage/_modules/socket/_models/socket-presence.control-model.ts.html +715 -0
  764. package/coverage/_modules/socket/_models/socket-server-service-params.control-model.ts.html +145 -0
  765. package/coverage/_modules/socket/_services/index.html +131 -0
  766. package/coverage/_modules/socket/_services/socket-client.service.ts.html +862 -0
  767. package/coverage/_modules/socket/_services/socket-server.service.ts.html +3196 -0
  768. package/coverage/_modules/socket/app-extended.server.ts.html +1954 -0
  769. package/coverage/_modules/socket/index.html +116 -0
  770. package/coverage/_modules/test/get-test-routing-module.util.ts.html +154 -0
  771. package/coverage/_modules/test/index.html +131 -0
  772. package/coverage/_modules/test/test.controller.ts.html +430 -0
  773. package/coverage/_modules/usage/get-usage-routing-module.util.ts.html +151 -0
  774. package/coverage/_modules/usage/index.html +146 -0
  775. package/coverage/_modules/usage/usage.controller.ts.html +463 -0
  776. package/coverage/_modules/usage/usage.data-service.ts.html +640 -0
  777. package/coverage/_services/base/api.service-base.ts.html +307 -0
  778. package/coverage/_services/base/archive-data.service.ts.html +727 -0
  779. package/coverage/_services/base/data.service.ts.html +7033 -0
  780. package/coverage/_services/base/db.service.ts.html +4786 -0
  781. package/coverage/_services/base/index.html +191 -0
  782. package/coverage/_services/base/singleton.service-base.ts.html +157 -0
  783. package/coverage/_services/base/singleton.service.ts.html +190 -0
  784. package/coverage/_services/core/api.service.ts.html +1900 -0
  785. package/coverage/_services/core/auth.service.ts.html +607 -0
  786. package/coverage/_services/core/email.service.ts.html +2302 -0
  787. package/coverage/_services/core/global.service.ts.html +1363 -0
  788. package/coverage/_services/core/index.html +176 -0
  789. package/coverage/_services/core/service-collection.service.ts.html +103 -0
  790. package/coverage/_services/index.html +116 -0
  791. package/coverage/_services/route/controller.service.ts.html +475 -0
  792. package/coverage/_services/route/index.html +131 -0
  793. package/coverage/_services/route/routing-module.service.ts.html +1075 -0
  794. package/coverage/_services/server/app.server.ts.html +4408 -0
  795. package/coverage/_services/server/index.html +116 -0
  796. package/coverage/_services/shared.static-service.ts.html +319 -0
  797. package/coverage/base.css +224 -0
  798. package/coverage/block-navigation.js +87 -0
  799. package/coverage/favicon.png +0 -0
  800. package/coverage/index.html +821 -0
  801. package/coverage/lcov-report/_collections/archive.util.ts.html +139 -0
  802. package/coverage/lcov-report/_collections/get-environment-settings.util.ts.html +229 -0
  803. package/coverage/lcov-report/_collections/index.html +146 -0
  804. package/coverage/lcov-report/_collections/star.controller.ts.html +472 -0
  805. package/coverage/lcov-report/_models/control-models/api-call-params.control-model.ts.html +511 -0
  806. package/coverage/lcov-report/_models/control-models/app-ext-system-controls.control-model.ts.html +112 -0
  807. package/coverage/lcov-report/_models/control-models/app-params.control-model.ts.html +475 -0
  808. package/coverage/lcov-report/_models/control-models/app-system-controls.control-model.ts.html +112 -0
  809. package/coverage/lcov-report/_models/control-models/endpoint-params.control-model.ts.html +1618 -0
  810. package/coverage/lcov-report/_models/control-models/http-settings.control-model.ts.html +172 -0
  811. package/coverage/lcov-report/_models/control-models/index.html +206 -0
  812. package/coverage/lcov-report/_models/control-models/system-control.control-model.ts.html +121 -0
  813. package/coverage/lcov-report/_modules/ai/_models/ai-input-interfaces.ts.html +436 -0
  814. package/coverage/lcov-report/_modules/ai/_models/index.html +116 -0
  815. package/coverage/lcov-report/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.ts.html +1993 -0
  816. package/coverage/lcov-report/_modules/ai/_modules/document-ai/_collections/dai-document.util.ts.html +340 -0
  817. package/coverage/lcov-report/_modules/ai/_modules/document-ai/_collections/index.html +131 -0
  818. package/coverage/lcov-report/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.ts.html +523 -0
  819. package/coverage/lcov-report/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.ts.html +571 -0
  820. package/coverage/lcov-report/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.ts.html +382 -0
  821. package/coverage/lcov-report/_modules/ai/_modules/document-ai/_models/data-models/index.html +146 -0
  822. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_collections/index.html +131 -0
  823. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.ts.html +331 -0
  824. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.ts.html +310 -0
  825. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_services/data-services/index.html +161 -0
  826. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-chunk-data.service.ts.html +958 -0
  827. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-page.data-service.ts.html +1801 -0
  828. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.ts.html +1390 -0
  829. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.ts.html +1915 -0
  830. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_services/index.html +146 -0
  831. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.ts.html +334 -0
  832. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts.html +1822 -0
  833. package/coverage/lcov-report/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts.html +2584 -0
  834. package/coverage/lcov-report/_modules/ai/_services/ai-embedding.service-base.ts.html +208 -0
  835. package/coverage/lcov-report/_modules/ai/_services/ai-llm-chat.service-base.ts.html +289 -0
  836. package/coverage/lcov-report/_modules/ai/_services/ai-llm.service-base.ts.html +1060 -0
  837. package/coverage/lcov-report/_modules/ai/_services/ai-provider.service-base.ts.html +172 -0
  838. package/coverage/lcov-report/_modules/ai/_services/index.html +161 -0
  839. package/coverage/lcov-report/_modules/assistant/_collections/ass.util.ts.html +235 -0
  840. package/coverage/lcov-report/_modules/assistant/_collections/index.html +116 -0
  841. package/coverage/lcov-report/_modules/assistant/_services/ass-io.control-service.ts.html +307 -0
  842. package/coverage/lcov-report/_modules/assistant/_services/ass-main.control-service.ts.html +406 -0
  843. package/coverage/lcov-report/_modules/assistant/_services/index.html +131 -0
  844. package/coverage/lcov-report/_modules/bot/_modules/discord-bot/_models/dib-platform.types.ts.html +112 -0
  845. package/coverage/lcov-report/_modules/bot/_modules/discord-bot/_models/index.html +116 -0
  846. package/coverage/lcov-report/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.ts.html +1978 -0
  847. package/coverage/lcov-report/_modules/bot/_modules/discord-bot/_services/index.html +116 -0
  848. package/coverage/lcov-report/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.ts.html +250 -0
  849. package/coverage/lcov-report/_modules/bot/_modules/dynamo-bot/_collections/index.html +116 -0
  850. package/coverage/lcov-report/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.ts.html +130 -0
  851. package/coverage/lcov-report/_modules/bot/_modules/dynamo-bot/_models/index.html +116 -0
  852. package/coverage/lcov-report/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.ts.html +1414 -0
  853. package/coverage/lcov-report/_modules/bot/_modules/dynamo-bot/_services/index.html +116 -0
  854. package/coverage/lcov-report/_modules/bot/_modules/slack-bot/_models/index.html +116 -0
  855. package/coverage/lcov-report/_modules/bot/_modules/slack-bot/_models/slb-platform.types.ts.html +112 -0
  856. package/coverage/lcov-report/_modules/bot/_modules/slack-bot/_services/index.html +116 -0
  857. package/coverage/lcov-report/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.ts.html +664 -0
  858. package/coverage/lcov-report/_modules/bot/_modules/teams-bot/_models/index.html +116 -0
  859. package/coverage/lcov-report/_modules/bot/_modules/teams-bot/_models/teb-platform.types.ts.html +112 -0
  860. package/coverage/lcov-report/_modules/bot/_modules/teams-bot/_services/index.html +116 -0
  861. package/coverage/lcov-report/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.ts.html +664 -0
  862. package/coverage/lcov-report/_modules/bot/_services/bot-commands.control-service.ts.html +559 -0
  863. package/coverage/lcov-report/_modules/bot/_services/bot-io.control-service.ts.html +1072 -0
  864. package/coverage/lcov-report/_modules/bot/_services/bot-main.control-service.ts.html +1552 -0
  865. package/coverage/lcov-report/_modules/bot/_services/bot-messaging-provider.service-base.ts.html +556 -0
  866. package/coverage/lcov-report/_modules/bot/_services/bot-routines.control-service.ts.html +319 -0
  867. package/coverage/lcov-report/_modules/bot/_services/index.html +176 -0
  868. package/coverage/lcov-report/_modules/custom-data/custom-data.controller.ts.html +292 -0
  869. package/coverage/lcov-report/_modules/custom-data/custom-data.data-service.ts.html +148 -0
  870. package/coverage/lcov-report/_modules/custom-data/get-custom-data-routing-module.util.ts.html +157 -0
  871. package/coverage/lcov-report/_modules/custom-data/index.html +146 -0
  872. package/coverage/lcov-report/_modules/defaults/_models/default-user.data-model.ts.html +301 -0
  873. package/coverage/lcov-report/_modules/defaults/_models/index.html +116 -0
  874. package/coverage/lcov-report/_modules/defaults/_services/default-auth.service.ts.html +616 -0
  875. package/coverage/lcov-report/_modules/defaults/_services/default-socket-events.service.ts.html +268 -0
  876. package/coverage/lcov-report/_modules/defaults/_services/default-user.data-service.ts.html +379 -0
  877. package/coverage/lcov-report/_modules/defaults/_services/index.html +146 -0
  878. package/coverage/lcov-report/_modules/discord-assistant/_collections/dias.util.ts.html +481 -0
  879. package/coverage/lcov-report/_modules/discord-assistant/_collections/index.html +116 -0
  880. package/coverage/lcov-report/_modules/discord-assistant/_models/dias-knowledge.data-model.ts.html +241 -0
  881. package/coverage/lcov-report/_modules/discord-assistant/_models/index.html +116 -0
  882. package/coverage/lcov-report/_modules/discord-assistant/_services/dias-chunk.data-service.ts.html +616 -0
  883. package/coverage/lcov-report/_modules/discord-assistant/_services/dias-io.control-service.ts.html +292 -0
  884. package/coverage/lcov-report/_modules/discord-assistant/_services/dias-main.control-service.ts.html +166 -0
  885. package/coverage/lcov-report/_modules/discord-assistant/_services/dias.service-base.ts.html +313 -0
  886. package/coverage/lcov-report/_modules/discord-assistant/_services/index.html +161 -0
  887. package/coverage/lcov-report/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.ts.html +118 -0
  888. package/coverage/lcov-report/_modules/discord-assistant-voiced/_services/index.html +116 -0
  889. package/coverage/lcov-report/_modules/discord-bot/_collections/dibo-global-settings.conts.ts.html +250 -0
  890. package/coverage/lcov-report/_modules/discord-bot/_collections/dibo-operations.util.ts.html +1246 -0
  891. package/coverage/lcov-report/_modules/discord-bot/_collections/index.html +131 -0
  892. package/coverage/lcov-report/_modules/discord-bot/_models/dibo-last-mention-date.inteface.ts.html +106 -0
  893. package/coverage/lcov-report/_modules/discord-bot/_models/index.html +116 -0
  894. package/coverage/lcov-report/_modules/discord-bot/_services/dibo-commands.control-service.ts.html +544 -0
  895. package/coverage/lcov-report/_modules/discord-bot/_services/dibo-io.control-service.ts.html +1003 -0
  896. package/coverage/lcov-report/_modules/discord-bot/_services/dibo-main.control-service.ts.html +1546 -0
  897. package/coverage/lcov-report/_modules/discord-bot/_services/dibo-routines.control-service.ts.html +376 -0
  898. package/coverage/lcov-report/_modules/discord-bot/_services/index.html +161 -0
  899. package/coverage/lcov-report/_modules/messaging/_collections/get-messaging-routing-module.util.ts.html +163 -0
  900. package/coverage/lcov-report/_modules/messaging/_collections/index.html +131 -0
  901. package/coverage/lcov-report/_modules/messaging/_collections/msg.util.ts.html +334 -0
  902. package/coverage/lcov-report/_modules/messaging/_services/index.html +191 -0
  903. package/coverage/lcov-report/_modules/messaging/_services/msg-conversation.data-service.ts.html +523 -0
  904. package/coverage/lcov-report/_modules/messaging/_services/msg-events.service.ts.html +886 -0
  905. package/coverage/lcov-report/_modules/messaging/_services/msg-integration.control-service.ts.html +622 -0
  906. package/coverage/lcov-report/_modules/messaging/_services/msg-main.control-service.ts.html +1738 -0
  907. package/coverage/lcov-report/_modules/messaging/_services/msg-message.data-service.ts.html +472 -0
  908. package/coverage/lcov-report/_modules/messaging/_services/msg.controller.ts.html +1195 -0
  909. package/coverage/lcov-report/_modules/mock/app-extended-server.mock.ts.html +688 -0
  910. package/coverage/lcov-report/_modules/mock/app-params.mock.ts.html +112 -0
  911. package/coverage/lcov-report/_modules/mock/app-server.mock.ts.html +649 -0
  912. package/coverage/lcov-report/_modules/mock/auth-service.mock.ts.html +169 -0
  913. package/coverage/lcov-report/_modules/mock/controller.mock.ts.html +133 -0
  914. package/coverage/lcov-report/_modules/mock/data-model.mock.ts.html +331 -0
  915. package/coverage/lcov-report/_modules/mock/email-service-collection.mock.ts.html +130 -0
  916. package/coverage/lcov-report/_modules/mock/email-service.mock.ts.html +145 -0
  917. package/coverage/lcov-report/_modules/mock/endpoint.mock.ts.html +358 -0
  918. package/coverage/lcov-report/_modules/mock/index.html +266 -0
  919. package/coverage/lcov-report/_modules/mock/socket-client.mock.ts.html +220 -0
  920. package/coverage/lcov-report/_modules/mock/socket-server.mock.ts.html +247 -0
  921. package/coverage/lcov-report/_modules/oauth2/_routes/index.html +116 -0
  922. package/coverage/lcov-report/_modules/oauth2/_routes/oauth2.controller.ts.html +379 -0
  923. package/coverage/lcov-report/_modules/oauth2/_services/index.html +131 -0
  924. package/coverage/lcov-report/_modules/oauth2/_services/oauth2.auth-service.ts.html +781 -0
  925. package/coverage/lcov-report/_modules/oauth2/_services/oauth2.control-service.ts.html +2044 -0
  926. package/coverage/lcov-report/_modules/server/errors/errors.control-service.ts.html +292 -0
  927. package/coverage/lcov-report/_modules/server/errors/errors.controller.ts.html +895 -0
  928. package/coverage/lcov-report/_modules/server/errors/errors.data-service.ts.html +1666 -0
  929. package/coverage/lcov-report/_modules/server/errors/index.html +146 -0
  930. package/coverage/lcov-report/_modules/server/server-status/index.html +161 -0
  931. package/coverage/lcov-report/_modules/server/server-status/server-status-snapshot.control-service.ts.html +136 -0
  932. package/coverage/lcov-report/_modules/server/server-status/server-status-snapshot.data-service.ts.html +196 -0
  933. package/coverage/lcov-report/_modules/server/server-status/server-status.control-service.ts.html +1093 -0
  934. package/coverage/lcov-report/_modules/server/server-status/server-status.controller.ts.html +478 -0
  935. package/coverage/lcov-report/_modules/socket/_models/index.html +146 -0
  936. package/coverage/lcov-report/_modules/socket/_models/socket-client-service-params.control-model.ts.html +151 -0
  937. package/coverage/lcov-report/_modules/socket/_models/socket-presence.control-model.ts.html +715 -0
  938. package/coverage/lcov-report/_modules/socket/_models/socket-server-service-params.control-model.ts.html +145 -0
  939. package/coverage/lcov-report/_modules/socket/_services/index.html +131 -0
  940. package/coverage/lcov-report/_modules/socket/_services/socket-client.service.ts.html +862 -0
  941. package/coverage/lcov-report/_modules/socket/_services/socket-server.service.ts.html +3196 -0
  942. package/coverage/lcov-report/_modules/socket/app-extended.server.ts.html +1954 -0
  943. package/coverage/lcov-report/_modules/socket/index.html +116 -0
  944. package/coverage/lcov-report/_modules/test/get-test-routing-module.util.ts.html +154 -0
  945. package/coverage/lcov-report/_modules/test/index.html +131 -0
  946. package/coverage/lcov-report/_modules/test/test.controller.ts.html +430 -0
  947. package/coverage/lcov-report/_modules/usage/get-usage-routing-module.util.ts.html +151 -0
  948. package/coverage/lcov-report/_modules/usage/index.html +146 -0
  949. package/coverage/lcov-report/_modules/usage/usage.controller.ts.html +463 -0
  950. package/coverage/lcov-report/_modules/usage/usage.data-service.ts.html +640 -0
  951. package/coverage/lcov-report/_services/base/api.service-base.ts.html +307 -0
  952. package/coverage/lcov-report/_services/base/archive-data.service.ts.html +727 -0
  953. package/coverage/lcov-report/_services/base/data.service.ts.html +7033 -0
  954. package/coverage/lcov-report/_services/base/db.service.ts.html +4786 -0
  955. package/coverage/lcov-report/_services/base/index.html +191 -0
  956. package/coverage/lcov-report/_services/base/singleton.service-base.ts.html +157 -0
  957. package/coverage/lcov-report/_services/base/singleton.service.ts.html +190 -0
  958. package/coverage/lcov-report/_services/core/api.service.ts.html +1900 -0
  959. package/coverage/lcov-report/_services/core/auth.service.ts.html +607 -0
  960. package/coverage/lcov-report/_services/core/email.service.ts.html +2302 -0
  961. package/coverage/lcov-report/_services/core/global.service.ts.html +1363 -0
  962. package/coverage/lcov-report/_services/core/index.html +176 -0
  963. package/coverage/lcov-report/_services/core/service-collection.service.ts.html +103 -0
  964. package/coverage/lcov-report/_services/index.html +116 -0
  965. package/coverage/lcov-report/_services/route/controller.service.ts.html +475 -0
  966. package/coverage/lcov-report/_services/route/index.html +131 -0
  967. package/coverage/lcov-report/_services/route/routing-module.service.ts.html +1075 -0
  968. package/coverage/lcov-report/_services/server/app.server.ts.html +4408 -0
  969. package/coverage/lcov-report/_services/server/index.html +116 -0
  970. package/coverage/lcov-report/_services/shared.static-service.ts.html +319 -0
  971. package/coverage/lcov-report/base.css +224 -0
  972. package/coverage/lcov-report/block-navigation.js +87 -0
  973. package/coverage/lcov-report/favicon.png +0 -0
  974. package/coverage/lcov-report/index.html +821 -0
  975. package/coverage/lcov-report/prettify.css +1 -0
  976. package/coverage/lcov-report/prettify.js +2 -0
  977. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  978. package/coverage/lcov-report/sorter.js +210 -0
  979. package/coverage/lcov.info +29957 -0
  980. package/coverage/prettify.css +1 -0
  981. package/coverage/prettify.js +2 -0
  982. package/coverage/sort-arrow-sprite.png +0 -0
  983. package/coverage/sorter.js +210 -0
  984. package/coverage/tmp/coverage-111712-1762988673351-0.json +1 -0
  985. package/coverage/tmp/coverage-112308-1762988673527-0.json +1 -0
  986. package/coverage/tmp/coverage-112324-1762988615026-0.json +1 -0
  987. package/coverage/tmp/coverage-112436-1762988615438-0.json +1 -0
  988. package/coverage/tmp/coverage-112512-1762988673477-0.json +1 -0
  989. package/eslint.config.js +3 -3
  990. package/logs/cicd-job.json +3 -0
  991. package/logs/cicd-output.log +31 -0
  992. package/logs/cicd-report.json +148 -0
  993. package/logs/cicd-status.json +70 -0
  994. package/nodemon.json +24 -24
  995. package/package.json +1 -1
  996. package/pnpm-workspace.yaml +5 -5
  997. package/scripts/run-coverage-tests.js +28 -28
  998. package/spec/support/helpers/spec-reporter-loader.js +359 -359
  999. package/spec/support/helpers/ts-node-helper.js +93 -93
  1000. package/spec/support/jasmine.coverage.json +24 -24
  1001. package/spec/support/jasmine.json +24 -24
  1002. package/src/_collections/archive.util.spec.ts +57 -57
  1003. package/src/_collections/archive.util.ts +18 -18
  1004. package/src/_collections/atlas-default-db-options.const.ts +9 -9
  1005. package/src/_collections/default-fallback-cache-max-age.const.spec.ts +11 -11
  1006. package/src/_collections/default-fallback-cache-max-age.const.ts +2 -2
  1007. package/src/_collections/default-not-found-page.const.spec.ts +19 -19
  1008. package/src/_collections/default-not-found-page.const.ts +22 -22
  1009. package/src/_collections/default-socket-path.const.spec.ts +12 -12
  1010. package/src/_collections/default-socket-path.const.ts +2 -2
  1011. package/src/_collections/get-environment-settings.util.spec.ts +210 -210
  1012. package/src/_collections/get-environment-settings.util.ts +48 -48
  1013. package/src/_collections/global-settings.const.ts +126 -126
  1014. package/src/_collections/sample.env +21 -21
  1015. package/src/_collections/signed-url.util.spec.ts +198 -198
  1016. package/src/_collections/signed-url.util.ts +170 -170
  1017. package/src/_collections/star.controller.spec.ts +224 -224
  1018. package/src/_collections/star.controller.ts +129 -129
  1019. package/src/_enums/data-model-type.enum.ts +14 -14
  1020. package/src/_enums/data-service-function.enum.ts +24 -24
  1021. package/src/_enums/predefined-data-types.enum.ts +16 -16
  1022. package/src/_enums/route-security.enum.ts +12 -12
  1023. package/src/_models/control-models/api-call-params.control-model.spec.ts +152 -152
  1024. package/src/_models/control-models/api-call-params.control-model.ts +142 -142
  1025. package/src/_models/control-models/app-ext-system-controls.control-model.spec.ts +52 -52
  1026. package/src/_models/control-models/app-ext-system-controls.control-model.ts +9 -9
  1027. package/src/_models/control-models/app-params.control-model.spec.ts +225 -225
  1028. package/src/_models/control-models/app-params.control-model.ts +136 -136
  1029. package/src/_models/control-models/app-system-controls.control-model.spec.ts +31 -31
  1030. package/src/_models/control-models/app-system-controls.control-model.ts +9 -9
  1031. package/src/_models/control-models/endpoint-params.control-model.spec.ts +669 -669
  1032. package/src/_models/control-models/endpoint-params.control-model.ts +664 -664
  1033. package/src/_models/control-models/http-settings.control-model.spec.ts +77 -77
  1034. package/src/_models/control-models/http-settings.control-model.ts +37 -37
  1035. package/src/_models/control-models/system-control.control-model.spec.ts +27 -27
  1036. package/src/_models/control-models/system-control.control-model.ts +12 -12
  1037. package/src/_models/interfaces/certification-settings.interface.ts +7 -7
  1038. package/src/_models/interfaces/environment-settings.interface.ts +59 -59
  1039. package/src/_models/interfaces/global-log-settings.interface.ts +171 -171
  1040. package/src/_models/interfaces/global-service-settings.interface.ts +47 -47
  1041. package/src/_models/interfaces/global-settings.interface.ts +294 -294
  1042. package/src/_models/interfaces/routing-module-settings.interface.ts +21 -21
  1043. package/src/_models/interfaces/static-client-settings.interface.spec.ts +29 -29
  1044. package/src/_models/interfaces/static-client-settings.interface.ts +36 -36
  1045. package/src/_models/types/db-update.type.ts +100 -100
  1046. package/src/_modules/ai/_models/ai-input-interfaces.ts +117 -117
  1047. package/src/_modules/ai/_models/ai-test-generation-result.interface.ts +16 -16
  1048. package/src/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.spec.ts +115 -115
  1049. package/src/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.ts +233 -233
  1050. package/src/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.ts +138 -138
  1051. package/src/_modules/ai/_modules/anthropic/index.ts +5 -5
  1052. package/src/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.spec.ts +242 -242
  1053. package/src/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.ts +639 -639
  1054. package/src/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.spec.ts +295 -295
  1055. package/src/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.ts +518 -518
  1056. package/src/_modules/ai/_modules/document-ai/_collections/dai-document.util.spec.ts +209 -209
  1057. package/src/_modules/ai/_modules/document-ai/_collections/dai-document.util.ts +85 -85
  1058. package/src/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.ts +7 -7
  1059. package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.ts +146 -146
  1060. package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.ts +162 -162
  1061. package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.ts +99 -99
  1062. package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-code-chunk.interface.ts +68 -68
  1063. package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.ts +18 -18
  1064. package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.ts +19 -19
  1065. package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.ts +25 -25
  1066. package/src/_modules/ai/_modules/document-ai/index.ts +30 -30
  1067. package/src/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.ts +189 -189
  1068. package/src/_modules/ai/_modules/fdp-ai/index.ts +5 -5
  1069. package/src/_modules/ai/_modules/open-ai/_collections/oai-global-settings.const.ts +9 -9
  1070. package/src/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.ts +82 -82
  1071. package/src/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.ts +75 -75
  1072. package/src/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.ts +45 -45
  1073. package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.ts +7 -7
  1074. package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.ts +7 -7
  1075. package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.ts +57 -57
  1076. package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-chunk-data.service.ts +292 -292
  1077. package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.spec.ts +342 -342
  1078. package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.spec.ts +550 -550
  1079. package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.ts +630 -630
  1080. package/src/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.spec.ts +332 -332
  1081. package/src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.spec.ts +462 -462
  1082. package/src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts +634 -634
  1083. package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.spec.ts +489 -489
  1084. package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.tools.spec.ts +173 -173
  1085. package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts +1085 -1085
  1086. package/src/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.ts +157 -157
  1087. package/src/_modules/ai/_services/ai-embedding-provider.registry.spec.ts +110 -110
  1088. package/src/_modules/ai/_services/ai-embedding-provider.registry.ts +114 -114
  1089. package/src/_modules/ai/_services/ai-embedding.service-base.spec.ts +98 -98
  1090. package/src/_modules/ai/_services/ai-embedding.service-base.ts +48 -48
  1091. package/src/_modules/ai/_services/ai-llm-chat.service-base.spec.ts +229 -229
  1092. package/src/_modules/ai/_services/ai-llm-chat.service-base.ts +68 -68
  1093. package/src/_modules/ai/_services/ai-llm.service-base.spec.ts +250 -250
  1094. package/src/_modules/ai/_services/ai-llm.service-base.ts +599 -599
  1095. package/src/_modules/ai/_services/ai-provider.service-base.spec.ts +158 -158
  1096. package/src/_modules/ai/_services/ai-user-key.service-base.ts +59 -59
  1097. package/src/_modules/ai/_services/lmstudio-embedding.control-service.spec.ts +197 -197
  1098. package/src/_modules/ai/_services/lmstudio-embedding.control-service.ts +371 -371
  1099. package/src/_modules/ai/index.ts +33 -33
  1100. package/src/_modules/assistant/_collections/ass-global-settings.const.ts +13 -13
  1101. package/src/_modules/assistant/_collections/ass.util.spec.ts +176 -176
  1102. package/src/_modules/assistant/_collections/ass.util.ts +50 -50
  1103. package/src/_modules/assistant/_models/ass-global-settings.interface.ts +15 -15
  1104. package/src/_modules/assistant/_services/ass-io.control-service.spec.ts +140 -140
  1105. package/src/_modules/assistant/_services/ass-main.control-service.spec.ts +192 -192
  1106. package/src/_modules/assistant/_services/ass-main.control-service.ts +107 -107
  1107. package/src/_modules/bot/_collections/bot-default-commands.const.ts +12 -12
  1108. package/src/_modules/bot/_collections/bot-global-settings.const.ts +39 -39
  1109. package/src/_modules/bot/_models/bot-channel-wrapper.interface.ts +62 -62
  1110. package/src/_modules/bot/_models/bot-command.interface.ts +8 -8
  1111. package/src/_modules/bot/_models/bot-global-settings.interface.ts +96 -96
  1112. package/src/_modules/bot/_models/bot-last-mention-date.interface.ts +6 -6
  1113. package/src/_modules/bot/_models/bot-last-message-date.interface.ts +5 -5
  1114. package/src/_modules/bot/_models/bot-user-wrapper.interface.ts +41 -41
  1115. package/src/_modules/bot/_modules/discord-bot/_models/dib-platform.types.ts +9 -9
  1116. package/src/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.spec.ts +431 -431
  1117. package/src/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.spec.ts +160 -160
  1118. package/src/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.ts +55 -55
  1119. package/src/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.ts +15 -15
  1120. package/src/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.spec.ts +374 -374
  1121. package/src/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.ts +447 -447
  1122. package/src/_modules/bot/_modules/dynamo-bot/index.ts +15 -15
  1123. package/src/_modules/bot/_modules/slack-bot/_models/slb-platform.types.ts +9 -9
  1124. package/src/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.spec.ts +344 -344
  1125. package/src/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.ts +197 -197
  1126. package/src/_modules/bot/_modules/teams-bot/_models/teb-platform.types.ts +9 -9
  1127. package/src/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.spec.ts +345 -345
  1128. package/src/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.ts +197 -197
  1129. package/src/_modules/bot/_services/bot-commands.control-service.spec.ts +116 -116
  1130. package/src/_modules/bot/_services/bot-io.control-service.spec.ts +285 -285
  1131. package/src/_modules/bot/_services/bot-main.control-service.spec.ts +208 -208
  1132. package/src/_modules/bot/_services/bot-messaging-provider.service-base.spec.ts +349 -349
  1133. package/src/_modules/bot/_services/bot-routines.control-service.spec.ts +111 -111
  1134. package/src/_modules/custom-data/custom-data.controller.spec.ts +49 -49
  1135. package/src/_modules/custom-data/custom-data.controller.ts +67 -67
  1136. package/src/_modules/custom-data/custom-data.data-service.spec.ts +54 -54
  1137. package/src/_modules/custom-data/custom-data.data-service.ts +21 -21
  1138. package/src/_modules/custom-data/get-custom-data-routing-module.util.spec.ts +28 -28
  1139. package/src/_modules/custom-data/get-custom-data-routing-module.util.ts +24 -24
  1140. package/src/_modules/custom-data/index.ts +9 -9
  1141. package/src/_modules/data-readers/_collections/dynts-sqlite-reader.util.spec.ts +161 -161
  1142. package/src/_modules/data-readers/_collections/dynts-sqlite-reader.util.ts +203 -203
  1143. package/src/_modules/data-readers/_models/interfaces/dynts-sqlite-reader.interface.ts +33 -33
  1144. package/src/_modules/data-readers/index.ts +11 -11
  1145. package/src/_modules/defaults/_collections/default-endpoints.util.ts +487 -487
  1146. package/src/_modules/defaults/_models/default-user.data-model.ts +72 -72
  1147. package/src/_modules/defaults/_services/default-auth.service.spec.ts +269 -269
  1148. package/src/_modules/defaults/_services/default-auth.service.ts +177 -177
  1149. package/src/_modules/defaults/_services/default-socket-events.service.spec.ts +42 -42
  1150. package/src/_modules/defaults/_services/default-socket-events.service.ts +61 -61
  1151. package/src/_modules/defaults/_services/default-user.data-service.spec.ts +187 -187
  1152. package/src/_modules/defaults/_services/default-user.data-service.ts +98 -98
  1153. package/src/_modules/defaults/index.ts +17 -17
  1154. package/src/_modules/discord-assistant/_collections/dias-global-settings.const.ts +19 -19
  1155. package/src/_modules/discord-assistant/_collections/dias.util.spec.ts +366 -366
  1156. package/src/_modules/discord-assistant/_collections/dias.util.ts +132 -132
  1157. package/src/_modules/discord-assistant/_models/dias-global-settings.interface.ts +19 -19
  1158. package/src/_modules/discord-assistant/_models/dias-knowledge.data-model.ts +52 -52
  1159. package/src/_modules/discord-assistant/_services/dias-chunk.data-service.ts +177 -177
  1160. package/src/_modules/discord-assistant/_services/dias-io.control-service.spec.ts +108 -108
  1161. package/src/_modules/discord-assistant/_services/dias-io.control-service.ts +69 -69
  1162. package/src/_modules/discord-assistant/_services/dias-main.control-service.spec.ts +22 -22
  1163. package/src/_modules/discord-assistant/_services/dias-main.control-service.ts +27 -27
  1164. package/src/_modules/discord-assistant/_services/dias.service-base.spec.ts +195 -195
  1165. package/src/_modules/discord-assistant/_services/dias.service-base.ts +76 -76
  1166. package/src/_modules/discord-assistant/index.ts +38 -38
  1167. package/src/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.spec.ts +34 -34
  1168. package/src/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.ts +11 -11
  1169. package/src/_modules/discord-assistant-voiced/index.ts +36 -36
  1170. package/src/_modules/discord-bot/_collections/dibo-default-commands.const.ts +16 -16
  1171. package/src/_modules/discord-bot/_collections/dibo-global-settings.conts.ts +55 -55
  1172. package/src/_modules/discord-bot/_collections/dibo-operations.util.spec.ts +214 -214
  1173. package/src/_modules/discord-bot/_collections/dibo-operations.util.ts +387 -387
  1174. package/src/_modules/discord-bot/_models/dibo-command.interface.ts +12 -12
  1175. package/src/_modules/discord-bot/_models/dibo-global-settings.interface.ts +98 -98
  1176. package/src/_modules/discord-bot/_models/dibo-last-mention-date.inteface.ts +7 -7
  1177. package/src/_modules/discord-bot/_models/dibo-last-message-date.interface.ts +6 -6
  1178. package/src/_modules/discord-bot/_services/dibo-commands.control-service.spec.ts +154 -154
  1179. package/src/_modules/discord-bot/_services/dibo-commands.control-service.ts +153 -153
  1180. package/src/_modules/discord-bot/_services/dibo-io.control-service.spec.ts +264 -264
  1181. package/src/_modules/discord-bot/_services/dibo-io.control-service.ts +306 -306
  1182. package/src/_modules/discord-bot/_services/dibo-main.control-service.spec.ts +408 -408
  1183. package/src/_modules/discord-bot/_services/dibo-main.control-service.ts +487 -487
  1184. package/src/_modules/discord-bot/_services/dibo-routines.control-service.spec.ts +105 -105
  1185. package/src/_modules/discord-bot/index.ts +36 -36
  1186. package/src/_modules/local-vector-search/_enums/lvs-search-mode.enum.ts +35 -35
  1187. package/src/_modules/local-vector-search/_models/data-models/lvs-vector-persist.data-model.ts +59 -59
  1188. package/src/_modules/local-vector-search/_models/lvs-search-result.interface.ts +17 -17
  1189. package/src/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.spec.ts +418 -418
  1190. package/src/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.ts +276 -276
  1191. package/src/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.spec.ts +480 -480
  1192. package/src/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.ts +416 -416
  1193. package/src/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.spec.ts +214 -214
  1194. package/src/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.ts +186 -186
  1195. package/src/_modules/local-vector-search/_services/lvs-vector-persist.data-service.spec.ts +167 -167
  1196. package/src/_modules/local-vector-search/_services/lvs-vector-persist.data-service.ts +130 -130
  1197. package/src/_modules/local-vector-search/_services/lvs-vector-pool.control-service.spec.ts +509 -509
  1198. package/src/_modules/local-vector-search/_services/lvs-vector-pool.control-service.ts +323 -323
  1199. package/src/_modules/local-vector-search/index.ts +16 -16
  1200. package/src/_modules/logs/index.ts +11 -11
  1201. package/src/_modules/mcp/_models/interfaces/dynts-mcp.interface.ts +111 -111
  1202. package/src/_modules/mcp/_services/dynts-mcp-server.service-base.spec.ts +142 -142
  1203. package/src/_modules/mcp/_services/dynts-mcp-server.service-base.ts +120 -120
  1204. package/src/_modules/mcp/_services/dynts-mcp.adapter.ts +168 -168
  1205. package/src/_modules/mcp/index.ts +13 -13
  1206. package/src/_modules/messaging/README.md +354 -354
  1207. package/src/_modules/messaging/_collections/get-messaging-routing-module.util.ts +26 -26
  1208. package/src/_modules/messaging/_collections/msg-global-settings.const.ts +22 -22
  1209. package/src/_modules/messaging/_collections/msg.util.spec.ts +226 -226
  1210. package/src/_modules/messaging/_models/msg-global-settings.interface.ts +37 -37
  1211. package/src/_modules/messaging/_services/msg-conversation.data-service.ts +146 -146
  1212. package/src/_modules/messaging/_services/msg-events.service.spec.ts +219 -219
  1213. package/src/_modules/messaging/_services/msg-events.service.ts +267 -267
  1214. package/src/_modules/messaging/_services/msg-integration.control-service.ts +179 -179
  1215. package/src/_modules/messaging/_services/msg-main.control-service.spec.ts +147 -147
  1216. package/src/_modules/messaging/_services/msg-main.control-service.ts +571 -571
  1217. package/src/_modules/messaging/_services/msg-message.data-service.ts +129 -129
  1218. package/src/_modules/messaging/_services/msg.controller.spec.ts +201 -201
  1219. package/src/_modules/messaging/index.ts +30 -30
  1220. package/src/_modules/mock/app-extended-server.mock.ts +201 -201
  1221. package/src/_modules/mock/app-integration-test.mock.ts +51 -51
  1222. package/src/_modules/mock/app-params.mock.spec.ts +21 -21
  1223. package/src/_modules/mock/app-params.mock.ts +9 -9
  1224. package/src/_modules/mock/app-server.mock.ts +188 -188
  1225. package/src/_modules/mock/auth-service.mock.spec.ts +47 -47
  1226. package/src/_modules/mock/auth-service.mock.ts +28 -28
  1227. package/src/_modules/mock/controller.mock.spec.ts +26 -26
  1228. package/src/_modules/mock/controller.mock.ts +16 -16
  1229. package/src/_modules/mock/data-model.mock.spec.ts +111 -111
  1230. package/src/_modules/mock/data-model.mock.ts +82 -82
  1231. package/src/_modules/mock/email-service-collection.mock.spec.ts +24 -24
  1232. package/src/_modules/mock/email-service-collection.mock.ts +15 -15
  1233. package/src/_modules/mock/email-service.mock.spec.ts +17 -17
  1234. package/src/_modules/mock/email-service.mock.ts +20 -20
  1235. package/src/_modules/mock/email-template.mock.html +14 -14
  1236. package/src/_modules/mock/endpoint.mock.ts +91 -91
  1237. package/src/_modules/mock/socket-client.mock.spec.ts +40 -40
  1238. package/src/_modules/mock/socket-client.mock.ts +45 -45
  1239. package/src/_modules/mock/socket-server.mock.spec.ts +44 -44
  1240. package/src/_modules/mock/socket-server.mock.ts +46 -46
  1241. package/src/_modules/oauth2/_routes/oauth2.controller.spec.ts +107 -107
  1242. package/src/_modules/oauth2/_routes/oauth2.controller.ts +98 -98
  1243. package/src/_modules/oauth2/_services/oauth2.auth-service.spec.ts +254 -254
  1244. package/src/_modules/oauth2/_services/oauth2.auth-service.ts +232 -232
  1245. package/src/_modules/oauth2/_services/oauth2.control-service.spec.ts +585 -585
  1246. package/src/_modules/oauth2/_services/oauth2.control-service.ts +653 -653
  1247. package/src/_modules/oauth2/index.ts +17 -17
  1248. package/src/_modules/scheduler/_models/scheduler-job.interface.ts +35 -35
  1249. package/src/_modules/scheduler/get-scheduler-routing-module.util.ts +33 -33
  1250. package/src/_modules/scheduler/index.ts +8 -8
  1251. package/src/_modules/scheduler/scheduler.controller.spec.ts +42 -42
  1252. package/src/_modules/scheduler/scheduler.controller.ts +69 -69
  1253. package/src/_modules/scheduler/scheduler.service.spec.ts +141 -141
  1254. package/src/_modules/scheduler/scheduler.service.ts +176 -176
  1255. package/src/_modules/scoped-config/_enums/dynts-scoped-config-level.enum.ts +22 -22
  1256. package/src/_modules/scoped-config/_models/data-models/dynts-scoped-config.data-model.ts +81 -81
  1257. package/src/_modules/scoped-config/_models/interfaces/dynts-scoped-config.interface.ts +107 -107
  1258. package/src/_modules/scoped-config/_services/dynts-scoped-config.control-service.spec.ts +306 -306
  1259. package/src/_modules/scoped-config/_services/dynts-scoped-config.control-service.ts +295 -295
  1260. package/src/_modules/scoped-config/_services/dynts-scoped-config.data-service.spec.ts +118 -118
  1261. package/src/_modules/scoped-config/_services/dynts-scoped-config.data-service.ts +105 -105
  1262. package/src/_modules/scoped-config/index.ts +17 -17
  1263. package/src/_modules/server/errors/errors.control-service.spec.ts +238 -238
  1264. package/src/_modules/server/errors/errors.control-service.ts +100 -100
  1265. package/src/_modules/server/errors/errors.controller.ts +559 -559
  1266. package/src/_modules/server/errors/errors.data-service.spec.ts +480 -480
  1267. package/src/_modules/server/index.ts +30 -30
  1268. package/src/_modules/server/server-status/server-status-snapshot.control-service.spec.ts +70 -70
  1269. package/src/_modules/server/server-status/server-status-snapshot.control-service.ts +17 -17
  1270. package/src/_modules/server/server-status/server-status-snapshot.data-service.spec.ts +77 -77
  1271. package/src/_modules/server/server-status/server-status-snapshot.data-service.ts +37 -37
  1272. package/src/_modules/server/server-status/server-status.control-service.spec.ts +672 -672
  1273. package/src/_modules/server/server-status/server-status.control-service.ts +490 -490
  1274. package/src/_modules/server/server-status/server-status.controller.spec.ts +276 -276
  1275. package/src/_modules/server/server-status/server-status.controller.ts +336 -336
  1276. package/src/_modules/socket/_enums/socket-security.enum.ts +11 -11
  1277. package/src/_modules/socket/_models/socket-client-service-params.control-model.spec.ts +32 -32
  1278. package/src/_modules/socket/_models/socket-client-service-params.control-model.ts +22 -22
  1279. package/src/_modules/socket/_models/socket-presence.control-model.spec.ts +159 -158
  1280. package/src/_modules/socket/_models/socket-presence.control-model.ts +210 -209
  1281. package/src/_modules/socket/_models/socket-server-service-params.control-model.spec.ts +69 -69
  1282. package/src/_modules/socket/_services/socket-client.service.spec.ts +15 -15
  1283. package/src/_modules/socket/_services/socket-client.service.ts +260 -260
  1284. package/src/_modules/socket/_services/socket-server.service.spec.ts +225 -3
  1285. package/src/_modules/socket/_services/socket-server.service.ts +41 -74
  1286. package/src/_modules/socket/app-extended.integration.spec.ts +85 -85
  1287. package/src/_modules/socket/app-extended.server.ts +648 -648
  1288. package/src/_modules/socket/index.ts +42 -42
  1289. package/src/_modules/test/get-test-routing-module.util.spec.ts +28 -28
  1290. package/src/_modules/test/get-test-routing-module.util.ts +23 -23
  1291. package/src/_modules/test/index.ts +11 -11
  1292. package/src/_modules/test/test.controller.spec.ts +72 -72
  1293. package/src/_modules/test/test.controller.ts +115 -115
  1294. package/src/_modules/usage/get-usage-routing-module.util.ts +22 -22
  1295. package/src/_modules/usage/index.ts +15 -15
  1296. package/src/_modules/usage/usage.controller.spec.ts +106 -106
  1297. package/src/_modules/usage/usage.controller.ts +140 -140
  1298. package/src/_modules/usage/usage.data-service.spec.ts +332 -332
  1299. package/src/_modules/usage/usage.data-service.ts +185 -185
  1300. package/src/_services/base/api.service-base.spec.ts +125 -125
  1301. package/src/_services/base/api.service-base.ts +74 -74
  1302. package/src/_services/base/archive-data.service.spec.ts +209 -209
  1303. package/src/_services/base/archive-data.service.ts +223 -223
  1304. package/src/_services/base/data.service.spec.ts +784 -784
  1305. package/src/_services/base/data.service.ts +2792 -2792
  1306. package/src/_services/base/db.service.spec.ts +160 -160
  1307. package/src/_services/base/db.service.ts +1698 -1698
  1308. package/src/_services/base/singleton.service-base.spec.ts +28 -28
  1309. package/src/_services/base/singleton.service-base.ts +24 -24
  1310. package/src/_services/base/singleton.service.spec.ts +114 -114
  1311. package/src/_services/base/singleton.service.ts +38 -38
  1312. package/src/_services/core/api.service.spec.ts +140 -140
  1313. package/src/_services/core/auth.service.spec.ts +159 -159
  1314. package/src/_services/core/auth.service.ts +174 -174
  1315. package/src/_services/core/email.service.spec.ts +85 -85
  1316. package/src/_services/core/email.service.ts +757 -757
  1317. package/src/_services/core/global.service.spec.ts +292 -292
  1318. package/src/_services/core/global.service.ts +487 -487
  1319. package/src/_services/core/memory-guard.service.spec.ts +245 -245
  1320. package/src/_services/core/memory-guard.service.ts +481 -481
  1321. package/src/_services/core/service-collection.service.spec.ts +46 -46
  1322. package/src/_services/core/service-collection.service.ts +6 -6
  1323. package/src/_services/route/controller.service.spec.ts +53 -53
  1324. package/src/_services/route/controller.service.ts +148 -148
  1325. package/src/_services/route/routing-module.service.spec.ts +98 -98
  1326. package/src/_services/route/routing-module.service.ts +330 -330
  1327. package/src/_services/server/app.server.ts +2012 -2012
  1328. package/src/_services/shared.static-service.spec.ts +99 -99
  1329. package/src/_services/shared.static-service.ts +78 -78
  1330. package/tsconfig.app.json +12 -12
  1331. package/tsconfig.json +42 -42
  1332. package/.dynamo/logs/cicd-pipeline/output.log +0 -2862
  1333. package/.dynamo/logs/cicd-pipeline/status.json +0 -74
@@ -1,635 +1,635 @@
1
- import { OpenAI } from 'openai';
2
-
3
- import { DyFM_OAI_Settings, DyFM_OAI_Model, DyFM_OAI_CallSettings } from '@futdevpro/fsm-dynamo/ai/open-ai';
4
- import { DyFM_AnyError, DyFM_Error, DyFM_Error_Settings, DyFM_getLocalStackLocation, DyFM_Log, DyFM_notNull, DyFM_Object, DyFM_Array } from '@futdevpro/fsm-dynamo';
5
- import { DyFM_AI_Message } from '@futdevpro/fsm-dynamo/ai';
6
-
7
- import { DyNTS_global_settings } from '../../../../../_collections/global-settings.const';
8
- import { ChatCompletion } from 'openai/resources';
9
- import { ChatCompletionCreateParamsBase, ChatCompletionMessageParam } from 'openai/resources/chat/completions';
10
- import { DyFM_AI_MessageRole } from '@futdevpro/fsm-dynamo/ai';
11
- import { DyNTS_OAI_LLM_Predefined_Requests } from '../_models/interfaces/oai-llm-predefined-requests.interface';
12
- import { DyNTS_OAI_LLM_ServiceBase } from './oai-llm.service-base';
13
- import { DyNTS_OAI_global_settings } from '../_collections/oai-global-settings.const';
14
- import { DyNTS_AI_LLMChat_ServiceBase } from '../../../_services/ai-llm-chat.service-base';
15
- import {
16
- DyFM_AI_ConversationBase_Input,
17
- DyFM_AI_ConversationSelect_Input,
18
- DyFM_AI_ConversationGenericSelect_Input,
19
- DyFM_AI_ConversationMultiSelect_Input,
20
- DyFM_AI_ConversationGenericMultiSelect_Input,
21
- DyFM_AI_ConversationJSONKeysDescription_Input,
22
- DyFM_AI_ConversationJSONExactKeys_Input,
23
- } from '../../../_models/ai-input-interfaces';
24
-
25
-
26
- /**
27
- * {
28
- * organization: 'org-XY',
29
- * apiKey: 'sk-XY',
30
- * project: 'proj_XY',
31
- * }
32
- */
33
-
34
- // Di Dictionary DiModel DiEz DiAz
35
-
36
- export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase implements DyNTS_AI_LLMChat_ServiceBase {
37
-
38
- // History management
39
- /* private conversationHistories: Map<string, DyFM_AI_Message[]> = new Map(); */
40
-
41
- /**
42
- * Hozzáad egy üzenetet a conversation history-hoz
43
- *
44
- * Adds a message to conversation history
45
- */
46
- /* addMessageToHistory(message: DyFM_AI_Message, issuer: string): void {
47
- if (!this.conversationHistories.has(issuer)) {
48
- this.conversationHistories.set(issuer, []);
49
- }
50
- this.conversationHistories.get(issuer).push(message);
51
- } */
52
-
53
- /**
54
- * Törli a conversation history-t
55
- *
56
- * Clears conversation history
57
- */
58
- /* clearHistory(issuer: string): void {
59
- this.conversationHistories.delete(issuer);
60
- } */
61
-
62
- /**
63
- * Visszaadja a conversation history-t
64
- *
65
- * Gets conversation history
66
- */
67
- /* getHistory(issuer: string): DyFM_AI_Message[] {
68
- return this.conversationHistories.get(issuer) || [];
69
- } */
70
-
71
- /**
72
- * Converts generic AI messages to OpenAI-specific format
73
- *
74
- * Az generic AI üzeneteket OpenAI-specifikus formátumra alakítja át
75
- */
76
- /* private convertToOAIMessages(messages: DyFM_AI_Message[]): DyFM_AI_Message[] {
77
- return messages;
78
- } */
79
-
80
- /**
81
- * Asks the AI to answer a yes/no question
82
- *
83
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.request} to ask the question,
84
- * and the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.upperCaseYes} to check the answer
85
- */
86
- async requestYesNoInConversation(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): Promise<boolean> {
87
- set.message += this.predefinedRequests.yesNo.request;
88
-
89
- //this.logQuestion(set);
90
-
91
- const answer: string = await this.requestSimpleMessageInConversation(set);
92
-
93
- return this.convertAnswerToBoolean(answer);
94
- }
95
- //askYesNoQuestionInConversation: typeof this.yesNoQuestionInConversation = this.yesNoQuestionInConversation;
96
-
97
- /**
98
- * Asks the AI to answer a simple question
99
- *
100
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.simpleQuestion} to ask the question
101
- */
102
- /* async requestSimpleQuestionInConversation(
103
- set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
104
- ): Promise<string> {
105
- this.logQuestion(set);
106
-
107
- return await this.getQuestionAnswerInConversation(set);
108
- } */
109
- //askSimpleQuestionInConversation: typeof this.simpleQuestionInConversation = this.simpleQuestionInConversation;
110
-
111
- /**
112
- * Asks the AI to answer a percentage question
113
- *
114
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.percentageOnly} to ask the question
115
- */
116
- async requestPercentageInConversation(
117
- set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
118
- ): Promise<number> {
119
- set.message += this.predefinedRequests.percentageOnly;
120
-
121
- //this.logQuestion(set);
122
-
123
- const answer: string = await this.requestSimpleMessageInConversation(set);
124
-
125
- return this.convertAnswerToNumber(answer, set.message);
126
- }
127
- //askPercentageQuestionInConversation: typeof this.percentageQuestionInConversation = this.percentageQuestionInConversation;
128
-
129
-
130
- /**
131
- * Asks the AI to select one of the options from the list
132
- *
133
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
134
- */
135
- async requestSelectInConversation<T>(
136
- set: DyFM_AI_ConversationGenericSelect_Input<T, DyFM_OAI_CallSettings>
137
- ): Promise<T | { unparsableResult: string }> {
138
- // replace the {{DyNTS_selectOptions}} with the list of options
139
- const selectQuestionAddition = this.predefinedRequests.selectRequest.replace(
140
- '{{DyNTS_selectOptions}}',
141
- this.getTextListAsText(this.stringifySelectOptions(set.selectFrom))
142
- );
143
- set.message += selectQuestionAddition;
144
-
145
- //this.logQuestion(set);
146
-
147
- const answer = await this.requestSimpleMessageInConversation(set);
148
-
149
- return this.convertAnswerToSelectOption<T>(answer, set.message, set.selectFrom);
150
- }
151
- //askSelectQuestionInConversation: typeof this.selectQuestionInConversation = this.selectQuestionInConversation;
152
-
153
- /**
154
- * Asks the AI to select one of the options from the list
155
- * Similar to {@link askSelectQuestion},
156
- * but with a more generic approach that can be used for objects
157
- *
158
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
159
- */
160
- /* async requestSelectInConversation<T>(
161
- set: DyFM_AI_ConversationGenericSelect_Input<T, DyFM_OAI_CallSettings>
162
- ): Promise<T | { unparsableResult: string }> {
163
- const selectQuestionAddition = this.predefinedRequests.selectRequest.replace(
164
- '{{DyNTS_selectOptions}}',
165
- this.getTextListAsText(set.selectFrom.map(item => `"${JSON.stringify(item)}"`))
166
- );
167
- set.message += selectQuestionAddition;
168
-
169
- this.logQuestion(set);
170
-
171
- const answer = await this.getQuestionAnswerInConversation(set);
172
-
173
- return DyFM_Object.safeParseJSON<T>(answer);
174
- } */
175
- //askRequestSelectInConversation: typeof this.requestSelectInConversation = this.requestSelectInConversation;
176
-
177
- /**
178
- * Asks the AI to select one or more of the options from the list
179
- *
180
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
181
- */
182
- /* async requestMultiselectInConversation(set: DyFM_AI_ConversationMultiSelect_Input): Promise<string[]> {
183
- const selectQuestionAddition = this.predefinedRequests.multiselect.replace(
184
- '{{DyNTS_selectOptions}}',
185
- this.getTextListAsText(set.options)
186
- );
187
- set.message += selectQuestionAddition;
188
-
189
- let answer = await this.getQuestionAnswerInConversation(set);
190
-
191
- answer = answer.toLocaleUpperCase();
192
-
193
- const result: string[] = [];
194
-
195
- for (const item of set.options) {
196
- if (answer.includes(item.toLocaleUpperCase())) {
197
- result.push(item);
198
- }
199
- }
200
-
201
- return result;
202
- } */
203
- //askMultipleSelectQuestionWithOptionsInConversation: typeof this.multipleSelectQuestionWithOptionsInConversation = this.multipleSelectQuestionWithOptionsInConversation;
204
-
205
- /**
206
- * Asks the AI to select one or more of the options from the list
207
- * Similar to {@link askMultipleSelectQuestionWithOptions},
208
- * but with a more generic approach that can be used for objects
209
- *
210
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
211
- */
212
- async requestMultiselectInConversation<T>(
213
- set: DyFM_AI_ConversationGenericMultiSelect_Input<T, DyFM_OAI_CallSettings>
214
- ): Promise<T[] | { unparsableResult: string }> {
215
- const selectQuestionAddition = this.predefinedRequests.multiselect.replace(
216
- '{{DyNTS_selectOptions}}',
217
- this.getTextListAsText(this.stringifySelectOptions(set.options))
218
- );
219
- set.message += selectQuestionAddition;
220
-
221
- //this.logQuestion(set);
222
-
223
- const answer = await this.requestSimpleMessageInConversation(set);
224
-
225
- return this.convertAnswerToList<T>(answer, set.message);
226
- }
227
- //askRequestMultipleSelectInConversation: typeof this.requestMultipleSelectInConversation = this.requestMultipleSelectInConversation;
228
-
229
- /**
230
- * Asks the AI to answer a question that must result a JSON object
231
- *
232
- * If the answer is not a valid JSON object, it will return { unparsableResult: answer }
233
- *
234
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.jsonRequest} to ask the question
235
- *
236
- * (uses {@link DyFM_safeParseJSON})
237
- */
238
- async requestJSONInConversation<T = any>(
239
- set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
240
- ): Promise<T | { unparsableResult: string }> {
241
- set.message += this.predefinedRequests.jsonRequest;
242
-
243
- //this.logQuestion(set);
244
-
245
- const answer = await this.requestSimpleMessageInConversation(set);
246
-
247
- return this.convertAnswerToJSON<T>(answer, set.message);
248
- }
249
- //askJsonQuestionInConversation: typeof this.jsonQuestionInConversation = this.jsonQuestionInConversation;
250
-
251
- /**
252
- * Asks the AI to answer a question that must result a JSON object with specific key descriptions
253
- *
254
- * If the answer is not a valid JSON object, it will return { unparsableResult: answer }
255
- *
256
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.jsonRequestWithKeysDescription} to ask the question
257
- *
258
- * (uses {@link DyFM_safeParseJSON})
259
- */
260
- /* async requestJSONInConversationWithKeysDescription<T = any>(
261
- set: DyFM_AI_ConversationJSONKeysDescription_Input<DyFM_OAI_CallSettings>
262
- ): Promise<T | { unparsableResult: string }> {
263
- return this.jsonQuestionWithKeysDescriptionInConversation<any>(set);
264
- } */
265
-
266
- /**
267
- * Asks the AI to answer a question that must result a JSON object with specific key descriptions
268
- *
269
- * If the answer is not a valid JSON object, it will return { unparsableResult: answer }
270
- *
271
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.jsonRequestWithKeysDescription} to ask the question
272
- *
273
- * (uses {@link DyFM_safeParseJSON})
274
- */
275
- async requestJSONInConversationWithKeysDescription<T = any>(
276
- set: DyFM_AI_ConversationJSONKeysDescription_Input
277
- ): Promise<T | { unparsableResult: string }> {
278
- const jsonRequestWithKeysDescription = this.predefinedRequests.jsonRequestWithKeysDescription.replace(
279
- '{{DyNTS_jsonKeysDescription}}',
280
- set.keysDescription
281
- );
282
- set.message += jsonRequestWithKeysDescription;
283
-
284
- //this.logQuestion(set);
285
-
286
- const answer = await this.requestSimpleMessageInConversation(set);
287
-
288
- return this.convertAnswerToJSON<T>(answer, set.message);
289
- }
290
- //askJsonQuestionWithKeysDescriptionInConversation: typeof this.jsonQuestionWithKeysDescriptionInConversation = this.jsonQuestionWithKeysDescriptionInConversation;
291
-
292
- /**
293
- * Asks the AI to answer a question that must result a JSON object with specific keys
294
- *
295
- * If the answer is not a valid JSON object, it will return { unparsableResult: answer }
296
- *
297
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.jsonRequestWithExactKeys} to ask the question
298
- *
299
- * (uses {@link DyFM_safeParseJSON})
300
- */
301
- /* async requestJSONInConversationWithExactKeys(set: DyFM_AI_ConversationJSONExactKeys_Input): Promise<object> {
302
- const result = await this.jsonQuestionWithExactKeysInConversation<any>(set);
303
- return typeof result === 'object' ? result : {};
304
- } */
305
-
306
- /**
307
- * Asks the AI to answer a question that must result a JSON object with specific keys
308
- *
309
- * If the answer is not a valid JSON object, it will return { unparsableResult: answer }
310
- *
311
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.jsonRequestWithExactKeys} to ask the question
312
- *
313
- * (uses {@link DyFM_safeParseJSON})
314
- */
315
- async requestJSONInConversationWithExactKeys<T = any>(
316
- set: DyFM_AI_ConversationJSONExactKeys_Input
317
- ): Promise<T | { unparsableResult: string }> {
318
- const jsonRequestWithExactKeys = this.predefinedRequests.jsonRequestWithExactKeys.replace(
319
- '{{DyNTS_jsonKeys}}',
320
- this.getTextListAsText(set.keys)
321
- );
322
- set.message += jsonRequestWithExactKeys;
323
-
324
- //this.logQuestion(set);
325
-
326
- const answer = await this.requestSimpleMessageInConversation(set);
327
-
328
- return this.convertAnswerToJSON<T>(answer, set.message);
329
- }
330
- //askJsonQuestionWithExactKeysInConversation: typeof this.jsonQuestionWithExactKeysInConversation = this.jsonQuestionWithExactKeysInConversation;
331
-
332
- /**
333
- * Asks the AI to answer a question that must result a list of strings
334
- *
335
- * If the answer is not a valid JSON list, it will return the answer as a single item in an array
336
- *
337
- * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.listRequest} to ask the question
338
- *
339
- * (uses {@link DyFM_Object.safeParseList})
340
- */
341
- async requestListInConversation<T = any>(
342
- set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
343
- ): Promise<T[] | { unparsableResult: string }> {
344
- set.message += this.predefinedRequests.listRequest;
345
-
346
- //this.logQuestion(set);
347
-
348
- const answer = await this.requestSimpleMessageInConversation(set);
349
-
350
- return this.convertAnswerToList<T>(answer, set.message);
351
- }
352
- //askListQuestionInConversation: typeof this.listQuestionInConversation = this.listQuestionInConversation;
353
-
354
- /**
355
- * Asks the AI to answer a question
356
- *
357
- * Uses the {@link resolveSimpleUserMessage}
358
- */
359
- /* async getQuestionAnswerInConversation(
360
- conversation: DyFM_AI_Message[],
361
- question: string,
362
- issuer: string,
363
- debugLog?: boolean,
364
- messageSettings: DyFM_OAI_CallSettings = this.defaultSettings
365
- ): Promise<string> {
366
- const answer = await this.resolveSimpleUserMessageInConversation(
367
- conversation,
368
- question,
369
- issuer,
370
- messageSettings,
371
- ) as Promise<string>;
372
-
373
- if (debugLog) {
374
- console.log(' - ', answer);
375
- }
376
-
377
- return answer;
378
- } */
379
-
380
- /* async requestSimpleQuestionInConversation(set: DyFM_AI_ConversationMessage_Input): Promise<string> {
381
- return await this.getAnswerInConversation({
382
- ...set,
383
- newMessage: set.message,
384
- });
385
- } */
386
- /* getQuestionAnswerInConversation = this.getAnswerInConversation; */
387
- //getQuestionInConversation: typeof this.getQuestionAnswerInConversation = this.getQuestionAnswerInConversation;
388
- //askQuestionInConversation: typeof this.getQuestionAnswerInConversation = this.getQuestionAnswerInConversation;
389
- //getConversationAnswer: typeof this.getAnswerInConversation = this.getAnswerInConversation;
390
-
391
- /**
392
- * Asks the AI to answer a question using the whole conversation
393
- * (If you want to use only the conversation, without adding a new message,
394
- * use directly the {@link resolveConversation})
395
- *
396
- * Uses the {@link resolveConversation}
397
- */
398
- async requestSimpleMessageInConversation(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): Promise<string> {
399
- // Convert generic AI messages to OpenAI-specific format
400
- //const oaiConversation: DyFM_AI_Message[] = /* this.convertToOAIMessages(set.conversation) */ set.conversation;
401
-
402
- if (set.message) {
403
- set.conversation.push({
404
- role: DyFM_AI_MessageRole.user,
405
- content: set.message,
406
- });
407
- }
408
-
409
- const answer: string = await this.resolveConversation({
410
- ...set,
411
- getFullResponse: false,
412
- }) as string;
413
-
414
- this.logAnswer(answer);
415
-
416
- return answer;
417
- }
418
-
419
- /* async resolveConversationMessage(
420
- set: {
421
- conversation: DyFM_AI_Message[],
422
- issuer: string,
423
- settings?: DyFM_OAI_CallSettings,
424
- getFullResponse?: boolean,
425
- debugLog?: boolean,
426
- * this is used to readably replace too long contents to eg '...' in logs
427
- replaceThisInLog?: string,
428
- }
429
- ): Promise<string> {
430
- return await this.resolveConversation(set) as string;
431
- } */
432
-
433
- /**
434
- * Resolves a conversation
435
- *
436
- * Uses the {@link getMessageCreateInput}
437
- */
438
- async resolveConversation(
439
- set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
440
- ): Promise<string | ChatCompletion> {
441
- try {
442
- if (!set.conversation.some(message => message.role === DyFM_AI_MessageRole.system)) {
443
- /* throw new DyFM_Error({
444
- ...this.getDefaultErrorSettings(
445
- 'resolveConversation',
446
- new Error('System message found in conversation'),
447
- set.issuer
448
- ),
449
- errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-OAB-RC1`,
450
- }); */
451
- /* DyFM_Log.error('System message found in conversation', {
452
- conversation: set.conversation,
453
- });
454
- } else { */
455
- set.conversation.unshift(this.getDefaultSystemMessage(set.settings));
456
- }
457
-
458
- // conversation shortening
459
- const shortenedConversation = this.shortenConversation(set);
460
-
461
- this.validateConversation(shortenedConversation);
462
-
463
- //this.logQuestion(set);
464
-
465
- this.logConversation({
466
- ...set,
467
- conversation: shortenedConversation,
468
- });
469
-
470
- // FR-002 — per-call cost-event timing
471
- const callInput = this.getMessageCreateInput({
472
- ...set,
473
- conversation: shortenedConversation,
474
- });
475
- const start: number = Date.now();
476
- const result: ChatCompletion = await this.openai.chat.completions.create(
477
- callInput,
478
- ) as ChatCompletion;
479
- const durationMs: number = Date.now() - start;
480
-
481
- // FR-002 — cost-event emit (resolveConversation = 'llm-chat' flow alapból)
482
- this.emitCostEvent({
483
- callType: 'llm-chat',
484
- provider: this.aiProvider,
485
- model: String(callInput.model ?? this.defaultModel),
486
- tokensUsed: {
487
- input: result.usage?.prompt_tokens ?? 0,
488
- output: result.usage?.completion_tokens ?? 0,
489
- total: result.usage?.total_tokens ?? 0,
490
- },
491
- durationMs: durationMs,
492
- issuer: set.issuer,
493
- timestamp: new Date(),
494
- });
495
-
496
- if (set.getFullResponse) {
497
- return result;
498
- }
499
-
500
- return result.choices[0].message.content;
501
- } catch (error) {
502
- throw new DyFM_Error({
503
- ...this.getDefaultErrorSettings('resolveConversation', error, set.issuer),
504
-
505
- errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-OAB-RC0`,
506
- });
507
- }
508
- }
509
- //resolveSimpleUserMessageInConversation: typeof this.resolveConversation = this.resolveConversation;
510
-
511
- protected shortenConversation(
512
- set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
513
- ): DyFM_AI_Message[] {
514
- try {
515
- // Step 1: Clone the conversation to avoid mutating the original
516
- const clonedConversation: DyFM_AI_Message[] = DyFM_Object.clone(set.conversation);
517
-
518
- // Step 2: Separate system messages from user/assistant messages
519
- // System messages are kept and not shortened
520
- const systemMessages: DyFM_AI_Message[] = clonedConversation.filter(
521
- (message: DyFM_AI_Message): boolean => message.role === DyFM_AI_MessageRole.system
522
- );
523
-
524
- // Step 3: Calculate system messages length as JSON string
525
- // ⚠️ ISSUE: This measures JSON string length, not actual token count
526
- // ⚠️ ISSUE: Doesn't account for message structure overhead (role, content keys, formatting)
527
- const systemMessagesStringLength: number = JSON.stringify(systemMessages).length;
528
-
529
- // Step 4: Extract only content strings from non-system messages
530
- // ⚠️ ISSUE: Only measuring content strings, not full message structure
531
- // ⚠️ ISSUE: OpenAI counts tokens for full message format: {"role": "...", "content": "..."}
532
- const msgs: string[] = clonedConversation.filter(
533
- (message: DyFM_AI_Message): boolean => message.role !== DyFM_AI_MessageRole.system
534
- ).map((message: DyFM_AI_Message): string => message.content);
535
-
536
- // Step 5: Stringify the content array to measure total length
537
- // ⚠️ ISSUE: This is character count, not token count - ratio varies (1 token ≈ 1-4 chars)
538
- let stringifiedMessages: string = JSON.stringify(msgs);
539
-
540
- // Step 6: Log initial state if debug is enabled
541
- if (this._debugLog || set.debugLog) {
542
- DyFM_Log.info(
543
- ' DyNTS_OAI_LLMChat_ServiceBase: before shortening conversation', {
544
- stringifiedMessagesLength: stringifiedMessages.length,
545
- conversationLength: clonedConversation.length,
546
- lastMessage: DyFM_Array.last(clonedConversation)?.content,
547
- }
548
- );
549
- }
550
-
551
- // Step 7: Initialize tracking variables
552
- let removedMessagesCount: number = 0;
553
- let lastStringifiedMessagesLength: number = stringifiedMessages.length;
554
-
555
- // Step 8: Loop to remove messages until under character limit
556
- // ⚠️ ISSUE: Comparing character count to token limit - different units!
557
- // ⚠️ ISSUE: maxMessagesStringLength (120k chars) may not safely map to 128k tokens
558
- // ⚠️ ISSUE: Condition allows single very long message to remain (length > 1)
559
- while (
560
- (stringifiedMessages.length + systemMessagesStringLength) > DyNTS_OAI_global_settings.maxMessagesStringLength &&
561
- clonedConversation.length > 1
562
- ) {
563
- // Step 8a: Remove oldest message from full conversation
564
- clonedConversation.splice(0, 1);
565
-
566
- // Step 8b: Remove corresponding content from msgs array
567
- // ⚠️ CRITICAL BUG: Always removes from msgs, even if removed message was a system message!
568
- // ⚠️ This causes array desynchronization - msgs and clonedConversation get out of sync
569
- msgs.splice(0, 1);
570
-
571
- removedMessagesCount++;
572
-
573
- // Step 8c: Recalculate stringified length after removal
574
- stringifiedMessages = JSON.stringify(msgs);
575
- lastStringifiedMessagesLength = stringifiedMessages.length;
576
- }
577
-
578
- // Step 9: Log final state if debug is enabled
579
- if (this._debugLog || set.debugLog) {
580
- DyFM_Log.info(
581
- ' DyNTS_OAI_LLMChat_ServiceBase: after shortening conversation', {
582
- removedMessagesCount: removedMessagesCount,
583
- lastStringifiedMessagesLength: lastStringifiedMessagesLength,
584
- lastMessage: DyFM_Array.last(clonedConversation)?.content,
585
- localStackLocation: DyFM_getLocalStackLocation(),
586
- }
587
- );
588
- }
589
-
590
- // Step 10: Safety check - ensure we didn't remove everything
591
- if (!clonedConversation.length) {
592
- DyFM_Log.error('No conversation messages (left)', {
593
- /* conversation: DyFM_Object.clone(conversation), */
594
- conversationLength: set.conversation.length,
595
- clonedConversation: DyFM_Object.clone(clonedConversation),
596
- });
597
- throw new Error('No conversation messages (left)');
598
- }
599
-
600
- // Step 11: Reconstruct conversation: system messages first, then shortened non-system messages
601
- // ⚠️ ISSUE: clonedConversation may still contain system messages mixed in
602
- // ⚠️ This could result in duplicate system messages in the final array
603
- return [ ...systemMessages, ...clonedConversation ];
604
- } catch (error) {
605
- DyFM_Error.logSimple('❌❌ Error shortening conversation:', error);
606
-
607
- throw new DyFM_Error({
608
- ...this.getDefaultErrorSettings('shortenConversation', error, set.issuer),
609
-
610
- errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-OAB-SC0`,
611
- });
612
- }
613
- }
614
-
615
- /**
616
- * Kérdez egy kérdést és JSON választ vár exact keys-szel
617
- *
618
- * Asks a question and expects JSON response with exact keys
619
- */
620
- /* async requestJSONInConversationWithExactKeys<T>(
621
- set: DyFM_AI_ConversationJSONExactKeys_Input
622
- ): Promise<T> {
623
- const answer = await this.jsonQuestionWithExactKeysInConversation<any>(set);
624
-
625
- if ('unparsableResult' in answer) {
626
- throw new DyFM_Error({
627
- message: 'Invalid JSON response from AI',
628
- additionalContent: { answer },
629
- userMessage: 'Failed to parse AI response'
630
- });
631
- }
632
-
633
- return answer as T;
634
- } */
1
+ import { OpenAI } from 'openai';
2
+
3
+ import { DyFM_OAI_Settings, DyFM_OAI_Model, DyFM_OAI_CallSettings } from '@futdevpro/fsm-dynamo/ai/open-ai';
4
+ import { DyFM_AnyError, DyFM_Error, DyFM_Error_Settings, DyFM_getLocalStackLocation, DyFM_Log, DyFM_notNull, DyFM_Object, DyFM_Array } from '@futdevpro/fsm-dynamo';
5
+ import { DyFM_AI_Message } from '@futdevpro/fsm-dynamo/ai';
6
+
7
+ import { DyNTS_global_settings } from '../../../../../_collections/global-settings.const';
8
+ import { ChatCompletion } from 'openai/resources';
9
+ import { ChatCompletionCreateParamsBase, ChatCompletionMessageParam } from 'openai/resources/chat/completions';
10
+ import { DyFM_AI_MessageRole } from '@futdevpro/fsm-dynamo/ai';
11
+ import { DyNTS_OAI_LLM_Predefined_Requests } from '../_models/interfaces/oai-llm-predefined-requests.interface';
12
+ import { DyNTS_OAI_LLM_ServiceBase } from './oai-llm.service-base';
13
+ import { DyNTS_OAI_global_settings } from '../_collections/oai-global-settings.const';
14
+ import { DyNTS_AI_LLMChat_ServiceBase } from '../../../_services/ai-llm-chat.service-base';
15
+ import {
16
+ DyFM_AI_ConversationBase_Input,
17
+ DyFM_AI_ConversationSelect_Input,
18
+ DyFM_AI_ConversationGenericSelect_Input,
19
+ DyFM_AI_ConversationMultiSelect_Input,
20
+ DyFM_AI_ConversationGenericMultiSelect_Input,
21
+ DyFM_AI_ConversationJSONKeysDescription_Input,
22
+ DyFM_AI_ConversationJSONExactKeys_Input,
23
+ } from '../../../_models/ai-input-interfaces';
24
+
25
+
26
+ /**
27
+ * {
28
+ * organization: 'org-XY',
29
+ * apiKey: 'sk-XY',
30
+ * project: 'proj_XY',
31
+ * }
32
+ */
33
+
34
+ // Di Dictionary DiModel DiEz DiAz
35
+
36
+ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase implements DyNTS_AI_LLMChat_ServiceBase {
37
+
38
+ // History management
39
+ /* private conversationHistories: Map<string, DyFM_AI_Message[]> = new Map(); */
40
+
41
+ /**
42
+ * Hozzáad egy üzenetet a conversation history-hoz
43
+ *
44
+ * Adds a message to conversation history
45
+ */
46
+ /* addMessageToHistory(message: DyFM_AI_Message, issuer: string): void {
47
+ if (!this.conversationHistories.has(issuer)) {
48
+ this.conversationHistories.set(issuer, []);
49
+ }
50
+ this.conversationHistories.get(issuer).push(message);
51
+ } */
52
+
53
+ /**
54
+ * Törli a conversation history-t
55
+ *
56
+ * Clears conversation history
57
+ */
58
+ /* clearHistory(issuer: string): void {
59
+ this.conversationHistories.delete(issuer);
60
+ } */
61
+
62
+ /**
63
+ * Visszaadja a conversation history-t
64
+ *
65
+ * Gets conversation history
66
+ */
67
+ /* getHistory(issuer: string): DyFM_AI_Message[] {
68
+ return this.conversationHistories.get(issuer) || [];
69
+ } */
70
+
71
+ /**
72
+ * Converts generic AI messages to OpenAI-specific format
73
+ *
74
+ * Az generic AI üzeneteket OpenAI-specifikus formátumra alakítja át
75
+ */
76
+ /* private convertToOAIMessages(messages: DyFM_AI_Message[]): DyFM_AI_Message[] {
77
+ return messages;
78
+ } */
79
+
80
+ /**
81
+ * Asks the AI to answer a yes/no question
82
+ *
83
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.request} to ask the question,
84
+ * and the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.upperCaseYes} to check the answer
85
+ */
86
+ async requestYesNoInConversation(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): Promise<boolean> {
87
+ set.message += this.predefinedRequests.yesNo.request;
88
+
89
+ //this.logQuestion(set);
90
+
91
+ const answer: string = await this.requestSimpleMessageInConversation(set);
92
+
93
+ return this.convertAnswerToBoolean(answer);
94
+ }
95
+ //askYesNoQuestionInConversation: typeof this.yesNoQuestionInConversation = this.yesNoQuestionInConversation;
96
+
97
+ /**
98
+ * Asks the AI to answer a simple question
99
+ *
100
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.simpleQuestion} to ask the question
101
+ */
102
+ /* async requestSimpleQuestionInConversation(
103
+ set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
104
+ ): Promise<string> {
105
+ this.logQuestion(set);
106
+
107
+ return await this.getQuestionAnswerInConversation(set);
108
+ } */
109
+ //askSimpleQuestionInConversation: typeof this.simpleQuestionInConversation = this.simpleQuestionInConversation;
110
+
111
+ /**
112
+ * Asks the AI to answer a percentage question
113
+ *
114
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.percentageOnly} to ask the question
115
+ */
116
+ async requestPercentageInConversation(
117
+ set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
118
+ ): Promise<number> {
119
+ set.message += this.predefinedRequests.percentageOnly;
120
+
121
+ //this.logQuestion(set);
122
+
123
+ const answer: string = await this.requestSimpleMessageInConversation(set);
124
+
125
+ return this.convertAnswerToNumber(answer, set.message);
126
+ }
127
+ //askPercentageQuestionInConversation: typeof this.percentageQuestionInConversation = this.percentageQuestionInConversation;
128
+
129
+
130
+ /**
131
+ * Asks the AI to select one of the options from the list
132
+ *
133
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
134
+ */
135
+ async requestSelectInConversation<T>(
136
+ set: DyFM_AI_ConversationGenericSelect_Input<T, DyFM_OAI_CallSettings>
137
+ ): Promise<T | { unparsableResult: string }> {
138
+ // replace the {{DyNTS_selectOptions}} with the list of options
139
+ const selectQuestionAddition = this.predefinedRequests.selectRequest.replace(
140
+ '{{DyNTS_selectOptions}}',
141
+ this.getTextListAsText(this.stringifySelectOptions(set.selectFrom))
142
+ );
143
+ set.message += selectQuestionAddition;
144
+
145
+ //this.logQuestion(set);
146
+
147
+ const answer = await this.requestSimpleMessageInConversation(set);
148
+
149
+ return this.convertAnswerToSelectOption<T>(answer, set.message, set.selectFrom);
150
+ }
151
+ //askSelectQuestionInConversation: typeof this.selectQuestionInConversation = this.selectQuestionInConversation;
152
+
153
+ /**
154
+ * Asks the AI to select one of the options from the list
155
+ * Similar to {@link askSelectQuestion},
156
+ * but with a more generic approach that can be used for objects
157
+ *
158
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
159
+ */
160
+ /* async requestSelectInConversation<T>(
161
+ set: DyFM_AI_ConversationGenericSelect_Input<T, DyFM_OAI_CallSettings>
162
+ ): Promise<T | { unparsableResult: string }> {
163
+ const selectQuestionAddition = this.predefinedRequests.selectRequest.replace(
164
+ '{{DyNTS_selectOptions}}',
165
+ this.getTextListAsText(set.selectFrom.map(item => `"${JSON.stringify(item)}"`))
166
+ );
167
+ set.message += selectQuestionAddition;
168
+
169
+ this.logQuestion(set);
170
+
171
+ const answer = await this.getQuestionAnswerInConversation(set);
172
+
173
+ return DyFM_Object.safeParseJSON<T>(answer);
174
+ } */
175
+ //askRequestSelectInConversation: typeof this.requestSelectInConversation = this.requestSelectInConversation;
176
+
177
+ /**
178
+ * Asks the AI to select one or more of the options from the list
179
+ *
180
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
181
+ */
182
+ /* async requestMultiselectInConversation(set: DyFM_AI_ConversationMultiSelect_Input): Promise<string[]> {
183
+ const selectQuestionAddition = this.predefinedRequests.multiselect.replace(
184
+ '{{DyNTS_selectOptions}}',
185
+ this.getTextListAsText(set.options)
186
+ );
187
+ set.message += selectQuestionAddition;
188
+
189
+ let answer = await this.getQuestionAnswerInConversation(set);
190
+
191
+ answer = answer.toLocaleUpperCase();
192
+
193
+ const result: string[] = [];
194
+
195
+ for (const item of set.options) {
196
+ if (answer.includes(item.toLocaleUpperCase())) {
197
+ result.push(item);
198
+ }
199
+ }
200
+
201
+ return result;
202
+ } */
203
+ //askMultipleSelectQuestionWithOptionsInConversation: typeof this.multipleSelectQuestionWithOptionsInConversation = this.multipleSelectQuestionWithOptionsInConversation;
204
+
205
+ /**
206
+ * Asks the AI to select one or more of the options from the list
207
+ * Similar to {@link askMultipleSelectQuestionWithOptions},
208
+ * but with a more generic approach that can be used for objects
209
+ *
210
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
211
+ */
212
+ async requestMultiselectInConversation<T>(
213
+ set: DyFM_AI_ConversationGenericMultiSelect_Input<T, DyFM_OAI_CallSettings>
214
+ ): Promise<T[] | { unparsableResult: string }> {
215
+ const selectQuestionAddition = this.predefinedRequests.multiselect.replace(
216
+ '{{DyNTS_selectOptions}}',
217
+ this.getTextListAsText(this.stringifySelectOptions(set.options))
218
+ );
219
+ set.message += selectQuestionAddition;
220
+
221
+ //this.logQuestion(set);
222
+
223
+ const answer = await this.requestSimpleMessageInConversation(set);
224
+
225
+ return this.convertAnswerToList<T>(answer, set.message);
226
+ }
227
+ //askRequestMultipleSelectInConversation: typeof this.requestMultipleSelectInConversation = this.requestMultipleSelectInConversation;
228
+
229
+ /**
230
+ * Asks the AI to answer a question that must result a JSON object
231
+ *
232
+ * If the answer is not a valid JSON object, it will return { unparsableResult: answer }
233
+ *
234
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.jsonRequest} to ask the question
235
+ *
236
+ * (uses {@link DyFM_safeParseJSON})
237
+ */
238
+ async requestJSONInConversation<T = any>(
239
+ set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
240
+ ): Promise<T | { unparsableResult: string }> {
241
+ set.message += this.predefinedRequests.jsonRequest;
242
+
243
+ //this.logQuestion(set);
244
+
245
+ const answer = await this.requestSimpleMessageInConversation(set);
246
+
247
+ return this.convertAnswerToJSON<T>(answer, set.message);
248
+ }
249
+ //askJsonQuestionInConversation: typeof this.jsonQuestionInConversation = this.jsonQuestionInConversation;
250
+
251
+ /**
252
+ * Asks the AI to answer a question that must result a JSON object with specific key descriptions
253
+ *
254
+ * If the answer is not a valid JSON object, it will return { unparsableResult: answer }
255
+ *
256
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.jsonRequestWithKeysDescription} to ask the question
257
+ *
258
+ * (uses {@link DyFM_safeParseJSON})
259
+ */
260
+ /* async requestJSONInConversationWithKeysDescription<T = any>(
261
+ set: DyFM_AI_ConversationJSONKeysDescription_Input<DyFM_OAI_CallSettings>
262
+ ): Promise<T | { unparsableResult: string }> {
263
+ return this.jsonQuestionWithKeysDescriptionInConversation<any>(set);
264
+ } */
265
+
266
+ /**
267
+ * Asks the AI to answer a question that must result a JSON object with specific key descriptions
268
+ *
269
+ * If the answer is not a valid JSON object, it will return { unparsableResult: answer }
270
+ *
271
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.jsonRequestWithKeysDescription} to ask the question
272
+ *
273
+ * (uses {@link DyFM_safeParseJSON})
274
+ */
275
+ async requestJSONInConversationWithKeysDescription<T = any>(
276
+ set: DyFM_AI_ConversationJSONKeysDescription_Input
277
+ ): Promise<T | { unparsableResult: string }> {
278
+ const jsonRequestWithKeysDescription = this.predefinedRequests.jsonRequestWithKeysDescription.replace(
279
+ '{{DyNTS_jsonKeysDescription}}',
280
+ set.keysDescription
281
+ );
282
+ set.message += jsonRequestWithKeysDescription;
283
+
284
+ //this.logQuestion(set);
285
+
286
+ const answer = await this.requestSimpleMessageInConversation(set);
287
+
288
+ return this.convertAnswerToJSON<T>(answer, set.message);
289
+ }
290
+ //askJsonQuestionWithKeysDescriptionInConversation: typeof this.jsonQuestionWithKeysDescriptionInConversation = this.jsonQuestionWithKeysDescriptionInConversation;
291
+
292
+ /**
293
+ * Asks the AI to answer a question that must result a JSON object with specific keys
294
+ *
295
+ * If the answer is not a valid JSON object, it will return { unparsableResult: answer }
296
+ *
297
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.jsonRequestWithExactKeys} to ask the question
298
+ *
299
+ * (uses {@link DyFM_safeParseJSON})
300
+ */
301
+ /* async requestJSONInConversationWithExactKeys(set: DyFM_AI_ConversationJSONExactKeys_Input): Promise<object> {
302
+ const result = await this.jsonQuestionWithExactKeysInConversation<any>(set);
303
+ return typeof result === 'object' ? result : {};
304
+ } */
305
+
306
+ /**
307
+ * Asks the AI to answer a question that must result a JSON object with specific keys
308
+ *
309
+ * If the answer is not a valid JSON object, it will return { unparsableResult: answer }
310
+ *
311
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.jsonRequestWithExactKeys} to ask the question
312
+ *
313
+ * (uses {@link DyFM_safeParseJSON})
314
+ */
315
+ async requestJSONInConversationWithExactKeys<T = any>(
316
+ set: DyFM_AI_ConversationJSONExactKeys_Input
317
+ ): Promise<T | { unparsableResult: string }> {
318
+ const jsonRequestWithExactKeys = this.predefinedRequests.jsonRequestWithExactKeys.replace(
319
+ '{{DyNTS_jsonKeys}}',
320
+ this.getTextListAsText(set.keys)
321
+ );
322
+ set.message += jsonRequestWithExactKeys;
323
+
324
+ //this.logQuestion(set);
325
+
326
+ const answer = await this.requestSimpleMessageInConversation(set);
327
+
328
+ return this.convertAnswerToJSON<T>(answer, set.message);
329
+ }
330
+ //askJsonQuestionWithExactKeysInConversation: typeof this.jsonQuestionWithExactKeysInConversation = this.jsonQuestionWithExactKeysInConversation;
331
+
332
+ /**
333
+ * Asks the AI to answer a question that must result a list of strings
334
+ *
335
+ * If the answer is not a valid JSON list, it will return the answer as a single item in an array
336
+ *
337
+ * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.listRequest} to ask the question
338
+ *
339
+ * (uses {@link DyFM_Object.safeParseList})
340
+ */
341
+ async requestListInConversation<T = any>(
342
+ set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
343
+ ): Promise<T[] | { unparsableResult: string }> {
344
+ set.message += this.predefinedRequests.listRequest;
345
+
346
+ //this.logQuestion(set);
347
+
348
+ const answer = await this.requestSimpleMessageInConversation(set);
349
+
350
+ return this.convertAnswerToList<T>(answer, set.message);
351
+ }
352
+ //askListQuestionInConversation: typeof this.listQuestionInConversation = this.listQuestionInConversation;
353
+
354
+ /**
355
+ * Asks the AI to answer a question
356
+ *
357
+ * Uses the {@link resolveSimpleUserMessage}
358
+ */
359
+ /* async getQuestionAnswerInConversation(
360
+ conversation: DyFM_AI_Message[],
361
+ question: string,
362
+ issuer: string,
363
+ debugLog?: boolean,
364
+ messageSettings: DyFM_OAI_CallSettings = this.defaultSettings
365
+ ): Promise<string> {
366
+ const answer = await this.resolveSimpleUserMessageInConversation(
367
+ conversation,
368
+ question,
369
+ issuer,
370
+ messageSettings,
371
+ ) as Promise<string>;
372
+
373
+ if (debugLog) {
374
+ console.log(' - ', answer);
375
+ }
376
+
377
+ return answer;
378
+ } */
379
+
380
+ /* async requestSimpleQuestionInConversation(set: DyFM_AI_ConversationMessage_Input): Promise<string> {
381
+ return await this.getAnswerInConversation({
382
+ ...set,
383
+ newMessage: set.message,
384
+ });
385
+ } */
386
+ /* getQuestionAnswerInConversation = this.getAnswerInConversation; */
387
+ //getQuestionInConversation: typeof this.getQuestionAnswerInConversation = this.getQuestionAnswerInConversation;
388
+ //askQuestionInConversation: typeof this.getQuestionAnswerInConversation = this.getQuestionAnswerInConversation;
389
+ //getConversationAnswer: typeof this.getAnswerInConversation = this.getAnswerInConversation;
390
+
391
+ /**
392
+ * Asks the AI to answer a question using the whole conversation
393
+ * (If you want to use only the conversation, without adding a new message,
394
+ * use directly the {@link resolveConversation})
395
+ *
396
+ * Uses the {@link resolveConversation}
397
+ */
398
+ async requestSimpleMessageInConversation(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): Promise<string> {
399
+ // Convert generic AI messages to OpenAI-specific format
400
+ //const oaiConversation: DyFM_AI_Message[] = /* this.convertToOAIMessages(set.conversation) */ set.conversation;
401
+
402
+ if (set.message) {
403
+ set.conversation.push({
404
+ role: DyFM_AI_MessageRole.user,
405
+ content: set.message,
406
+ });
407
+ }
408
+
409
+ const answer: string = await this.resolveConversation({
410
+ ...set,
411
+ getFullResponse: false,
412
+ }) as string;
413
+
414
+ this.logAnswer(answer);
415
+
416
+ return answer;
417
+ }
418
+
419
+ /* async resolveConversationMessage(
420
+ set: {
421
+ conversation: DyFM_AI_Message[],
422
+ issuer: string,
423
+ settings?: DyFM_OAI_CallSettings,
424
+ getFullResponse?: boolean,
425
+ debugLog?: boolean,
426
+ * this is used to readably replace too long contents to eg '...' in logs
427
+ replaceThisInLog?: string,
428
+ }
429
+ ): Promise<string> {
430
+ return await this.resolveConversation(set) as string;
431
+ } */
432
+
433
+ /**
434
+ * Resolves a conversation
435
+ *
436
+ * Uses the {@link getMessageCreateInput}
437
+ */
438
+ async resolveConversation(
439
+ set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
440
+ ): Promise<string | ChatCompletion> {
441
+ try {
442
+ if (!set.conversation.some(message => message.role === DyFM_AI_MessageRole.system)) {
443
+ /* throw new DyFM_Error({
444
+ ...this.getDefaultErrorSettings(
445
+ 'resolveConversation',
446
+ new Error('System message found in conversation'),
447
+ set.issuer
448
+ ),
449
+ errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-OAB-RC1`,
450
+ }); */
451
+ /* DyFM_Log.error('System message found in conversation', {
452
+ conversation: set.conversation,
453
+ });
454
+ } else { */
455
+ set.conversation.unshift(this.getDefaultSystemMessage(set.settings));
456
+ }
457
+
458
+ // conversation shortening
459
+ const shortenedConversation = this.shortenConversation(set);
460
+
461
+ this.validateConversation(shortenedConversation);
462
+
463
+ //this.logQuestion(set);
464
+
465
+ this.logConversation({
466
+ ...set,
467
+ conversation: shortenedConversation,
468
+ });
469
+
470
+ // FR-002 — per-call cost-event timing
471
+ const callInput = this.getMessageCreateInput({
472
+ ...set,
473
+ conversation: shortenedConversation,
474
+ });
475
+ const start: number = Date.now();
476
+ const result: ChatCompletion = await this.openai.chat.completions.create(
477
+ callInput,
478
+ ) as ChatCompletion;
479
+ const durationMs: number = Date.now() - start;
480
+
481
+ // FR-002 — cost-event emit (resolveConversation = 'llm-chat' flow alapból)
482
+ this.emitCostEvent({
483
+ callType: 'llm-chat',
484
+ provider: this.aiProvider,
485
+ model: String(callInput.model ?? this.defaultModel),
486
+ tokensUsed: {
487
+ input: result.usage?.prompt_tokens ?? 0,
488
+ output: result.usage?.completion_tokens ?? 0,
489
+ total: result.usage?.total_tokens ?? 0,
490
+ },
491
+ durationMs: durationMs,
492
+ issuer: set.issuer,
493
+ timestamp: new Date(),
494
+ });
495
+
496
+ if (set.getFullResponse) {
497
+ return result;
498
+ }
499
+
500
+ return result.choices[0].message.content;
501
+ } catch (error) {
502
+ throw new DyFM_Error({
503
+ ...this.getDefaultErrorSettings('resolveConversation', error, set.issuer),
504
+
505
+ errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-OAB-RC0`,
506
+ });
507
+ }
508
+ }
509
+ //resolveSimpleUserMessageInConversation: typeof this.resolveConversation = this.resolveConversation;
510
+
511
+ protected shortenConversation(
512
+ set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>
513
+ ): DyFM_AI_Message[] {
514
+ try {
515
+ // Step 1: Clone the conversation to avoid mutating the original
516
+ const clonedConversation: DyFM_AI_Message[] = DyFM_Object.clone(set.conversation);
517
+
518
+ // Step 2: Separate system messages from user/assistant messages
519
+ // System messages are kept and not shortened
520
+ const systemMessages: DyFM_AI_Message[] = clonedConversation.filter(
521
+ (message: DyFM_AI_Message): boolean => message.role === DyFM_AI_MessageRole.system
522
+ );
523
+
524
+ // Step 3: Calculate system messages length as JSON string
525
+ // ⚠️ ISSUE: This measures JSON string length, not actual token count
526
+ // ⚠️ ISSUE: Doesn't account for message structure overhead (role, content keys, formatting)
527
+ const systemMessagesStringLength: number = JSON.stringify(systemMessages).length;
528
+
529
+ // Step 4: Extract only content strings from non-system messages
530
+ // ⚠️ ISSUE: Only measuring content strings, not full message structure
531
+ // ⚠️ ISSUE: OpenAI counts tokens for full message format: {"role": "...", "content": "..."}
532
+ const msgs: string[] = clonedConversation.filter(
533
+ (message: DyFM_AI_Message): boolean => message.role !== DyFM_AI_MessageRole.system
534
+ ).map((message: DyFM_AI_Message): string => message.content);
535
+
536
+ // Step 5: Stringify the content array to measure total length
537
+ // ⚠️ ISSUE: This is character count, not token count - ratio varies (1 token ≈ 1-4 chars)
538
+ let stringifiedMessages: string = JSON.stringify(msgs);
539
+
540
+ // Step 6: Log initial state if debug is enabled
541
+ if (this._debugLog || set.debugLog) {
542
+ DyFM_Log.info(
543
+ ' DyNTS_OAI_LLMChat_ServiceBase: before shortening conversation', {
544
+ stringifiedMessagesLength: stringifiedMessages.length,
545
+ conversationLength: clonedConversation.length,
546
+ lastMessage: DyFM_Array.last(clonedConversation)?.content,
547
+ }
548
+ );
549
+ }
550
+
551
+ // Step 7: Initialize tracking variables
552
+ let removedMessagesCount: number = 0;
553
+ let lastStringifiedMessagesLength: number = stringifiedMessages.length;
554
+
555
+ // Step 8: Loop to remove messages until under character limit
556
+ // ⚠️ ISSUE: Comparing character count to token limit - different units!
557
+ // ⚠️ ISSUE: maxMessagesStringLength (120k chars) may not safely map to 128k tokens
558
+ // ⚠️ ISSUE: Condition allows single very long message to remain (length > 1)
559
+ while (
560
+ (stringifiedMessages.length + systemMessagesStringLength) > DyNTS_OAI_global_settings.maxMessagesStringLength &&
561
+ clonedConversation.length > 1
562
+ ) {
563
+ // Step 8a: Remove oldest message from full conversation
564
+ clonedConversation.splice(0, 1);
565
+
566
+ // Step 8b: Remove corresponding content from msgs array
567
+ // ⚠️ CRITICAL BUG: Always removes from msgs, even if removed message was a system message!
568
+ // ⚠️ This causes array desynchronization - msgs and clonedConversation get out of sync
569
+ msgs.splice(0, 1);
570
+
571
+ removedMessagesCount++;
572
+
573
+ // Step 8c: Recalculate stringified length after removal
574
+ stringifiedMessages = JSON.stringify(msgs);
575
+ lastStringifiedMessagesLength = stringifiedMessages.length;
576
+ }
577
+
578
+ // Step 9: Log final state if debug is enabled
579
+ if (this._debugLog || set.debugLog) {
580
+ DyFM_Log.info(
581
+ ' DyNTS_OAI_LLMChat_ServiceBase: after shortening conversation', {
582
+ removedMessagesCount: removedMessagesCount,
583
+ lastStringifiedMessagesLength: lastStringifiedMessagesLength,
584
+ lastMessage: DyFM_Array.last(clonedConversation)?.content,
585
+ localStackLocation: DyFM_getLocalStackLocation(),
586
+ }
587
+ );
588
+ }
589
+
590
+ // Step 10: Safety check - ensure we didn't remove everything
591
+ if (!clonedConversation.length) {
592
+ DyFM_Log.error('No conversation messages (left)', {
593
+ /* conversation: DyFM_Object.clone(conversation), */
594
+ conversationLength: set.conversation.length,
595
+ clonedConversation: DyFM_Object.clone(clonedConversation),
596
+ });
597
+ throw new Error('No conversation messages (left)');
598
+ }
599
+
600
+ // Step 11: Reconstruct conversation: system messages first, then shortened non-system messages
601
+ // ⚠️ ISSUE: clonedConversation may still contain system messages mixed in
602
+ // ⚠️ This could result in duplicate system messages in the final array
603
+ return [ ...systemMessages, ...clonedConversation ];
604
+ } catch (error) {
605
+ DyFM_Error.logSimple('❌❌ Error shortening conversation:', error);
606
+
607
+ throw new DyFM_Error({
608
+ ...this.getDefaultErrorSettings('shortenConversation', error, set.issuer),
609
+
610
+ errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-OAB-SC0`,
611
+ });
612
+ }
613
+ }
614
+
615
+ /**
616
+ * Kérdez egy kérdést és JSON választ vár exact keys-szel
617
+ *
618
+ * Asks a question and expects JSON response with exact keys
619
+ */
620
+ /* async requestJSONInConversationWithExactKeys<T>(
621
+ set: DyFM_AI_ConversationJSONExactKeys_Input
622
+ ): Promise<T> {
623
+ const answer = await this.jsonQuestionWithExactKeysInConversation<any>(set);
624
+
625
+ if ('unparsableResult' in answer) {
626
+ throw new DyFM_Error({
627
+ message: 'Invalid JSON response from AI',
628
+ additionalContent: { answer },
629
+ userMessage: 'Failed to parse AI response'
630
+ });
631
+ }
632
+
633
+ return answer as T;
634
+ } */
635
635
  }