@futdevpro/nts-dynamo 1.15.151 → 1.15.154
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/.c8rc.json +26 -26
- package/.copilot/patterns.json +7 -7
- package/.cursor/rules/__assistant_guide.mdc +30 -30
- package/.cursor/rules/__main.mdc +64 -64
- package/.cursor/rules/_ag_backend-structure.mdc +85 -85
- package/.cursor/rules/_ag_backend.mdc +16 -16
- package/.cursor/rules/_ag_debug.mdc +7 -7
- package/.cursor/rules/_ag_documentation_writing_rules.mdc +372 -372
- package/.cursor/rules/_ag_file-refactoring.mdc +113 -113
- package/.cursor/rules/_ag_fixes_rules.mdc +5 -5
- package/.cursor/rules/_ag_frontend-structure.mdc +86 -86
- package/.cursor/rules/_ag_frontend.mdc +39 -39
- package/.cursor/rules/_ag_import-rules.mdc +44 -44
- package/.cursor/rules/_ag_naming.mdc +115 -115
- package/.cursor/rules/_ag_running_commands.mdc +4 -4
- package/.cursor/rules/_ag_server-controller.mdc +5 -5
- package/.cursor/rules/_ag_should-be.mdc +6 -6
- package/.cursor/rules/_ag_swearing.mdc +47 -47
- package/.cursor/rules/ai_development_guide.md +60 -60
- package/.cursor/rules/ai_directives.md +114 -114
- package/.cursor/rules/cursor-rules.md +160 -160
- package/.cursor/rules/default-command.mdc +464 -464
- package/.cursor/rules/error_code_pattern.md +39 -39
- package/.cursor/rules/saved rule mcp server use.md +15 -15
- package/.dynamo/pipeline.cicd.config.json +190 -190
- package/.dynamo/version-bump.config.json +5 -5
- package/.github/workflows/main.yml +438 -438
- package/.husky/pre-commit +3 -3
- package/.vscode/settings.json +10 -10
- package/HOWTO.md +15 -15
- package/LICENSE +21 -21
- package/README.md +790 -749
- package/__documentations/2026-04-28-logs-module.md +49 -49
- package/__documentations/2026-05-17-oai-compatible-providers.md +229 -229
- package/__documentations/2026-05-17-static-client-serving-howto.md +144 -144
- package/__documentations/2026-06-01-fr041-cors-middleware.md +96 -96
- package/__documentations/2026-06-01-fr047-p2p3-function-calling.md +81 -81
- package/__documentations/2026-06-15-fr193-memory-guard.md +73 -73
- package/__documentations/2026-08-08-fr292-app-version-header.md +38 -38
- package/__documentations/2026-08-14-field-encryption-mongoose-document-spread.md +124 -124
- package/__documentations/2026-08-18-artifact-compiler.md +46 -46
- package/__documentations/2026-08-18-mongo-transaction-control-service.md +82 -82
- package/__documentations/2026-08-18-standalone-account-security-and-privacy-bedrock.md +132 -132
- package/__documentations/2026-08-21-distributed-rate-limit-bfr-ctm-010.md +59 -59
- package/__documentations/2026-08-22-content-free-process-error-boundary.md +91 -0
- package/__documentations/2026-08-22-npm-token-state-classifier.md +92 -92
- package/__documentations/nts-integration-tests-2026-03-17.md +26 -26
- package/__documentations/plans/BEDROCK-HYPERPLAN.md +95 -95
- package/_specifications/BACKLOG.md +92 -92
- package/_specifications/TODO.md +15 -15
- package/_specifications/agent.md +138 -138
- package/build/_models/control-models/app-params.control-model.d.ts.map +1 -1
- package/build/_models/control-models/app-params.control-model.js +1 -2
- package/build/_models/control-models/app-params.control-model.js.map +1 -1
- package/build/_modules/server/index.d.ts +8 -0
- package/build/_modules/server/index.d.ts.map +1 -1
- package/build/_modules/server/index.js +9 -0
- package/build/_modules/server/index.js.map +1 -1
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.d.ts +9 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.d.ts.map +1 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.js +13 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.js.map +1 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.d.ts +20 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.d.ts.map +1 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.js +24 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.js.map +1 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.control-service.d.ts +19 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.control-service.d.ts.map +1 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.control-service.js +83 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.control-service.js.map +1 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.interface.d.ts +19 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.interface.d.ts.map +1 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.interface.js +3 -0
- package/build/_modules/server/safe-diagnostic/safe-diagnostic.interface.js.map +1 -0
- package/build/_modules/server/server-status/db-readiness-probe-code.type-enum.d.ts +14 -0
- package/build/_modules/server/server-status/db-readiness-probe-code.type-enum.d.ts.map +1 -0
- package/build/_modules/server/server-status/db-readiness-probe-code.type-enum.js +18 -0
- package/build/_modules/server/server-status/db-readiness-probe-code.type-enum.js.map +1 -0
- package/build/_modules/server/server-status/db-readiness-probe-stage.type-enum.d.ts +8 -0
- package/build/_modules/server/server-status/db-readiness-probe-stage.type-enum.d.ts.map +1 -0
- package/build/_modules/server/server-status/db-readiness-probe-stage.type-enum.js +12 -0
- package/build/_modules/server/server-status/db-readiness-probe-stage.type-enum.js.map +1 -0
- package/build/_modules/server/server-status/db-readiness-probe.control-service.d.ts +14 -0
- package/build/_modules/server/server-status/db-readiness-probe.control-service.d.ts.map +1 -0
- package/build/_modules/server/server-status/db-readiness-probe.control-service.js +126 -0
- package/build/_modules/server/server-status/db-readiness-probe.control-service.js.map +1 -0
- package/build/_modules/server/server-status/db-readiness-probe.interface.d.ts +18 -0
- package/build/_modules/server/server-status/db-readiness-probe.interface.d.ts.map +1 -0
- package/build/_modules/server/server-status/db-readiness-probe.interface.js +3 -0
- package/build/_modules/server/server-status/db-readiness-probe.interface.js.map +1 -0
- package/build/_services/core/global.service.d.ts +3 -3
- package/build/_services/core/global.service.d.ts.map +1 -1
- package/build/_services/core/global.service.js +24 -18
- package/build/_services/core/global.service.js.map +1 -1
- package/build/_services/server/app.server.d.ts +2 -0
- package/build/_services/server/app.server.d.ts.map +1 -1
- package/build/_services/server/app.server.js +71 -199
- package/build/_services/server/app.server.js.map +1 -1
- package/eslint.config.js +3 -3
- package/nodemon.json +24 -24
- package/package.json +1 -1
- package/pnpm-workspace.yaml +6 -6
- package/scripts/_seed-out/aim-seed.fixtures.ts +161 -161
- package/scripts/_seed-out/llm-expand-raw.json +59 -59
- package/scripts/_seed-out/seed-raw.json +152 -152
- package/scripts/ai-fixture-seed.js +126 -126
- package/scripts/run-coverage-tests.js +28 -28
- package/spec/support/helpers/spec-reporter-loader.js +359 -359
- package/spec/support/helpers/ts-node-helper.js +93 -93
- package/spec/support/jasmine.coverage.json +24 -24
- package/spec/support/jasmine.json +24 -24
- package/src/_collections/app-version-header.util.spec.ts +108 -108
- package/src/_collections/app-version-header.util.ts +74 -74
- package/src/_collections/archive-service-registry.const.ts +21 -21
- package/src/_collections/archive.util.spec.ts +57 -57
- package/src/_collections/archive.util.ts +18 -18
- package/src/_collections/atlas-default-db-options.const.ts +9 -9
- package/src/_collections/client-safe-error.util.spec.ts +151 -151
- package/src/_collections/client-safe-error.util.ts +107 -107
- package/src/_collections/default-fallback-cache-max-age.const.spec.ts +11 -11
- package/src/_collections/default-fallback-cache-max-age.const.ts +2 -2
- package/src/_collections/default-not-found-page.const.spec.ts +19 -19
- package/src/_collections/default-not-found-page.const.ts +22 -22
- package/src/_collections/default-socket-path.const.spec.ts +12 -12
- package/src/_collections/default-socket-path.const.ts +2 -2
- package/src/_collections/field-encryption.util.spec.ts +195 -195
- package/src/_collections/field-encryption.util.ts +222 -222
- package/src/_collections/get-environment-settings.util.spec.ts +210 -210
- package/src/_collections/get-environment-settings.util.ts +48 -48
- package/src/_collections/global-settings.const.ts +126 -126
- package/src/_collections/load-shed.util.spec.ts +62 -62
- package/src/_collections/load-shed.util.ts +51 -51
- package/src/_collections/mongo-reconnect-guard.util.spec.ts +52 -52
- package/src/_collections/mongo-reconnect-guard.util.ts +172 -172
- package/src/_collections/npm-token-check.util.spec.ts +218 -218
- package/src/_collections/npm-token-check.util.ts +327 -327
- package/src/_collections/sample.env +21 -21
- package/src/_collections/security-headers.util.spec.ts +98 -98
- package/src/_collections/security-headers.util.ts +96 -96
- package/src/_collections/signed-url.util.spec.ts +198 -198
- package/src/_collections/signed-url.util.ts +170 -170
- package/src/_collections/star.controller.spec.ts +224 -224
- package/src/_collections/star.controller.ts +129 -129
- package/src/_collections/static-cache-control.util.spec.ts +47 -47
- package/src/_collections/static-cache-control.util.ts +25 -25
- package/src/_enums/data-model-type.enum.ts +14 -14
- package/src/_enums/data-service-function.enum.ts +24 -24
- package/src/_enums/predefined-data-types.enum.ts +16 -16
- package/src/_enums/route-security.enum.ts +12 -12
- package/src/_models/control-models/api-call-params.control-model.spec.ts +152 -152
- package/src/_models/control-models/api-call-params.control-model.ts +142 -142
- package/src/_models/control-models/app-ext-system-controls.control-model.spec.ts +52 -52
- package/src/_models/control-models/app-ext-system-controls.control-model.ts +9 -9
- package/src/_models/control-models/app-params.control-model.spec.ts +213 -209
- package/src/_models/control-models/app-params.control-model.ts +130 -129
- package/src/_models/control-models/app-system-controls.control-model.spec.ts +31 -31
- package/src/_models/control-models/app-system-controls.control-model.ts +9 -9
- package/src/_models/control-models/endpoint-params.control-model.spec.ts +669 -669
- package/src/_models/control-models/endpoint-params.control-model.ts +664 -664
- package/src/_models/control-models/http-settings.control-model.spec.ts +77 -77
- package/src/_models/control-models/http-settings.control-model.ts +37 -37
- package/src/_models/control-models/system-control.control-model.spec.ts +27 -27
- package/src/_models/control-models/system-control.control-model.ts +12 -12
- package/src/_models/data-models/schema-migration.data-model.ts +50 -50
- package/src/_models/interfaces/app-version-header-settings.interface.ts +17 -17
- package/src/_models/interfaces/certification-settings.interface.ts +7 -7
- package/src/_models/interfaces/compare-data-options.interface.ts +27 -27
- package/src/_models/interfaces/compare-data-result.interface.ts +12 -12
- package/src/_models/interfaces/cors-settings.interface.spec.ts +52 -52
- package/src/_models/interfaces/cors-settings.interface.ts +56 -56
- package/src/_models/interfaces/db-query-options.interface.ts +33 -33
- package/src/_models/interfaces/environment-settings.interface.ts +59 -59
- package/src/_models/interfaces/global-log-settings.interface.ts +171 -171
- package/src/_models/interfaces/global-service-settings.interface.ts +47 -47
- package/src/_models/interfaces/global-settings.interface.ts +294 -294
- package/src/_models/interfaces/migration-entry.interface.ts +19 -19
- package/src/_models/interfaces/mongo-transaction-settings.interface.ts +9 -9
- package/src/_models/interfaces/routing-module-settings.interface.ts +21 -21
- package/src/_models/interfaces/security-headers-settings.interface.ts +50 -50
- package/src/_models/interfaces/signed-url-verify-result.interface.ts +13 -13
- package/src/_models/interfaces/static-client-settings.interface.spec.ts +29 -29
- package/src/_models/interfaces/static-client-settings.interface.ts +36 -36
- package/src/_models/types/db-update.type.ts +100 -100
- package/src/_modules/account-security/_enums/account-challenge-purpose.type-enum.ts +5 -5
- package/src/_modules/account-security/_enums/account-refresh-token-state.type-enum.ts +6 -6
- package/src/_modules/account-security/_enums/account-session-state.type-enum.ts +6 -6
- package/src/_modules/account-security/_models/account-challenge-adapter.interface.ts +17 -17
- package/src/_modules/account-security/_models/account-challenge-issued.interface.ts +6 -6
- package/src/_modules/account-security/_models/account-challenge-record.interface.ts +13 -13
- package/src/_modules/account-security/_models/account-challenge-result.interface.ts +8 -8
- package/src/_modules/account-security/_models/account-challenge-settings.interface.ts +9 -9
- package/src/_modules/account-security/_models/account-password-policy.interface.ts +11 -11
- package/src/_modules/account-security/_models/account-password-verification.interface.ts +5 -5
- package/src/_modules/account-security/_models/account-refresh-token-record.interface.ts +13 -13
- package/src/_modules/account-security/_models/account-session-adapter.interface.ts +19 -19
- package/src/_modules/account-security/_models/account-session-claims.interface.ts +7 -7
- package/src/_modules/account-security/_models/account-session-context.interface.ts +6 -6
- package/src/_modules/account-security/_models/account-session-create.interface.ts +8 -8
- package/src/_modules/account-security/_models/account-session-record.interface.ts +21 -21
- package/src/_modules/account-security/_models/account-session-rotate.interface.ts +11 -11
- package/src/_modules/account-security/_models/account-session-settings.interface.ts +11 -11
- package/src/_modules/account-security/_models/account-session-token-pair.interface.ts +8 -8
- package/src/_modules/account-security/_models/account-session-view.interface.ts +13 -13
- package/src/_modules/account-security/account-challenge.control-service.spec.ts +195 -195
- package/src/_modules/account-security/account-challenge.control-service.ts +164 -164
- package/src/_modules/account-security/account-password.control-service.spec.ts +96 -96
- package/src/_modules/account-security/account-password.control-service.ts +288 -288
- package/src/_modules/account-security/account-session.control-service.spec.ts +294 -294
- package/src/_modules/account-security/account-session.control-service.ts +376 -376
- package/src/_modules/account-security/index.ts +31 -31
- package/src/_modules/admin-auth/_models/admin-api-key-config.interface.ts +33 -33
- package/src/_modules/admin-auth/admin-api-key.auth-service.spec.ts +200 -200
- package/src/_modules/admin-auth/admin-api-key.auth-service.ts +220 -220
- package/src/_modules/admin-auth/index.ts +2 -2
- package/src/_modules/ai/_collections/ai-model-config-validator.util.spec.ts +150 -150
- package/src/_modules/ai/_collections/ai-model-config-validator.util.ts +131 -131
- package/src/_modules/ai/_collections/ai-provider-error.util.ts +144 -144
- package/src/_modules/ai/_models/ai-input-interfaces.ts +117 -117
- package/src/_modules/ai/_models/ai-test-generation-result.interface.ts +16 -16
- package/src/_modules/ai/_models/interfaces/dynts-ai-cost-event-callback.interface.ts +14 -14
- package/src/_modules/ai/_models/interfaces/dynts-ai-cost-event.interface.ts +56 -56
- package/src/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.ts +16 -16
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.spec.ts +72 -72
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.ts +71 -71
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.spec.ts +57 -57
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.ts +60 -60
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.spec.ts +56 -56
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.ts +117 -117
- package/src/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.ts +28 -28
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.ts +14 -14
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.ts +11 -11
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.ts +30 -30
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.ts +19 -19
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.ts +20 -20
- package/src/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.spec.ts +115 -115
- package/src/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.ts +233 -233
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.spec.ts +134 -134
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.ts +127 -127
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-pipeline.spec.ts +105 -105
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.spec.ts +50 -50
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.ts +65 -65
- package/src/_modules/ai/_modules/ai-mock/_services/aim-integration-proof.spec.ts +92 -92
- package/src/_modules/ai/_modules/ai-mock/_services/aim-mock.service.spec.ts +112 -112
- package/src/_modules/ai/_modules/ai-mock/_services/aim-mock.service.ts +155 -155
- package/src/_modules/ai/_modules/ai-mock/fixtures/aim-text.fixtures.ts +649 -649
- package/src/_modules/ai/_modules/ai-mock/index.ts +47 -47
- package/src/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.ts +138 -138
- package/src/_modules/ai/_modules/anthropic/index.ts +5 -5
- package/src/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.spec.ts +242 -242
- package/src/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.ts +639 -639
- package/src/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.spec.ts +295 -295
- package/src/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.ts +552 -552
- package/src/_modules/ai/_modules/document-ai/_collections/dai-document.util.spec.ts +209 -209
- package/src/_modules/ai/_modules/document-ai/_collections/dai-document.util.ts +85 -85
- package/src/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.ts +7 -7
- package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.ts +146 -146
- package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.ts +162 -162
- package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.ts +99 -99
- package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-code-chunk.interface.ts +68 -68
- package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.ts +18 -18
- package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.ts +19 -19
- package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.ts +25 -25
- package/src/_modules/ai/_modules/document-ai/index.ts +30 -30
- package/src/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.ts +189 -189
- package/src/_modules/ai/_modules/fdp-ai/index.ts +5 -5
- package/src/_modules/ai/_modules/open-ai/_collections/oai-global-settings.const.ts +9 -9
- package/src/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.ts +82 -82
- package/src/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.ts +75 -75
- package/src/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.ts +45 -45
- package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.ts +7 -7
- package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.ts +7 -7
- package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.ts +57 -57
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-chunk-data.service.ts +292 -292
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-page.data-service.ts +572 -572
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.spec.ts +342 -342
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.ts +435 -435
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.spec.ts +550 -550
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.ts +630 -630
- package/src/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.spec.ts +332 -332
- package/src/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.ts +132 -132
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.spec.ts +462 -462
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts +634 -634
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.spec.ts +489 -489
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.tools.spec.ts +173 -173
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts +1085 -1085
- package/src/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.ts +157 -157
- package/src/_modules/ai/_modules/open-ai/index.ts +74 -74
- package/src/_modules/ai/_services/ai-embedding-provider.registry.spec.ts +110 -110
- package/src/_modules/ai/_services/ai-embedding-provider.registry.ts +114 -114
- package/src/_modules/ai/_services/ai-embedding.service-base.spec.ts +98 -98
- package/src/_modules/ai/_services/ai-embedding.service-base.ts +48 -48
- package/src/_modules/ai/_services/ai-llm-chat.service-base.spec.ts +229 -229
- package/src/_modules/ai/_services/ai-llm-chat.service-base.ts +68 -68
- package/src/_modules/ai/_services/ai-llm.service-base.reconciler.spec.ts +133 -133
- package/src/_modules/ai/_services/ai-llm.service-base.spec.ts +250 -250
- package/src/_modules/ai/_services/ai-llm.service-base.ts +599 -599
- package/src/_modules/ai/_services/ai-provider.service-base.spec.ts +158 -158
- package/src/_modules/ai/_services/ai-provider.service-base.ts +67 -67
- package/src/_modules/ai/_services/ai-user-key.service-base.ts +59 -59
- package/src/_modules/ai/_services/lmstudio-embedding.control-service.spec.ts +197 -197
- package/src/_modules/ai/_services/lmstudio-embedding.control-service.ts +399 -399
- package/src/_modules/ai/index.ts +33 -33
- package/src/_modules/artifact-compiler/_enums/artifact-compile-outcome.type-enum.ts +5 -5
- package/src/_modules/artifact-compiler/_enums/artifact-compile-stage.type-enum.ts +8 -8
- package/src/_modules/artifact-compiler/_enums/artifact-retry-class.type-enum.ts +6 -6
- package/src/_modules/artifact-compiler/_models/artifact-compile.interface.ts +35 -35
- package/src/_modules/artifact-compiler/artifact-compiler.control-service.spec.ts +151 -151
- package/src/_modules/artifact-compiler/artifact-compiler.control-service.ts +356 -356
- package/src/_modules/artifact-compiler/index.ts +9 -9
- package/src/_modules/assistant/_collections/ass-global-settings.const.ts +13 -13
- package/src/_modules/assistant/_collections/ass.util.spec.ts +176 -176
- package/src/_modules/assistant/_collections/ass.util.ts +50 -50
- package/src/_modules/assistant/_models/ass-global-settings.interface.ts +15 -15
- package/src/_modules/assistant/_services/ass-io.control-service.spec.ts +140 -140
- package/src/_modules/assistant/_services/ass-io.control-service.ts +74 -74
- package/src/_modules/assistant/_services/ass-main.control-service.spec.ts +192 -192
- package/src/_modules/assistant/_services/ass-main.control-service.ts +107 -107
- package/src/_modules/assistant/index.ts +19 -19
- package/src/_modules/bot/_collections/bot-default-commands.const.ts +12 -12
- package/src/_modules/bot/_collections/bot-global-settings.const.ts +39 -39
- package/src/_modules/bot/_models/bot-channel-wrapper.interface.ts +62 -62
- package/src/_modules/bot/_models/bot-command.interface.ts +8 -8
- package/src/_modules/bot/_models/bot-global-settings.interface.ts +96 -96
- package/src/_modules/bot/_models/bot-last-mention-date.interface.ts +6 -6
- package/src/_modules/bot/_models/bot-last-message-date.interface.ts +5 -5
- package/src/_modules/bot/_models/bot-message-wrapper.interface.ts +90 -90
- package/src/_modules/bot/_models/bot-user-wrapper.interface.ts +41 -41
- package/src/_modules/bot/_modules/discord-bot/_models/dib-platform.types.ts +9 -9
- package/src/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.spec.ts +431 -431
- package/src/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.ts +641 -641
- package/src/_modules/bot/_modules/discord-bot/index.ts +12 -12
- package/src/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.spec.ts +160 -160
- package/src/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.ts +55 -55
- package/src/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.ts +15 -15
- package/src/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.spec.ts +374 -374
- package/src/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.ts +447 -447
- package/src/_modules/bot/_modules/dynamo-bot/index.ts +15 -15
- package/src/_modules/bot/_modules/slack-bot/_models/slb-platform.types.ts +9 -9
- package/src/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.spec.ts +344 -344
- package/src/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.ts +197 -197
- package/src/_modules/bot/_modules/slack-bot/index.ts +12 -12
- package/src/_modules/bot/_modules/teams-bot/_models/teb-platform.types.ts +9 -9
- package/src/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.spec.ts +345 -345
- package/src/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.ts +197 -197
- package/src/_modules/bot/_modules/teams-bot/index.ts +11 -11
- package/src/_modules/bot/_services/bot-commands.control-service.spec.ts +116 -116
- package/src/_modules/bot/_services/bot-commands.control-service.ts +158 -158
- package/src/_modules/bot/_services/bot-io.control-service.spec.ts +285 -285
- package/src/_modules/bot/_services/bot-io.control-service.ts +329 -329
- package/src/_modules/bot/_services/bot-main.control-service.spec.ts +208 -208
- package/src/_modules/bot/_services/bot-main.control-service.ts +489 -489
- package/src/_modules/bot/_services/bot-messaging-provider.service-base.spec.ts +349 -349
- package/src/_modules/bot/_services/bot-messaging-provider.service-base.ts +158 -158
- package/src/_modules/bot/_services/bot-routines.control-service.spec.ts +111 -111
- package/src/_modules/bot/_services/bot-routines.control-service.ts +78 -78
- package/src/_modules/bot/index.ts +37 -37
- package/src/_modules/custom-data/custom-data.controller.spec.ts +49 -49
- package/src/_modules/custom-data/custom-data.controller.ts +67 -67
- package/src/_modules/custom-data/custom-data.data-service.spec.ts +54 -54
- package/src/_modules/custom-data/custom-data.data-service.ts +21 -21
- package/src/_modules/custom-data/get-custom-data-routing-module.util.spec.ts +28 -28
- package/src/_modules/custom-data/get-custom-data-routing-module.util.ts +24 -24
- package/src/_modules/custom-data/index.ts +9 -9
- package/src/_modules/data-readers/_collections/dynts-sqlite-reader.util.spec.ts +176 -176
- package/src/_modules/data-readers/_collections/dynts-sqlite-reader.util.ts +203 -203
- package/src/_modules/data-readers/_models/interfaces/dynts-sqlite-reader.interface.ts +33 -33
- package/src/_modules/data-readers/index.ts +11 -11
- package/src/_modules/defaults/_collections/default-endpoints.util.ts +487 -487
- package/src/_modules/defaults/_models/default-user.data-model.ts +72 -72
- package/src/_modules/defaults/_services/default-auth.service.spec.ts +269 -269
- package/src/_modules/defaults/_services/default-auth.service.ts +177 -177
- package/src/_modules/defaults/_services/default-socket-events.service.spec.ts +42 -42
- package/src/_modules/defaults/_services/default-socket-events.service.ts +61 -61
- package/src/_modules/defaults/_services/default-user.data-service.spec.ts +187 -187
- package/src/_modules/defaults/_services/default-user.data-service.ts +98 -98
- package/src/_modules/defaults/index.ts +17 -17
- package/src/_modules/discord-assistant/_collections/dias-global-settings.const.ts +19 -19
- package/src/_modules/discord-assistant/_collections/dias.util.spec.ts +366 -366
- package/src/_modules/discord-assistant/_collections/dias.util.ts +132 -132
- package/src/_modules/discord-assistant/_models/dias-global-settings.interface.ts +19 -19
- package/src/_modules/discord-assistant/_models/dias-knowledge.data-model.ts +52 -52
- package/src/_modules/discord-assistant/_services/dias-chunk.data-service.ts +177 -177
- package/src/_modules/discord-assistant/_services/dias-io.control-service.spec.ts +108 -108
- package/src/_modules/discord-assistant/_services/dias-io.control-service.ts +69 -69
- package/src/_modules/discord-assistant/_services/dias-main.control-service.spec.ts +22 -22
- package/src/_modules/discord-assistant/_services/dias-main.control-service.ts +27 -27
- package/src/_modules/discord-assistant/_services/dias.service-base.spec.ts +195 -195
- package/src/_modules/discord-assistant/_services/dias.service-base.ts +76 -76
- package/src/_modules/discord-assistant/index.ts +38 -38
- package/src/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.spec.ts +34 -34
- package/src/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.ts +11 -11
- package/src/_modules/discord-assistant-voiced/index.ts +36 -36
- package/src/_modules/discord-bot/_collections/dibo-default-commands.const.ts +16 -16
- package/src/_modules/discord-bot/_collections/dibo-global-settings.conts.ts +55 -55
- package/src/_modules/discord-bot/_collections/dibo-operations.util.spec.ts +214 -214
- package/src/_modules/discord-bot/_collections/dibo-operations.util.ts +387 -387
- package/src/_modules/discord-bot/_models/dibo-command.interface.ts +12 -12
- package/src/_modules/discord-bot/_models/dibo-global-settings.interface.ts +98 -98
- package/src/_modules/discord-bot/_models/dibo-last-mention-date.inteface.ts +7 -7
- package/src/_modules/discord-bot/_models/dibo-last-message-date.interface.ts +6 -6
- package/src/_modules/discord-bot/_services/dibo-commands.control-service.spec.ts +154 -154
- package/src/_modules/discord-bot/_services/dibo-commands.control-service.ts +153 -153
- package/src/_modules/discord-bot/_services/dibo-io.control-service.spec.ts +264 -264
- package/src/_modules/discord-bot/_services/dibo-io.control-service.ts +306 -306
- package/src/_modules/discord-bot/_services/dibo-main.control-service.spec.ts +408 -408
- package/src/_modules/discord-bot/_services/dibo-main.control-service.ts +487 -487
- package/src/_modules/discord-bot/_services/dibo-routines.control-service.spec.ts +105 -105
- package/src/_modules/discord-bot/_services/dibo-routines.control-service.ts +97 -97
- package/src/_modules/discord-bot/index.ts +36 -36
- package/src/_modules/local-vector-search/_enums/lvs-search-mode.enum.ts +35 -35
- package/src/_modules/local-vector-search/_models/data-models/lvs-vector-persist.data-model.ts +60 -60
- package/src/_modules/local-vector-search/_models/lvs-search-result.interface.ts +17 -17
- package/src/_modules/local-vector-search/_services/lvs-bm25.util.spec.ts +159 -159
- package/src/_modules/local-vector-search/_services/lvs-bm25.util.ts +206 -206
- package/src/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.spec.ts +418 -418
- package/src/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.ts +276 -276
- package/src/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.spec.ts +480 -480
- package/src/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.ts +416 -416
- package/src/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.spec.ts +214 -214
- package/src/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.ts +186 -186
- package/src/_modules/local-vector-search/_services/lvs-vector-persist.data-service.spec.ts +167 -167
- package/src/_modules/local-vector-search/_services/lvs-vector-persist.data-service.ts +130 -130
- package/src/_modules/local-vector-search/_services/lvs-vector-pool.control-service.spec.ts +509 -509
- package/src/_modules/local-vector-search/_services/lvs-vector-pool.control-service.ts +323 -323
- package/src/_modules/local-vector-search/index.ts +16 -16
- package/src/_modules/logs/_models/file-log-entry.interface.ts +13 -13
- package/src/_modules/logs/_models/file-log-read-result.interface.ts +37 -37
- package/src/_modules/logs/file-log.service.spec.ts +341 -341
- package/src/_modules/logs/file-log.service.ts +466 -466
- package/src/_modules/logs/file-logs.controller.spec.ts +245 -245
- package/src/_modules/logs/file-logs.controller.ts +165 -165
- package/src/_modules/logs/get-file-logs-routing-module.util.ts +51 -51
- package/src/_modules/logs/get-logs-routing-module.util.ts +36 -36
- package/src/_modules/logs/index.ts +11 -11
- package/src/_modules/logs/log-buffer.service.ts +101 -101
- package/src/_modules/logs/logs.controller.ts +109 -109
- package/src/_modules/logs/logs.service.ts +100 -100
- package/src/_modules/mcp/_models/interfaces/dynts-mcp.interface.ts +111 -111
- package/src/_modules/mcp/_services/dynts-mcp-server.service-base.spec.ts +151 -151
- package/src/_modules/mcp/_services/dynts-mcp-server.service-base.ts +125 -125
- package/src/_modules/mcp/_services/dynts-mcp.adapter.ts +168 -168
- package/src/_modules/mcp/index.ts +13 -13
- package/src/_modules/messaging/README.md +354 -354
- package/src/_modules/messaging/_collections/get-messaging-routing-module.util.ts +26 -26
- package/src/_modules/messaging/_collections/msg-global-settings.const.ts +22 -22
- package/src/_modules/messaging/_collections/msg.util.spec.ts +226 -226
- package/src/_modules/messaging/_collections/msg.util.ts +83 -83
- package/src/_modules/messaging/_models/msg-global-settings.interface.ts +37 -37
- package/src/_modules/messaging/_services/msg-conversation.data-service.ts +146 -146
- package/src/_modules/messaging/_services/msg-events.service.spec.ts +219 -219
- package/src/_modules/messaging/_services/msg-events.service.ts +267 -267
- package/src/_modules/messaging/_services/msg-integration.control-service.ts +179 -179
- package/src/_modules/messaging/_services/msg-main.control-service.spec.ts +147 -147
- package/src/_modules/messaging/_services/msg-main.control-service.ts +571 -571
- package/src/_modules/messaging/_services/msg-message.data-service.ts +129 -129
- package/src/_modules/messaging/_services/msg.controller.spec.ts +201 -201
- package/src/_modules/messaging/_services/msg.controller.ts +370 -370
- package/src/_modules/messaging/index.ts +30 -30
- package/src/_modules/mock/app-extended-server.mock.ts +201 -201
- package/src/_modules/mock/app-integration-test.mock.ts +51 -51
- package/src/_modules/mock/app-params.mock.spec.ts +21 -21
- package/src/_modules/mock/app-params.mock.ts +9 -9
- package/src/_modules/mock/app-server.mock.ts +188 -188
- package/src/_modules/mock/auth-service.mock.spec.ts +47 -47
- package/src/_modules/mock/auth-service.mock.ts +28 -28
- package/src/_modules/mock/controller.mock.spec.ts +26 -26
- package/src/_modules/mock/controller.mock.ts +16 -16
- package/src/_modules/mock/data-model.mock.spec.ts +111 -111
- package/src/_modules/mock/data-model.mock.ts +82 -82
- package/src/_modules/mock/email-service-collection.mock.spec.ts +24 -24
- package/src/_modules/mock/email-service-collection.mock.ts +15 -15
- package/src/_modules/mock/email-service.mock.spec.ts +17 -17
- package/src/_modules/mock/email-service.mock.ts +20 -20
- package/src/_modules/mock/email-template.mock.html +14 -14
- package/src/_modules/mock/endpoint.mock.ts +91 -91
- package/src/_modules/mock/socket-client.mock.spec.ts +40 -40
- package/src/_modules/mock/socket-client.mock.ts +45 -45
- package/src/_modules/mock/socket-server.mock.spec.ts +44 -44
- package/src/_modules/mock/socket-server.mock.ts +46 -46
- package/src/_modules/oauth2/_routes/oauth2.controller.spec.ts +107 -107
- package/src/_modules/oauth2/_routes/oauth2.controller.ts +98 -98
- package/src/_modules/oauth2/_services/oauth2.auth-service.spec.ts +254 -254
- package/src/_modules/oauth2/_services/oauth2.auth-service.ts +232 -232
- package/src/_modules/oauth2/_services/oauth2.control-service.spec.ts +585 -585
- package/src/_modules/oauth2/_services/oauth2.control-service.ts +653 -653
- package/src/_modules/oauth2/index.ts +17 -17
- package/src/_modules/privacy-lifecycle/_enums/privacy-consent-decision.type-enum.ts +5 -5
- package/src/_modules/privacy-lifecycle/_enums/privacy-contributor-action.type-enum.ts +10 -10
- package/src/_modules/privacy-lifecycle/_enums/privacy-contributor-outcome.type-enum.ts +7 -7
- package/src/_modules/privacy-lifecycle/_enums/privacy-request-state.type-enum.ts +15 -15
- package/src/_modules/privacy-lifecycle/_enums/privacy-request.type-enum.ts +9 -9
- package/src/_modules/privacy-lifecycle/_models/privacy-consent-input.interface.ts +12 -12
- package/src/_modules/privacy-lifecycle/_models/privacy-consent-persistence-result.interface.ts +7 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-consent-record.interface.ts +15 -15
- package/src/_modules/privacy-lifecycle/_models/privacy-consent-result.interface.ts +7 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-consent-view.interface.ts +13 -13
- package/src/_modules/privacy-lifecycle/_models/privacy-contributor-context.interface.ts +9 -9
- package/src/_modules/privacy-lifecycle/_models/privacy-contributor-outcome.interface.ts +14 -14
- package/src/_modules/privacy-lifecycle/_models/privacy-contributor-plan.interface.ts +8 -8
- package/src/_modules/privacy-lifecycle/_models/privacy-contributor.interface.ts +17 -17
- package/src/_modules/privacy-lifecycle/_models/privacy-ledger-adapter.interface.ts +21 -21
- package/src/_modules/privacy-lifecycle/_models/privacy-ledger-result.interface.ts +9 -9
- package/src/_modules/privacy-lifecycle/_models/privacy-ledger-settings.interface.ts +7 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-input.interface.ts +10 -10
- package/src/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-persistence-result.interface.ts +7 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-result.interface.ts +7 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-view.interface.ts +11 -11
- package/src/_modules/privacy-lifecycle/_models/privacy-legal-acceptance.interface.ts +13 -13
- package/src/_modules/privacy-lifecycle/_models/privacy-lifecycle-adapter.interface.ts +19 -19
- package/src/_modules/privacy-lifecycle/_models/privacy-lifecycle-settings.interface.ts +9 -9
- package/src/_modules/privacy-lifecycle/_models/privacy-request-create-result.interface.ts +7 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-request-open.interface.ts +10 -10
- package/src/_modules/privacy-lifecycle/_models/privacy-request-persistence-create-result.interface.ts +7 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-request-record.interface.ts +21 -21
- package/src/_modules/privacy-lifecycle/_models/privacy-request-result.interface.ts +8 -8
- package/src/_modules/privacy-lifecycle/_models/privacy-request-view.interface.ts +20 -20
- package/src/_modules/privacy-lifecycle/index.ts +40 -40
- package/src/_modules/privacy-lifecycle/privacy-ledger.control-service.spec.ts +206 -206
- package/src/_modules/privacy-lifecycle/privacy-ledger.control-service.ts +253 -253
- package/src/_modules/privacy-lifecycle/privacy-lifecycle.control-service.spec.ts +353 -353
- package/src/_modules/privacy-lifecycle/privacy-lifecycle.control-service.ts +586 -586
- package/src/_modules/rate-limit/_enums/rate-limit-store-kind.type-enum.ts +5 -5
- package/src/_modules/rate-limit/_models/rate-limit-config.interface.ts +82 -82
- package/src/_modules/rate-limit/_models/rate-limit-consume-request.interface.ts +9 -9
- package/src/_modules/rate-limit/_models/rate-limit-consume-result.interface.ts +6 -6
- package/src/_modules/rate-limit/_models/rate-limit-policy.interface.ts +16 -16
- package/src/_modules/rate-limit/_models/rate-limit-store.interface.ts +9 -9
- package/src/_modules/rate-limit/index.ts +8 -8
- package/src/_modules/rate-limit/rate-limit-in-memory.store.ts +91 -91
- package/src/_modules/rate-limit/rate-limit.middleware.spec.ts +488 -488
- package/src/_modules/rate-limit/rate-limit.middleware.ts +504 -504
- package/src/_modules/scheduler/_models/scheduler-job.interface.ts +35 -35
- package/src/_modules/scheduler/get-scheduler-routing-module.util.ts +33 -33
- package/src/_modules/scheduler/index.ts +8 -8
- package/src/_modules/scheduler/scheduler.controller.spec.ts +42 -42
- package/src/_modules/scheduler/scheduler.controller.ts +69 -69
- package/src/_modules/scheduler/scheduler.service.spec.ts +141 -141
- package/src/_modules/scheduler/scheduler.service.ts +176 -176
- package/src/_modules/scoped-config/_enums/dynts-scoped-config-level.enum.ts +22 -22
- package/src/_modules/scoped-config/_models/data-models/dynts-scoped-config.data-model.ts +82 -82
- package/src/_modules/scoped-config/_models/interfaces/dynts-scoped-config.interface.ts +107 -107
- package/src/_modules/scoped-config/_services/dynts-scoped-config.control-service.spec.ts +312 -312
- package/src/_modules/scoped-config/_services/dynts-scoped-config.control-service.ts +311 -311
- package/src/_modules/scoped-config/_services/dynts-scoped-config.data-service.spec.ts +123 -123
- package/src/_modules/scoped-config/_services/dynts-scoped-config.data-service.ts +108 -108
- package/src/_modules/scoped-config/index.ts +17 -17
- package/src/_modules/server/errors/errors.control-service.spec.ts +246 -246
- package/src/_modules/server/errors/errors.control-service.ts +100 -100
- package/src/_modules/server/errors/errors.controller.spec.ts +340 -340
- package/src/_modules/server/errors/errors.controller.ts +559 -559
- package/src/_modules/server/errors/errors.data-service.spec.ts +480 -480
- package/src/_modules/server/errors/errors.data-service.ts +867 -867
- package/src/_modules/server/index.ts +37 -27
- package/src/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.ts +8 -0
- package/src/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.ts +19 -0
- package/src/_modules/server/safe-diagnostic/safe-diagnostic.control-service.spec.ts +124 -0
- package/src/_modules/server/safe-diagnostic/safe-diagnostic.control-service.ts +99 -0
- package/src/_modules/server/safe-diagnostic/safe-diagnostic.interface.ts +20 -0
- package/src/_modules/server/server-status/db-readiness-probe-code.type-enum.ts +13 -0
- package/src/_modules/server/server-status/db-readiness-probe-stage.type-enum.ts +7 -0
- package/src/_modules/server/server-status/db-readiness-probe.control-service.spec.ts +235 -0
- package/src/_modules/server/server-status/db-readiness-probe.control-service.ts +158 -0
- package/src/_modules/server/server-status/db-readiness-probe.interface.ts +20 -0
- package/src/_modules/server/server-status/server-status-snapshot.control-service.spec.ts +70 -70
- package/src/_modules/server/server-status/server-status-snapshot.control-service.ts +17 -17
- package/src/_modules/server/server-status/server-status-snapshot.data-service.spec.ts +77 -77
- package/src/_modules/server/server-status/server-status-snapshot.data-service.ts +37 -37
- package/src/_modules/server/server-status/server-status.control-service.spec.ts +672 -672
- package/src/_modules/server/server-status/server-status.control-service.ts +490 -490
- package/src/_modules/server/server-status/server-status.controller.spec.ts +276 -276
- package/src/_modules/server/server-status/server-status.controller.ts +336 -336
- package/src/_modules/socket/_enums/socket-security.enum.ts +11 -11
- package/src/_modules/socket/_models/socket-client-service-params.control-model.spec.ts +32 -32
- package/src/_modules/socket/_models/socket-client-service-params.control-model.ts +22 -22
- package/src/_modules/socket/_models/socket-presence.control-model.spec.ts +165 -165
- package/src/_modules/socket/_models/socket-presence.control-model.ts +211 -211
- package/src/_modules/socket/_models/socket-server-service-params.control-model.spec.ts +69 -69
- package/src/_modules/socket/_models/socket-server-service-params.control-model.ts +33 -33
- package/src/_modules/socket/_services/socket-client.service.spec.ts +15 -15
- package/src/_modules/socket/_services/socket-client.service.ts +260 -260
- package/src/_modules/socket/_services/socket-server.service.spec.ts +272 -272
- package/src/_modules/socket/_services/socket-server.service.ts +1037 -1037
- package/src/_modules/socket/app-extended.integration.spec.ts +85 -85
- package/src/_modules/socket/app-extended.server.ts +648 -648
- package/src/_modules/socket/index.ts +42 -42
- package/src/_modules/test/get-test-routing-module.util.spec.ts +28 -28
- package/src/_modules/test/get-test-routing-module.util.ts +23 -23
- package/src/_modules/test/index.ts +11 -11
- package/src/_modules/test/test.controller.spec.ts +72 -72
- package/src/_modules/test/test.controller.ts +115 -115
- package/src/_modules/test-email-sink/_collections/test-email-pattern.const.ts +10 -10
- package/src/_modules/test-email-sink/_models/data-models/dynts-sent-test-mail.data-model.ts +41 -41
- package/src/_modules/test-email-sink/_services/dynts-test-email-sink.service.spec.ts +112 -112
- package/src/_modules/test-email-sink/_services/dynts-test-email-sink.service.ts +141 -141
- package/src/_modules/test-email-sink/get-sent-mail-routing-module.util.ts +29 -29
- package/src/_modules/test-email-sink/index.ts +11 -11
- package/src/_modules/test-email-sink/test-email-sink.controller.ts +83 -83
- package/src/_modules/usage/get-usage-routing-module.util.ts +22 -22
- package/src/_modules/usage/index.ts +15 -15
- package/src/_modules/usage/usage.controller.spec.ts +106 -106
- package/src/_modules/usage/usage.controller.ts +140 -140
- package/src/_modules/usage/usage.data-service.spec.ts +332 -332
- package/src/_modules/usage/usage.data-service.ts +185 -185
- package/src/_services/base/api.service-base.spec.ts +125 -125
- package/src/_services/base/api.service-base.ts +74 -74
- package/src/_services/base/archive-data.service.spec.ts +209 -209
- package/src/_services/base/archive-data.service.ts +228 -228
- package/src/_services/base/data.service.spec.ts +784 -784
- package/src/_services/base/data.service.ts +2792 -2792
- package/src/_services/base/db.service.encryption.spec.ts +76 -76
- package/src/_services/base/db.service.spec.ts +160 -160
- package/src/_services/base/db.service.ts +1698 -1698
- package/src/_services/base/singleton.service-base.spec.ts +28 -28
- package/src/_services/base/singleton.service-base.ts +24 -24
- package/src/_services/base/singleton.service.spec.ts +114 -114
- package/src/_services/base/singleton.service.ts +38 -38
- package/src/_services/core/api.service.spec.ts +187 -187
- package/src/_services/core/api.service.ts +627 -627
- package/src/_services/core/auth.service.spec.ts +159 -159
- package/src/_services/core/auth.service.ts +174 -174
- package/src/_services/core/collection-growth-monitor.service.spec.ts +119 -119
- package/src/_services/core/collection-growth-monitor.service.ts +234 -234
- package/src/_services/core/db-stats.service.ts +104 -104
- package/src/_services/core/diagnostics.service.spec.ts +44 -44
- package/src/_services/core/diagnostics.service.ts +158 -158
- package/src/_services/core/email.service.spec.ts +85 -85
- package/src/_services/core/email.service.ts +757 -757
- package/src/_services/core/event-loop-diag.service.spec.ts +22 -22
- package/src/_services/core/event-loop-diag.service.ts +144 -144
- package/src/_services/core/global.service.spec.ts +292 -292
- package/src/_services/core/global.service.ts +466 -465
- package/src/_services/core/memory-guard.service.spec.ts +245 -245
- package/src/_services/core/memory-guard.service.ts +481 -481
- package/src/_services/core/migration-runner.service.spec.ts +91 -91
- package/src/_services/core/migration-runner.service.ts +106 -106
- package/src/_services/core/mongo-transaction.control-service.spec.ts +165 -165
- package/src/_services/core/mongo-transaction.control-service.ts +148 -148
- package/src/_services/core/request-hunter.service.spec.ts +124 -124
- package/src/_services/core/request-hunter.service.ts +157 -157
- package/src/_services/core/service-collection.service.spec.ts +46 -46
- package/src/_services/core/service-collection.service.ts +6 -6
- package/src/_services/route/controller.service.spec.ts +53 -53
- package/src/_services/route/controller.service.ts +148 -148
- package/src/_services/route/routing-module.service.spec.ts +98 -98
- package/src/_services/route/routing-module.service.ts +330 -330
- package/src/_services/server/app-safe-diagnostic.spec.ts +124 -0
- package/src/_services/server/app.server-retention.spec.ts +106 -106
- package/src/_services/server/app.server.ts +1865 -1918
- package/src/_services/shared.static-service.spec.ts +99 -99
- package/src/_services/shared.static-service.ts +78 -78
- package/src/index.ts +117 -117
- package/tsconfig.app.json +12 -12
- package/tsconfig.json +42 -42
- package/.dynamo/logs/cicd-pipeline/output.log +0 -2883
- package/.dynamo/logs/cicd-pipeline/status.json +0 -74
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
# Dynamo NTS in-memory artifact compiler
|
|
2
|
-
|
|
3
|
-
**Contract:** `dynts-artifact-compiler/1`
|
|
4
|
-
|
|
5
|
-
**Release candidate:** `@futdevpro/nts-dynamo@1.15.144`
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
The artifact compiler turns one already policy-validated TypeScript program into a self-contained JavaScript bundle
|
|
10
|
-
for a classic browser Worker. It is a shared build capability, not a sandbox, an authorization layer or a source
|
|
11
|
-
policy validator. Consumers must validate source before compilation and execute the output inside an independently
|
|
12
|
-
enforced runtime boundary.
|
|
13
|
-
|
|
14
|
-
## Guarantees
|
|
15
|
-
|
|
16
|
-
- source is supplied through an in-memory virtual entry;
|
|
17
|
-
- output uses the asynchronous esbuild API with `bundle:true`, `platform:'browser'`, `format:'iife'` and
|
|
18
|
-
`write:false`;
|
|
19
|
-
- no sourcemap, embedded source content, legal comment file, plugin supplied by the caller or filesystem output;
|
|
20
|
-
- the TypeScript AST is traversed before bundling, so unused imports cannot disappear through tree-shaking before
|
|
21
|
-
policy evaluation;
|
|
22
|
-
- only caller-allowlisted static package roots resolve from the supplied absolute dependency directory;
|
|
23
|
-
- relative, absolute, re-export, import-equals, `require()` and dynamic `import()` module loads fail closed;
|
|
24
|
-
- transitive modules resolve only through the installed dependency graph;
|
|
25
|
-
- source and output byte limits, allowlist cardinality, package names and path fields have absolute Bedrock
|
|
26
|
-
ceilings;
|
|
27
|
-
- success returns exactly one JavaScript output with SHA-256 metadata;
|
|
28
|
-
- errors return stable codes and optional line/column only, never esbuild message text, source excerpt or path.
|
|
29
|
-
|
|
30
|
-
The output is deterministic for the same source, settings, installed lock graph, platform and compiler version. The
|
|
31
|
-
consumer must therefore version and checksum the compiler version and dependency lock together with the bundle.
|
|
32
|
-
|
|
33
|
-
## Security boundary
|
|
34
|
-
|
|
35
|
-
esbuild's own documentation explicitly states that esbuild is not a sandbox. This module never executes generated
|
|
36
|
-
code, and successful compilation must not be interpreted as permission to run it. Direct relative/absolute, Node,
|
|
37
|
-
HTTP or non-allowlisted imports fail because only package roots in `allowedPackages` can resolve from the virtual
|
|
38
|
-
entry. Trusted allowed packages may resolve their own installed transitive graph.
|
|
39
|
-
|
|
40
|
-
## Verification
|
|
41
|
-
|
|
42
|
-
The eight focused Bedrock specs cover deterministic output, a real bundled dependency, non-allowlisted imports,
|
|
43
|
-
all supported static and dynamic module-load syntax, content-free syntax diagnostics, invalid request contracts and
|
|
44
|
-
source/output budgets. Company Toolmaker is the first direct consumer under `BFR-CTM-008`. The request was
|
|
45
|
-
initially recorded as `BFR-CTM-007`, but that identifier already belonged to the atomic Mongo transaction boundary;
|
|
46
|
-
the correction preserves both trace histories.
|
|
1
|
+
# Dynamo NTS in-memory artifact compiler
|
|
2
|
+
|
|
3
|
+
**Contract:** `dynts-artifact-compiler/1`
|
|
4
|
+
|
|
5
|
+
**Release candidate:** `@futdevpro/nts-dynamo@1.15.144`
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
The artifact compiler turns one already policy-validated TypeScript program into a self-contained JavaScript bundle
|
|
10
|
+
for a classic browser Worker. It is a shared build capability, not a sandbox, an authorization layer or a source
|
|
11
|
+
policy validator. Consumers must validate source before compilation and execute the output inside an independently
|
|
12
|
+
enforced runtime boundary.
|
|
13
|
+
|
|
14
|
+
## Guarantees
|
|
15
|
+
|
|
16
|
+
- source is supplied through an in-memory virtual entry;
|
|
17
|
+
- output uses the asynchronous esbuild API with `bundle:true`, `platform:'browser'`, `format:'iife'` and
|
|
18
|
+
`write:false`;
|
|
19
|
+
- no sourcemap, embedded source content, legal comment file, plugin supplied by the caller or filesystem output;
|
|
20
|
+
- the TypeScript AST is traversed before bundling, so unused imports cannot disappear through tree-shaking before
|
|
21
|
+
policy evaluation;
|
|
22
|
+
- only caller-allowlisted static package roots resolve from the supplied absolute dependency directory;
|
|
23
|
+
- relative, absolute, re-export, import-equals, `require()` and dynamic `import()` module loads fail closed;
|
|
24
|
+
- transitive modules resolve only through the installed dependency graph;
|
|
25
|
+
- source and output byte limits, allowlist cardinality, package names and path fields have absolute Bedrock
|
|
26
|
+
ceilings;
|
|
27
|
+
- success returns exactly one JavaScript output with SHA-256 metadata;
|
|
28
|
+
- errors return stable codes and optional line/column only, never esbuild message text, source excerpt or path.
|
|
29
|
+
|
|
30
|
+
The output is deterministic for the same source, settings, installed lock graph, platform and compiler version. The
|
|
31
|
+
consumer must therefore version and checksum the compiler version and dependency lock together with the bundle.
|
|
32
|
+
|
|
33
|
+
## Security boundary
|
|
34
|
+
|
|
35
|
+
esbuild's own documentation explicitly states that esbuild is not a sandbox. This module never executes generated
|
|
36
|
+
code, and successful compilation must not be interpreted as permission to run it. Direct relative/absolute, Node,
|
|
37
|
+
HTTP or non-allowlisted imports fail because only package roots in `allowedPackages` can resolve from the virtual
|
|
38
|
+
entry. Trusted allowed packages may resolve their own installed transitive graph.
|
|
39
|
+
|
|
40
|
+
## Verification
|
|
41
|
+
|
|
42
|
+
The eight focused Bedrock specs cover deterministic output, a real bundled dependency, non-allowlisted imports,
|
|
43
|
+
all supported static and dynamic module-load syntax, content-free syntax diagnostics, invalid request contracts and
|
|
44
|
+
source/output budgets. Company Toolmaker is the first direct consumer under `BFR-CTM-008`. The request was
|
|
45
|
+
initially recorded as `BFR-CTM-007`, but that identifier already belonged to the atomic Mongo transaction boundary;
|
|
46
|
+
the correction preserves both trace histories.
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
# Mongo transaction control service
|
|
2
|
-
|
|
3
|
-
**Date:** 2026-08-18
|
|
4
|
-
**Status:** implemented and verified
|
|
5
|
-
**Bedrock capability:** atomic multi-document MongoDB business operation
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
`DyNTS_MongoTransaction_ControlService` provides one reusable Dynamo NTS transaction boundary for consumers
|
|
10
|
-
that must persist related state and audit records atomically. The first consumer is Company Toolmaker's
|
|
11
|
-
approval-gated pipeline lifecycle, where a state transition and its immutable transition event must either both
|
|
12
|
-
commit or both remain absent.
|
|
13
|
-
|
|
14
|
-
The primitive owns transaction lifecycle and safety policy. It deliberately does not own a consuming product's
|
|
15
|
-
business rules, collection schemas, idempotency contract or authorization decisions.
|
|
16
|
-
|
|
17
|
-
## Contract
|
|
18
|
-
|
|
19
|
-
The caller supplies:
|
|
20
|
-
|
|
21
|
-
- a non-empty, diagnostic-only `transactionName`;
|
|
22
|
-
- a non-empty `issuer`;
|
|
23
|
-
- an optional positive safe-integer `maxCommitTimeMs`;
|
|
24
|
-
- an asynchronous task receiving the active Mongoose `ClientSession`.
|
|
25
|
-
|
|
26
|
-
The service:
|
|
27
|
-
|
|
28
|
-
1. validates settings before allocating a session;
|
|
29
|
-
2. creates exactly one Mongoose session;
|
|
30
|
-
3. executes the task through `ClientSession.withTransaction`;
|
|
31
|
-
4. uses `snapshot` read concern, `majority` write concern and `primary` read preference;
|
|
32
|
-
5. returns the committed task value, including a legitimate `undefined` task value through an internal wrapper;
|
|
33
|
-
6. always attempts session cleanup after a session was created;
|
|
34
|
-
7. fails closed when no committed result is returned.
|
|
35
|
-
|
|
36
|
-
Every MongoDB read or write participating in the atomic operation must explicitly receive the callback's
|
|
37
|
-
session. Starting a transaction does not automatically attach the session to unrelated model calls.
|
|
38
|
-
|
|
39
|
-
Mongoose may invoke the transaction task more than once when retrying a transient transaction error. The task
|
|
40
|
-
must therefore keep all mutations inside the MongoDB transaction and must not send messages, call external
|
|
41
|
-
mutation endpoints or perform any other non-transactional side effect. Such work belongs after a successful
|
|
42
|
-
commit and requires its own idempotency contract.
|
|
43
|
-
|
|
44
|
-
## Stable failures and data minimization
|
|
45
|
-
|
|
46
|
-
| Code | Meaning |
|
|
47
|
-
|---|---|
|
|
48
|
-
| `DyNTS|MONGO_TRANSACTION|SETTINGS_INVALID` | Required settings are absent or invalid. |
|
|
49
|
-
| `DyNTS|MONGO_TRANSACTION|COMMIT_TIME_INVALID` | Commit budget is not a positive safe integer. |
|
|
50
|
-
| `DyNTS|MONGO_TRANSACTION|SESSION_FAILED` | A MongoDB session could not be created. |
|
|
51
|
-
| `DyNTS|MONGO_TRANSACTION|NO_COMMIT_RESULT` | The transaction callback produced no committed wrapper result. |
|
|
52
|
-
| `DyNTS|MONGO_TRANSACTION|FAILED` | Transaction execution or commit failed. |
|
|
53
|
-
|
|
54
|
-
Failure objects include only the transaction name and the JavaScript error class name. The original error
|
|
55
|
-
message, stack, database payload and task input are not copied into the stable error, preventing accidental
|
|
56
|
-
sensitive-data disclosure. Cleanup warnings likewise log only the transaction name and error class name.
|
|
57
|
-
|
|
58
|
-
## Deployment requirement
|
|
59
|
-
|
|
60
|
-
MongoDB multi-document transactions require a replica set or a sharded cluster. Production and integration-test
|
|
61
|
-
deployments using this primitive must therefore provide a transaction-capable MongoDB topology. A standalone
|
|
62
|
-
MongoDB process must fail the operation rather than silently degrading to non-atomic writes.
|
|
63
|
-
|
|
64
|
-
## Verification
|
|
65
|
-
|
|
66
|
-
The focused Jasmine suite covers successful commit and result forwarding, shared-session forwarding,
|
|
67
|
-
transaction failure sanitization, pre-session validation, invalid commit-budget rejection, session-creation
|
|
68
|
-
failure, missing commit result, cleanup failure tolerance and singleton access.
|
|
69
|
-
|
|
70
|
-
Measured on 2026-08-18:
|
|
71
|
-
|
|
72
|
-
- focused suite: 8 specs, 0 failures;
|
|
73
|
-
- complete package suite: 1,653 specs, 0 failures, 146 explicitly pending specs;
|
|
74
|
-
- TypeScript build: passed;
|
|
75
|
-
- changed-file ESLint: passed without findings;
|
|
76
|
-
- package-wide ESLint: completed with the repository's pre-existing warning baseline;
|
|
77
|
-
- import validator: blocked by the existing Dynamo ESLint v9 flat-config incompatibility in unrelated files;
|
|
78
|
-
- naming validator: reports the repository's existing 6,400-finding baseline in 230 files.
|
|
79
|
-
|
|
80
|
-
The two convention-validator baselines are not introduced by this capability. The changed source files pass the
|
|
81
|
-
direct ESLint gate, and the full compiler and regression suite are green. Repairing the repository-wide
|
|
82
|
-
validator baseline is separate technical-debt work and must not be represented as completed by this change.
|
|
1
|
+
# Mongo transaction control service
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-08-18
|
|
4
|
+
**Status:** implemented and verified
|
|
5
|
+
**Bedrock capability:** atomic multi-document MongoDB business operation
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
`DyNTS_MongoTransaction_ControlService` provides one reusable Dynamo NTS transaction boundary for consumers
|
|
10
|
+
that must persist related state and audit records atomically. The first consumer is Company Toolmaker's
|
|
11
|
+
approval-gated pipeline lifecycle, where a state transition and its immutable transition event must either both
|
|
12
|
+
commit or both remain absent.
|
|
13
|
+
|
|
14
|
+
The primitive owns transaction lifecycle and safety policy. It deliberately does not own a consuming product's
|
|
15
|
+
business rules, collection schemas, idempotency contract or authorization decisions.
|
|
16
|
+
|
|
17
|
+
## Contract
|
|
18
|
+
|
|
19
|
+
The caller supplies:
|
|
20
|
+
|
|
21
|
+
- a non-empty, diagnostic-only `transactionName`;
|
|
22
|
+
- a non-empty `issuer`;
|
|
23
|
+
- an optional positive safe-integer `maxCommitTimeMs`;
|
|
24
|
+
- an asynchronous task receiving the active Mongoose `ClientSession`.
|
|
25
|
+
|
|
26
|
+
The service:
|
|
27
|
+
|
|
28
|
+
1. validates settings before allocating a session;
|
|
29
|
+
2. creates exactly one Mongoose session;
|
|
30
|
+
3. executes the task through `ClientSession.withTransaction`;
|
|
31
|
+
4. uses `snapshot` read concern, `majority` write concern and `primary` read preference;
|
|
32
|
+
5. returns the committed task value, including a legitimate `undefined` task value through an internal wrapper;
|
|
33
|
+
6. always attempts session cleanup after a session was created;
|
|
34
|
+
7. fails closed when no committed result is returned.
|
|
35
|
+
|
|
36
|
+
Every MongoDB read or write participating in the atomic operation must explicitly receive the callback's
|
|
37
|
+
session. Starting a transaction does not automatically attach the session to unrelated model calls.
|
|
38
|
+
|
|
39
|
+
Mongoose may invoke the transaction task more than once when retrying a transient transaction error. The task
|
|
40
|
+
must therefore keep all mutations inside the MongoDB transaction and must not send messages, call external
|
|
41
|
+
mutation endpoints or perform any other non-transactional side effect. Such work belongs after a successful
|
|
42
|
+
commit and requires its own idempotency contract.
|
|
43
|
+
|
|
44
|
+
## Stable failures and data minimization
|
|
45
|
+
|
|
46
|
+
| Code | Meaning |
|
|
47
|
+
|---|---|
|
|
48
|
+
| `DyNTS|MONGO_TRANSACTION|SETTINGS_INVALID` | Required settings are absent or invalid. |
|
|
49
|
+
| `DyNTS|MONGO_TRANSACTION|COMMIT_TIME_INVALID` | Commit budget is not a positive safe integer. |
|
|
50
|
+
| `DyNTS|MONGO_TRANSACTION|SESSION_FAILED` | A MongoDB session could not be created. |
|
|
51
|
+
| `DyNTS|MONGO_TRANSACTION|NO_COMMIT_RESULT` | The transaction callback produced no committed wrapper result. |
|
|
52
|
+
| `DyNTS|MONGO_TRANSACTION|FAILED` | Transaction execution or commit failed. |
|
|
53
|
+
|
|
54
|
+
Failure objects include only the transaction name and the JavaScript error class name. The original error
|
|
55
|
+
message, stack, database payload and task input are not copied into the stable error, preventing accidental
|
|
56
|
+
sensitive-data disclosure. Cleanup warnings likewise log only the transaction name and error class name.
|
|
57
|
+
|
|
58
|
+
## Deployment requirement
|
|
59
|
+
|
|
60
|
+
MongoDB multi-document transactions require a replica set or a sharded cluster. Production and integration-test
|
|
61
|
+
deployments using this primitive must therefore provide a transaction-capable MongoDB topology. A standalone
|
|
62
|
+
MongoDB process must fail the operation rather than silently degrading to non-atomic writes.
|
|
63
|
+
|
|
64
|
+
## Verification
|
|
65
|
+
|
|
66
|
+
The focused Jasmine suite covers successful commit and result forwarding, shared-session forwarding,
|
|
67
|
+
transaction failure sanitization, pre-session validation, invalid commit-budget rejection, session-creation
|
|
68
|
+
failure, missing commit result, cleanup failure tolerance and singleton access.
|
|
69
|
+
|
|
70
|
+
Measured on 2026-08-18:
|
|
71
|
+
|
|
72
|
+
- focused suite: 8 specs, 0 failures;
|
|
73
|
+
- complete package suite: 1,653 specs, 0 failures, 146 explicitly pending specs;
|
|
74
|
+
- TypeScript build: passed;
|
|
75
|
+
- changed-file ESLint: passed without findings;
|
|
76
|
+
- package-wide ESLint: completed with the repository's pre-existing warning baseline;
|
|
77
|
+
- import validator: blocked by the existing Dynamo ESLint v9 flat-config incompatibility in unrelated files;
|
|
78
|
+
- naming validator: reports the repository's existing 6,400-finding baseline in 230 files.
|
|
79
|
+
|
|
80
|
+
The two convention-validator baselines are not introduced by this capability. The changed source files pass the
|
|
81
|
+
direct ESLint gate, and the full compiler and regression suite are green. Repairing the repository-wide
|
|
82
|
+
validator baseline is separate technical-debt work and must not be represented as completed by this change.
|
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
# Standalone account security and privacy Bedrock
|
|
2
|
-
|
|
3
|
-
**Date:** 2026-08-18
|
|
4
|
-
**Status:** implemented and verified at package-contract level
|
|
5
|
-
**Packages:** `@futdevpro/nts-dynamo/account-security`, `@futdevpro/nts-dynamo/privacy-lifecycle`
|
|
6
|
-
|
|
7
|
-
## Purpose and boundary
|
|
8
|
-
|
|
9
|
-
This capability lets a Dynamo application own its identity and GDPR lifecycle without redirecting to, or
|
|
10
|
-
depending on, a shared Fleet account. It is reusable Bedrock code, not a complete application account system.
|
|
11
|
-
The consuming product remains responsible for typed persistence models, email delivery, organization and
|
|
12
|
-
permission decisions, HTTP transport, secure browser credential handling, rate limiting, audit wiring and each
|
|
13
|
-
product data-domain contributor.
|
|
14
|
-
|
|
15
|
-
The modules deliberately expose direct Dynamo contracts. They do not add provider-swapping or replacement
|
|
16
|
-
abstractions around Dynamo.
|
|
17
|
-
|
|
18
|
-
## Account-security contract
|
|
19
|
-
|
|
20
|
-
### Passwords
|
|
21
|
-
|
|
22
|
-
`DyNTS_AccountPassword_ControlService` uses the versioned `dyn-scrypt-v1` format with a unique random salt,
|
|
23
|
-
bounded scrypt parameters and timing-safe verification. It supports a SHA-256 common-password denylist and
|
|
24
|
-
returns `needsRehash` when stored parameters differ from current policy. Malformed stored hashes and
|
|
25
|
-
attacker-controlled work factors produce a safe negative result while still performing bounded dummy work.
|
|
26
|
-
Passwords are never copied into errors.
|
|
27
|
-
|
|
28
|
-
### Email verification and password reset
|
|
29
|
-
|
|
30
|
-
`DyNTS_AccountChallenge_ControlService` issues opaque 256-bit-or-stronger credentials for two isolated purposes:
|
|
31
|
-
email verification and password reset. Only SHA-256 token hashes enter persistence. Issuing a replacement
|
|
32
|
-
atomically revokes its active predecessor for the same subject and purpose. Consumption must be a single
|
|
33
|
-
compare-and-set operation that validates purpose, active state and expiry before marking the record consumed.
|
|
34
|
-
Raw tokens are returned only once after successful persistence.
|
|
35
|
-
|
|
36
|
-
Enumeration-neutral register/reset responses are an HTTP-boundary responsibility: the service must not reveal
|
|
37
|
-
whether an email exists. The application must rate-limit issue and consume operations and deliver the raw token
|
|
38
|
-
only through an approved out-of-band channel.
|
|
39
|
-
|
|
40
|
-
### Sessions
|
|
41
|
-
|
|
42
|
-
`DyNTS_AccountSession_ControlService` uses opaque random access and refresh credentials; no self-contained JWT is
|
|
43
|
-
required. Only hashes are stored. An access credential resolves through an active server-side session, so
|
|
44
|
-
logout, password change, account restriction and incident response can revoke it immediately.
|
|
45
|
-
|
|
46
|
-
Refresh credentials are one-time ledger entries. Rotation uses an adapter-provided compare-and-set transaction.
|
|
47
|
-
Reuse of an already consumed credential, including a concurrent rotation race, revokes the entire family. The
|
|
48
|
-
user-safe session projection excludes subject, family and token hashes. The application decides authorization
|
|
49
|
-
before calling individual or subject-wide revocation methods.
|
|
50
|
-
|
|
51
|
-
The adapter contract is normative: session creation, token replacement and token-state changes must be atomic.
|
|
52
|
-
An in-memory or multi-step production adapter would invalidate replay protection.
|
|
53
|
-
|
|
54
|
-
## Privacy lifecycle contract
|
|
55
|
-
|
|
56
|
-
### Data-subject requests
|
|
57
|
-
|
|
58
|
-
`DyNTS_PrivacyLifecycle_ControlService` creates subject-, organization- and request-type-scoped idempotency
|
|
59
|
-
hashes. The raw idempotency key is never stored. Each request has an explicit policy-supplied deadline and uses
|
|
60
|
-
the following durable state family:
|
|
61
|
-
|
|
62
|
-
`received → identity-verified → scoped → planned → executing → verifying → completed`
|
|
63
|
-
|
|
64
|
-
Supported terminal/non-happy states are `partially-completed`, `rejected-with-reason`, `cancelled`,
|
|
65
|
-
`failed-retryable` and `failed-terminal`. The current orchestrator produces `completed` or
|
|
66
|
-
`partially-completed`; policy-specific rejection/cancellation/failure entry points remain consumer-owned until a
|
|
67
|
-
shared cross-product transition contract is justified.
|
|
68
|
-
|
|
69
|
-
Every registered contributor is ordered deterministically. Its durable `plan`, idempotent `execute` and
|
|
70
|
-
read-only `verify` operations return content-free structured outcomes. Planning finishes and is persisted before
|
|
71
|
-
the request enters `planned`; a planning failure becomes a resumable partial outcome without executing another
|
|
72
|
-
domain against an incomplete plan set. Successful contributors are skipped on resume and failed contributors
|
|
73
|
-
are retried. A retention result is valid only with an explicit matching basis code. Cross-subject reads return
|
|
74
|
-
the same not-found response as an absent request.
|
|
75
|
-
|
|
76
|
-
The consuming application must register contributors for identity, session, membership, pipelines/projects,
|
|
77
|
-
agent sessions, artifacts, audit, support, subscription/billing and backup where those domains exist. Export
|
|
78
|
-
contributors must generate machine-readable, checksummed, short-lived artifacts; erasure contributors must use
|
|
79
|
-
hard delete by default and anonymize only where a documented retention basis requires it.
|
|
80
|
-
|
|
81
|
-
### Legal acceptance and consent
|
|
82
|
-
|
|
83
|
-
`DyNTS_PrivacyLedger_ControlService` keeps legal acceptance separate from optional-purpose consent. Legal records
|
|
84
|
-
bind the subject to an exact document type, version and SHA-256 checksum. Consent is append-only and scoped by
|
|
85
|
-
purpose and policy version; withdrawal creates a new event instead of mutating history. The ledger projection
|
|
86
|
-
returns both full history and the latest decision per purpose.
|
|
87
|
-
|
|
88
|
-
Adapters must enforce tenant/subject scoping and idempotency uniqueness. Document and privacy-notice content is
|
|
89
|
-
not stored in these event records; the checksum binds the separately versioned canonical document.
|
|
90
|
-
|
|
91
|
-
## Data-minimization and diagnostics
|
|
92
|
-
|
|
93
|
-
- No password, bearer credential, challenge credential or raw idempotency key is persisted by these services.
|
|
94
|
-
- Stable error messages contain no email address, token, password, file content, cell content or contributor
|
|
95
|
-
exception text.
|
|
96
|
-
- Session context is intentionally pre-redacted: device label plus IP and user-agent hashes only.
|
|
97
|
-
- Contributor outcomes carry codes, counts, checksums and retention basis, not exported personal data.
|
|
98
|
-
- User-facing request, consent and legal-acceptance views omit idempotency hashes and request fingerprints;
|
|
99
|
-
those fields remain server-side persistence metadata.
|
|
100
|
-
- Consumers must preserve this boundary in logs, audits, HTTP errors and analytics snapshots.
|
|
101
|
-
|
|
102
|
-
## Required production integrations
|
|
103
|
-
|
|
104
|
-
Before a product can claim production readiness, it must provide and test:
|
|
105
|
-
|
|
106
|
-
1. transaction-safe MongoDB adapters for challenges, sessions, privacy requests and ledgers;
|
|
107
|
-
2. normalized unique identity records and verified-email privilege gates;
|
|
108
|
-
3. API rate limits for register, login, challenge issue/consume and refresh;
|
|
109
|
-
4. a reviewed browser credential transport/storage threat model;
|
|
110
|
-
5. organization membership and permission checks at every tenant-scoped route;
|
|
111
|
-
6. all applicable DSAR contributors, export delivery expiry and backup restore/re-erasure procedure;
|
|
112
|
-
7. content-redaction snapshots for logs, errors, analytics and audit events;
|
|
113
|
-
8. automated feature and cross-feature user-journey E2E coverage including cleanup.
|
|
114
|
-
|
|
115
|
-
## Verification
|
|
116
|
-
|
|
117
|
-
Measured on 2026-08-18:
|
|
118
|
-
|
|
119
|
-
- account password suite: 7 specs, 0 failures;
|
|
120
|
-
- session suite: 10 specs, 0 failures;
|
|
121
|
-
- one-time challenge suite: 5 specs, 0 failures;
|
|
122
|
-
- privacy lifecycle suite: 7 specs, 0 failures;
|
|
123
|
-
- privacy ledger suite: 5 specs, 0 failures;
|
|
124
|
-
- complete package suite: 1,687 specs, 0 failures, 146 explicitly pending specs;
|
|
125
|
-
- TypeScript build: passed;
|
|
126
|
-
- changed-module ESLint: passed with zero warnings;
|
|
127
|
-
- release tarball: local untracked `SKILLS.md` explicitly excluded by `.npmignore`;
|
|
128
|
-
- package import validator: existing baseline, 82 findings in 76 files;
|
|
129
|
-
- package naming validator: existing baseline, 101 findings in 68 files.
|
|
130
|
-
|
|
131
|
-
The repository-wide convention findings predate this capability and are not represented as fixed. The new
|
|
132
|
-
modules pass their direct compiler, lint and regression gates.
|
|
1
|
+
# Standalone account security and privacy Bedrock
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-08-18
|
|
4
|
+
**Status:** implemented and verified at package-contract level
|
|
5
|
+
**Packages:** `@futdevpro/nts-dynamo/account-security`, `@futdevpro/nts-dynamo/privacy-lifecycle`
|
|
6
|
+
|
|
7
|
+
## Purpose and boundary
|
|
8
|
+
|
|
9
|
+
This capability lets a Dynamo application own its identity and GDPR lifecycle without redirecting to, or
|
|
10
|
+
depending on, a shared Fleet account. It is reusable Bedrock code, not a complete application account system.
|
|
11
|
+
The consuming product remains responsible for typed persistence models, email delivery, organization and
|
|
12
|
+
permission decisions, HTTP transport, secure browser credential handling, rate limiting, audit wiring and each
|
|
13
|
+
product data-domain contributor.
|
|
14
|
+
|
|
15
|
+
The modules deliberately expose direct Dynamo contracts. They do not add provider-swapping or replacement
|
|
16
|
+
abstractions around Dynamo.
|
|
17
|
+
|
|
18
|
+
## Account-security contract
|
|
19
|
+
|
|
20
|
+
### Passwords
|
|
21
|
+
|
|
22
|
+
`DyNTS_AccountPassword_ControlService` uses the versioned `dyn-scrypt-v1` format with a unique random salt,
|
|
23
|
+
bounded scrypt parameters and timing-safe verification. It supports a SHA-256 common-password denylist and
|
|
24
|
+
returns `needsRehash` when stored parameters differ from current policy. Malformed stored hashes and
|
|
25
|
+
attacker-controlled work factors produce a safe negative result while still performing bounded dummy work.
|
|
26
|
+
Passwords are never copied into errors.
|
|
27
|
+
|
|
28
|
+
### Email verification and password reset
|
|
29
|
+
|
|
30
|
+
`DyNTS_AccountChallenge_ControlService` issues opaque 256-bit-or-stronger credentials for two isolated purposes:
|
|
31
|
+
email verification and password reset. Only SHA-256 token hashes enter persistence. Issuing a replacement
|
|
32
|
+
atomically revokes its active predecessor for the same subject and purpose. Consumption must be a single
|
|
33
|
+
compare-and-set operation that validates purpose, active state and expiry before marking the record consumed.
|
|
34
|
+
Raw tokens are returned only once after successful persistence.
|
|
35
|
+
|
|
36
|
+
Enumeration-neutral register/reset responses are an HTTP-boundary responsibility: the service must not reveal
|
|
37
|
+
whether an email exists. The application must rate-limit issue and consume operations and deliver the raw token
|
|
38
|
+
only through an approved out-of-band channel.
|
|
39
|
+
|
|
40
|
+
### Sessions
|
|
41
|
+
|
|
42
|
+
`DyNTS_AccountSession_ControlService` uses opaque random access and refresh credentials; no self-contained JWT is
|
|
43
|
+
required. Only hashes are stored. An access credential resolves through an active server-side session, so
|
|
44
|
+
logout, password change, account restriction and incident response can revoke it immediately.
|
|
45
|
+
|
|
46
|
+
Refresh credentials are one-time ledger entries. Rotation uses an adapter-provided compare-and-set transaction.
|
|
47
|
+
Reuse of an already consumed credential, including a concurrent rotation race, revokes the entire family. The
|
|
48
|
+
user-safe session projection excludes subject, family and token hashes. The application decides authorization
|
|
49
|
+
before calling individual or subject-wide revocation methods.
|
|
50
|
+
|
|
51
|
+
The adapter contract is normative: session creation, token replacement and token-state changes must be atomic.
|
|
52
|
+
An in-memory or multi-step production adapter would invalidate replay protection.
|
|
53
|
+
|
|
54
|
+
## Privacy lifecycle contract
|
|
55
|
+
|
|
56
|
+
### Data-subject requests
|
|
57
|
+
|
|
58
|
+
`DyNTS_PrivacyLifecycle_ControlService` creates subject-, organization- and request-type-scoped idempotency
|
|
59
|
+
hashes. The raw idempotency key is never stored. Each request has an explicit policy-supplied deadline and uses
|
|
60
|
+
the following durable state family:
|
|
61
|
+
|
|
62
|
+
`received → identity-verified → scoped → planned → executing → verifying → completed`
|
|
63
|
+
|
|
64
|
+
Supported terminal/non-happy states are `partially-completed`, `rejected-with-reason`, `cancelled`,
|
|
65
|
+
`failed-retryable` and `failed-terminal`. The current orchestrator produces `completed` or
|
|
66
|
+
`partially-completed`; policy-specific rejection/cancellation/failure entry points remain consumer-owned until a
|
|
67
|
+
shared cross-product transition contract is justified.
|
|
68
|
+
|
|
69
|
+
Every registered contributor is ordered deterministically. Its durable `plan`, idempotent `execute` and
|
|
70
|
+
read-only `verify` operations return content-free structured outcomes. Planning finishes and is persisted before
|
|
71
|
+
the request enters `planned`; a planning failure becomes a resumable partial outcome without executing another
|
|
72
|
+
domain against an incomplete plan set. Successful contributors are skipped on resume and failed contributors
|
|
73
|
+
are retried. A retention result is valid only with an explicit matching basis code. Cross-subject reads return
|
|
74
|
+
the same not-found response as an absent request.
|
|
75
|
+
|
|
76
|
+
The consuming application must register contributors for identity, session, membership, pipelines/projects,
|
|
77
|
+
agent sessions, artifacts, audit, support, subscription/billing and backup where those domains exist. Export
|
|
78
|
+
contributors must generate machine-readable, checksummed, short-lived artifacts; erasure contributors must use
|
|
79
|
+
hard delete by default and anonymize only where a documented retention basis requires it.
|
|
80
|
+
|
|
81
|
+
### Legal acceptance and consent
|
|
82
|
+
|
|
83
|
+
`DyNTS_PrivacyLedger_ControlService` keeps legal acceptance separate from optional-purpose consent. Legal records
|
|
84
|
+
bind the subject to an exact document type, version and SHA-256 checksum. Consent is append-only and scoped by
|
|
85
|
+
purpose and policy version; withdrawal creates a new event instead of mutating history. The ledger projection
|
|
86
|
+
returns both full history and the latest decision per purpose.
|
|
87
|
+
|
|
88
|
+
Adapters must enforce tenant/subject scoping and idempotency uniqueness. Document and privacy-notice content is
|
|
89
|
+
not stored in these event records; the checksum binds the separately versioned canonical document.
|
|
90
|
+
|
|
91
|
+
## Data-minimization and diagnostics
|
|
92
|
+
|
|
93
|
+
- No password, bearer credential, challenge credential or raw idempotency key is persisted by these services.
|
|
94
|
+
- Stable error messages contain no email address, token, password, file content, cell content or contributor
|
|
95
|
+
exception text.
|
|
96
|
+
- Session context is intentionally pre-redacted: device label plus IP and user-agent hashes only.
|
|
97
|
+
- Contributor outcomes carry codes, counts, checksums and retention basis, not exported personal data.
|
|
98
|
+
- User-facing request, consent and legal-acceptance views omit idempotency hashes and request fingerprints;
|
|
99
|
+
those fields remain server-side persistence metadata.
|
|
100
|
+
- Consumers must preserve this boundary in logs, audits, HTTP errors and analytics snapshots.
|
|
101
|
+
|
|
102
|
+
## Required production integrations
|
|
103
|
+
|
|
104
|
+
Before a product can claim production readiness, it must provide and test:
|
|
105
|
+
|
|
106
|
+
1. transaction-safe MongoDB adapters for challenges, sessions, privacy requests and ledgers;
|
|
107
|
+
2. normalized unique identity records and verified-email privilege gates;
|
|
108
|
+
3. API rate limits for register, login, challenge issue/consume and refresh;
|
|
109
|
+
4. a reviewed browser credential transport/storage threat model;
|
|
110
|
+
5. organization membership and permission checks at every tenant-scoped route;
|
|
111
|
+
6. all applicable DSAR contributors, export delivery expiry and backup restore/re-erasure procedure;
|
|
112
|
+
7. content-redaction snapshots for logs, errors, analytics and audit events;
|
|
113
|
+
8. automated feature and cross-feature user-journey E2E coverage including cleanup.
|
|
114
|
+
|
|
115
|
+
## Verification
|
|
116
|
+
|
|
117
|
+
Measured on 2026-08-18:
|
|
118
|
+
|
|
119
|
+
- account password suite: 7 specs, 0 failures;
|
|
120
|
+
- session suite: 10 specs, 0 failures;
|
|
121
|
+
- one-time challenge suite: 5 specs, 0 failures;
|
|
122
|
+
- privacy lifecycle suite: 7 specs, 0 failures;
|
|
123
|
+
- privacy ledger suite: 5 specs, 0 failures;
|
|
124
|
+
- complete package suite: 1,687 specs, 0 failures, 146 explicitly pending specs;
|
|
125
|
+
- TypeScript build: passed;
|
|
126
|
+
- changed-module ESLint: passed with zero warnings;
|
|
127
|
+
- release tarball: local untracked `SKILLS.md` explicitly excluded by `.npmignore`;
|
|
128
|
+
- package import validator: existing baseline, 82 findings in 76 files;
|
|
129
|
+
- package naming validator: existing baseline, 101 findings in 68 files.
|
|
130
|
+
|
|
131
|
+
The repository-wide convention findings predate this capability and are not represented as fixed. The new
|
|
132
|
+
modules pass their direct compiler, lint and regression gates.
|