@futdevpro/nts-dynamo 1.15.155 → 1.15.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/__documentations/2026-08-22-bfr-ctm-018-content-free-endpoint-errors.md +54 -0
- package/__documentations/2026-08-22-content-free-process-error-boundary.md +26 -6
- package/build/_collections/app-version-header.util.d.ts +41 -41
- package/build/_collections/app-version-header.util.js +66 -66
- package/build/_collections/archive-service-registry.const.d.ts +15 -15
- package/build/_collections/archive-service-registry.const.js +14 -14
- package/build/_collections/archive.util.d.ts +12 -12
- package/build/_collections/archive.util.js +18 -18
- package/build/_collections/atlas-default-db-options.const.d.ts +2 -2
- package/build/_collections/atlas-default-db-options.const.js +9 -9
- package/build/_collections/client-safe-error.util.d.ts +38 -38
- package/build/_collections/client-safe-error.util.js +96 -96
- package/build/_collections/default-fallback-cache-max-age.const.d.ts +2 -2
- package/build/_collections/default-fallback-cache-max-age.const.js +5 -5
- package/build/_collections/default-not-found-page.const.d.ts +5 -5
- package/build/_collections/default-not-found-page.const.js +24 -24
- package/build/_collections/default-socket-path.const.d.ts +2 -2
- package/build/_collections/default-socket-path.const.js +5 -5
- package/build/_collections/field-encryption.util.d.ts +85 -85
- package/build/_collections/field-encryption.util.js +192 -192
- package/build/_collections/get-environment-settings.util.d.ts +2 -2
- package/build/_collections/get-environment-settings.util.js +43 -43
- package/build/_collections/global-settings.const.d.ts +6 -6
- package/build/_collections/global-settings.const.js +104 -104
- package/build/_collections/load-shed.util.d.ts +15 -15
- package/build/_collections/load-shed.util.js +42 -42
- package/build/_collections/mongo-reconnect-guard.util.d.ts +73 -73
- package/build/_collections/mongo-reconnect-guard.util.js +110 -110
- package/build/_collections/npm-token-check.util.d.ts +138 -138
- package/build/_collections/npm-token-check.util.js +301 -301
- package/build/_collections/security-headers.util.d.ts +16 -16
- package/build/_collections/security-headers.util.js +77 -77
- package/build/_collections/signed-url.util.d.ts +84 -84
- package/build/_collections/signed-url.util.js +145 -145
- package/build/_collections/star.controller.d.ts +7 -7
- package/build/_collections/star.controller.js +97 -97
- package/build/_collections/static-cache-control.util.d.ts +17 -17
- package/build/_collections/static-cache-control.util.js +23 -23
- package/build/_enums/data-model-type.enum.d.ts +13 -13
- package/build/_enums/data-model-type.enum.js +17 -17
- package/build/_enums/data-service-function.enum.d.ts +18 -18
- package/build/_enums/data-service-function.enum.js +24 -24
- package/build/_enums/predefined-data-types.enum.d.ts +15 -15
- package/build/_enums/predefined-data-types.enum.js +19 -19
- package/build/_enums/route-security.enum.d.ts +11 -11
- package/build/_enums/route-security.enum.js +15 -15
- package/build/_models/control-models/api-call-params.control-model.d.ts +79 -79
- package/build/_models/control-models/api-call-params.control-model.js +101 -101
- package/build/_models/control-models/app-ext-system-controls.control-model.d.ts +6 -6
- package/build/_models/control-models/app-ext-system-controls.control-model.js +10 -10
- package/build/_models/control-models/app-params.control-model.d.ts +51 -51
- package/build/_models/control-models/app-params.control-model.js +118 -118
- package/build/_models/control-models/app-system-controls.control-model.d.ts +7 -7
- package/build/_models/control-models/app-system-controls.control-model.js +11 -11
- package/build/_models/control-models/endpoint-params.control-model.d.ts +125 -119
- package/build/_models/control-models/endpoint-params.control-model.d.ts.map +1 -1
- package/build/_models/control-models/endpoint-params.control-model.js +409 -484
- package/build/_models/control-models/endpoint-params.control-model.js.map +1 -1
- package/build/_models/control-models/http-settings.control-model.d.ts +17 -17
- package/build/_models/control-models/http-settings.control-model.js +34 -34
- package/build/_models/control-models/system-control.control-model.d.ts +5 -5
- package/build/_models/control-models/system-control.control-model.js +11 -11
- package/build/_models/data-models/schema-migration.data-model.d.ts +28 -28
- package/build/_models/data-models/schema-migration.data-model.js +46 -46
- package/build/_models/interfaces/app-version-header-settings.interface.d.ts +16 -16
- package/build/_models/interfaces/app-version-header-settings.interface.js +2 -2
- package/build/_models/interfaces/certification-settings.interface.d.ts +5 -5
- package/build/_models/interfaces/certification-settings.interface.js +2 -2
- package/build/_models/interfaces/compare-data-options.interface.d.ts +26 -26
- package/build/_models/interfaces/compare-data-options.interface.js +2 -2
- package/build/_models/interfaces/compare-data-result.interface.d.ts +12 -12
- package/build/_models/interfaces/compare-data-result.interface.js +2 -2
- package/build/_models/interfaces/cors-settings.interface.d.ts +51 -51
- package/build/_models/interfaces/cors-settings.interface.js +2 -2
- package/build/_models/interfaces/db-query-options.interface.d.ts +32 -32
- package/build/_models/interfaces/db-query-options.interface.js +2 -2
- package/build/_models/interfaces/environment-settings.interface.d.ts +34 -34
- package/build/_models/interfaces/environment-settings.interface.js +2 -2
- package/build/_models/interfaces/global-log-settings.interface.d.ts +145 -145
- package/build/_models/interfaces/global-log-settings.interface.js +2 -2
- package/build/_models/interfaces/global-service-settings.interface.d.ts +30 -30
- package/build/_models/interfaces/global-service-settings.interface.js +2 -2
- package/build/_models/interfaces/global-settings.interface.d.ts +265 -265
- package/build/_models/interfaces/global-settings.interface.js +2 -2
- package/build/_models/interfaces/migration-entry.interface.d.ts +19 -19
- package/build/_models/interfaces/migration-entry.interface.js +2 -2
- package/build/_models/interfaces/mongo-transaction-settings.interface.d.ts +8 -8
- package/build/_models/interfaces/mongo-transaction-settings.interface.js +2 -2
- package/build/_models/interfaces/routing-module-settings.interface.d.ts +19 -19
- package/build/_models/interfaces/routing-module-settings.interface.js +2 -2
- package/build/_models/interfaces/security-headers-settings.interface.d.ts +41 -41
- package/build/_models/interfaces/security-headers-settings.interface.js +2 -2
- package/build/_models/interfaces/signed-url-verify-result.interface.d.ts +13 -13
- package/build/_models/interfaces/signed-url-verify-result.interface.js +2 -2
- package/build/_models/interfaces/static-client-settings.interface.d.ts +36 -36
- package/build/_models/interfaces/static-client-settings.interface.js +2 -2
- package/build/_models/types/db-update.type.d.ts +129 -129
- package/build/_models/types/db-update.type.js +2 -2
- package/build/_modules/account-security/_enums/account-challenge-purpose.type-enum.d.ts +5 -5
- package/build/_modules/account-security/_enums/account-challenge-purpose.type-enum.js +9 -9
- package/build/_modules/account-security/_enums/account-refresh-token-state.type-enum.d.ts +6 -6
- package/build/_modules/account-security/_enums/account-refresh-token-state.type-enum.js +10 -10
- package/build/_modules/account-security/_enums/account-session-state.type-enum.d.ts +6 -6
- package/build/_modules/account-security/_enums/account-session-state.type-enum.js +10 -10
- package/build/_modules/account-security/_models/account-challenge-adapter.interface.d.ts +8 -8
- package/build/_modules/account-security/_models/account-challenge-adapter.interface.js +2 -2
- package/build/_modules/account-security/_models/account-challenge-issued.interface.d.ts +6 -6
- package/build/_modules/account-security/_models/account-challenge-issued.interface.js +2 -2
- package/build/_modules/account-security/_models/account-challenge-record.interface.d.ts +12 -12
- package/build/_modules/account-security/_models/account-challenge-record.interface.js +2 -2
- package/build/_modules/account-security/_models/account-challenge-result.interface.d.ts +7 -7
- package/build/_modules/account-security/_models/account-challenge-result.interface.js +2 -2
- package/build/_modules/account-security/_models/account-challenge-settings.interface.d.ts +8 -8
- package/build/_modules/account-security/_models/account-challenge-settings.interface.js +2 -2
- package/build/_modules/account-security/_models/account-password-policy.interface.d.ts +11 -11
- package/build/_modules/account-security/_models/account-password-policy.interface.js +2 -2
- package/build/_modules/account-security/_models/account-password-verification.interface.d.ts +5 -5
- package/build/_modules/account-security/_models/account-password-verification.interface.js +2 -2
- package/build/_modules/account-security/_models/account-refresh-token-record.interface.d.ts +12 -12
- package/build/_modules/account-security/_models/account-refresh-token-record.interface.js +2 -2
- package/build/_modules/account-security/_models/account-session-adapter.interface.d.ts +18 -18
- package/build/_modules/account-security/_models/account-session-adapter.interface.js +2 -2
- package/build/_modules/account-security/_models/account-session-claims.interface.d.ts +7 -7
- package/build/_modules/account-security/_models/account-session-claims.interface.js +2 -2
- package/build/_modules/account-security/_models/account-session-context.interface.d.ts +6 -6
- package/build/_modules/account-security/_models/account-session-context.interface.js +2 -2
- package/build/_modules/account-security/_models/account-session-create.interface.d.ts +7 -7
- package/build/_modules/account-security/_models/account-session-create.interface.js +2 -2
- package/build/_modules/account-security/_models/account-session-record.interface.d.ts +20 -20
- package/build/_modules/account-security/_models/account-session-record.interface.js +2 -2
- package/build/_modules/account-security/_models/account-session-rotate.interface.d.ts +10 -10
- package/build/_modules/account-security/_models/account-session-rotate.interface.js +2 -2
- package/build/_modules/account-security/_models/account-session-settings.interface.d.ts +10 -10
- package/build/_modules/account-security/_models/account-session-settings.interface.js +2 -2
- package/build/_modules/account-security/_models/account-session-token-pair.interface.d.ts +8 -8
- package/build/_modules/account-security/_models/account-session-token-pair.interface.js +2 -2
- package/build/_modules/account-security/_models/account-session-view.interface.d.ts +12 -12
- package/build/_modules/account-security/_models/account-session-view.interface.js +2 -2
- package/build/_modules/account-security/account-challenge.control-service.d.ts +23 -23
- package/build/_modules/account-security/account-challenge.control-service.js +116 -116
- package/build/_modules/account-security/account-password.control-service.d.ts +23 -23
- package/build/_modules/account-security/account-password.control-service.js +213 -213
- package/build/_modules/account-security/account-session.control-service.d.ts +38 -38
- package/build/_modules/account-security/account-session.control-service.js +276 -276
- package/build/_modules/account-security/index.d.ts +23 -23
- package/build/_modules/account-security/index.js +15 -15
- package/build/_modules/admin-auth/_models/admin-api-key-config.interface.d.ts +31 -31
- package/build/_modules/admin-auth/_models/admin-api-key-config.interface.js +2 -2
- package/build/_modules/admin-auth/admin-api-key.auth-service.d.ts +89 -89
- package/build/_modules/admin-auth/admin-api-key.auth-service.js +194 -194
- package/build/_modules/admin-auth/index.d.ts +2 -2
- package/build/_modules/admin-auth/index.js +5 -5
- package/build/_modules/ai/_collections/ai-model-config-validator.util.d.ts +31 -31
- package/build/_modules/ai/_collections/ai-model-config-validator.util.js +94 -94
- package/build/_modules/ai/_collections/ai-provider-error.util.d.ts +43 -43
- package/build/_modules/ai/_collections/ai-provider-error.util.js +120 -120
- package/build/_modules/ai/_models/ai-input-interfaces.d.ts +53 -53
- package/build/_modules/ai/_models/ai-input-interfaces.js +5 -5
- package/build/_modules/ai/_models/ai-test-generation-result.interface.d.ts +16 -16
- package/build/_modules/ai/_models/ai-test-generation-result.interface.js +2 -2
- package/build/_modules/ai/_models/interfaces/dynts-ai-cost-event-callback.interface.d.ts +13 -13
- package/build/_modules/ai/_models/interfaces/dynts-ai-cost-event-callback.interface.js +2 -2
- package/build/_modules/ai/_models/interfaces/dynts-ai-cost-event.interface.d.ts +49 -49
- package/build/_modules/ai/_models/interfaces/dynts-ai-cost-event.interface.js +2 -2
- package/build/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.d.ts +16 -16
- package/build/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.js +2 -2
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.d.ts +22 -22
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.js +51 -51
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.d.ts +33 -33
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.js +55 -55
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.d.ts +40 -40
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.js +89 -89
- package/build/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.d.ts +27 -27
- package/build/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.js +28 -28
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.d.ts +14 -14
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.js +2 -2
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.d.ts +10 -10
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.js +2 -2
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.d.ts +29 -29
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.js +2 -2
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.d.ts +18 -18
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.js +2 -2
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.d.ts +18 -18
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.js +2 -2
- package/build/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.d.ts +80 -80
- package/build/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.js +166 -166
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.d.ts +47 -47
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.js +103 -103
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.d.ts +34 -34
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.js +59 -59
- package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.d.ts +73 -73
- package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.js +133 -133
- package/build/_modules/ai/_modules/ai-mock/fixtures/aim-text.fixtures.d.ts +8 -8
- package/build/_modules/ai/_modules/ai-mock/fixtures/aim-text.fixtures.js +650 -650
- package/build/_modules/ai/_modules/ai-mock/index.d.ts +14 -14
- package/build/_modules/ai/_modules/ai-mock/index.js +42 -42
- package/build/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.d.ts +35 -35
- package/build/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.js +117 -117
- package/build/_modules/ai/_modules/anthropic/index.d.ts +2 -2
- package/build/_modules/ai/_modules/anthropic/index.js +7 -7
- package/build/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.d.ts +84 -84
- package/build/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.js +467 -467
- package/build/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.d.ts +109 -109
- package/build/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.js +418 -418
- package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.d.ts +28 -28
- package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.js +73 -73
- package/build/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.d.ts +6 -6
- package/build/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.js +10 -10
- package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.d.ts +51 -51
- package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.js +132 -132
- package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.d.ts +47 -47
- package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.js +136 -136
- package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.d.ts +17 -17
- package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.js +76 -76
- package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-code-chunk.interface.d.ts +49 -49
- package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-code-chunk.interface.js +2 -2
- package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.d.ts +8 -8
- package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.js +2 -2
- package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.d.ts +11 -11
- package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.js +2 -2
- package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.d.ts +12 -12
- package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.js +2 -2
- package/build/_modules/ai/_modules/document-ai/index.d.ts +12 -12
- package/build/_modules/ai/_modules/document-ai/index.js +27 -27
- package/build/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.d.ts +34 -34
- package/build/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.js +128 -128
- package/build/_modules/ai/_modules/fdp-ai/index.d.ts +2 -2
- package/build/_modules/ai/_modules/fdp-ai/index.js +7 -7
- package/build/_modules/ai/_modules/open-ai/_collections/oai-global-settings.const.d.ts +2 -2
- package/build/_modules/ai/_modules/open-ai/_collections/oai-global-settings.const.js +8 -8
- package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.d.ts +2 -2
- package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.js +74 -74
- package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.d.ts +2 -2
- package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.js +67 -67
- package/build/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.js +42 -42
- package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.d.ts +5 -5
- package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.js +2 -2
- package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js +6 -6
- package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.d.ts +51 -51
- package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.js +2 -2
- package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-chunk-data.service.d.ts +21 -21
- package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-chunk-data.service.js +187 -187
- package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-page.data-service.d.ts +26 -26
- package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-page.data-service.js +278 -278
- package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.d.ts +22 -22
- package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.js +322 -322
- package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.d.ts +119 -119
- package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.js +480 -480
- package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.d.ts +25 -25
- package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.js +103 -103
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts +169 -169
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.js +479 -479
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.d.ts +229 -229
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.js +617 -617
- package/build/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.d.ts +39 -39
- package/build/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.js +110 -110
- package/build/_modules/ai/_modules/open-ai/index.d.ts +14 -14
- package/build/_modules/ai/_modules/open-ai/index.js +55 -55
- package/build/_modules/ai/_services/ai-embedding-provider.registry.d.ts +51 -51
- package/build/_modules/ai/_services/ai-embedding-provider.registry.js +78 -78
- package/build/_modules/ai/_services/ai-embedding.service-base.d.ts +41 -41
- package/build/_modules/ai/_services/ai-embedding.service-base.js +11 -11
- package/build/_modules/ai/_services/ai-llm-chat.service-base.d.ts +39 -39
- package/build/_modules/ai/_services/ai-llm-chat.service-base.js +11 -11
- package/build/_modules/ai/_services/ai-llm.service-base.d.ts +148 -148
- package/build/_modules/ai/_services/ai-llm.service-base.js +378 -378
- package/build/_modules/ai/_services/ai-provider.service-base.d.ts +46 -46
- package/build/_modules/ai/_services/ai-provider.service-base.js +43 -43
- package/build/_modules/ai/_services/ai-user-key.service-base.d.ts +44 -44
- package/build/_modules/ai/_services/ai-user-key.service-base.js +14 -14
- package/build/_modules/ai/_services/lmstudio-embedding.control-service.d.ts +110 -110
- package/build/_modules/ai/_services/lmstudio-embedding.control-service.js +297 -297
- package/build/_modules/ai/index.d.ts +16 -16
- package/build/_modules/ai/index.js +30 -30
- package/build/_modules/artifact-compiler/_enums/artifact-compile-outcome.type-enum.d.ts +5 -5
- package/build/_modules/artifact-compiler/_enums/artifact-compile-outcome.type-enum.js +9 -9
- package/build/_modules/artifact-compiler/_enums/artifact-compile-stage.type-enum.d.ts +8 -8
- package/build/_modules/artifact-compiler/_enums/artifact-compile-stage.type-enum.js +12 -12
- package/build/_modules/artifact-compiler/_enums/artifact-retry-class.type-enum.d.ts +6 -6
- package/build/_modules/artifact-compiler/_enums/artifact-retry-class.type-enum.js +10 -10
- package/build/_modules/artifact-compiler/_models/artifact-compile.interface.d.ts +32 -32
- package/build/_modules/artifact-compiler/_models/artifact-compile.interface.js +2 -2
- package/build/_modules/artifact-compiler/artifact-compiler.control-service.d.ts +36 -36
- package/build/_modules/artifact-compiler/artifact-compiler.control-service.js +273 -273
- package/build/_modules/artifact-compiler/index.d.ts +5 -5
- package/build/_modules/artifact-compiler/index.js +11 -11
- package/build/_modules/assistant/_collections/ass-global-settings.const.d.ts +2 -2
- package/build/_modules/assistant/_collections/ass-global-settings.const.js +14 -14
- package/build/_modules/assistant/_collections/ass.util.d.ts +15 -15
- package/build/_modules/assistant/_collections/ass.util.js +42 -42
- package/build/_modules/assistant/_models/ass-global-settings.interface.d.ts +13 -13
- package/build/_modules/assistant/_models/ass-global-settings.interface.js +2 -2
- package/build/_modules/assistant/_services/ass-io.control-service.d.ts +19 -19
- package/build/_modules/assistant/_services/ass-io.control-service.js +57 -57
- package/build/_modules/assistant/_services/ass-main.control-service.d.ts +32 -32
- package/build/_modules/assistant/_services/ass-main.control-service.js +65 -65
- package/build/_modules/assistant/index.d.ts +6 -6
- package/build/_modules/assistant/index.js +18 -18
- package/build/_modules/bot/_collections/bot-default-commands.const.d.ts +2 -2
- package/build/_modules/bot/_collections/bot-default-commands.const.js +13 -13
- package/build/_modules/bot/_collections/bot-global-settings.const.d.ts +2 -2
- package/build/_modules/bot/_collections/bot-global-settings.const.js +31 -31
- package/build/_modules/bot/_models/bot-channel-wrapper.interface.d.ts +25 -25
- package/build/_modules/bot/_models/bot-channel-wrapper.interface.js +38 -38
- package/build/_modules/bot/_models/bot-command.interface.d.ts +7 -7
- package/build/_modules/bot/_models/bot-command.interface.js +2 -2
- package/build/_modules/bot/_models/bot-global-settings.interface.d.ts +85 -85
- package/build/_modules/bot/_models/bot-global-settings.interface.js +2 -2
- package/build/_modules/bot/_models/bot-last-mention-date.interface.d.ts +6 -6
- package/build/_modules/bot/_models/bot-last-mention-date.interface.js +2 -2
- package/build/_modules/bot/_models/bot-last-message-date.interface.d.ts +5 -5
- package/build/_modules/bot/_models/bot-last-message-date.interface.js +2 -2
- package/build/_modules/bot/_models/bot-message-wrapper.interface.d.ts +37 -37
- package/build/_modules/bot/_models/bot-message-wrapper.interface.js +54 -54
- package/build/_modules/bot/_models/bot-user-wrapper.interface.d.ts +23 -23
- package/build/_modules/bot/_models/bot-user-wrapper.interface.js +28 -28
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js +10 -10
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.d.ts +69 -69
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.js +497 -497
- package/build/_modules/bot/_modules/discord-bot/index.d.ts +1 -1
- package/build/_modules/bot/_modules/discord-bot/index.js +12 -12
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.d.ts +16 -16
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.js +42 -42
- package/build/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.d.ts +9 -9
- package/build/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.js +2 -2
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.d.ts +59 -59
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.js +349 -349
- package/build/_modules/bot/_modules/dynamo-bot/index.d.ts +3 -3
- package/build/_modules/bot/_modules/dynamo-bot/index.js +15 -15
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts +6 -6
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.js +2 -2
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.d.ts +56 -56
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.js +137 -137
- package/build/_modules/bot/_modules/slack-bot/index.d.ts +2 -2
- package/build/_modules/bot/_modules/slack-bot/index.js +12 -12
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts +6 -6
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.js +2 -2
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.d.ts +56 -56
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.js +137 -137
- package/build/_modules/bot/_modules/teams-bot/index.d.ts +2 -2
- package/build/_modules/bot/_modules/teams-bot/index.js +12 -12
- package/build/_modules/bot/_services/bot-commands.control-service.d.ts +12 -12
- package/build/_modules/bot/_services/bot-commands.control-service.js +117 -117
- package/build/_modules/bot/_services/bot-io.control-service.d.ts +23 -23
- package/build/_modules/bot/_services/bot-io.control-service.js +226 -226
- package/build/_modules/bot/_services/bot-main.control-service.d.ts +35 -35
- package/build/_modules/bot/_services/bot-main.control-service.js +195 -195
- package/build/_modules/bot/_services/bot-messaging-provider.service-base.d.ts +71 -71
- package/build/_modules/bot/_services/bot-messaging-provider.service-base.js +15 -15
- package/build/_modules/bot/_services/bot-routines.control-service.d.ts +13 -13
- package/build/_modules/bot/_services/bot-routines.control-service.js +59 -59
- package/build/_modules/bot/index.d.ts +17 -17
- package/build/_modules/bot/index.js +36 -36
- package/build/_modules/custom-data/custom-data.controller.d.ts +5 -5
- package/build/_modules/custom-data/custom-data.controller.js +56 -56
- package/build/_modules/custom-data/custom-data.data-service.d.ts +5 -5
- package/build/_modules/custom-data/custom-data.data-service.js +11 -11
- package/build/_modules/custom-data/get-custom-data-routing-module.util.d.ts +3 -3
- package/build/_modules/custom-data/get-custom-data-routing-module.util.js +16 -16
- package/build/_modules/custom-data/index.d.ts +4 -4
- package/build/_modules/custom-data/index.js +9 -9
- package/build/_modules/data-readers/_collections/dynts-sqlite-reader.util.d.ts +58 -58
- package/build/_modules/data-readers/_collections/dynts-sqlite-reader.util.js +168 -168
- package/build/_modules/data-readers/_models/interfaces/dynts-sqlite-reader.interface.d.ts +31 -31
- package/build/_modules/data-readers/_models/interfaces/dynts-sqlite-reader.interface.js +7 -7
- package/build/_modules/data-readers/index.d.ts +2 -2
- package/build/_modules/data-readers/index.js +10 -10
- package/build/_modules/defaults/_collections/default-endpoints.util.d.ts +248 -248
- package/build/_modules/defaults/_collections/default-endpoints.util.js +386 -386
- package/build/_modules/defaults/_models/default-user.data-model.d.ts +19 -19
- package/build/_modules/defaults/_models/default-user.data-model.js +72 -72
- package/build/_modules/defaults/_services/default-auth.service.d.ts +50 -50
- package/build/_modules/defaults/_services/default-auth.service.js +158 -158
- package/build/_modules/defaults/_services/default-socket-events.service.d.ts +23 -23
- package/build/_modules/defaults/_services/default-socket-events.service.js +60 -60
- package/build/_modules/defaults/_services/default-user.data-service.d.ts +24 -24
- package/build/_modules/defaults/_services/default-user.data-service.js +87 -87
- package/build/_modules/defaults/index.d.ts +5 -5
- package/build/_modules/defaults/index.js +17 -17
- package/build/_modules/discord-assistant/_collections/dias-global-settings.const.d.ts +2 -2
- package/build/_modules/discord-assistant/_collections/dias-global-settings.const.js +16 -16
- package/build/_modules/discord-assistant/_collections/dias.util.d.ts +31 -31
- package/build/_modules/discord-assistant/_collections/dias.util.js +85 -85
- package/build/_modules/discord-assistant/_models/dias-global-settings.interface.d.ts +17 -17
- package/build/_modules/discord-assistant/_models/dias-global-settings.interface.js +2 -2
- package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.d.ts +8 -8
- package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.js +46 -46
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts +17 -17
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js +123 -123
- package/build/_modules/discord-assistant/_services/dias-io.control-service.d.ts +10 -10
- package/build/_modules/discord-assistant/_services/dias-io.control-service.js +49 -49
- package/build/_modules/discord-assistant/_services/dias-main.control-service.d.ts +3 -3
- package/build/_modules/discord-assistant/_services/dias-main.control-service.js +7 -7
- package/build/_modules/discord-assistant/_services/dias.service-base.d.ts +18 -18
- package/build/_modules/discord-assistant/_services/dias.service-base.js +46 -46
- package/build/_modules/discord-assistant/index.d.ts +11 -11
- package/build/_modules/discord-assistant/index.js +24 -24
- package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.d.ts +3 -3
- package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.js +7 -7
- package/build/_modules/discord-assistant-voiced/index.d.ts +2 -2
- package/build/_modules/discord-assistant-voiced/index.js +28 -28
- package/build/_modules/discord-bot/_collections/dibo-default-commands.const.d.ts +2 -2
- package/build/_modules/discord-bot/_collections/dibo-default-commands.const.js +12 -12
- package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.d.ts +2 -2
- package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.js +43 -43
- package/build/_modules/discord-bot/_collections/dibo-operations.util.d.ts +22 -22
- package/build/_modules/discord-bot/_collections/dibo-operations.util.js +275 -275
- package/build/_modules/discord-bot/_models/dibo-command.interface.d.ts +7 -7
- package/build/_modules/discord-bot/_models/dibo-command.interface.js +2 -2
- package/build/_modules/discord-bot/_models/dibo-global-settings.interface.d.ts +87 -87
- package/build/_modules/discord-bot/_models/dibo-global-settings.interface.js +2 -2
- package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.d.ts +6 -6
- package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.js +2 -2
- package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.d.ts +5 -5
- package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.js +2 -2
- package/build/_modules/discord-bot/_services/dibo-commands.control-service.d.ts +11 -11
- package/build/_modules/discord-bot/_services/dibo-commands.control-service.js +109 -109
- package/build/_modules/discord-bot/_services/dibo-io.control-service.d.ts +21 -21
- package/build/_modules/discord-bot/_services/dibo-io.control-service.js +218 -218
- package/build/_modules/discord-bot/_services/dibo-main.control-service.d.ts +89 -89
- package/build/_modules/discord-bot/_services/dibo-main.control-service.js +363 -363
- package/build/_modules/discord-bot/_services/dibo-routines.control-service.d.ts +13 -13
- package/build/_modules/discord-bot/_services/dibo-routines.control-service.js +73 -73
- package/build/_modules/discord-bot/index.d.ts +11 -11
- package/build/_modules/discord-bot/index.js +30 -30
- package/build/_modules/local-vector-search/_enums/lvs-search-mode.enum.d.ts +34 -34
- package/build/_modules/local-vector-search/_enums/lvs-search-mode.enum.js +38 -38
- package/build/_modules/local-vector-search/_models/data-models/lvs-vector-persist.data-model.d.ts +35 -35
- package/build/_modules/local-vector-search/_models/data-models/lvs-vector-persist.data-model.js +53 -53
- package/build/_modules/local-vector-search/_models/lvs-search-result.interface.d.ts +16 -16
- package/build/_modules/local-vector-search/_models/lvs-search-result.interface.js +2 -2
- package/build/_modules/local-vector-search/_services/lvs-bm25.util.d.ts +88 -88
- package/build/_modules/local-vector-search/_services/lvs-bm25.util.js +189 -189
- package/build/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.d.ts +26 -26
- package/build/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.js +197 -197
- package/build/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.d.ts +145 -145
- package/build/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.js +294 -294
- package/build/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.d.ts +74 -74
- package/build/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.js +152 -152
- package/build/_modules/local-vector-search/_services/lvs-vector-persist.data-service.d.ts +51 -51
- package/build/_modules/local-vector-search/_services/lvs-vector-persist.data-service.js +83 -83
- package/build/_modules/local-vector-search/_services/lvs-vector-pool.control-service.d.ts +99 -99
- package/build/_modules/local-vector-search/_services/lvs-vector-pool.control-service.js +276 -276
- package/build/_modules/local-vector-search/index.d.ts +8 -8
- package/build/_modules/local-vector-search/index.js +15 -15
- package/build/_modules/logs/_models/file-log-entry.interface.d.ts +13 -13
- package/build/_modules/logs/_models/file-log-entry.interface.js +2 -2
- package/build/_modules/logs/_models/file-log-read-result.interface.d.ts +35 -35
- package/build/_modules/logs/_models/file-log-read-result.interface.js +2 -2
- package/build/_modules/logs/file-log.service.d.ts +132 -132
- package/build/_modules/logs/file-log.service.js +444 -444
- package/build/_modules/logs/file-logs.controller.d.ts +40 -40
- package/build/_modules/logs/file-logs.controller.js +138 -138
- package/build/_modules/logs/get-file-logs-routing-module.util.d.ts +31 -31
- package/build/_modules/logs/get-file-logs-routing-module.util.js +37 -37
- package/build/_modules/logs/get-logs-routing-module.util.d.ts +18 -18
- package/build/_modules/logs/get-logs-routing-module.util.js +31 -31
- package/build/_modules/logs/index.d.ts +8 -8
- package/build/_modules/logs/index.js +15 -15
- package/build/_modules/logs/log-buffer.service.d.ts +37 -37
- package/build/_modules/logs/log-buffer.service.js +96 -96
- package/build/_modules/logs/logs.controller.d.ts +26 -26
- package/build/_modules/logs/logs.controller.js +89 -89
- package/build/_modules/logs/logs.service.d.ts +39 -39
- package/build/_modules/logs/logs.service.js +96 -96
- package/build/_modules/mcp/_models/interfaces/dynts-mcp.interface.d.ts +108 -108
- package/build/_modules/mcp/_models/interfaces/dynts-mcp.interface.js +13 -13
- package/build/_modules/mcp/_services/dynts-mcp-server.service-base.d.ts +70 -70
- package/build/_modules/mcp/_services/dynts-mcp-server.service-base.js +98 -98
- package/build/_modules/mcp/_services/dynts-mcp.adapter.d.ts +56 -56
- package/build/_modules/mcp/_services/dynts-mcp.adapter.js +138 -138
- package/build/_modules/mcp/index.d.ts +3 -3
- package/build/_modules/mcp/index.js +12 -12
- package/build/_modules/messaging/_collections/get-messaging-routing-module.util.d.ts +7 -7
- package/build/_modules/messaging/_collections/get-messaging-routing-module.util.js +20 -20
- package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts +5 -5
- package/build/_modules/messaging/_collections/msg-global-settings.const.js +22 -22
- package/build/_modules/messaging/_collections/msg.util.d.ts +24 -24
- package/build/_modules/messaging/_collections/msg.util.js +62 -62
- package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts +28 -28
- package/build/_modules/messaging/_models/msg-global-settings.interface.js +2 -2
- package/build/_modules/messaging/_services/msg-conversation.data-service.d.ts +28 -28
- package/build/_modules/messaging/_services/msg-conversation.data-service.js +109 -109
- package/build/_modules/messaging/_services/msg-events.service.d.ts +61 -61
- package/build/_modules/messaging/_services/msg-events.service.js +203 -203
- package/build/_modules/messaging/_services/msg-integration.control-service.js +180 -180
- package/build/_modules/messaging/_services/msg-main.control-service.d.ts +62 -62
- package/build/_modules/messaging/_services/msg-main.control-service.js +428 -428
- package/build/_modules/messaging/_services/msg-message.data-service.d.ts +28 -28
- package/build/_modules/messaging/_services/msg-message.data-service.js +103 -103
- package/build/_modules/messaging/_services/msg.controller.d.ts +12 -12
- package/build/_modules/messaging/_services/msg.controller.js +256 -256
- package/build/_modules/messaging/index.d.ts +10 -10
- package/build/_modules/messaging/index.js +27 -27
- package/build/_modules/mock/app-extended-server.mock.d.ts +41 -41
- package/build/_modules/mock/app-extended-server.mock.js +169 -169
- package/build/_modules/mock/app-integration-test.mock.d.ts +19 -19
- package/build/_modules/mock/app-integration-test.mock.js +45 -45
- package/build/_modules/mock/app-params.mock.d.ts +2 -2
- package/build/_modules/mock/app-params.mock.js +9 -9
- package/build/_modules/mock/app-server.mock.d.ts +41 -41
- package/build/_modules/mock/app-server.mock.js +148 -148
- package/build/_modules/mock/auth-service.mock.d.ts +10 -10
- package/build/_modules/mock/auth-service.mock.js +19 -19
- package/build/_modules/mock/controller.mock.d.ts +5 -5
- package/build/_modules/mock/controller.mock.js +14 -14
- package/build/_modules/mock/data-model.mock.d.ts +26 -26
- package/build/_modules/mock/data-model.mock.js +72 -72
- package/build/_modules/mock/email-service-collection.mock.d.ts +7 -7
- package/build/_modules/mock/email-service-collection.mock.js +12 -12
- package/build/_modules/mock/email-service.mock.d.ts +4 -4
- package/build/_modules/mock/email-service.mock.js +20 -20
- package/build/_modules/mock/endpoint.mock.d.ts +8 -8
- package/build/_modules/mock/endpoint.mock.js +79 -79
- package/build/_modules/mock/socket-client.mock.d.ts +9 -9
- package/build/_modules/mock/socket-client.mock.js +38 -38
- package/build/_modules/mock/socket-server.mock.d.ts +15 -15
- package/build/_modules/mock/socket-server.mock.js +32 -32
- package/build/_modules/oauth2/_routes/oauth2.controller.d.ts +16 -16
- package/build/_modules/oauth2/_routes/oauth2.controller.js +96 -96
- package/build/_modules/oauth2/_services/oauth2.auth-service.d.ts +30 -30
- package/build/_modules/oauth2/_services/oauth2.auth-service.js +215 -215
- package/build/_modules/oauth2/_services/oauth2.control-service.d.ts +132 -132
- package/build/_modules/oauth2/_services/oauth2.control-service.js +576 -576
- package/build/_modules/oauth2/index.d.ts +3 -3
- package/build/_modules/oauth2/index.js +14 -14
- package/build/_modules/privacy-lifecycle/_enums/privacy-consent-decision.type-enum.d.ts +5 -5
- package/build/_modules/privacy-lifecycle/_enums/privacy-consent-decision.type-enum.js +9 -9
- package/build/_modules/privacy-lifecycle/_enums/privacy-contributor-action.type-enum.d.ts +10 -10
- package/build/_modules/privacy-lifecycle/_enums/privacy-contributor-action.type-enum.js +14 -14
- package/build/_modules/privacy-lifecycle/_enums/privacy-contributor-outcome.type-enum.d.ts +7 -7
- package/build/_modules/privacy-lifecycle/_enums/privacy-contributor-outcome.type-enum.js +11 -11
- package/build/_modules/privacy-lifecycle/_enums/privacy-request-state.type-enum.d.ts +15 -15
- package/build/_modules/privacy-lifecycle/_enums/privacy-request-state.type-enum.js +19 -19
- package/build/_modules/privacy-lifecycle/_enums/privacy-request.type-enum.d.ts +9 -9
- package/build/_modules/privacy-lifecycle/_enums/privacy-request.type-enum.js +13 -13
- package/build/_modules/privacy-lifecycle/_models/privacy-consent-input.interface.d.ts +11 -11
- package/build/_modules/privacy-lifecycle/_models/privacy-consent-input.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-consent-persistence-result.interface.d.ts +6 -6
- package/build/_modules/privacy-lifecycle/_models/privacy-consent-persistence-result.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-consent-record.interface.d.ts +14 -14
- package/build/_modules/privacy-lifecycle/_models/privacy-consent-record.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-consent-result.interface.d.ts +6 -6
- package/build/_modules/privacy-lifecycle/_models/privacy-consent-result.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-consent-view.interface.d.ts +12 -12
- package/build/_modules/privacy-lifecycle/_models/privacy-consent-view.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-contributor-context.interface.d.ts +8 -8
- package/build/_modules/privacy-lifecycle/_models/privacy-contributor-context.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-contributor-outcome.interface.d.ts +13 -13
- package/build/_modules/privacy-lifecycle/_models/privacy-contributor-outcome.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-contributor-plan.interface.d.ts +7 -7
- package/build/_modules/privacy-lifecycle/_models/privacy-contributor-plan.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-contributor.interface.d.ts +10 -10
- package/build/_modules/privacy-lifecycle/_models/privacy-contributor.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-ledger-adapter.interface.d.ts +12 -12
- package/build/_modules/privacy-lifecycle/_models/privacy-ledger-adapter.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-ledger-result.interface.d.ts +8 -8
- package/build/_modules/privacy-lifecycle/_models/privacy-ledger-result.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-ledger-settings.interface.d.ts +6 -6
- package/build/_modules/privacy-lifecycle/_models/privacy-ledger-settings.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-input.interface.d.ts +10 -10
- package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-input.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-persistence-result.interface.d.ts +6 -6
- package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-persistence-result.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-result.interface.d.ts +6 -6
- package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-result.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-view.interface.d.ts +11 -11
- package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-view.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance.interface.d.ts +13 -13
- package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-lifecycle-adapter.interface.d.ts +14 -14
- package/build/_modules/privacy-lifecycle/_models/privacy-lifecycle-adapter.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-lifecycle-settings.interface.d.ts +8 -8
- package/build/_modules/privacy-lifecycle/_models/privacy-lifecycle-settings.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-request-create-result.interface.d.ts +6 -6
- package/build/_modules/privacy-lifecycle/_models/privacy-request-create-result.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-request-open.interface.d.ts +9 -9
- package/build/_modules/privacy-lifecycle/_models/privacy-request-open.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-request-persistence-create-result.interface.d.ts +6 -6
- package/build/_modules/privacy-lifecycle/_models/privacy-request-persistence-create-result.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-request-record.interface.d.ts +20 -20
- package/build/_modules/privacy-lifecycle/_models/privacy-request-record.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-request-result.interface.d.ts +7 -7
- package/build/_modules/privacy-lifecycle/_models/privacy-request-result.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/_models/privacy-request-view.interface.d.ts +19 -19
- package/build/_modules/privacy-lifecycle/_models/privacy-request-view.interface.js +2 -2
- package/build/_modules/privacy-lifecycle/index.d.ts +32 -32
- package/build/_modules/privacy-lifecycle/index.js +17 -17
- package/build/_modules/privacy-lifecycle/privacy-ledger.control-service.d.ts +27 -27
- package/build/_modules/privacy-lifecycle/privacy-ledger.control-service.js +167 -167
- package/build/_modules/privacy-lifecycle/privacy-lifecycle.control-service.d.ts +41 -41
- package/build/_modules/privacy-lifecycle/privacy-lifecycle.control-service.js +363 -363
- package/build/_modules/rate-limit/_enums/rate-limit-store-kind.type-enum.d.ts +5 -5
- package/build/_modules/rate-limit/_enums/rate-limit-store-kind.type-enum.js +9 -9
- package/build/_modules/rate-limit/_models/rate-limit-config.interface.d.ts +70 -70
- package/build/_modules/rate-limit/_models/rate-limit-config.interface.js +2 -2
- package/build/_modules/rate-limit/_models/rate-limit-consume-request.interface.d.ts +8 -8
- package/build/_modules/rate-limit/_models/rate-limit-consume-request.interface.js +2 -2
- package/build/_modules/rate-limit/_models/rate-limit-consume-result.interface.d.ts +6 -6
- package/build/_modules/rate-limit/_models/rate-limit-consume-result.interface.js +2 -2
- package/build/_modules/rate-limit/_models/rate-limit-policy.interface.d.ts +15 -15
- package/build/_modules/rate-limit/_models/rate-limit-policy.interface.js +2 -2
- package/build/_modules/rate-limit/_models/rate-limit-store.interface.d.ts +8 -8
- package/build/_modules/rate-limit/_models/rate-limit-store.interface.js +2 -2
- package/build/_modules/rate-limit/index.d.ts +8 -8
- package/build/_modules/rate-limit/index.js +9 -9
- package/build/_modules/rate-limit/rate-limit-in-memory.store.d.ts +18 -18
- package/build/_modules/rate-limit/rate-limit-in-memory.store.js +70 -70
- package/build/_modules/rate-limit/rate-limit.middleware.d.ts +68 -68
- package/build/_modules/rate-limit/rate-limit.middleware.js +378 -378
- package/build/_modules/scheduler/_models/scheduler-job.interface.d.ts +33 -33
- package/build/_modules/scheduler/_models/scheduler-job.interface.js +2 -2
- package/build/_modules/scheduler/get-scheduler-routing-module.util.d.ts +17 -17
- package/build/_modules/scheduler/get-scheduler-routing-module.util.js +30 -30
- package/build/_modules/scheduler/index.d.ts +4 -4
- package/build/_modules/scheduler/index.js +9 -9
- package/build/_modules/scheduler/scheduler.controller.d.ts +24 -24
- package/build/_modules/scheduler/scheduler.controller.js +53 -53
- package/build/_modules/scheduler/scheduler.service.d.ts +53 -53
- package/build/_modules/scheduler/scheduler.service.js +163 -163
- package/build/_modules/scoped-config/_enums/dynts-scoped-config-level.enum.d.ts +18 -18
- package/build/_modules/scoped-config/_enums/dynts-scoped-config-level.enum.js +22 -22
- package/build/_modules/scoped-config/_models/data-models/dynts-scoped-config.data-model.d.ts +43 -43
- package/build/_modules/scoped-config/_models/data-models/dynts-scoped-config.data-model.js +67 -67
- package/build/_modules/scoped-config/_models/interfaces/dynts-scoped-config.interface.d.ts +88 -88
- package/build/_modules/scoped-config/_models/interfaces/dynts-scoped-config.interface.js +11 -11
- package/build/_modules/scoped-config/_services/dynts-scoped-config.control-service.d.ts +83 -83
- package/build/_modules/scoped-config/_services/dynts-scoped-config.control-service.js +219 -219
- package/build/_modules/scoped-config/_services/dynts-scoped-config.data-service.d.ts +53 -53
- package/build/_modules/scoped-config/_services/dynts-scoped-config.data-service.js +75 -75
- package/build/_modules/scoped-config/index.d.ts +5 -5
- package/build/_modules/scoped-config/index.js +14 -14
- package/build/_modules/server/errors/errors.control-service.d.ts +21 -21
- package/build/_modules/server/errors/errors.control-service.js +10 -10
- package/build/_modules/server/errors/errors.controller.d.ts +144 -144
- package/build/_modules/server/errors/errors.controller.js +404 -404
- package/build/_modules/server/errors/errors.data-service.d.ts +70 -70
- package/build/_modules/server/errors/errors.data-service.js +677 -677
- package/build/_modules/server/index.d.ts +15 -15
- package/build/_modules/server/index.js +35 -35
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.d.ts +8 -8
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.js +12 -12
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.d.ts +20 -19
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.d.ts.map +1 -1
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.js +24 -23
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.js.map +1 -1
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.control-service.d.ts +18 -18
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.control-service.js +82 -82
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.interface.d.ts +18 -18
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.interface.js +2 -2
- package/build/_modules/server/server-status/db-readiness-probe-code.type-enum.d.ts +13 -13
- package/build/_modules/server/server-status/db-readiness-probe-code.type-enum.js +17 -17
- package/build/_modules/server/server-status/db-readiness-probe-stage.type-enum.d.ts +7 -7
- package/build/_modules/server/server-status/db-readiness-probe-stage.type-enum.js +11 -11
- package/build/_modules/server/server-status/db-readiness-probe.control-service.d.ts +13 -13
- package/build/_modules/server/server-status/db-readiness-probe.control-service.js +125 -125
- package/build/_modules/server/server-status/db-readiness-probe.interface.d.ts +17 -17
- package/build/_modules/server/server-status/db-readiness-probe.interface.js +2 -2
- package/build/_modules/server/server-status/server-status-snapshot.control-service.d.ts +4 -4
- package/build/_modules/server/server-status/server-status-snapshot.control-service.js +7 -7
- package/build/_modules/server/server-status/server-status-snapshot.data-service.d.ts +6 -6
- package/build/_modules/server/server-status/server-status-snapshot.data-service.js +22 -22
- package/build/_modules/server/server-status/server-status.control-service.d.ts +111 -111
- package/build/_modules/server/server-status/server-status.control-service.js +302 -302
- package/build/_modules/server/server-status/server-status.controller.d.ts +92 -92
- package/build/_modules/server/server-status/server-status.controller.js +253 -253
- package/build/_modules/socket/_enums/socket-security.enum.d.ts +10 -10
- package/build/_modules/socket/_enums/socket-security.enum.js +14 -14
- package/build/_modules/socket/_models/socket-client-service-params.control-model.d.ts +8 -8
- package/build/_modules/socket/_models/socket-client-service-params.control-model.js +16 -16
- package/build/_modules/socket/_models/socket-presence.control-model.d.ts +25 -25
- package/build/_modules/socket/_models/socket-presence.control-model.js +140 -140
- package/build/_modules/socket/_models/socket-server-service-params.control-model.d.ts +22 -22
- package/build/_modules/socket/_models/socket-server-service-params.control-model.js +31 -31
- package/build/_modules/socket/_services/socket-client.service.d.ts +37 -37
- package/build/_modules/socket/_services/socket-client.service.js +196 -196
- package/build/_modules/socket/_services/socket-server.service.d.ts +98 -98
- package/build/_modules/socket/_services/socket-server.service.js +673 -673
- package/build/_modules/socket/app-extended.server.d.ts +145 -145
- package/build/_modules/socket/app-extended.server.js +521 -521
- package/build/_modules/socket/index.d.ts +8 -8
- package/build/_modules/socket/index.js +35 -35
- package/build/_modules/test/get-test-routing-module.util.d.ts +3 -3
- package/build/_modules/test/get-test-routing-module.util.js +16 -16
- package/build/_modules/test/index.d.ts +3 -3
- package/build/_modules/test/index.js +11 -11
- package/build/_modules/test/test.controller.d.ts +5 -5
- package/build/_modules/test/test.controller.js +103 -103
- package/build/_modules/test-email-sink/_collections/test-email-pattern.const.d.ts +10 -10
- package/build/_modules/test-email-sink/_collections/test-email-pattern.const.js +13 -13
- package/build/_modules/test-email-sink/_models/data-models/dynts-sent-test-mail.data-model.d.ts +21 -21
- package/build/_modules/test-email-sink/_models/data-models/dynts-sent-test-mail.data-model.js +38 -38
- package/build/_modules/test-email-sink/_services/dynts-test-email-sink.service.d.ts +49 -49
- package/build/_modules/test-email-sink/_services/dynts-test-email-sink.service.js +117 -117
- package/build/_modules/test-email-sink/get-sent-mail-routing-module.util.d.ts +14 -14
- package/build/_modules/test-email-sink/get-sent-mail-routing-module.util.js +26 -26
- package/build/_modules/test-email-sink/index.d.ts +11 -11
- package/build/_modules/test-email-sink/index.js +14 -14
- package/build/_modules/test-email-sink/test-email-sink.controller.d.ts +23 -23
- package/build/_modules/test-email-sink/test-email-sink.controller.js +66 -66
- package/build/_modules/usage/get-usage-routing-module.util.d.ts +3 -3
- package/build/_modules/usage/get-usage-routing-module.util.js +16 -16
- package/build/_modules/usage/index.d.ts +4 -4
- package/build/_modules/usage/index.js +13 -13
- package/build/_modules/usage/usage.controller.d.ts +6 -6
- package/build/_modules/usage/usage.controller.js +105 -105
- package/build/_modules/usage/usage.data-service.d.ts +17 -17
- package/build/_modules/usage/usage.data-service.js +135 -135
- package/build/_services/base/api.service-base.d.ts +9 -9
- package/build/_services/base/api.service-base.js +46 -46
- package/build/_services/base/archive-data.service.d.ts +25 -25
- package/build/_services/base/archive-data.service.js +151 -151
- package/build/_services/base/data.service.d.ts +402 -402
- package/build/_services/base/data.service.js +2131 -2131
- package/build/_services/base/db.service.d.ts +424 -424
- package/build/_services/base/db.service.js +1356 -1356
- package/build/_services/base/singleton.service-base.d.ts +8 -8
- package/build/_services/base/singleton.service-base.js +21 -21
- package/build/_services/base/singleton.service.d.ts +11 -11
- package/build/_services/base/singleton.service.js +31 -31
- package/build/_services/core/api.service.d.ts +45 -45
- package/build/_services/core/api.service.js +456 -456
- package/build/_services/core/auth.service.d.ts +129 -129
- package/build/_services/core/auth.service.js +59 -59
- package/build/_services/core/collection-growth-monitor.service.d.ts +76 -76
- package/build/_services/core/collection-growth-monitor.service.js +165 -165
- package/build/_services/core/db-stats.service.d.ts +33 -33
- package/build/_services/core/db-stats.service.js +64 -64
- package/build/_services/core/diagnostics.service.d.ts +42 -42
- package/build/_services/core/diagnostics.service.js +121 -121
- package/build/_services/core/email.service.d.ts +77 -77
- package/build/_services/core/email.service.js +503 -503
- package/build/_services/core/event-loop-diag.service.d.ts +49 -49
- package/build/_services/core/event-loop-diag.service.js +106 -106
- package/build/_services/core/global.service.d.ts +83 -83
- package/build/_services/core/global.service.js +386 -386
- package/build/_services/core/memory-guard.service.d.ts +166 -166
- package/build/_services/core/memory-guard.service.js +369 -369
- package/build/_services/core/migration-runner.service.d.ts +39 -39
- package/build/_services/core/migration-runner.service.js +74 -74
- package/build/_services/core/mongo-transaction.control-service.d.ts +18 -18
- package/build/_services/core/mongo-transaction.control-service.js +94 -94
- package/build/_services/core/request-hunter.service.d.ts +73 -73
- package/build/_services/core/request-hunter.service.js +122 -122
- package/build/_services/core/service-collection.service.d.ts +4 -4
- package/build/_services/core/service-collection.service.js +7 -7
- package/build/_services/route/controller.service.d.ts +124 -124
- package/build/_services/route/controller.service.js +95 -95
- package/build/_services/route/routing-module.service.d.ts +80 -80
- package/build/_services/route/routing-module.service.js +250 -250
- package/build/_services/server/app.server.d.ts +429 -429
- package/build/_services/server/app.server.js +1226 -1226
- package/build/_services/shared.static-service.d.ts +43 -43
- package/build/_services/shared.static-service.js +92 -92
- package/build/index.d.ts +63 -63
- package/build/index.js +101 -101
- package/package.json +1 -1
- package/src/_models/control-models/endpoint-params.control-model.spec.ts +102 -17
- package/src/_models/control-models/endpoint-params.control-model.ts +131 -220
- package/src/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.ts +3 -2
- package/src/_services/shared.static-service.spec.ts +57 -57
- package/src/_services/shared.static-service.ts +48 -48
|
@@ -1,379 +1,379 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DyNTS_AI_LLM_ServiceBase = void 0;
|
|
4
|
-
const ai_provider_service_base_1 = require("./ai-provider.service-base");
|
|
5
|
-
const ai_1 = require("@futdevpro/fsm-dynamo/ai");
|
|
6
|
-
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
7
|
-
/**
|
|
8
|
-
* Abstract base class for LLM services
|
|
9
|
-
* Defines all methods that must be implemented by AI providers
|
|
10
|
-
*/
|
|
11
|
-
class DyNTS_AI_LLM_ServiceBase extends ai_provider_service_base_1.DyNTS_AI_Provider_ServiceBase {
|
|
12
|
-
_debugLog = false;
|
|
13
|
-
get debugLog() {
|
|
14
|
-
return this.defaultSettings?.debugLog ?? this._debugLog;
|
|
15
|
-
}
|
|
16
|
-
get defaultSystemPrompt() {
|
|
17
|
-
return this.defaultSettings.systemPrompt;
|
|
18
|
-
}
|
|
19
|
-
get defaultModel() {
|
|
20
|
-
return this.defaultSettings.useModel;
|
|
21
|
-
}
|
|
22
|
-
defaultLogReplacer = '...long-context...';
|
|
23
|
-
//////////////////////////////////////////////////////////////////////////////////////////
|
|
24
|
-
// FUNCTION CALLING (TOOL USE) — FR-047 //
|
|
25
|
-
//////////////////////////////////////////////////////////////////////////////////////////
|
|
26
|
-
// Provider-agnostic agent-loop. The loop logic lives here ONCE (ported from the legacy
|
|
27
|
-
// FDPNTS_GPT_ControlService.getAnswerWithTools); each provider only overrides
|
|
28
|
-
// `callModelWithTools` (one provider turn) and `getModelRegistry` (capability honesty).
|
|
29
|
-
// Tools are a REQUEST parameter (not on settings), per the FR-047 design.
|
|
30
|
-
/**
|
|
31
|
-
* A provider tool-kepes modell-registry-je (override providerenkent — pl. DyFM_OAI_Models).
|
|
32
|
-
* Ures default → a modell tool-kepessege ismeretlen → a precheck elutasitja (honesty).
|
|
33
|
-
*/
|
|
34
|
-
getModelRegistry() {
|
|
35
|
-
return [];
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Ellenorzi, hogy a feloldott modell tamogatja-e a function calling-ot; ha nem, beszedes
|
|
39
|
-
* hibaval elhasal MIELOTT barmilyen API-hivas tortenne (kritikus pl. a Local providernel).
|
|
40
|
-
*/
|
|
41
|
-
assertToolsSupported(modelId) {
|
|
42
|
-
if (!ai_1.DyFM_AI_ModelRegistry_Util.modelSupportsTools(this.getModelRegistry(), modelId)) {
|
|
43
|
-
throw new fsm_dynamo_1.DyFM_Error({
|
|
44
|
-
message: `Model '${modelId}' does not support function calling (provider: ${this.aiProvider})`,
|
|
45
|
-
userMessage: `The selected AI model does not support tools.`,
|
|
46
|
-
errorCode: 'DyNTS-AILSB-TLC0',
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
//////////////////////////////////////////////////////////////////////////////////////////
|
|
51
|
-
// PER-MODEL SETTINGS RECONCILER — FR-048 //
|
|
52
|
-
//////////////////////////////////////////////////////////////////////////////////////////
|
|
53
|
-
/**
|
|
54
|
-
* FR-048 reconciler — a resolved modell `settingsSchema`-ja szerint egyezteti a call-settings-et a
|
|
55
|
-
* tenyleges provider-hivas ELOTT: DROPolja az `unsupported` kulcsokat (debug-log, SOHA nem csendben),
|
|
56
|
-
* CLAMP-eli a `constraints` (min/max) szerint. Ismeretlen modell / schema-mentes registry-bejegyzes →
|
|
57
|
-
* permissziv passthrough + log (best-effort, honesty).
|
|
58
|
-
*
|
|
59
|
-
* Ezzel altalanosul a FR-047 Phase-4 lokalis param-drop (Anthropic Opus 4.7+ temperature/topP/topK) es a
|
|
60
|
-
* FR-047 `isReasoningModel` sampling-drop: a tudas mostantol a registry `settingsSchema`-jaban (SSoT) el,
|
|
61
|
-
* nem provider-translator-onkent duplikalva.
|
|
62
|
-
*
|
|
63
|
-
* NON-BREAKING: ha a registry ures vagy a modellnek nincs schemaja, a bemenet valtozatlanul ter vissza —
|
|
64
|
-
* igy a meglevo providerek viselkedese nem valtozik, amig a schema nincs feltoltve.
|
|
65
|
-
* @param modelId - a feloldott modell azonositoja
|
|
66
|
-
* @param settings - a hivas-settings (opcionalis)
|
|
67
|
-
*/
|
|
68
|
-
reconcileCallSettings(modelId, settings) {
|
|
69
|
-
if (!settings) {
|
|
70
|
-
return settings;
|
|
71
|
-
}
|
|
72
|
-
const modelInfo = ai_1.DyFM_AI_ModelRegistry_Util.findModelInfo(this.getModelRegistry(), modelId);
|
|
73
|
-
const schema = modelInfo?.settingsSchema;
|
|
74
|
-
if (!schema) {
|
|
75
|
-
if (this.debugLog) {
|
|
76
|
-
fsm_dynamo_1.DyFM_Log.info(`[FR-048] no settingsSchema for '${modelId}' — passthrough (best-effort)`);
|
|
77
|
-
}
|
|
78
|
-
return settings;
|
|
79
|
-
}
|
|
80
|
-
const reconciled = { ...settings };
|
|
81
|
-
// A generikus `T_AISettings` csak OLVASASRA indexelheto (TS2862), ezert a mutaciot egy nem-generikus
|
|
82
|
-
// aliason vegezzuk — UGYANARRA az objektumra mutat, igy cast nelkul is tipus-helyes marad.
|
|
83
|
-
const mutable = reconciled;
|
|
84
|
-
for (const key of schema.unsupported ?? []) {
|
|
85
|
-
if (mutable[key] !== undefined) {
|
|
86
|
-
if (this.debugLog) {
|
|
87
|
-
fsm_dynamo_1.DyFM_Log.info(`[FR-048] drop unsupported '${key}' for model '${modelId}'`);
|
|
88
|
-
}
|
|
89
|
-
delete mutable[key];
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
const constraints = schema.constraints ?? {};
|
|
93
|
-
for (const key of Object.keys(constraints)) {
|
|
94
|
-
const constraint = constraints[key];
|
|
95
|
-
const value = mutable[key];
|
|
96
|
-
if (typeof value !== 'number') {
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
let next = value;
|
|
100
|
-
if (typeof constraint.min === 'number' && next < constraint.min) {
|
|
101
|
-
next = constraint.min;
|
|
102
|
-
}
|
|
103
|
-
if (typeof constraint.max === 'number' && next > constraint.max) {
|
|
104
|
-
next = constraint.max;
|
|
105
|
-
}
|
|
106
|
-
if (next !== value) {
|
|
107
|
-
if (this.debugLog) {
|
|
108
|
-
fsm_dynamo_1.DyFM_Log.info(`[FR-048] clamp '${key}' ${value} → ${next} for model '${modelId}'`);
|
|
109
|
-
}
|
|
110
|
-
mutable[key] = next;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return reconciled;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* GPT valasz Function Calling Agent Tool-okkal — provider-agnosztikus agent-loop.
|
|
117
|
-
* @description A `tools` definiciok + `toolHandlers` alapjan tool-loop-ot futtat: hivja a
|
|
118
|
-
* modellt (callModelWithTools) → ha a valaszban tool-call van, lefuttatja a regisztralt
|
|
119
|
-
* handler-t (runToolCall, never-throw) es az eredmenyt visszafuzi → ismetli, amig a model
|
|
120
|
-
* vegso (tool-call nelkuli) valaszt ad, vagy a maxIterations limitet eleri. A tool-ok a
|
|
121
|
-
* REQUEST-parameterben jonnek, nem a settings-ben.
|
|
122
|
-
*/
|
|
123
|
-
async requestWithTools(set) {
|
|
124
|
-
const modelId = (set.settings?.useModel ?? this.defaultModel);
|
|
125
|
-
if (!modelId) {
|
|
126
|
-
throw new fsm_dynamo_1.DyFM_Error({
|
|
127
|
-
message: `No model configured for function calling (provider: ${this.aiProvider})`,
|
|
128
|
-
userMessage: `No AI model is configured for tools.`,
|
|
129
|
-
errorCode: 'DyNTS-AILSB-TLM0',
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
this.assertToolsSupported(modelId);
|
|
133
|
-
return this.runToolLoop(set);
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Egy provider-kor a tool-loop-ban: elkuldi a beszelgetest + tool-okat, normalizalt valaszt ad.
|
|
137
|
-
* @description Override-olando providerenkent (OpenAI / Anthropic / Google / …). A default
|
|
138
|
-
* elhasal — egy provider, ami nem implementalja, tool-use-t nem tud kiszolgalni.
|
|
139
|
-
*/
|
|
140
|
-
async callModelWithTools(_set) {
|
|
141
|
-
throw new fsm_dynamo_1.DyFM_Error({
|
|
142
|
-
message: `callModelWithTools is not implemented for provider '${this.aiProvider}'`,
|
|
143
|
-
userMessage: `Function calling is not available for this AI provider yet.`,
|
|
144
|
-
errorCode: 'DyNTS-AILSB-TLN0',
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* A provider-agnosztikus agent-loop torzse. A bemeno `conversation` ele a provider teszi a
|
|
149
|
-
* system-message-et (callModelWithTools); a loop a tool-call/tool-result uzeneteket fuzi hozza.
|
|
150
|
-
*/
|
|
151
|
-
async runToolLoop(set) {
|
|
152
|
-
const maxIterations = set.maxIterations ?? 8;
|
|
153
|
-
const conversation = [...set.conversation];
|
|
154
|
-
for (let iteration = 0; iteration < maxIterations; iteration++) {
|
|
155
|
-
const response = await this.callModelWithTools({
|
|
156
|
-
conversation: conversation,
|
|
157
|
-
tools: set.tools,
|
|
158
|
-
settings: set.settings,
|
|
159
|
-
issuer: set.issuer,
|
|
160
|
-
});
|
|
161
|
-
// nincs tool-hivas → ez a vegso valasz
|
|
162
|
-
if (!response.toolCalls?.length) {
|
|
163
|
-
return response;
|
|
164
|
-
}
|
|
165
|
-
// a model tool-hivo (assistant) uzenetet visszatesszuk a kontextusba
|
|
166
|
-
conversation.push({
|
|
167
|
-
role: ai_1.DyFM_AI_MessageRole.assistant,
|
|
168
|
-
content: response.content ?? '',
|
|
169
|
-
toolCalls: response.toolCalls,
|
|
170
|
-
});
|
|
171
|
-
// minden tool-hivast lefuttatunk (never-throw), es az eredmenyt visszaadjuk a modellnek
|
|
172
|
-
const results = await Promise.all(response.toolCalls.map((call) => this.runToolCall(call, set.toolHandlers)));
|
|
173
|
-
results.forEach((result) => {
|
|
174
|
-
conversation.push({
|
|
175
|
-
role: ai_1.DyFM_AI_MessageRole.tool,
|
|
176
|
-
content: result.content,
|
|
177
|
-
toolCallId: result.toolCallId,
|
|
178
|
-
});
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
// a tool-loop nem konvergalt a limiten belul
|
|
182
|
-
throw new fsm_dynamo_1.DyFM_Error({
|
|
183
|
-
message: `Tool loop did not converge within ${maxIterations} iterations`,
|
|
184
|
-
userMessage: `We encountered an error while running AI tools, please contact the responsible development team.`,
|
|
185
|
-
errorCode: 'DyNTS-AILSB-TL0',
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Egy tool-hivas lefuttatasa a regisztralt handler-rel. SOHA nem dob — a tool-hiba string-kent
|
|
190
|
-
* megy vissza a modellnek (hogy korrigalhasson), hianyzo handler eseten is informativ uzenet
|
|
191
|
-
* (soha nem [object Object]).
|
|
192
|
-
*/
|
|
193
|
-
async runToolCall(call, toolHandlers) {
|
|
194
|
-
const handler = toolHandlers[call.name];
|
|
195
|
-
if (!handler) {
|
|
196
|
-
return {
|
|
197
|
-
toolCallId: call.id,
|
|
198
|
-
content: `ERROR: no handler registered for tool '${call.name}'`,
|
|
199
|
-
isError: true,
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
try {
|
|
203
|
-
return {
|
|
204
|
-
toolCallId: call.id,
|
|
205
|
-
content: await handler(call.arguments),
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
catch (error) {
|
|
209
|
-
return {
|
|
210
|
-
toolCallId: call.id,
|
|
211
|
-
content: `ERROR executing tool '${call.name}': ` +
|
|
212
|
-
`${error instanceof Error ? error.message : String(error)}`,
|
|
213
|
-
isError: true,
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
// Helper methods
|
|
218
|
-
/* protected abstract getDefaultErrorSettings(
|
|
219
|
-
method: string,
|
|
220
|
-
error: any,
|
|
221
|
-
issuer?: string
|
|
222
|
-
): DyFM_Error_Settings; */
|
|
223
|
-
/* protected abstract getTextListAsText(list: string[]): string; */
|
|
224
|
-
/* protected abstract logQuestion(set: DyFM_AI_Base_Input<T_AISettings>): void; */
|
|
225
|
-
convertAnswerToBoolean(answer) {
|
|
226
|
-
return answer.toUpperCase().includes(this.predefinedRequests.yesNo.upperCaseYes);
|
|
227
|
-
}
|
|
228
|
-
convertAnswerToNumber(answer, message) {
|
|
229
|
-
if (this.isAnswerValid(answer, message)) {
|
|
230
|
-
return null;
|
|
231
|
-
}
|
|
232
|
-
if (isNaN(+answer)) {
|
|
233
|
-
fsm_dynamo_1.DyFM_Log.T_error('DyNTS_AI_LLMChat_ServiceBase.convertAnswerToNumber got an invalid answer', {
|
|
234
|
-
question: message,
|
|
235
|
-
answer: answer,
|
|
236
|
-
});
|
|
237
|
-
return null;
|
|
238
|
-
}
|
|
239
|
-
return +answer;
|
|
240
|
-
}
|
|
241
|
-
convertAnswerToSelectOption(answer, message, options) {
|
|
242
|
-
if (this.isAnswerValid(answer, message)) {
|
|
243
|
-
return null;
|
|
244
|
-
}
|
|
245
|
-
answer = answer.toLocaleUpperCase();
|
|
246
|
-
const stringifiedOptions = this.stringifySelectOptions(options);
|
|
247
|
-
for (const stringifiedItem of stringifiedOptions) {
|
|
248
|
-
if (answer.includes(stringifiedItem.toLocaleUpperCase())) {
|
|
249
|
-
const parsedItem = fsm_dynamo_1.DyFM_Object.safeParseJSON(stringifiedItem);
|
|
250
|
-
if (parsedItem.unparsableResult) {
|
|
251
|
-
fsm_dynamo_1.DyFM_Log.T_error('DyNTS_AI_LLMChat_ServiceBase.convertAnswerToSelectOption got an invalid answer', {
|
|
252
|
-
question: message,
|
|
253
|
-
answer: answer,
|
|
254
|
-
});
|
|
255
|
-
return stringifiedItem;
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
return parsedItem;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
return null;
|
|
263
|
-
}
|
|
264
|
-
convertAnswerToSelectOptions(answer, message, options) {
|
|
265
|
-
if (this.isAnswerValid(answer, message)) {
|
|
266
|
-
return null;
|
|
267
|
-
}
|
|
268
|
-
const enrichedOptions = options.map((option) => ({
|
|
269
|
-
stringifiedOption: this.stringifySelectOption(option),
|
|
270
|
-
parsedOption: option
|
|
271
|
-
}));
|
|
272
|
-
const result = [];
|
|
273
|
-
for (const item of enrichedOptions) {
|
|
274
|
-
if (answer.includes(item.stringifiedOption)) {
|
|
275
|
-
result.push(item.parsedOption);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
return result;
|
|
279
|
-
}
|
|
280
|
-
convertAnswerToJSON(answer, message) {
|
|
281
|
-
if (this.isAnswerValid(answer, message)) {
|
|
282
|
-
return { unparsableResult: answer };
|
|
283
|
-
}
|
|
284
|
-
const parsedItem = fsm_dynamo_1.DyFM_Object.safeParseJSON(answer);
|
|
285
|
-
if (parsedItem.unparsableResult) {
|
|
286
|
-
fsm_dynamo_1.DyFM_Log.T_error('DyNTS_AI_LLMChat_ServiceBase.convertAnswerToJSON got an invalid answer', {
|
|
287
|
-
question: message,
|
|
288
|
-
answer: answer,
|
|
289
|
-
});
|
|
290
|
-
return { unparsableResult: answer };
|
|
291
|
-
}
|
|
292
|
-
return parsedItem;
|
|
293
|
-
}
|
|
294
|
-
convertAnswerToList(answer, message) {
|
|
295
|
-
if (this.isAnswerValid(answer, message)) {
|
|
296
|
-
return { unparsableResult: answer };
|
|
297
|
-
}
|
|
298
|
-
// Check if safeParseJSON returns unparsableResult before calling safeParseList
|
|
299
|
-
// because safeParseList doesn't properly handle unparsableResult
|
|
300
|
-
const parsedCheck = fsm_dynamo_1.DyFM_Object.safeParseJSON(answer, true);
|
|
301
|
-
if (parsedCheck.unparsableResult) {
|
|
302
|
-
fsm_dynamo_1.DyFM_Log.T_error('DyNTS_AI_LLMChat_ServiceBase.convertAnswerToList got an invalid answer', {
|
|
303
|
-
question: message,
|
|
304
|
-
answer: answer,
|
|
305
|
-
});
|
|
306
|
-
return { unparsableResult: answer };
|
|
307
|
-
}
|
|
308
|
-
return fsm_dynamo_1.DyFM_Object.safeParseList(answer);
|
|
309
|
-
}
|
|
310
|
-
stringifySelectOptions(options) {
|
|
311
|
-
return options.map(item => this.stringifySelectOption(item));
|
|
312
|
-
}
|
|
313
|
-
stringifySelectOption(option) {
|
|
314
|
-
return JSON.stringify(option);
|
|
315
|
-
}
|
|
316
|
-
isAnswerValid(answer, message) {
|
|
317
|
-
if (!answer?.trim?.()?.length) {
|
|
318
|
-
fsm_dynamo_1.DyFM_Log.T_error('DyNTS_AI_LLMChat_ServiceBase.convertAnswerToSelectOption got an invalid answer', {
|
|
319
|
-
question: message,
|
|
320
|
-
answer: answer,
|
|
321
|
-
});
|
|
322
|
-
return true;
|
|
323
|
-
}
|
|
324
|
-
return false;
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* olvasható mondatszerű-listaszerű formába teszi a listaelemeket
|
|
328
|
-
* pl.: ['a', 'b', 'c'] -> '"a", "b" or "c"'
|
|
329
|
-
*/
|
|
330
|
-
getTextListAsText(list) {
|
|
331
|
-
list = list.filter(item => item?.trim()).map(item => `"${item}"`);
|
|
332
|
-
/* list = list.map(item => item.toLocaleLowerCase()); */
|
|
333
|
-
list.push(list.pop() + ' or ' + list.pop());
|
|
334
|
-
return list.join(', ');
|
|
335
|
-
}
|
|
336
|
-
logQuestion(set) {
|
|
337
|
-
if (set.settings?.debugLog ?? this._debugLog) {
|
|
338
|
-
console.log('\n - ', set.message);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
getDefaultSystemMessage(settings) {
|
|
342
|
-
return {
|
|
343
|
-
role: ai_1.DyFM_AI_MessageRole.system,
|
|
344
|
-
content: settings?.systemPrompt || this.defaultSystemPrompt,
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
validateConversation(conversation) {
|
|
348
|
-
conversation.forEach((message, index) => {
|
|
349
|
-
if (!message.role) {
|
|
350
|
-
throw new fsm_dynamo_1.DyFM_Error({
|
|
351
|
-
message: `Message has no role at index ${index}`,
|
|
352
|
-
additionalContent: {
|
|
353
|
-
invalidMessage: message,
|
|
354
|
-
conversation: conversation,
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
conversation = conversation.filter(message => message.content);
|
|
360
|
-
}
|
|
361
|
-
logAnswer(answer) {
|
|
362
|
-
if (this._debugLog) {
|
|
363
|
-
console.log(' - answer: ', answer);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
//////////////////////////////////////////////////////////////////////////////////////////
|
|
367
|
-
// LLM CHAT METHODS //
|
|
368
|
-
//////////////////////////////////////////////////////////////////////////////////////////
|
|
369
|
-
logConversation(set) {
|
|
370
|
-
if (set.debugLog || this._debugLog) {
|
|
371
|
-
fsm_dynamo_1.DyFM_Log.info('Conversation log at', (0, fsm_dynamo_1.DyFM_getLocalStackLocation)());
|
|
372
|
-
set.conversation.forEach(message => {
|
|
373
|
-
console.log(` - ${message.role}: ${message.content.replace(set.replaceThisInLog, this.defaultLogReplacer)}`);
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
exports.DyNTS_AI_LLM_ServiceBase = DyNTS_AI_LLM_ServiceBase;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_AI_LLM_ServiceBase = void 0;
|
|
4
|
+
const ai_provider_service_base_1 = require("./ai-provider.service-base");
|
|
5
|
+
const ai_1 = require("@futdevpro/fsm-dynamo/ai");
|
|
6
|
+
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
7
|
+
/**
|
|
8
|
+
* Abstract base class for LLM services
|
|
9
|
+
* Defines all methods that must be implemented by AI providers
|
|
10
|
+
*/
|
|
11
|
+
class DyNTS_AI_LLM_ServiceBase extends ai_provider_service_base_1.DyNTS_AI_Provider_ServiceBase {
|
|
12
|
+
_debugLog = false;
|
|
13
|
+
get debugLog() {
|
|
14
|
+
return this.defaultSettings?.debugLog ?? this._debugLog;
|
|
15
|
+
}
|
|
16
|
+
get defaultSystemPrompt() {
|
|
17
|
+
return this.defaultSettings.systemPrompt;
|
|
18
|
+
}
|
|
19
|
+
get defaultModel() {
|
|
20
|
+
return this.defaultSettings.useModel;
|
|
21
|
+
}
|
|
22
|
+
defaultLogReplacer = '...long-context...';
|
|
23
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
24
|
+
// FUNCTION CALLING (TOOL USE) — FR-047 //
|
|
25
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
26
|
+
// Provider-agnostic agent-loop. The loop logic lives here ONCE (ported from the legacy
|
|
27
|
+
// FDPNTS_GPT_ControlService.getAnswerWithTools); each provider only overrides
|
|
28
|
+
// `callModelWithTools` (one provider turn) and `getModelRegistry` (capability honesty).
|
|
29
|
+
// Tools are a REQUEST parameter (not on settings), per the FR-047 design.
|
|
30
|
+
/**
|
|
31
|
+
* A provider tool-kepes modell-registry-je (override providerenkent — pl. DyFM_OAI_Models).
|
|
32
|
+
* Ures default → a modell tool-kepessege ismeretlen → a precheck elutasitja (honesty).
|
|
33
|
+
*/
|
|
34
|
+
getModelRegistry() {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Ellenorzi, hogy a feloldott modell tamogatja-e a function calling-ot; ha nem, beszedes
|
|
39
|
+
* hibaval elhasal MIELOTT barmilyen API-hivas tortenne (kritikus pl. a Local providernel).
|
|
40
|
+
*/
|
|
41
|
+
assertToolsSupported(modelId) {
|
|
42
|
+
if (!ai_1.DyFM_AI_ModelRegistry_Util.modelSupportsTools(this.getModelRegistry(), modelId)) {
|
|
43
|
+
throw new fsm_dynamo_1.DyFM_Error({
|
|
44
|
+
message: `Model '${modelId}' does not support function calling (provider: ${this.aiProvider})`,
|
|
45
|
+
userMessage: `The selected AI model does not support tools.`,
|
|
46
|
+
errorCode: 'DyNTS-AILSB-TLC0',
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
51
|
+
// PER-MODEL SETTINGS RECONCILER — FR-048 //
|
|
52
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
53
|
+
/**
|
|
54
|
+
* FR-048 reconciler — a resolved modell `settingsSchema`-ja szerint egyezteti a call-settings-et a
|
|
55
|
+
* tenyleges provider-hivas ELOTT: DROPolja az `unsupported` kulcsokat (debug-log, SOHA nem csendben),
|
|
56
|
+
* CLAMP-eli a `constraints` (min/max) szerint. Ismeretlen modell / schema-mentes registry-bejegyzes →
|
|
57
|
+
* permissziv passthrough + log (best-effort, honesty).
|
|
58
|
+
*
|
|
59
|
+
* Ezzel altalanosul a FR-047 Phase-4 lokalis param-drop (Anthropic Opus 4.7+ temperature/topP/topK) es a
|
|
60
|
+
* FR-047 `isReasoningModel` sampling-drop: a tudas mostantol a registry `settingsSchema`-jaban (SSoT) el,
|
|
61
|
+
* nem provider-translator-onkent duplikalva.
|
|
62
|
+
*
|
|
63
|
+
* NON-BREAKING: ha a registry ures vagy a modellnek nincs schemaja, a bemenet valtozatlanul ter vissza —
|
|
64
|
+
* igy a meglevo providerek viselkedese nem valtozik, amig a schema nincs feltoltve.
|
|
65
|
+
* @param modelId - a feloldott modell azonositoja
|
|
66
|
+
* @param settings - a hivas-settings (opcionalis)
|
|
67
|
+
*/
|
|
68
|
+
reconcileCallSettings(modelId, settings) {
|
|
69
|
+
if (!settings) {
|
|
70
|
+
return settings;
|
|
71
|
+
}
|
|
72
|
+
const modelInfo = ai_1.DyFM_AI_ModelRegistry_Util.findModelInfo(this.getModelRegistry(), modelId);
|
|
73
|
+
const schema = modelInfo?.settingsSchema;
|
|
74
|
+
if (!schema) {
|
|
75
|
+
if (this.debugLog) {
|
|
76
|
+
fsm_dynamo_1.DyFM_Log.info(`[FR-048] no settingsSchema for '${modelId}' — passthrough (best-effort)`);
|
|
77
|
+
}
|
|
78
|
+
return settings;
|
|
79
|
+
}
|
|
80
|
+
const reconciled = { ...settings };
|
|
81
|
+
// A generikus `T_AISettings` csak OLVASASRA indexelheto (TS2862), ezert a mutaciot egy nem-generikus
|
|
82
|
+
// aliason vegezzuk — UGYANARRA az objektumra mutat, igy cast nelkul is tipus-helyes marad.
|
|
83
|
+
const mutable = reconciled;
|
|
84
|
+
for (const key of schema.unsupported ?? []) {
|
|
85
|
+
if (mutable[key] !== undefined) {
|
|
86
|
+
if (this.debugLog) {
|
|
87
|
+
fsm_dynamo_1.DyFM_Log.info(`[FR-048] drop unsupported '${key}' for model '${modelId}'`);
|
|
88
|
+
}
|
|
89
|
+
delete mutable[key];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const constraints = schema.constraints ?? {};
|
|
93
|
+
for (const key of Object.keys(constraints)) {
|
|
94
|
+
const constraint = constraints[key];
|
|
95
|
+
const value = mutable[key];
|
|
96
|
+
if (typeof value !== 'number') {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
let next = value;
|
|
100
|
+
if (typeof constraint.min === 'number' && next < constraint.min) {
|
|
101
|
+
next = constraint.min;
|
|
102
|
+
}
|
|
103
|
+
if (typeof constraint.max === 'number' && next > constraint.max) {
|
|
104
|
+
next = constraint.max;
|
|
105
|
+
}
|
|
106
|
+
if (next !== value) {
|
|
107
|
+
if (this.debugLog) {
|
|
108
|
+
fsm_dynamo_1.DyFM_Log.info(`[FR-048] clamp '${key}' ${value} → ${next} for model '${modelId}'`);
|
|
109
|
+
}
|
|
110
|
+
mutable[key] = next;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return reconciled;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* GPT valasz Function Calling Agent Tool-okkal — provider-agnosztikus agent-loop.
|
|
117
|
+
* @description A `tools` definiciok + `toolHandlers` alapjan tool-loop-ot futtat: hivja a
|
|
118
|
+
* modellt (callModelWithTools) → ha a valaszban tool-call van, lefuttatja a regisztralt
|
|
119
|
+
* handler-t (runToolCall, never-throw) es az eredmenyt visszafuzi → ismetli, amig a model
|
|
120
|
+
* vegso (tool-call nelkuli) valaszt ad, vagy a maxIterations limitet eleri. A tool-ok a
|
|
121
|
+
* REQUEST-parameterben jonnek, nem a settings-ben.
|
|
122
|
+
*/
|
|
123
|
+
async requestWithTools(set) {
|
|
124
|
+
const modelId = (set.settings?.useModel ?? this.defaultModel);
|
|
125
|
+
if (!modelId) {
|
|
126
|
+
throw new fsm_dynamo_1.DyFM_Error({
|
|
127
|
+
message: `No model configured for function calling (provider: ${this.aiProvider})`,
|
|
128
|
+
userMessage: `No AI model is configured for tools.`,
|
|
129
|
+
errorCode: 'DyNTS-AILSB-TLM0',
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
this.assertToolsSupported(modelId);
|
|
133
|
+
return this.runToolLoop(set);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Egy provider-kor a tool-loop-ban: elkuldi a beszelgetest + tool-okat, normalizalt valaszt ad.
|
|
137
|
+
* @description Override-olando providerenkent (OpenAI / Anthropic / Google / …). A default
|
|
138
|
+
* elhasal — egy provider, ami nem implementalja, tool-use-t nem tud kiszolgalni.
|
|
139
|
+
*/
|
|
140
|
+
async callModelWithTools(_set) {
|
|
141
|
+
throw new fsm_dynamo_1.DyFM_Error({
|
|
142
|
+
message: `callModelWithTools is not implemented for provider '${this.aiProvider}'`,
|
|
143
|
+
userMessage: `Function calling is not available for this AI provider yet.`,
|
|
144
|
+
errorCode: 'DyNTS-AILSB-TLN0',
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* A provider-agnosztikus agent-loop torzse. A bemeno `conversation` ele a provider teszi a
|
|
149
|
+
* system-message-et (callModelWithTools); a loop a tool-call/tool-result uzeneteket fuzi hozza.
|
|
150
|
+
*/
|
|
151
|
+
async runToolLoop(set) {
|
|
152
|
+
const maxIterations = set.maxIterations ?? 8;
|
|
153
|
+
const conversation = [...set.conversation];
|
|
154
|
+
for (let iteration = 0; iteration < maxIterations; iteration++) {
|
|
155
|
+
const response = await this.callModelWithTools({
|
|
156
|
+
conversation: conversation,
|
|
157
|
+
tools: set.tools,
|
|
158
|
+
settings: set.settings,
|
|
159
|
+
issuer: set.issuer,
|
|
160
|
+
});
|
|
161
|
+
// nincs tool-hivas → ez a vegso valasz
|
|
162
|
+
if (!response.toolCalls?.length) {
|
|
163
|
+
return response;
|
|
164
|
+
}
|
|
165
|
+
// a model tool-hivo (assistant) uzenetet visszatesszuk a kontextusba
|
|
166
|
+
conversation.push({
|
|
167
|
+
role: ai_1.DyFM_AI_MessageRole.assistant,
|
|
168
|
+
content: response.content ?? '',
|
|
169
|
+
toolCalls: response.toolCalls,
|
|
170
|
+
});
|
|
171
|
+
// minden tool-hivast lefuttatunk (never-throw), es az eredmenyt visszaadjuk a modellnek
|
|
172
|
+
const results = await Promise.all(response.toolCalls.map((call) => this.runToolCall(call, set.toolHandlers)));
|
|
173
|
+
results.forEach((result) => {
|
|
174
|
+
conversation.push({
|
|
175
|
+
role: ai_1.DyFM_AI_MessageRole.tool,
|
|
176
|
+
content: result.content,
|
|
177
|
+
toolCallId: result.toolCallId,
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
// a tool-loop nem konvergalt a limiten belul
|
|
182
|
+
throw new fsm_dynamo_1.DyFM_Error({
|
|
183
|
+
message: `Tool loop did not converge within ${maxIterations} iterations`,
|
|
184
|
+
userMessage: `We encountered an error while running AI tools, please contact the responsible development team.`,
|
|
185
|
+
errorCode: 'DyNTS-AILSB-TL0',
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Egy tool-hivas lefuttatasa a regisztralt handler-rel. SOHA nem dob — a tool-hiba string-kent
|
|
190
|
+
* megy vissza a modellnek (hogy korrigalhasson), hianyzo handler eseten is informativ uzenet
|
|
191
|
+
* (soha nem [object Object]).
|
|
192
|
+
*/
|
|
193
|
+
async runToolCall(call, toolHandlers) {
|
|
194
|
+
const handler = toolHandlers[call.name];
|
|
195
|
+
if (!handler) {
|
|
196
|
+
return {
|
|
197
|
+
toolCallId: call.id,
|
|
198
|
+
content: `ERROR: no handler registered for tool '${call.name}'`,
|
|
199
|
+
isError: true,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
try {
|
|
203
|
+
return {
|
|
204
|
+
toolCallId: call.id,
|
|
205
|
+
content: await handler(call.arguments),
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
catch (error) {
|
|
209
|
+
return {
|
|
210
|
+
toolCallId: call.id,
|
|
211
|
+
content: `ERROR executing tool '${call.name}': ` +
|
|
212
|
+
`${error instanceof Error ? error.message : String(error)}`,
|
|
213
|
+
isError: true,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
// Helper methods
|
|
218
|
+
/* protected abstract getDefaultErrorSettings(
|
|
219
|
+
method: string,
|
|
220
|
+
error: any,
|
|
221
|
+
issuer?: string
|
|
222
|
+
): DyFM_Error_Settings; */
|
|
223
|
+
/* protected abstract getTextListAsText(list: string[]): string; */
|
|
224
|
+
/* protected abstract logQuestion(set: DyFM_AI_Base_Input<T_AISettings>): void; */
|
|
225
|
+
convertAnswerToBoolean(answer) {
|
|
226
|
+
return answer.toUpperCase().includes(this.predefinedRequests.yesNo.upperCaseYes);
|
|
227
|
+
}
|
|
228
|
+
convertAnswerToNumber(answer, message) {
|
|
229
|
+
if (this.isAnswerValid(answer, message)) {
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
if (isNaN(+answer)) {
|
|
233
|
+
fsm_dynamo_1.DyFM_Log.T_error('DyNTS_AI_LLMChat_ServiceBase.convertAnswerToNumber got an invalid answer', {
|
|
234
|
+
question: message,
|
|
235
|
+
answer: answer,
|
|
236
|
+
});
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
239
|
+
return +answer;
|
|
240
|
+
}
|
|
241
|
+
convertAnswerToSelectOption(answer, message, options) {
|
|
242
|
+
if (this.isAnswerValid(answer, message)) {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
answer = answer.toLocaleUpperCase();
|
|
246
|
+
const stringifiedOptions = this.stringifySelectOptions(options);
|
|
247
|
+
for (const stringifiedItem of stringifiedOptions) {
|
|
248
|
+
if (answer.includes(stringifiedItem.toLocaleUpperCase())) {
|
|
249
|
+
const parsedItem = fsm_dynamo_1.DyFM_Object.safeParseJSON(stringifiedItem);
|
|
250
|
+
if (parsedItem.unparsableResult) {
|
|
251
|
+
fsm_dynamo_1.DyFM_Log.T_error('DyNTS_AI_LLMChat_ServiceBase.convertAnswerToSelectOption got an invalid answer', {
|
|
252
|
+
question: message,
|
|
253
|
+
answer: answer,
|
|
254
|
+
});
|
|
255
|
+
return stringifiedItem;
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
return parsedItem;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
convertAnswerToSelectOptions(answer, message, options) {
|
|
265
|
+
if (this.isAnswerValid(answer, message)) {
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
const enrichedOptions = options.map((option) => ({
|
|
269
|
+
stringifiedOption: this.stringifySelectOption(option),
|
|
270
|
+
parsedOption: option
|
|
271
|
+
}));
|
|
272
|
+
const result = [];
|
|
273
|
+
for (const item of enrichedOptions) {
|
|
274
|
+
if (answer.includes(item.stringifiedOption)) {
|
|
275
|
+
result.push(item.parsedOption);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return result;
|
|
279
|
+
}
|
|
280
|
+
convertAnswerToJSON(answer, message) {
|
|
281
|
+
if (this.isAnswerValid(answer, message)) {
|
|
282
|
+
return { unparsableResult: answer };
|
|
283
|
+
}
|
|
284
|
+
const parsedItem = fsm_dynamo_1.DyFM_Object.safeParseJSON(answer);
|
|
285
|
+
if (parsedItem.unparsableResult) {
|
|
286
|
+
fsm_dynamo_1.DyFM_Log.T_error('DyNTS_AI_LLMChat_ServiceBase.convertAnswerToJSON got an invalid answer', {
|
|
287
|
+
question: message,
|
|
288
|
+
answer: answer,
|
|
289
|
+
});
|
|
290
|
+
return { unparsableResult: answer };
|
|
291
|
+
}
|
|
292
|
+
return parsedItem;
|
|
293
|
+
}
|
|
294
|
+
convertAnswerToList(answer, message) {
|
|
295
|
+
if (this.isAnswerValid(answer, message)) {
|
|
296
|
+
return { unparsableResult: answer };
|
|
297
|
+
}
|
|
298
|
+
// Check if safeParseJSON returns unparsableResult before calling safeParseList
|
|
299
|
+
// because safeParseList doesn't properly handle unparsableResult
|
|
300
|
+
const parsedCheck = fsm_dynamo_1.DyFM_Object.safeParseJSON(answer, true);
|
|
301
|
+
if (parsedCheck.unparsableResult) {
|
|
302
|
+
fsm_dynamo_1.DyFM_Log.T_error('DyNTS_AI_LLMChat_ServiceBase.convertAnswerToList got an invalid answer', {
|
|
303
|
+
question: message,
|
|
304
|
+
answer: answer,
|
|
305
|
+
});
|
|
306
|
+
return { unparsableResult: answer };
|
|
307
|
+
}
|
|
308
|
+
return fsm_dynamo_1.DyFM_Object.safeParseList(answer);
|
|
309
|
+
}
|
|
310
|
+
stringifySelectOptions(options) {
|
|
311
|
+
return options.map(item => this.stringifySelectOption(item));
|
|
312
|
+
}
|
|
313
|
+
stringifySelectOption(option) {
|
|
314
|
+
return JSON.stringify(option);
|
|
315
|
+
}
|
|
316
|
+
isAnswerValid(answer, message) {
|
|
317
|
+
if (!answer?.trim?.()?.length) {
|
|
318
|
+
fsm_dynamo_1.DyFM_Log.T_error('DyNTS_AI_LLMChat_ServiceBase.convertAnswerToSelectOption got an invalid answer', {
|
|
319
|
+
question: message,
|
|
320
|
+
answer: answer,
|
|
321
|
+
});
|
|
322
|
+
return true;
|
|
323
|
+
}
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* olvasható mondatszerű-listaszerű formába teszi a listaelemeket
|
|
328
|
+
* pl.: ['a', 'b', 'c'] -> '"a", "b" or "c"'
|
|
329
|
+
*/
|
|
330
|
+
getTextListAsText(list) {
|
|
331
|
+
list = list.filter(item => item?.trim()).map(item => `"${item}"`);
|
|
332
|
+
/* list = list.map(item => item.toLocaleLowerCase()); */
|
|
333
|
+
list.push(list.pop() + ' or ' + list.pop());
|
|
334
|
+
return list.join(', ');
|
|
335
|
+
}
|
|
336
|
+
logQuestion(set) {
|
|
337
|
+
if (set.settings?.debugLog ?? this._debugLog) {
|
|
338
|
+
console.log('\n - ', set.message);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
getDefaultSystemMessage(settings) {
|
|
342
|
+
return {
|
|
343
|
+
role: ai_1.DyFM_AI_MessageRole.system,
|
|
344
|
+
content: settings?.systemPrompt || this.defaultSystemPrompt,
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
validateConversation(conversation) {
|
|
348
|
+
conversation.forEach((message, index) => {
|
|
349
|
+
if (!message.role) {
|
|
350
|
+
throw new fsm_dynamo_1.DyFM_Error({
|
|
351
|
+
message: `Message has no role at index ${index}`,
|
|
352
|
+
additionalContent: {
|
|
353
|
+
invalidMessage: message,
|
|
354
|
+
conversation: conversation,
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
conversation = conversation.filter(message => message.content);
|
|
360
|
+
}
|
|
361
|
+
logAnswer(answer) {
|
|
362
|
+
if (this._debugLog) {
|
|
363
|
+
console.log(' - answer: ', answer);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
367
|
+
// LLM CHAT METHODS //
|
|
368
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
369
|
+
logConversation(set) {
|
|
370
|
+
if (set.debugLog || this._debugLog) {
|
|
371
|
+
fsm_dynamo_1.DyFM_Log.info('Conversation log at', (0, fsm_dynamo_1.DyFM_getLocalStackLocation)());
|
|
372
|
+
set.conversation.forEach(message => {
|
|
373
|
+
console.log(` - ${message.role}: ${message.content.replace(set.replaceThisInLog, this.defaultLogReplacer)}`);
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
exports.DyNTS_AI_LLM_ServiceBase = DyNTS_AI_LLM_ServiceBase;
|
|
379
379
|
//# sourceMappingURL=ai-llm.service-base.js.map
|