@futdevpro/nts-dynamo 1.15.105 → 1.15.110
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/.dynamo/logs/cicd-pipeline/output.log +1621 -1669
- package/.dynamo/logs/cicd-pipeline/status.json +43 -29
- package/build/_modules/ai/_collections/ai-model-config-validator.util.d.ts +32 -0
- package/build/_modules/ai/_collections/ai-model-config-validator.util.d.ts.map +1 -0
- package/build/_modules/ai/_collections/ai-model-config-validator.util.js +95 -0
- package/build/_modules/ai/_collections/ai-model-config-validator.util.js.map +1 -0
- package/build/_modules/ai/_collections/ai-provider-error.util.d.ts +44 -0
- package/build/_modules/ai/_collections/ai-provider-error.util.d.ts.map +1 -0
- package/build/_modules/ai/_collections/ai-provider-error.util.js +121 -0
- package/build/_modules/ai/_collections/ai-provider-error.util.js.map +1 -0
- package/build/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.d.ts +17 -0
- package/build/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.d.ts.map +1 -0
- package/build/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.js +3 -0
- package/build/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.d.ts +23 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.js +52 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.d.ts +34 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.js +56 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.d.ts +33 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.js +89 -0
- package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.d.ts +16 -0
- package/build/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.js +20 -0
- package/build/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.d.ts +15 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.js +3 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.d.ts +11 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.js +3 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.d.ts +30 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.js +3 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.d.ts +19 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.js +3 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.d.ts +19 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.js +3 -0
- package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.js.map +1 -0
- package/build/_modules/ai/{_services → _modules/ai-mock/_services}/ai-embedding-mock.service.d.ts +2 -2
- package/build/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.d.ts.map +1 -0
- package/build/_modules/ai/{_services → _modules/ai-mock/_services}/ai-embedding-mock.service.js +1 -1
- package/build/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.d.ts +48 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.js +104 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.d.ts +35 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.js +60 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.d.ts +60 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.js +121 -0
- package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.js.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/index.d.ts +14 -0
- package/build/_modules/ai/_modules/ai-mock/index.d.ts.map +1 -0
- package/build/_modules/ai/_modules/ai-mock/index.js +41 -0
- package/build/_modules/ai/_modules/ai-mock/index.js.map +1 -0
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.d.ts +31 -3
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.d.ts.map +1 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.js +71 -33
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.js.map +1 -1
- package/build/_modules/ai/_services/ai-embedding-provider.registry.d.ts +1 -1
- package/build/_modules/ai/_services/ai-embedding-provider.registry.d.ts.map +1 -1
- package/build/_modules/ai/_services/ai-embedding-provider.registry.js +1 -1
- package/build/_modules/ai/_services/ai-embedding-provider.registry.js.map +1 -1
- package/build/_modules/ai/_services/ai-llm.service-base.d.ts +16 -0
- package/build/_modules/ai/_services/ai-llm.service-base.d.ts.map +1 -1
- package/build/_modules/ai/_services/ai-llm.service-base.js +65 -0
- package/build/_modules/ai/_services/ai-llm.service-base.js.map +1 -1
- package/build/_modules/ai/index.d.ts +4 -1
- package/build/_modules/ai/index.d.ts.map +1 -1
- package/build/_modules/ai/index.js +9 -1
- package/build/_modules/ai/index.js.map +1 -1
- package/build/_modules/server/server-status/server-status.control-service.d.ts +10 -0
- package/build/_modules/server/server-status/server-status.control-service.d.ts.map +1 -1
- package/build/_modules/server/server-status/server-status.control-service.js +21 -0
- package/build/_modules/server/server-status/server-status.control-service.js.map +1 -1
- package/package.json +11 -2
- package/src/_modules/ai/_collections/ai-model-config-validator.util.spec.ts +150 -0
- package/src/_modules/ai/_collections/ai-model-config-validator.util.ts +131 -0
- package/src/_modules/ai/_collections/ai-provider-error.util.ts +144 -0
- package/src/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.ts +16 -0
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.spec.ts +72 -0
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.ts +71 -0
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.spec.ts +57 -0
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.ts +60 -0
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.spec.ts +56 -0
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.ts +107 -0
- package/src/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.ts +15 -0
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.ts +14 -0
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.ts +11 -0
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.ts +30 -0
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.ts +19 -0
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.ts +20 -0
- package/src/_modules/ai/{_services → _modules/ai-mock/_services}/ai-embedding-mock.service.spec.ts +1 -1
- package/src/_modules/ai/{_services → _modules/ai-mock/_services}/ai-embedding-mock.service.ts +2 -2
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.spec.ts +134 -0
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.ts +127 -0
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-pipeline.spec.ts +105 -0
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.spec.ts +50 -0
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.ts +65 -0
- package/src/_modules/ai/_modules/ai-mock/_services/aim-mock.service.spec.ts +112 -0
- package/src/_modules/ai/_modules/ai-mock/_services/aim-mock.service.ts +142 -0
- package/src/_modules/ai/_modules/ai-mock/index.ts +44 -0
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts +90 -38
- package/src/_modules/ai/_services/ai-embedding-provider.registry.spec.ts +1 -1
- package/src/_modules/ai/_services/ai-embedding-provider.registry.ts +1 -1
- package/src/_modules/ai/_services/ai-llm.service-base.reconciler.spec.ts +133 -0
- package/src/_modules/ai/_services/ai-llm.service-base.ts +80 -0
- package/src/_modules/ai/index.ts +11 -1
- package/src/_modules/server/server-status/server-status.control-service.spec.ts +40 -0
- package/src/_modules/server/server-status/server-status.control-service.ts +40 -0
- package/build/_modules/ai/_services/ai-embedding-mock.service.d.ts.map +0 -1
- package/build/_modules/ai/_services/ai-embedding-mock.service.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"pid":
|
|
3
|
-
"startedAt": "2026-07-
|
|
4
|
-
"startedAtMs":
|
|
2
|
+
"pid": 48582,
|
|
3
|
+
"startedAt": "2026-07-22T00:46:29.296Z",
|
|
4
|
+
"startedAtMs": 1784681189296,
|
|
5
5
|
"phase": "npm-publish",
|
|
6
6
|
"pipelineComplete": false,
|
|
7
7
|
"serverRunning": false,
|
|
@@ -10,63 +10,77 @@
|
|
|
10
10
|
"steps": {
|
|
11
11
|
"validate-secrets": {
|
|
12
12
|
"status": "ok",
|
|
13
|
-
"startedAt": "2026-07-
|
|
13
|
+
"startedAt": "2026-07-22T00:46:29.314Z",
|
|
14
14
|
"logLineStart": 2,
|
|
15
15
|
"logLineEnd": 8,
|
|
16
|
-
"durationSec": 0.
|
|
16
|
+
"durationSec": 0.3
|
|
17
17
|
},
|
|
18
18
|
"discord-start": {
|
|
19
19
|
"status": "ok",
|
|
20
|
-
"startedAt": "2026-07-
|
|
20
|
+
"startedAt": "2026-07-22T00:46:30.567Z",
|
|
21
21
|
"logLineStart": 9,
|
|
22
22
|
"logLineEnd": 14,
|
|
23
|
-
"durationSec":
|
|
23
|
+
"durationSec": 3.1
|
|
24
24
|
},
|
|
25
25
|
"pre-flight": {
|
|
26
26
|
"status": "ok",
|
|
27
|
-
"startedAt": "2026-07-
|
|
27
|
+
"startedAt": "2026-07-22T00:46:34.675Z",
|
|
28
28
|
"logLineStart": 15,
|
|
29
29
|
"logLineEnd": 17,
|
|
30
30
|
"durationSec": 0.2
|
|
31
31
|
},
|
|
32
32
|
"install": {
|
|
33
33
|
"status": "ok",
|
|
34
|
-
"startedAt": "2026-07-
|
|
34
|
+
"startedAt": "2026-07-22T00:46:35.872Z",
|
|
35
35
|
"logLineStart": 18,
|
|
36
|
-
"logLineEnd":
|
|
37
|
-
"durationSec":
|
|
36
|
+
"logLineEnd": 100,
|
|
37
|
+
"durationSec": 20
|
|
38
38
|
},
|
|
39
39
|
"check-dev-leftovers": {
|
|
40
40
|
"status": "ok",
|
|
41
|
-
"startedAt": "2026-07-
|
|
42
|
-
"logLineStart":
|
|
43
|
-
"logLineEnd":
|
|
44
|
-
"durationSec":
|
|
41
|
+
"startedAt": "2026-07-22T00:46:56.916Z",
|
|
42
|
+
"logLineStart": 101,
|
|
43
|
+
"logLineEnd": 110,
|
|
44
|
+
"durationSec": 10.3
|
|
45
45
|
},
|
|
46
46
|
"build": {
|
|
47
47
|
"status": "ok",
|
|
48
|
-
"startedAt": "2026-07-
|
|
49
|
-
"logLineStart":
|
|
50
|
-
"logLineEnd":
|
|
51
|
-
"durationSec":
|
|
48
|
+
"startedAt": "2026-07-22T00:47:08.195Z",
|
|
49
|
+
"logLineStart": 111,
|
|
50
|
+
"logLineEnd": 112,
|
|
51
|
+
"durationSec": 29.3
|
|
52
52
|
},
|
|
53
53
|
"test": {
|
|
54
54
|
"status": "ok",
|
|
55
|
-
"startedAt": "2026-07-
|
|
56
|
-
"logLineStart":
|
|
57
|
-
"logLineEnd":
|
|
58
|
-
"durationSec":
|
|
55
|
+
"startedAt": "2026-07-22T00:47:38.467Z",
|
|
56
|
+
"logLineStart": 113,
|
|
57
|
+
"logLineEnd": 2802,
|
|
58
|
+
"durationSec": 27.6,
|
|
59
59
|
"testSummary": {
|
|
60
|
-
"totalSpecs":
|
|
60
|
+
"totalSpecs": 1569,
|
|
61
61
|
"failures": 0,
|
|
62
|
-
"passed":
|
|
63
|
-
"testDurationSec":
|
|
64
|
-
}
|
|
62
|
+
"passed": 1569,
|
|
63
|
+
"testDurationSec": 6.55
|
|
64
|
+
},
|
|
65
|
+
"errors": [
|
|
66
|
+
{
|
|
67
|
+
"line": 1935,
|
|
68
|
+
"text": "...........(checkDbReadiness) diagnostics collection failed (non-fatal) Error: diag boom",
|
|
69
|
+
"details": "'Test API Call' was UNSUCCESSFUL\nat Object.get host [as host] (/tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/build/_modules/server/server-status/server-status.control-service.spec.js:445:36)\nat TestServerStatusControlService.checkDbReadiness (/tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/build/_modules/server/server-status/server-status.control-service.js:162:29)\nat async UserContext.<anonymous> (/tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/build/_modules/server/server-status/server-status.control-service.spec.js:448:28)",
|
|
70
|
+
"detailLineEnd": 1938
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"line": 1955,
|
|
74
|
+
"text": "(checkDbReadiness) diagnostics collection failed (non-fatal) Error: boom",
|
|
75
|
+
"details": "at runNext (/tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/node_modules/.pnpm/jasmine-core@5.10.0/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:8355:16)\nat /tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/node_modules/.pnpm/jasmine-core@5.10.0/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:8361:11\nat /tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/node_modules/.pnpm/jasmine-core@5.10.0/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:8241:9\nat UserContext.<anonymous> (/tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/build/_modules/server/server-status/server-status.control-service.spec.js:465:68)\nat QueueRunner.attempt (/tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/node_modules/.pnpm/jasmine-core@5.10.0/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:8414:40)\nat QueueRunner.run (/tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/node_modules/.pnpm/jasmine-core@5.10.0/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:8452:27)\nat runNext (/tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/node_modules/.pnpm/jasmine-core@5.10.0/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:8355:16)\nat /tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/node_modules/.pnpm/jasmine-core@5.10.0/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:8361:11\nat /tmp/pipeline-runs/4e90ce91-ed2c-4de4-877e-747eee44694b/node_modules/.pnpm/jasmine-core@5.10.0/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:8241:9",
|
|
76
|
+
"detailLineEnd": 1961
|
|
77
|
+
}
|
|
78
|
+
]
|
|
65
79
|
},
|
|
66
80
|
"npm-publish": {
|
|
67
81
|
"status": "running",
|
|
68
|
-
"startedAt": "2026-07-
|
|
69
|
-
"logLineStart":
|
|
82
|
+
"startedAt": "2026-07-22T00:48:07.146Z",
|
|
83
|
+
"logLineStart": 2803,
|
|
70
84
|
"logLineEnd": null,
|
|
71
85
|
"durationSec": null
|
|
72
86
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DyFM_Error } from '@futdevpro/fsm-dynamo';
|
|
2
|
+
import { DyFM_AI_ModelInfo } from '@futdevpro/fsm-dynamo/ai';
|
|
3
|
+
/**
|
|
4
|
+
* FR-048 **validate-mode** — a per-model `settingsSchema` szerinti config-ellenorzes MUTACIO NELKUL.
|
|
5
|
+
*
|
|
6
|
+
* Testvere a `DyNTS_AI_LLM_ServiceBase.reconcileCallSettings`-nek: a reconciler a hivas elott CSENDBEN
|
|
7
|
+
* dropol/clampel (hogy a hivas atmenjen), ez viszont HIBAT AD — igy hasznalhato **production
|
|
8
|
+
* pre-validaciora** (UI-form submit elott, backend service-boundary-n) es tesztben egyarant.
|
|
9
|
+
* **Ugyanabbol az egy forrasbol** (`settingsSchema`) dolgozik mindketto — nincs parhuzamos szabaly-keszlet.
|
|
10
|
+
*
|
|
11
|
+
* A visszateres `null` = OK; kulonben provider-faithful `DyFM_Error` (a nativ hiba-body az
|
|
12
|
+
* `additionalContent.providerErrorBody`-ban).
|
|
13
|
+
*
|
|
14
|
+
* Ismeretlen modell / schema-mentes registry-bejegyzes → `null` (permissziv, best-effort) — NEM talalgatunk.
|
|
15
|
+
*/
|
|
16
|
+
export declare class DyNTS_AI_ModelConfig_Validator {
|
|
17
|
+
/**
|
|
18
|
+
* Egy hivas-config ellenorzese a modell `settingsSchema`-ja ellen.
|
|
19
|
+
* @param set - provider + modell + a vizsgalando config + a provider modell-registry-je
|
|
20
|
+
*/
|
|
21
|
+
static validate(set: {
|
|
22
|
+
provider: string;
|
|
23
|
+
model: string;
|
|
24
|
+
config?: Record<string, unknown>;
|
|
25
|
+
registry: DyFM_AI_ModelInfo[];
|
|
26
|
+
}): DyFM_Error;
|
|
27
|
+
/** A `constraints` (allowed / min / max) ellenorzese. `null` = OK. */
|
|
28
|
+
private static validateConstraints;
|
|
29
|
+
/** Provider-faithful hiba-leiroból a `DyFM_Error`. */
|
|
30
|
+
private static toError;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ai-model-config-validator.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-model-config-validator.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_collections/ai-model-config-validator.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,iBAAiB,EAIlB,MAAM,0BAA0B,CAAC;AAKlC;;;;;;;;;;;;GAYG;AACH,qBAAa,8BAA8B;IAEzC;;;OAGG;IACH,MAAM,CAAC,QAAQ,CACb,GAAG,EAAE;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACjC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;KAC/B,GACA,UAAU;IAkCb,sEAAsE;IACtE,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAiDlC,sDAAsD;IACtD,OAAO,CAAC,MAAM,CAAC,OAAO;CAQvB"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_AI_ModelConfig_Validator = void 0;
|
|
4
|
+
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
5
|
+
const ai_1 = require("@futdevpro/fsm-dynamo/ai");
|
|
6
|
+
const ai_provider_error_util_1 = require("./ai-provider-error.util");
|
|
7
|
+
/**
|
|
8
|
+
* FR-048 **validate-mode** — a per-model `settingsSchema` szerinti config-ellenorzes MUTACIO NELKUL.
|
|
9
|
+
*
|
|
10
|
+
* Testvere a `DyNTS_AI_LLM_ServiceBase.reconcileCallSettings`-nek: a reconciler a hivas elott CSENDBEN
|
|
11
|
+
* dropol/clampel (hogy a hivas atmenjen), ez viszont HIBAT AD — igy hasznalhato **production
|
|
12
|
+
* pre-validaciora** (UI-form submit elott, backend service-boundary-n) es tesztben egyarant.
|
|
13
|
+
* **Ugyanabbol az egy forrasbol** (`settingsSchema`) dolgozik mindketto — nincs parhuzamos szabaly-keszlet.
|
|
14
|
+
*
|
|
15
|
+
* A visszateres `null` = OK; kulonben provider-faithful `DyFM_Error` (a nativ hiba-body az
|
|
16
|
+
* `additionalContent.providerErrorBody`-ban).
|
|
17
|
+
*
|
|
18
|
+
* Ismeretlen modell / schema-mentes registry-bejegyzes → `null` (permissziv, best-effort) — NEM talalgatunk.
|
|
19
|
+
*/
|
|
20
|
+
class DyNTS_AI_ModelConfig_Validator {
|
|
21
|
+
/**
|
|
22
|
+
* Egy hivas-config ellenorzese a modell `settingsSchema`-ja ellen.
|
|
23
|
+
* @param set - provider + modell + a vizsgalando config + a provider modell-registry-je
|
|
24
|
+
*/
|
|
25
|
+
static validate(set) {
|
|
26
|
+
if (!set.config) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
const modelInfo = ai_1.DyFM_AI_ModelRegistry_Util.findModelInfo(set.registry ?? [], set.model);
|
|
30
|
+
const schema = modelInfo?.settingsSchema;
|
|
31
|
+
if (!schema) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
// 1) NEM tamogatott parameter (a modell 400-zal elutasitana)
|
|
35
|
+
for (const param of schema.unsupported ?? []) {
|
|
36
|
+
if (set.config[param] !== undefined) {
|
|
37
|
+
return this.toError(ai_provider_error_util_1.DyNTS_AI_ProviderError_Util.buildUnsupportedParamError({
|
|
38
|
+
provider: set.provider,
|
|
39
|
+
model: set.model,
|
|
40
|
+
param: param,
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// 2) Tamogatott parameter, de ervenytelen ertek (constraints: allowed / min / max)
|
|
45
|
+
return this.validateConstraints({
|
|
46
|
+
provider: set.provider,
|
|
47
|
+
model: set.model,
|
|
48
|
+
config: set.config,
|
|
49
|
+
schema: schema,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/** A `constraints` (allowed / min / max) ellenorzese. `null` = OK. */
|
|
53
|
+
static validateConstraints(set) {
|
|
54
|
+
const constraints = set.schema.constraints ?? {};
|
|
55
|
+
for (const param of Object.keys(constraints)) {
|
|
56
|
+
const constraint = constraints[param];
|
|
57
|
+
const value = set.config[param];
|
|
58
|
+
if (value === undefined) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (constraint.allowed?.length && !constraint.allowed.includes(value)) {
|
|
62
|
+
return this.toError(ai_provider_error_util_1.DyNTS_AI_ProviderError_Util.buildInvalidValueError({
|
|
63
|
+
provider: set.provider,
|
|
64
|
+
model: set.model,
|
|
65
|
+
param: param,
|
|
66
|
+
detail: `must be one of [${constraint.allowed.join(', ')}]`,
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
if (typeof value === 'number') {
|
|
70
|
+
const belowMin = typeof constraint.min === 'number' && value < constraint.min;
|
|
71
|
+
const aboveMax = typeof constraint.max === 'number' && value > constraint.max;
|
|
72
|
+
if (belowMin || aboveMax) {
|
|
73
|
+
return this.toError(ai_provider_error_util_1.DyNTS_AI_ProviderError_Util.buildInvalidValueError({
|
|
74
|
+
provider: set.provider,
|
|
75
|
+
model: set.model,
|
|
76
|
+
param: param,
|
|
77
|
+
detail: `out of range (${constraint.min ?? '-∞'}..${constraint.max ?? '∞'})`,
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
/** Provider-faithful hiba-leiroból a `DyFM_Error`. */
|
|
85
|
+
static toError(providerError) {
|
|
86
|
+
return new fsm_dynamo_1.DyFM_Error({
|
|
87
|
+
message: `[FR-048] provider-faithful error (HTTP ${providerError.httpStatus}): ${providerError.reason}`,
|
|
88
|
+
userMessage: 'The AI request contains a parameter this model does not accept.',
|
|
89
|
+
errorCode: 'DyNTS-AICFG-UNSUP',
|
|
90
|
+
additionalContent: { providerErrorBody: providerError.providerErrorBody },
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.DyNTS_AI_ModelConfig_Validator = DyNTS_AI_ModelConfig_Validator;
|
|
95
|
+
//# sourceMappingURL=ai-model-config-validator.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-model-config-validator.util.js","sourceRoot":"","sources":["../../../../src/_modules/ai/_collections/ai-model-config-validator.util.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CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sDAAsD;IAC9C,MAAM,CAAC,OAAO,CAAC,aAAqC;QAC1D,OAAO,IAAI,uBAAU,CAAC;YACpB,OAAO,EAAE,0CAA0C,aAAa,CAAC,UAAU,MAAM,aAAa,CAAC,MAAM,EAAE;YACvG,WAAW,EAAE,iEAAiE;YAC9E,SAAS,EAAE,mBAAmB;YAC9B,iBAAiB,EAAE,EAAE,iBAAiB,EAAE,aAAa,CAAC,iBAAiB,EAAE;SAC1E,CAAC,CAAC;IACL,CAAC;CACF;AA1GD,wEA0GC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DyNTS_AI_ProviderError } from '../_models/interfaces/dynts-ai-provider-error.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Provider-faithful hiba-alakok eloallitasa a FR-048 `settingsSchema` szabalysertesekhez — ugyanaz a
|
|
4
|
+
* hiba-alak, mint amit a valodi provider adna. A forras-igazsag a `settingsSchema` (SSoT); itt CSAK a
|
|
5
|
+
* hiba formazasa tortenik, szabaly-duplikatum nincs.
|
|
6
|
+
*
|
|
7
|
+
* **Pontossag (D4):** a hiba **strukturaja** (mezok + `code`/`type`) a dokumentalt provider-alak szerint
|
|
8
|
+
* keszult; a `message` SZOVEGE a valodi capture-ig kozelites. A gepileg fogyasztott resz (`reason`, `code`,
|
|
9
|
+
* `param`, `httpStatus`) a stabil — a byte-hu message a fixture-capture passzal pontosithato.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DyNTS_AI_ProviderError_Util {
|
|
12
|
+
/** Az Anthropic provider-azonositoja (a hiba-alak valasztasahoz) — az enumbol, nem beegetett stringkent. */
|
|
13
|
+
private static readonly anthropicProviderId;
|
|
14
|
+
/**
|
|
15
|
+
* Nem tamogatott parameter → provider-hu HTTP 400 hiba-leiro.
|
|
16
|
+
* @param set - provider-azonosito + modell-azonosito + a kifogasolt parameter neve
|
|
17
|
+
*/
|
|
18
|
+
static buildUnsupportedParamError(set: {
|
|
19
|
+
provider: string;
|
|
20
|
+
model: string;
|
|
21
|
+
param: string;
|
|
22
|
+
}): DyNTS_AI_ProviderError;
|
|
23
|
+
/**
|
|
24
|
+
* Tamogatott parameter, de ERVENYTELEN ertek (tartomanyon kivul, vagy nem az engedett keszletbol) →
|
|
25
|
+
* provider-hu HTTP 400. Ez a `settingsSchema.constraints` (min/max/allowed) megsertese.
|
|
26
|
+
* @param set - provider + modell + parameter-nev + a rovid indoklas (pl. 'out of range 0..2')
|
|
27
|
+
*/
|
|
28
|
+
static buildInvalidValueError(set: {
|
|
29
|
+
provider: string;
|
|
30
|
+
model: string;
|
|
31
|
+
param: string;
|
|
32
|
+
detail: string;
|
|
33
|
+
}): DyNTS_AI_ProviderError;
|
|
34
|
+
/**
|
|
35
|
+
* Ismeretlen modell → **HTTP 404** (NEM 400), `code: 'model_not_found'`.
|
|
36
|
+
* MERT (capture 2026-07-21): `The model \`X\` does not exist or you do not have access to it.`
|
|
37
|
+
* @param set - provider + a nem letezo modell-azonosito
|
|
38
|
+
*/
|
|
39
|
+
static buildModelNotFoundError(set: {
|
|
40
|
+
provider: string;
|
|
41
|
+
model: string;
|
|
42
|
+
}): DyNTS_AI_ProviderError;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=ai-provider-error.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-provider-error.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_collections/ai-provider-error.util.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AAEjG;;;;;;;;GAQG;AACH,qBAAa,2BAA2B;IAEtC,4GAA4G;IAC5G,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAsC;IAEjF;;;OAGG;IACH,MAAM,CAAC,0BAA0B,CAC/B,GAAG,EAAE;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,GACA,sBAAsB;IAmCzB;;;;OAIG;IACH,MAAM,CAAC,sBAAsB,CAC3B,GAAG,EAAE;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,GACA,sBAAsB;IAgCzB;;;;OAIG;IACH,MAAM,CAAC,uBAAuB,CAC5B,GAAG,EAAE;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACf,GACA,sBAAsB;CA0B1B"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_AI_ProviderError_Util = void 0;
|
|
4
|
+
const ai_1 = require("@futdevpro/fsm-dynamo/ai");
|
|
5
|
+
/**
|
|
6
|
+
* Provider-faithful hiba-alakok eloallitasa a FR-048 `settingsSchema` szabalysertesekhez — ugyanaz a
|
|
7
|
+
* hiba-alak, mint amit a valodi provider adna. A forras-igazsag a `settingsSchema` (SSoT); itt CSAK a
|
|
8
|
+
* hiba formazasa tortenik, szabaly-duplikatum nincs.
|
|
9
|
+
*
|
|
10
|
+
* **Pontossag (D4):** a hiba **strukturaja** (mezok + `code`/`type`) a dokumentalt provider-alak szerint
|
|
11
|
+
* keszult; a `message` SZOVEGE a valodi capture-ig kozelites. A gepileg fogyasztott resz (`reason`, `code`,
|
|
12
|
+
* `param`, `httpStatus`) a stabil — a byte-hu message a fixture-capture passzal pontosithato.
|
|
13
|
+
*/
|
|
14
|
+
class DyNTS_AI_ProviderError_Util {
|
|
15
|
+
/** Az Anthropic provider-azonositoja (a hiba-alak valasztasahoz) — az enumbol, nem beegetett stringkent. */
|
|
16
|
+
static anthropicProviderId = ai_1.DyFM_AI_Provider.Anthropic;
|
|
17
|
+
/**
|
|
18
|
+
* Nem tamogatott parameter → provider-hu HTTP 400 hiba-leiro.
|
|
19
|
+
* @param set - provider-azonosito + modell-azonosito + a kifogasolt parameter neve
|
|
20
|
+
*/
|
|
21
|
+
static buildUnsupportedParamError(set) {
|
|
22
|
+
if (set.provider === this.anthropicProviderId) {
|
|
23
|
+
return {
|
|
24
|
+
httpStatus: 400,
|
|
25
|
+
providerErrorBody: {
|
|
26
|
+
type: 'error',
|
|
27
|
+
error: {
|
|
28
|
+
type: 'invalid_request_error',
|
|
29
|
+
// MERT (capture 2026-07-21, claude-opus-4-8 + temperature): a valodi uzenet ez, NEM a korabbi
|
|
30
|
+
// kozelitesem ("Extra inputs are not permitted").
|
|
31
|
+
message: `\`${set.param}\` is deprecated for this model.`,
|
|
32
|
+
},
|
|
33
|
+
// VERIFIED (capture 2026-07-21): a valodi Anthropic hiba-body TOP-LEVEL `request_id`-t is hoz —
|
|
34
|
+
// ez korabban hianyzott a sablonbol. Fixture-oknel a rogzitett valodi ertek szerepel; itt
|
|
35
|
+
// szintetikus placeholder, hogy az ALAK hu legyen.
|
|
36
|
+
request_id: 'req_mock',
|
|
37
|
+
},
|
|
38
|
+
reason: `invalid_request_error:${set.param}`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
httpStatus: 400,
|
|
43
|
+
providerErrorBody: {
|
|
44
|
+
error: {
|
|
45
|
+
message: `Unsupported parameter: '${set.param}' is not supported with model '${set.model}'.`,
|
|
46
|
+
type: 'invalid_request_error',
|
|
47
|
+
param: set.param,
|
|
48
|
+
code: 'unsupported_parameter',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
reason: `unsupported_parameter:${set.param}`,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Tamogatott parameter, de ERVENYTELEN ertek (tartomanyon kivul, vagy nem az engedett keszletbol) →
|
|
56
|
+
* provider-hu HTTP 400. Ez a `settingsSchema.constraints` (min/max/allowed) megsertese.
|
|
57
|
+
* @param set - provider + modell + parameter-nev + a rovid indoklas (pl. 'out of range 0..2')
|
|
58
|
+
*/
|
|
59
|
+
static buildInvalidValueError(set) {
|
|
60
|
+
if (set.provider === this.anthropicProviderId) {
|
|
61
|
+
return {
|
|
62
|
+
httpStatus: 400,
|
|
63
|
+
providerErrorBody: {
|
|
64
|
+
type: 'error',
|
|
65
|
+
error: {
|
|
66
|
+
type: 'invalid_request_error',
|
|
67
|
+
message: `${set.param}: ${set.detail} (model '${set.model}').`,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
reason: `invalid_request_error:${set.param}`,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
// MERT (capture 2026-07-21, gpt-4o-mini + temperature: 3): a valodi OpenAI range-hiba kodja
|
|
74
|
+
// `decimal_above_max_value`, NEM az altalam felteteleztt `invalid_value`, es a message formatuma ez:
|
|
75
|
+
// "Invalid 'temperature': decimal above maximum value. Expected a value <= 2, but got 3 instead."
|
|
76
|
+
return {
|
|
77
|
+
httpStatus: 400,
|
|
78
|
+
providerErrorBody: {
|
|
79
|
+
error: {
|
|
80
|
+
message: `Invalid '${set.param}': ${set.detail}.`,
|
|
81
|
+
type: 'invalid_request_error',
|
|
82
|
+
param: set.param,
|
|
83
|
+
code: 'decimal_above_max_value',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
reason: `invalid_value:${set.param}`,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Ismeretlen modell → **HTTP 404** (NEM 400), `code: 'model_not_found'`.
|
|
91
|
+
* MERT (capture 2026-07-21): `The model \`X\` does not exist or you do not have access to it.`
|
|
92
|
+
* @param set - provider + a nem letezo modell-azonosito
|
|
93
|
+
*/
|
|
94
|
+
static buildModelNotFoundError(set) {
|
|
95
|
+
if (set.provider === this.anthropicProviderId) {
|
|
96
|
+
return {
|
|
97
|
+
httpStatus: 404,
|
|
98
|
+
providerErrorBody: {
|
|
99
|
+
type: 'error',
|
|
100
|
+
error: { type: 'not_found_error', message: `model: ${set.model}` },
|
|
101
|
+
request_id: 'req_mock',
|
|
102
|
+
},
|
|
103
|
+
reason: `not_found_error:${set.model}`,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
httpStatus: 404,
|
|
108
|
+
providerErrorBody: {
|
|
109
|
+
error: {
|
|
110
|
+
message: `The model \`${set.model}\` does not exist or you do not have access to it.`,
|
|
111
|
+
type: 'invalid_request_error',
|
|
112
|
+
param: null,
|
|
113
|
+
code: 'model_not_found',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
reason: `model_not_found:${set.model}`,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
exports.DyNTS_AI_ProviderError_Util = DyNTS_AI_ProviderError_Util;
|
|
121
|
+
//# sourceMappingURL=ai-provider-error.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-provider-error.util.js","sourceRoot":"","sources":["../../../../src/_modules/ai/_collections/ai-provider-error.util.ts"],"names":[],"mappings":";;;AAAA,iDAA4D;AAI5D;;;;;;;;GAQG;AACH,MAAa,2BAA2B;IAEtC,4GAA4G;IACpG,MAAM,CAAU,mBAAmB,GAAW,qBAAgB,CAAC,SAAS,CAAC;IAEjF;;;OAGG;IACH,MAAM,CAAC,0BAA0B,CAC/B,GAIC;QAED,IAAI,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC9C,OAAO;gBACL,UAAU,EAAE,GAAG;gBACf,iBAAiB,EAAE;oBACjB,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL,IAAI,EAAE,uBAAuB;wBAC7B,8FAA8F;wBAC9F,kDAAkD;wBAClD,OAAO,EAAE,KAAK,GAAG,CAAC,KAAK,kCAAkC;qBAC1D;oBACD,gGAAgG;oBAChG,0FAA0F;o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EAAE;SACrC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,uBAAuB,CAC5B,GAGC;QAED,IAAI,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC9C,OAAO;gBACL,UAAU,EAAE,GAAG;gBACf,iBAAiB,EAAE;oBACjB,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,GAAG,CAAC,KAAK,EAAE,EAAE;oBAClE,UAAU,EAAE,UAAU;iBACvB;gBACD,MAAM,EAAE,mBAAmB,GAAG,CAAC,KAAK,EAAE;aACvC,CAAC;QACJ,CAAC;QAED,OAAO;YACL,UAAU,EAAE,GAAG;YACf,iBAAiB,EAAE;gBACjB,KAAK,EAAE;oBACL,OAAO,EAAE,eAAe,GAAG,CAAC,KAAK,oDAAoD;oBACrF,IAAI,EAAE,uBAAuB;oBAC7B,KAAK,EAAE,IAAI;oBACX,IAAI,EAAE,iBAAiB;iBACxB;aACF;YACD,MAAM,EAAE,mBAAmB,GAAG,CAAC,KAAK,EAAE;SACvC,CAAC;IACJ,CAAC;;AAjIH,kEAkIC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-faithful hiba-leiro — azt irja le, MILYEN hibat adna a valodi provider egy szabalytalan
|
|
3
|
+
* hivasra (FR-048). A `providerErrorBody` a provider NATIV hiba-JSON-ja (OpenAI:
|
|
4
|
+
* `{error:{message,type,param,code}}`, Anthropic: `{type:'error',error:{type,message}}`).
|
|
5
|
+
*
|
|
6
|
+
* Egy helyen definialva, hogy a Layer A validator (`DyNTS_AI_ModelConfig_Validator`) es a Layer B
|
|
7
|
+
* mock-fixture-ok UGYANAZT az alakot hasznaljak — nincs parhuzamos hiba-shape (SSoT).
|
|
8
|
+
*/
|
|
9
|
+
export interface DyNTS_AI_ProviderError {
|
|
10
|
+
/** A reprodukalando HTTP-statusz (pl. 400). */
|
|
11
|
+
httpStatus: number;
|
|
12
|
+
/** A provider nativ hiba-body-ja. */
|
|
13
|
+
providerErrorBody: unknown;
|
|
14
|
+
/** Rovid, gepi ok-jeloles (pl. 'unsupported_parameter:temperature'). */
|
|
15
|
+
reason: string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=dynts-ai-provider-error.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynts-ai-provider-error.interface.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynts-ai-provider-error.interface.js","sourceRoot":"","sources":["../../../../../src/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DyFM_AI_Provider } from '@futdevpro/fsm-dynamo/ai';
|
|
2
|
+
import { DyNTS_AIMock_Modality } from '../_enums/aim-modality.enum';
|
|
3
|
+
import { DyNTS_AIMock_Fixture } from '../_models/interfaces/aim-fixture.interface';
|
|
4
|
+
import { DyNTS_AIMock_ServiceCollection } from '../_models/interfaces/aim-service-collection.interface';
|
|
5
|
+
/**
|
|
6
|
+
* **Default-bundle factory** (MP-7 SP-7.1) — egy hivassal osszeallit egy hasznalatra kesz AI-mock keszletet:
|
|
7
|
+
* fixture-tar + mock-provider + a config-validaciohoz bekototott modell-registry.
|
|
8
|
+
*
|
|
9
|
+
* A `fdp-templates` `getApiDefaultSettings`-mintajat koveti: a consumer teszt-modul egyetlen sorral kap egy
|
|
10
|
+
* mukodo mockot, es DI-vel a valodi provider helyere teheti.
|
|
11
|
+
*
|
|
12
|
+
* @param set - opcionalis szukites: mely providerek registry-je legyen bekotve, mely modalitasok
|
|
13
|
+
* fixture-oi keruljenek be, es a kezdo fixture-keszlet.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getDefaultAiMockServiceCollection(set?: {
|
|
16
|
+
/** Mely providerek registry-je legyen bekotve a config-validaciohoz (default: mind a harom schema-s). */
|
|
17
|
+
providers?: DyFM_AI_Provider[];
|
|
18
|
+
/** Ha meg van adva, CSAK az itt felsorolt modalitasu fixture-ok kerulnek a tarba. */
|
|
19
|
+
modalities?: DyNTS_AIMock_Modality[];
|
|
20
|
+
/** A kezdo (beegetett) fixture-keszlet. */
|
|
21
|
+
fixtures?: DyNTS_AIMock_Fixture[];
|
|
22
|
+
}): DyNTS_AIMock_ServiceCollection;
|
|
23
|
+
//# sourceMappingURL=aim-default-collection.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aim-default-collection.util.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAK/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,8BAA8B,EAAE,MAAM,wDAAwD,CAAC;AAwBxG;;;;;;;;;GASG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,CAAC,EAAE;IACJ,yGAAyG;IACzG,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC/B,qFAAqF;IACrF,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACrC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACnC,GACA,8BAA8B,CAoBhC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDefaultAiMockServiceCollection = getDefaultAiMockServiceCollection;
|
|
4
|
+
const ai_1 = require("@futdevpro/fsm-dynamo/ai");
|
|
5
|
+
const open_ai_1 = require("@futdevpro/fsm-dynamo/ai/open-ai");
|
|
6
|
+
const anthropic_1 = require("@futdevpro/fsm-dynamo/ai/anthropic");
|
|
7
|
+
const google_1 = require("@futdevpro/fsm-dynamo/ai/google");
|
|
8
|
+
const aim_fixture_store_service_1 = require("../_services/aim-fixture-store.service");
|
|
9
|
+
const aim_mock_service_1 = require("../_services/aim-mock.service");
|
|
10
|
+
/**
|
|
11
|
+
* Provider → modell-registry hozzarendeles.
|
|
12
|
+
*
|
|
13
|
+
* CSAK azok a providerek szerepelnek, amelyeknek van FR-048 `settingsSchema`-juk — a `local-ai` es az
|
|
14
|
+
* `fdp-ai` szandekosan schema-mentes (runtime/gateway-fuggo), igy a registry-be emelesuk a validaciohoz
|
|
15
|
+
* semmit nem adna hozza. L. a fsm registry-fejleceket + `FR-048-LAYER-A.md`.
|
|
16
|
+
*/
|
|
17
|
+
const REGISTRY_BY_PROVIDER = {
|
|
18
|
+
[ai_1.DyFM_AI_Provider.OpenAI]: open_ai_1.DyFM_OAI_Models,
|
|
19
|
+
[ai_1.DyFM_AI_Provider.Anthropic]: anthropic_1.DyFM_AAI_Models,
|
|
20
|
+
[ai_1.DyFM_AI_Provider.Google]: google_1.DyFM_GAI_Models,
|
|
21
|
+
};
|
|
22
|
+
/** Provider-default: minden schema-val rendelkezo provider. */
|
|
23
|
+
const DEFAULT_PROVIDERS = [
|
|
24
|
+
ai_1.DyFM_AI_Provider.OpenAI,
|
|
25
|
+
ai_1.DyFM_AI_Provider.Anthropic,
|
|
26
|
+
ai_1.DyFM_AI_Provider.Google,
|
|
27
|
+
];
|
|
28
|
+
/**
|
|
29
|
+
* **Default-bundle factory** (MP-7 SP-7.1) — egy hivassal osszeallit egy hasznalatra kesz AI-mock keszletet:
|
|
30
|
+
* fixture-tar + mock-provider + a config-validaciohoz bekototott modell-registry.
|
|
31
|
+
*
|
|
32
|
+
* A `fdp-templates` `getApiDefaultSettings`-mintajat koveti: a consumer teszt-modul egyetlen sorral kap egy
|
|
33
|
+
* mukodo mockot, es DI-vel a valodi provider helyere teheti.
|
|
34
|
+
*
|
|
35
|
+
* @param set - opcionalis szukites: mely providerek registry-je legyen bekotve, mely modalitasok
|
|
36
|
+
* fixture-oi keruljenek be, es a kezdo fixture-keszlet.
|
|
37
|
+
*/
|
|
38
|
+
function getDefaultAiMockServiceCollection(set) {
|
|
39
|
+
const providers = set?.providers?.length ? set.providers : DEFAULT_PROVIDERS;
|
|
40
|
+
const registry = providers.reduce((all, provider) => all.concat(REGISTRY_BY_PROVIDER[provider] ?? []), []);
|
|
41
|
+
const allFixtures = set?.fixtures ?? [];
|
|
42
|
+
const fixtures = set?.modalities?.length ?
|
|
43
|
+
allFixtures.filter((fixture) => set.modalities.includes(fixture.modality)) :
|
|
44
|
+
allFixtures;
|
|
45
|
+
const store = new aim_fixture_store_service_1.DyNTS_AIMock_FixtureStore_Service(fixtures);
|
|
46
|
+
return {
|
|
47
|
+
store: store,
|
|
48
|
+
service: new aim_mock_service_1.DyNTS_AIMock_Service(store, registry),
|
|
49
|
+
registry: registry,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=aim-default-collection.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aim-default-collection.util.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.ts"],"names":[],"mappings":";;AAyCA,8EA6BC;AAtED,iDAA+E;AAC/E,8DAAmE;AACnE,kEAAqE;AACrE,4DAAkE;AAKlE,sFAA2F;AAC3F,oEAAqE;AAErE;;;;;;GAMG;AACH,MAAM,oBAAoB,GAAwC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_AIMock_Request } from '../_models/interfaces/aim-request.interface';
|
|
2
|
+
/**
|
|
3
|
+
* A fixture-match kulcs DETERMINISZTIKUS képzése. Cél: azonos „jelentésű" request → azonos kulcs,
|
|
4
|
+
* függetlenül a config-kulcsok sorrendjétől és az input whitespace-variánsaitól (különben false
|
|
5
|
+
* reject-on-unknown, l. HYPERPLAN D3 + MP-3 SP-3.1). NEM végez generálást — tiszta, hálózat-mentes.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DyNTS_AIMock_FixtureMatch_Util {
|
|
8
|
+
/**
|
|
9
|
+
* A teljes match-kulcs: `provider|model|modality|<config-hash>|<input-hash>`.
|
|
10
|
+
* @param request - a mock-hívás bemenete
|
|
11
|
+
*/
|
|
12
|
+
static buildMatchKey(request: DyNTS_AIMock_Request): string;
|
|
13
|
+
/**
|
|
14
|
+
* Csak az input-hash (a `DyNTS_AIMock_Fixture.inputHash`-hez): a kanonizált input SHA-256-ja.
|
|
15
|
+
* @param input - a modalitás-függő bemenet
|
|
16
|
+
*/
|
|
17
|
+
static buildInputHash(input: unknown): string;
|
|
18
|
+
/**
|
|
19
|
+
* Kulcs-rendezett, stabil szöveg egy config-objektumból (a config-kulcsok sorrend-függetlenségéhez).
|
|
20
|
+
* Megjegyzés: a nested-objektum mély-kanonizációja jövőbeli finomítás (a shallow key-sort a config-flat
|
|
21
|
+
* paramétereket — temperature/dimensions/size — fedi).
|
|
22
|
+
* @param config - a kanonizálandó config
|
|
23
|
+
*/
|
|
24
|
+
private static canonicalizeConfig;
|
|
25
|
+
/**
|
|
26
|
+
* Input-kanonizáció: string → trim + belső whitespace-összevonás; egyéb (pl. embedding-szöveg-tömb) →
|
|
27
|
+
* stabil JSON (a sorrend jelentős, pl. batch-embedding).
|
|
28
|
+
* @param input - a bemenet
|
|
29
|
+
*/
|
|
30
|
+
private static canonicalizeInput;
|
|
31
|
+
/** SHA-256 hex az adott szövegből. */
|
|
32
|
+
private static hash;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=aim-fixture-match.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aim-fixture-match.util.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAEnF;;;;GAIG;AACH,qBAAa,8BAA8B;IACzC;;;OAGG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM;IAO3D;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;IAI7C;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAOjC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAQhC,sCAAsC;IACtC,OAAO,CAAC,MAAM,CAAC,IAAI;CAGpB"}
|