@chanl/scenarios-core 0.4.0
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/LICENSE +21 -0
- package/dist/__tests__/e2e/test-helpers.d.ts +79 -0
- package/dist/__tests__/e2e/test-helpers.d.ts.map +1 -0
- package/dist/__tests__/e2e/test-helpers.js +162 -0
- package/dist/__tests__/e2e/test-helpers.js.map +1 -0
- package/dist/adapters/adapter-registry.d.ts +14 -0
- package/dist/adapters/adapter-registry.d.ts.map +1 -0
- package/dist/adapters/adapter-registry.js +53 -0
- package/dist/adapters/adapter-registry.js.map +1 -0
- package/dist/adapters/agent-adapter.interface.d.ts +70 -0
- package/dist/adapters/agent-adapter.interface.d.ts.map +1 -0
- package/dist/adapters/agent-adapter.interface.js +3 -0
- package/dist/adapters/agent-adapter.interface.js.map +1 -0
- package/dist/adapters/anthropic.adapter.d.ts +17 -0
- package/dist/adapters/anthropic.adapter.d.ts.map +1 -0
- package/dist/adapters/anthropic.adapter.js +145 -0
- package/dist/adapters/anthropic.adapter.js.map +1 -0
- package/dist/adapters/http.adapter.d.ts +17 -0
- package/dist/adapters/http.adapter.d.ts.map +1 -0
- package/dist/adapters/http.adapter.js +95 -0
- package/dist/adapters/http.adapter.js.map +1 -0
- package/dist/adapters/index.d.ts +6 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +22 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/openai.adapter.d.ts +17 -0
- package/dist/adapters/openai.adapter.d.ts.map +1 -0
- package/dist/adapters/openai.adapter.js +133 -0
- package/dist/adapters/openai.adapter.js.map +1 -0
- package/dist/dataset/convert.d.ts +28 -0
- package/dist/dataset/convert.d.ts.map +1 -0
- package/dist/dataset/convert.js +94 -0
- package/dist/dataset/convert.js.map +1 -0
- package/dist/dataset/formats/dpo.d.ts +41 -0
- package/dist/dataset/formats/dpo.d.ts.map +1 -0
- package/dist/dataset/formats/dpo.js +79 -0
- package/dist/dataset/formats/dpo.js.map +1 -0
- package/dist/dataset/formats/index.d.ts +4 -0
- package/dist/dataset/formats/index.d.ts.map +1 -0
- package/dist/dataset/formats/index.js +13 -0
- package/dist/dataset/formats/index.js.map +1 -0
- package/dist/dataset/formats/openai.d.ts +29 -0
- package/dist/dataset/formats/openai.d.ts.map +1 -0
- package/dist/dataset/formats/openai.js +98 -0
- package/dist/dataset/formats/openai.js.map +1 -0
- package/dist/dataset/formats/sharegpt.d.ts +31 -0
- package/dist/dataset/formats/sharegpt.d.ts.map +1 -0
- package/dist/dataset/formats/sharegpt.js +76 -0
- package/dist/dataset/formats/sharegpt.js.map +1 -0
- package/dist/dataset/index.d.ts +4 -0
- package/dist/dataset/index.d.ts.map +1 -0
- package/dist/dataset/index.js +20 -0
- package/dist/dataset/index.js.map +1 -0
- package/dist/dataset/types.d.ts +108 -0
- package/dist/dataset/types.d.ts.map +1 -0
- package/dist/dataset/types.js +7 -0
- package/dist/dataset/types.js.map +1 -0
- package/dist/execution/agent-config-resolver.d.ts +44 -0
- package/dist/execution/agent-config-resolver.d.ts.map +1 -0
- package/dist/execution/agent-config-resolver.js +76 -0
- package/dist/execution/agent-config-resolver.js.map +1 -0
- package/dist/execution/execution-processor.d.ts +75 -0
- package/dist/execution/execution-processor.d.ts.map +1 -0
- package/dist/execution/execution-processor.js +569 -0
- package/dist/execution/execution-processor.js.map +1 -0
- package/dist/execution/execution.module.d.ts +3 -0
- package/dist/execution/execution.module.d.ts.map +1 -0
- package/dist/execution/execution.module.js +56 -0
- package/dist/execution/execution.module.js.map +1 -0
- package/dist/execution/execution.service.d.ts +52 -0
- package/dist/execution/execution.service.d.ts.map +1 -0
- package/dist/execution/execution.service.js +182 -0
- package/dist/execution/execution.service.js.map +1 -0
- package/dist/execution/index.d.ts +11 -0
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/index.js +30 -0
- package/dist/execution/index.js.map +1 -0
- package/dist/execution/interfaces/job-data.interface.d.ts +38 -0
- package/dist/execution/interfaces/job-data.interface.d.ts.map +1 -0
- package/dist/execution/interfaces/job-data.interface.js +3 -0
- package/dist/execution/interfaces/job-data.interface.js.map +1 -0
- package/dist/execution/judge-llm.d.ts +35 -0
- package/dist/execution/judge-llm.d.ts.map +1 -0
- package/dist/execution/judge-llm.js +129 -0
- package/dist/execution/judge-llm.js.map +1 -0
- package/dist/execution/llm-config-resolver.d.ts +26 -0
- package/dist/execution/llm-config-resolver.d.ts.map +1 -0
- package/dist/execution/llm-config-resolver.js +99 -0
- package/dist/execution/llm-config-resolver.js.map +1 -0
- package/dist/execution/persona-llm.d.ts +29 -0
- package/dist/execution/persona-llm.d.ts.map +1 -0
- package/dist/execution/persona-llm.js +98 -0
- package/dist/execution/persona-llm.js.map +1 -0
- package/dist/execution/persona-strategy-registry.d.ts +14 -0
- package/dist/execution/persona-strategy-registry.d.ts.map +1 -0
- package/dist/execution/persona-strategy-registry.js +51 -0
- package/dist/execution/persona-strategy-registry.js.map +1 -0
- package/dist/execution/persona-strategy.interface.d.ts +88 -0
- package/dist/execution/persona-strategy.interface.d.ts.map +1 -0
- package/dist/execution/persona-strategy.interface.js +3 -0
- package/dist/execution/persona-strategy.interface.js.map +1 -0
- package/dist/execution/queue-producer.service.d.ts +21 -0
- package/dist/execution/queue-producer.service.d.ts.map +1 -0
- package/dist/execution/queue-producer.service.js +60 -0
- package/dist/execution/queue-producer.service.js.map +1 -0
- package/dist/execution/queues.config.d.ts +39 -0
- package/dist/execution/queues.config.d.ts.map +1 -0
- package/dist/execution/queues.config.js +43 -0
- package/dist/execution/queues.config.js.map +1 -0
- package/dist/execution/strategies/default.strategy.d.ts +11 -0
- package/dist/execution/strategies/default.strategy.d.ts.map +1 -0
- package/dist/execution/strategies/default.strategy.js +31 -0
- package/dist/execution/strategies/default.strategy.js.map +1 -0
- package/dist/execution/strategies/reactive.strategy.d.ts +28 -0
- package/dist/execution/strategies/reactive.strategy.d.ts.map +1 -0
- package/dist/execution/strategies/reactive.strategy.js +220 -0
- package/dist/execution/strategies/reactive.strategy.js.map +1 -0
- package/dist/execution/template-renderer.d.ts +52 -0
- package/dist/execution/template-renderer.d.ts.map +1 -0
- package/dist/execution/template-renderer.js +90 -0
- package/dist/execution/template-renderer.js.map +1 -0
- package/dist/generation/index.d.ts +2 -0
- package/dist/generation/index.d.ts.map +1 -0
- package/dist/generation/index.js +6 -0
- package/dist/generation/index.js.map +1 -0
- package/dist/generation/scenario-generator.service.d.ts +77 -0
- package/dist/generation/scenario-generator.service.d.ts.map +1 -0
- package/dist/generation/scenario-generator.service.js +272 -0
- package/dist/generation/scenario-generator.service.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/personas/dto/create-persona.dto.d.ts +61 -0
- package/dist/personas/dto/create-persona.dto.d.ts.map +1 -0
- package/dist/personas/dto/create-persona.dto.js +146 -0
- package/dist/personas/dto/create-persona.dto.js.map +1 -0
- package/dist/personas/dto/index.d.ts +3 -0
- package/dist/personas/dto/index.d.ts.map +1 -0
- package/dist/personas/dto/index.js +19 -0
- package/dist/personas/dto/index.js.map +1 -0
- package/dist/personas/dto/update-persona.dto.d.ts +8 -0
- package/dist/personas/dto/update-persona.dto.d.ts.map +1 -0
- package/dist/personas/dto/update-persona.dto.js +29 -0
- package/dist/personas/dto/update-persona.dto.js.map +1 -0
- package/dist/personas/index.d.ts +6 -0
- package/dist/personas/index.d.ts.map +1 -0
- package/dist/personas/index.js +22 -0
- package/dist/personas/index.js.map +1 -0
- package/dist/personas/persona.controller.d.ts +69 -0
- package/dist/personas/persona.controller.d.ts.map +1 -0
- package/dist/personas/persona.controller.js +282 -0
- package/dist/personas/persona.controller.js.map +1 -0
- package/dist/personas/persona.module.d.ts +3 -0
- package/dist/personas/persona.module.d.ts.map +1 -0
- package/dist/personas/persona.module.js +28 -0
- package/dist/personas/persona.module.js.map +1 -0
- package/dist/personas/persona.service.d.ts +85 -0
- package/dist/personas/persona.service.d.ts.map +1 -0
- package/dist/personas/persona.service.js +382 -0
- package/dist/personas/persona.service.js.map +1 -0
- package/dist/personas/schemas/persona.schema.d.ts +90 -0
- package/dist/personas/schemas/persona.schema.d.ts.map +1 -0
- package/dist/personas/schemas/persona.schema.js +321 -0
- package/dist/personas/schemas/persona.schema.js.map +1 -0
- package/dist/scenarios/controllers/scenario-execution.controller.d.ts +48 -0
- package/dist/scenarios/controllers/scenario-execution.controller.d.ts.map +1 -0
- package/dist/scenarios/controllers/scenario-execution.controller.js +260 -0
- package/dist/scenarios/controllers/scenario-execution.controller.js.map +1 -0
- package/dist/scenarios/controllers/scenario.controller.d.ts +81 -0
- package/dist/scenarios/controllers/scenario.controller.d.ts.map +1 -0
- package/dist/scenarios/controllers/scenario.controller.js +345 -0
- package/dist/scenarios/controllers/scenario.controller.js.map +1 -0
- package/dist/scenarios/dto/create-scenario.dto.d.ts +31 -0
- package/dist/scenarios/dto/create-scenario.dto.d.ts.map +1 -0
- package/dist/scenarios/dto/create-scenario.dto.js +102 -0
- package/dist/scenarios/dto/create-scenario.dto.js.map +1 -0
- package/dist/scenarios/dto/execute-scenario.dto.d.ts +34 -0
- package/dist/scenarios/dto/execute-scenario.dto.d.ts.map +1 -0
- package/dist/scenarios/dto/execute-scenario.dto.js +150 -0
- package/dist/scenarios/dto/execute-scenario.dto.js.map +1 -0
- package/dist/scenarios/dto/index.d.ts +4 -0
- package/dist/scenarios/dto/index.d.ts.map +1 -0
- package/dist/scenarios/dto/index.js +20 -0
- package/dist/scenarios/dto/index.js.map +1 -0
- package/dist/scenarios/dto/update-scenario.dto.d.ts +6 -0
- package/dist/scenarios/dto/update-scenario.dto.d.ts.map +1 -0
- package/dist/scenarios/dto/update-scenario.dto.js +9 -0
- package/dist/scenarios/dto/update-scenario.dto.js.map +1 -0
- package/dist/scenarios/index.d.ts +9 -0
- package/dist/scenarios/index.d.ts.map +1 -0
- package/dist/scenarios/index.js +25 -0
- package/dist/scenarios/index.js.map +1 -0
- package/dist/scenarios/scenario.module.d.ts +3 -0
- package/dist/scenarios/scenario.module.d.ts.map +1 -0
- package/dist/scenarios/scenario.module.js +42 -0
- package/dist/scenarios/scenario.module.js.map +1 -0
- package/dist/scenarios/schemas/scenario-execution.schema.d.ts +133 -0
- package/dist/scenarios/schemas/scenario-execution.schema.d.ts.map +1 -0
- package/dist/scenarios/schemas/scenario-execution.schema.js +292 -0
- package/dist/scenarios/schemas/scenario-execution.schema.js.map +1 -0
- package/dist/scenarios/schemas/scenario.schema.d.ts +106 -0
- package/dist/scenarios/schemas/scenario.schema.d.ts.map +1 -0
- package/dist/scenarios/schemas/scenario.schema.js +205 -0
- package/dist/scenarios/schemas/scenario.schema.js.map +1 -0
- package/dist/scenarios/services/scenario-execution.service.d.ts +73 -0
- package/dist/scenarios/services/scenario-execution.service.d.ts.map +1 -0
- package/dist/scenarios/services/scenario-execution.service.js +505 -0
- package/dist/scenarios/services/scenario-execution.service.js.map +1 -0
- package/dist/scenarios/services/scenario.service.d.ts +110 -0
- package/dist/scenarios/services/scenario.service.d.ts.map +1 -0
- package/dist/scenarios/services/scenario.service.js +608 -0
- package/dist/scenarios/services/scenario.service.js.map +1 -0
- package/dist/simulator/index.d.ts +2 -0
- package/dist/simulator/index.d.ts.map +1 -0
- package/dist/simulator/index.js +18 -0
- package/dist/simulator/index.js.map +1 -0
- package/dist/simulator/persona-simulator.service.d.ts +81 -0
- package/dist/simulator/persona-simulator.service.d.ts.map +1 -0
- package/dist/simulator/persona-simulator.service.js +358 -0
- package/dist/simulator/persona-simulator.service.js.map +1 -0
- package/dist/templates/dto/create-template.dto.d.ts +16 -0
- package/dist/templates/dto/create-template.dto.d.ts.map +1 -0
- package/dist/templates/dto/create-template.dto.js +75 -0
- package/dist/templates/dto/create-template.dto.js.map +1 -0
- package/dist/templates/dto/index.d.ts +4 -0
- package/dist/templates/dto/index.d.ts.map +1 -0
- package/dist/templates/dto/index.js +10 -0
- package/dist/templates/dto/index.js.map +1 -0
- package/dist/templates/dto/instantiate-template.dto.d.ts +7 -0
- package/dist/templates/dto/instantiate-template.dto.d.ts.map +1 -0
- package/dist/templates/dto/instantiate-template.dto.js +38 -0
- package/dist/templates/dto/instantiate-template.dto.js.map +1 -0
- package/dist/templates/dto/update-template.dto.d.ts +6 -0
- package/dist/templates/dto/update-template.dto.d.ts.map +1 -0
- package/dist/templates/dto/update-template.dto.js +9 -0
- package/dist/templates/dto/update-template.dto.js.map +1 -0
- package/dist/templates/index.d.ts +6 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +22 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/scenario-template.controller.d.ts +42 -0
- package/dist/templates/scenario-template.controller.d.ts.map +1 -0
- package/dist/templates/scenario-template.controller.js +148 -0
- package/dist/templates/scenario-template.controller.js.map +1 -0
- package/dist/templates/scenario-template.module.d.ts +3 -0
- package/dist/templates/scenario-template.module.d.ts.map +1 -0
- package/dist/templates/scenario-template.module.js +30 -0
- package/dist/templates/scenario-template.module.js.map +1 -0
- package/dist/templates/scenario-template.service.d.ts +50 -0
- package/dist/templates/scenario-template.service.d.ts.map +1 -0
- package/dist/templates/scenario-template.service.js +497 -0
- package/dist/templates/scenario-template.service.js.map +1 -0
- package/dist/templates/schemas/scenario-template.schema.d.ts +59 -0
- package/dist/templates/schemas/scenario-template.schema.d.ts.map +1 -0
- package/dist/templates/schemas/scenario-template.schema.js +132 -0
- package/dist/templates/schemas/scenario-template.schema.js.map +1 -0
- package/dist/tool-fixtures/dto/create-tool-fixture.dto.d.ts +18 -0
- package/dist/tool-fixtures/dto/create-tool-fixture.dto.d.ts.map +1 -0
- package/dist/tool-fixtures/dto/create-tool-fixture.dto.js +46 -0
- package/dist/tool-fixtures/dto/create-tool-fixture.dto.js.map +1 -0
- package/dist/tool-fixtures/dto/index.d.ts +4 -0
- package/dist/tool-fixtures/dto/index.d.ts.map +1 -0
- package/dist/tool-fixtures/dto/index.js +20 -0
- package/dist/tool-fixtures/dto/index.js.map +1 -0
- package/dist/tool-fixtures/dto/tool-fixture-filter.dto.d.ts +6 -0
- package/dist/tool-fixtures/dto/tool-fixture-filter.dto.d.ts.map +1 -0
- package/dist/tool-fixtures/dto/tool-fixture-filter.dto.js +33 -0
- package/dist/tool-fixtures/dto/tool-fixture-filter.dto.js.map +1 -0
- package/dist/tool-fixtures/dto/update-tool-fixture.dto.d.ts +6 -0
- package/dist/tool-fixtures/dto/update-tool-fixture.dto.d.ts.map +1 -0
- package/dist/tool-fixtures/dto/update-tool-fixture.dto.js +9 -0
- package/dist/tool-fixtures/dto/update-tool-fixture.dto.js.map +1 -0
- package/dist/tool-fixtures/index.d.ts +7 -0
- package/dist/tool-fixtures/index.d.ts.map +1 -0
- package/dist/tool-fixtures/index.js +23 -0
- package/dist/tool-fixtures/index.js.map +1 -0
- package/dist/tool-fixtures/mock-resolver.service.d.ts +48 -0
- package/dist/tool-fixtures/mock-resolver.service.d.ts.map +1 -0
- package/dist/tool-fixtures/mock-resolver.service.js +99 -0
- package/dist/tool-fixtures/mock-resolver.service.js.map +1 -0
- package/dist/tool-fixtures/schemas/tool-fixture.schema.d.ts +35 -0
- package/dist/tool-fixtures/schemas/tool-fixture.schema.d.ts.map +1 -0
- package/dist/tool-fixtures/schemas/tool-fixture.schema.js +87 -0
- package/dist/tool-fixtures/schemas/tool-fixture.schema.js.map +1 -0
- package/dist/tool-fixtures/tool-fixture.controller.d.ts +45 -0
- package/dist/tool-fixtures/tool-fixture.controller.d.ts.map +1 -0
- package/dist/tool-fixtures/tool-fixture.controller.js +223 -0
- package/dist/tool-fixtures/tool-fixture.controller.js.map +1 -0
- package/dist/tool-fixtures/tool-fixture.module.d.ts +3 -0
- package/dist/tool-fixtures/tool-fixture.module.d.ts.map +1 -0
- package/dist/tool-fixtures/tool-fixture.module.js +31 -0
- package/dist/tool-fixtures/tool-fixture.module.js.map +1 -0
- package/dist/tool-fixtures/tool-fixture.service.d.ts +59 -0
- package/dist/tool-fixtures/tool-fixture.service.d.ts.map +1 -0
- package/dist/tool-fixtures/tool-fixture.service.js +198 -0
- package/dist/tool-fixtures/tool-fixture.service.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PersonaSchema = exports.Persona = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
/**
|
|
16
|
+
* Local virtual ID plugin - transforms _id to id in JSON responses.
|
|
17
|
+
* Replaces the @chanl-ai/nestjs-common virtualIdPlugin for OSS usage.
|
|
18
|
+
*/
|
|
19
|
+
function virtualIdPlugin(schema) {
|
|
20
|
+
schema.set('toJSON', {
|
|
21
|
+
virtuals: true,
|
|
22
|
+
versionKey: false,
|
|
23
|
+
transform: (_doc, ret) => {
|
|
24
|
+
ret.id = ret._id?.toString();
|
|
25
|
+
delete ret._id;
|
|
26
|
+
return ret;
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
schema.set('toObject', { virtuals: true });
|
|
30
|
+
}
|
|
31
|
+
let Persona = class Persona {
|
|
32
|
+
};
|
|
33
|
+
exports.Persona = Persona;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Persona.prototype, "name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, mongoose_1.Prop)({
|
|
40
|
+
required: true,
|
|
41
|
+
enum: ['male', 'female'],
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Persona.prototype, "gender", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, mongoose_1.Prop)({
|
|
47
|
+
required: true,
|
|
48
|
+
enum: [
|
|
49
|
+
'friendly',
|
|
50
|
+
'distracted',
|
|
51
|
+
'polite',
|
|
52
|
+
'concerned',
|
|
53
|
+
'stressed',
|
|
54
|
+
'annoyed',
|
|
55
|
+
'neutral',
|
|
56
|
+
'calm',
|
|
57
|
+
'frustrated',
|
|
58
|
+
'curious',
|
|
59
|
+
'irritated',
|
|
60
|
+
],
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], Persona.prototype, "emotion", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, mongoose_1.Prop)({
|
|
66
|
+
required: true,
|
|
67
|
+
enum: ['english', 'spanish', 'portuguese'],
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], Persona.prototype, "language", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, mongoose_1.Prop)({
|
|
73
|
+
required: true,
|
|
74
|
+
enum: [
|
|
75
|
+
'american',
|
|
76
|
+
'british',
|
|
77
|
+
'australian',
|
|
78
|
+
'canadian',
|
|
79
|
+
'irish',
|
|
80
|
+
'scottish',
|
|
81
|
+
'mexican',
|
|
82
|
+
'argentinian',
|
|
83
|
+
'colombian',
|
|
84
|
+
'brazilian',
|
|
85
|
+
'portuguese',
|
|
86
|
+
'other',
|
|
87
|
+
],
|
|
88
|
+
}),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], Persona.prototype, "accent", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, mongoose_1.Prop)({
|
|
93
|
+
required: true,
|
|
94
|
+
enum: [
|
|
95
|
+
'very clear',
|
|
96
|
+
'slightly unclear',
|
|
97
|
+
'slurred',
|
|
98
|
+
'slightly slurred',
|
|
99
|
+
'mumbled',
|
|
100
|
+
'unclear',
|
|
101
|
+
],
|
|
102
|
+
}),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], Persona.prototype, "intentClarity", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, mongoose_1.Prop)({
|
|
107
|
+
required: true,
|
|
108
|
+
enum: ['slow', 'fast', 'normal', 'moderate'],
|
|
109
|
+
}),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], Persona.prototype, "speechStyle", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, mongoose_1.Prop)({ required: true, default: false }),
|
|
114
|
+
__metadata("design:type", Boolean)
|
|
115
|
+
], Persona.prototype, "backgroundNoise", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, mongoose_1.Prop)({ required: true, default: false }),
|
|
118
|
+
__metadata("design:type", Boolean)
|
|
119
|
+
], Persona.prototype, "allowInterruptions", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, mongoose_1.Prop)(),
|
|
122
|
+
__metadata("design:type", String)
|
|
123
|
+
], Persona.prototype, "description", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, mongoose_1.Prop)(),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], Persona.prototype, "backstory", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, mongoose_1.Prop)({
|
|
130
|
+
type: {
|
|
131
|
+
gender: { type: String, enum: ['male', 'female', 'non-binary'] },
|
|
132
|
+
age: { type: String, enum: ['young', 'middle-aged', 'elderly'] },
|
|
133
|
+
accent: { type: String },
|
|
134
|
+
clarity: {
|
|
135
|
+
type: String,
|
|
136
|
+
enum: ['very clear', 'slightly unclear', 'slurred', 'mumbled'],
|
|
137
|
+
},
|
|
138
|
+
pace: {
|
|
139
|
+
type: String,
|
|
140
|
+
enum: ['very slow', 'slow', 'normal', 'fast', 'very fast'],
|
|
141
|
+
},
|
|
142
|
+
volume: { type: String, enum: ['quiet', 'normal', 'loud'] },
|
|
143
|
+
tone: { type: String, enum: ['monotone', 'expressive', 'animated'] },
|
|
144
|
+
voiceId: { type: String },
|
|
145
|
+
provider: { type: String, enum: ['elevenlabs', 'azure', 'google'] },
|
|
146
|
+
},
|
|
147
|
+
required: false,
|
|
148
|
+
}),
|
|
149
|
+
__metadata("design:type", Object)
|
|
150
|
+
], Persona.prototype, "voice", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, mongoose_1.Prop)({
|
|
153
|
+
type: {
|
|
154
|
+
personality: {
|
|
155
|
+
type: String,
|
|
156
|
+
enum: ['friendly', 'professional', 'assertive', 'passive', 'demanding'],
|
|
157
|
+
},
|
|
158
|
+
emotionalState: {
|
|
159
|
+
type: String,
|
|
160
|
+
enum: [
|
|
161
|
+
'calm',
|
|
162
|
+
'neutral',
|
|
163
|
+
'concerned',
|
|
164
|
+
'frustrated',
|
|
165
|
+
'angry',
|
|
166
|
+
'distressed',
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
cooperationLevel: {
|
|
170
|
+
type: String,
|
|
171
|
+
enum: [
|
|
172
|
+
'very cooperative',
|
|
173
|
+
'cooperative',
|
|
174
|
+
'neutral',
|
|
175
|
+
'difficult',
|
|
176
|
+
'hostile',
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
patience: {
|
|
180
|
+
type: String,
|
|
181
|
+
enum: [
|
|
182
|
+
'very patient',
|
|
183
|
+
'patient',
|
|
184
|
+
'neutral',
|
|
185
|
+
'impatient',
|
|
186
|
+
'very impatient',
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
communicationStyle: {
|
|
190
|
+
type: String,
|
|
191
|
+
enum: ['direct', 'indirect', 'verbose', 'concise', 'rambling'],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
required: false,
|
|
195
|
+
}),
|
|
196
|
+
__metadata("design:type", Object)
|
|
197
|
+
], Persona.prototype, "behavior", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
(0, mongoose_1.Prop)({
|
|
200
|
+
type: {
|
|
201
|
+
allowInterruptions: { type: Boolean },
|
|
202
|
+
interruptionFrequency: {
|
|
203
|
+
type: String,
|
|
204
|
+
enum: ['rarely', 'sometimes', 'often'],
|
|
205
|
+
},
|
|
206
|
+
asksClarifyingQuestions: { type: Boolean },
|
|
207
|
+
repeatsInformation: { type: Boolean },
|
|
208
|
+
goesOffTopic: { type: Boolean },
|
|
209
|
+
},
|
|
210
|
+
required: false,
|
|
211
|
+
}),
|
|
212
|
+
__metadata("design:type", Object)
|
|
213
|
+
], Persona.prototype, "conversationTraits", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
(0, mongoose_1.Prop)({
|
|
216
|
+
type: {
|
|
217
|
+
backgroundNoise: { type: Boolean },
|
|
218
|
+
noiseType: {
|
|
219
|
+
type: String,
|
|
220
|
+
enum: ['traffic', 'office', 'cafe', 'home', 'outdoor'],
|
|
221
|
+
},
|
|
222
|
+
connectionQuality: {
|
|
223
|
+
type: String,
|
|
224
|
+
enum: ['excellent', 'good', 'poor', 'very poor'],
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
required: false,
|
|
228
|
+
}),
|
|
229
|
+
__metadata("design:type", Object)
|
|
230
|
+
], Persona.prototype, "environment", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
(0, mongoose_1.Prop)({ type: Object, default: {} }),
|
|
233
|
+
__metadata("design:type", Object)
|
|
234
|
+
], Persona.prototype, "variables", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
(0, mongoose_1.Prop)(),
|
|
237
|
+
__metadata("design:type", String)
|
|
238
|
+
], Persona.prototype, "voiceId", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
(0, mongoose_1.Prop)({ enum: ['elevenlabs', 'azure', 'google', 'chanl'] }),
|
|
241
|
+
__metadata("design:type", String)
|
|
242
|
+
], Persona.prototype, "voiceProvider", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: 'Agent' }),
|
|
245
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
246
|
+
], Persona.prototype, "agentId", void 0);
|
|
247
|
+
__decorate([
|
|
248
|
+
(0, mongoose_1.Prop)({
|
|
249
|
+
type: {
|
|
250
|
+
promptTemplate: { type: String },
|
|
251
|
+
voice: {
|
|
252
|
+
type: Object,
|
|
253
|
+
properties: {
|
|
254
|
+
voiceId: { type: String },
|
|
255
|
+
provider: {
|
|
256
|
+
type: String,
|
|
257
|
+
enum: ['elevenlabs', 'azure', 'google', 'cartesia'],
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
behavior: {
|
|
262
|
+
type: Object,
|
|
263
|
+
properties: {
|
|
264
|
+
interruptionFrequency: {
|
|
265
|
+
type: String,
|
|
266
|
+
enum: ['never', 'rare', 'frequent'],
|
|
267
|
+
},
|
|
268
|
+
responseSpeed: { type: String, enum: ['slow', 'normal', 'fast'] },
|
|
269
|
+
verbosity: { type: String, enum: ['terse', 'normal', 'verbose'] },
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
}),
|
|
274
|
+
__metadata("design:type", Object)
|
|
275
|
+
], Persona.prototype, "agentConfig", void 0);
|
|
276
|
+
__decorate([
|
|
277
|
+
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
278
|
+
__metadata("design:type", Array)
|
|
279
|
+
], Persona.prototype, "tags", void 0);
|
|
280
|
+
__decorate([
|
|
281
|
+
(0, mongoose_1.Prop)({ default: true }),
|
|
282
|
+
__metadata("design:type", Boolean)
|
|
283
|
+
], Persona.prototype, "isActive", void 0);
|
|
284
|
+
__decorate([
|
|
285
|
+
(0, mongoose_1.Prop)({ default: false }),
|
|
286
|
+
__metadata("design:type", Boolean)
|
|
287
|
+
], Persona.prototype, "isDefault", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
(0, mongoose_1.Prop)({ default: 'local' }),
|
|
290
|
+
__metadata("design:type", String)
|
|
291
|
+
], Persona.prototype, "createdBy", void 0);
|
|
292
|
+
__decorate([
|
|
293
|
+
(0, mongoose_1.Prop)(),
|
|
294
|
+
__metadata("design:type", String)
|
|
295
|
+
], Persona.prototype, "lastModifiedBy", void 0);
|
|
296
|
+
__decorate([
|
|
297
|
+
(0, mongoose_1.Prop)({ type: Date }),
|
|
298
|
+
__metadata("design:type", Date)
|
|
299
|
+
], Persona.prototype, "createdAt", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
(0, mongoose_1.Prop)({ type: Date }),
|
|
302
|
+
__metadata("design:type", Date)
|
|
303
|
+
], Persona.prototype, "updatedAt", void 0);
|
|
304
|
+
exports.Persona = Persona = __decorate([
|
|
305
|
+
(0, mongoose_1.Schema)({
|
|
306
|
+
collection: 'personas',
|
|
307
|
+
timestamps: true,
|
|
308
|
+
})
|
|
309
|
+
], Persona);
|
|
310
|
+
exports.PersonaSchema = mongoose_1.SchemaFactory.createForClass(Persona);
|
|
311
|
+
// Add indexes for better query performance
|
|
312
|
+
exports.PersonaSchema.index({ isActive: 1 });
|
|
313
|
+
exports.PersonaSchema.index({ emotion: 1 });
|
|
314
|
+
exports.PersonaSchema.index({ language: 1 });
|
|
315
|
+
exports.PersonaSchema.index({ gender: 1 });
|
|
316
|
+
exports.PersonaSchema.index({ accent: 1 });
|
|
317
|
+
exports.PersonaSchema.index({ createdBy: 1 });
|
|
318
|
+
exports.PersonaSchema.index({ tags: 1 });
|
|
319
|
+
// Apply virtual ID plugin to transform _id to id in responses
|
|
320
|
+
exports.PersonaSchema.plugin(virtualIdPlugin);
|
|
321
|
+
//# sourceMappingURL=persona.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persona.schema.js","sourceRoot":"","sources":["../../../src/personas/schemas/persona.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAA2C;AAI3C;;;GAGG;AACH,SAAS,eAAe,CAAC,MAAW;IAClC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE;QACnB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,CAAC,IAAS,EAAE,GAAQ,EAAE,EAAE;YACjC,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC;YAC7B,OAAO,GAAG,CAAC,GAAG,CAAC;YACf,OAAO,GAAG,CAAC;QACb,CAAC;KACF,CAAC,CAAC;IACH,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC;AAMM,IAAM,OAAO,GAAb,MAAM,OAAO;CA+SnB,CAAA;AA/SY,0BAAO;AAElB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACX;AAMd;IAJC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;KACzB,CAAC;;uCACc;AAkBhB;IAhBC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,UAAU;YACV,YAAY;YACZ,QAAQ;YACR,WAAW;YACX,UAAU;YACV,SAAS;YACT,SAAS;YACT,MAAM;YACN,YAAY;YACZ,SAAS;YACT,WAAW;SACZ;KACF,CAAC;;wCACe;AAMjB;IAJC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,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CAAC;;0CACL;AAGpB;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;;0CACR;AAGnB;IADC,IAAA,eAAI,GAAE;;+CACiB;AAGxB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACT,IAAI;0CAAC;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACT,IAAI;0CAAC;kBA9SN,OAAO;IAJnB,IAAA,iBAAM,EAAC;QACN,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,IAAI;KACjB,CAAC;GACW,OAAO,CA+SnB;AAEY,QAAA,aAAa,GAAG,wBAAa,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAEnE,2CAA2C;AAC3C,qBAAa,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;AACrC,qBAAa,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AACpC,qBAAa,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;AACrC,qBAAa,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;AACnC,qBAAa,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;AACnC,qBAAa,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;AACtC,qBAAa,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AAEjC,8DAA8D;AAC9D,qBAAa,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ScenarioExecutionService } from '../services/scenario-execution.service';
|
|
2
|
+
import { ExecuteScenarioDto, RetryExecutionDto, EvaluateExecutionDto } from '../dto/execute-scenario.dto';
|
|
3
|
+
export declare class ScenarioExecutionController {
|
|
4
|
+
private readonly executionService;
|
|
5
|
+
private readonly logger;
|
|
6
|
+
constructor(executionService: ScenarioExecutionService);
|
|
7
|
+
execute(scenarioId: string, executeDto: ExecuteScenarioDto): Promise<{
|
|
8
|
+
execution: import("..").ScenarioExecution;
|
|
9
|
+
}>;
|
|
10
|
+
getScenarioExecutions(scenarioId: string, pageStr?: string, limitStr?: string): Promise<{
|
|
11
|
+
executions: import("..").ScenarioExecution[];
|
|
12
|
+
total: number;
|
|
13
|
+
pagination: {
|
|
14
|
+
total: number;
|
|
15
|
+
page: number;
|
|
16
|
+
limit: number;
|
|
17
|
+
totalPages: number;
|
|
18
|
+
hasNextPage: boolean;
|
|
19
|
+
hasPrevPage: boolean;
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
getAllExecutions(scenarioId?: string, agentId?: string, personaId?: string, status?: string, triggerId?: string, triggeredBy?: string, fromDate?: string, toDate?: string, pageStr?: string, limitStr?: string): Promise<{
|
|
23
|
+
executions: import("..").ScenarioExecution[];
|
|
24
|
+
total: number;
|
|
25
|
+
pagination: {
|
|
26
|
+
total: number;
|
|
27
|
+
page: number;
|
|
28
|
+
limit: number;
|
|
29
|
+
totalPages: number;
|
|
30
|
+
hasNextPage: boolean;
|
|
31
|
+
hasPrevPage: boolean;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
getExecution(executionId: string): Promise<{
|
|
35
|
+
execution: import("..").ScenarioExecution;
|
|
36
|
+
}>;
|
|
37
|
+
evaluateExecution(executionId: string, evaluateDto: EvaluateExecutionDto): Promise<{
|
|
38
|
+
execution: import("..").ScenarioExecution;
|
|
39
|
+
}>;
|
|
40
|
+
cancelExecution(executionId: string): Promise<{
|
|
41
|
+
deleted: boolean;
|
|
42
|
+
message: string;
|
|
43
|
+
}>;
|
|
44
|
+
retryExecution(executionId: string, retryDto: RetryExecutionDto): Promise<{
|
|
45
|
+
execution: import("..").ScenarioExecution;
|
|
46
|
+
}>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=scenario-execution.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario-execution.controller.d.ts","sourceRoot":"","sources":["../../../src/scenarios/controllers/scenario-execution.controller.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAkBrC,qBACa,2BAA2B;IAIpC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAHnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgD;gBAGpD,gBAAgB,EAAE,wBAAwB;IAIvD,OAAO,CACE,UAAU,EAAE,MAAM,EACvB,UAAU,EAAE,kBAAkB;;;IA4BlC,qBAAqB,CACZ,UAAU,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM;;;;;;;;;;;;IAkC7B,gBAAgB,CACC,UAAU,CAAC,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,EACvB,QAAQ,CAAC,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM;;;;;;;;;;;;IA4C7B,YAAY,CACM,WAAW,EAAE,MAAM;;;IA2BrC,iBAAiB,CACC,WAAW,EAAE,MAAM,EACjC,WAAW,EAAE,oBAAoB;;;IAgCrC,eAAe,CACG,WAAW,EAAE,MAAM;;;;IA4BrC,cAAc,CACI,WAAW,EAAE,MAAM,EACjC,QAAQ,EAAE,iBAAiB;;;CA0BtC"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var ScenarioExecutionController_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ScenarioExecutionController = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const scenario_execution_service_1 = require("../services/scenario-execution.service");
|
|
19
|
+
const execute_scenario_dto_1 = require("../dto/execute-scenario.dto");
|
|
20
|
+
/**
|
|
21
|
+
* Simple pagination response builder.
|
|
22
|
+
* Replaces the @chanl-ai/nestjs-common buildPaginationResponse for OSS usage.
|
|
23
|
+
*/
|
|
24
|
+
function buildPaginationResponse(total, page, limit) {
|
|
25
|
+
const totalPages = Math.ceil(total / limit);
|
|
26
|
+
return {
|
|
27
|
+
total,
|
|
28
|
+
page,
|
|
29
|
+
limit,
|
|
30
|
+
totalPages,
|
|
31
|
+
hasNextPage: page < totalPages,
|
|
32
|
+
hasPrevPage: page > 1,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
let ScenarioExecutionController = ScenarioExecutionController_1 = class ScenarioExecutionController {
|
|
36
|
+
constructor(executionService) {
|
|
37
|
+
this.executionService = executionService;
|
|
38
|
+
this.logger = new common_1.Logger(ScenarioExecutionController_1.name);
|
|
39
|
+
}
|
|
40
|
+
async execute(scenarioId, executeDto) {
|
|
41
|
+
try {
|
|
42
|
+
const execution = await this.executionService.execute(scenarioId, executeDto);
|
|
43
|
+
return { execution };
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
this.logger.error(`Failed to execute scenario: ${error.message}`, error.stack);
|
|
47
|
+
const status = error.message.includes('not found')
|
|
48
|
+
? common_1.HttpStatus.NOT_FOUND
|
|
49
|
+
: common_1.HttpStatus.BAD_REQUEST;
|
|
50
|
+
throw new common_1.HttpException({
|
|
51
|
+
success: false,
|
|
52
|
+
message: error.message,
|
|
53
|
+
error: 'Execution failed',
|
|
54
|
+
}, status);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async getScenarioExecutions(scenarioId, pageStr, limitStr) {
|
|
58
|
+
try {
|
|
59
|
+
const page = pageStr ? parseInt(pageStr, 10) : 1;
|
|
60
|
+
const limit = limitStr ? parseInt(limitStr, 10) : 10;
|
|
61
|
+
const offset = (page - 1) * limit;
|
|
62
|
+
const result = await this.executionService.findByScenario(scenarioId, { limit, offset });
|
|
63
|
+
return {
|
|
64
|
+
executions: result.executions,
|
|
65
|
+
total: result.total,
|
|
66
|
+
pagination: buildPaginationResponse(result.total, page, limit),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
this.logger.error(`Failed to retrieve executions: ${error.message}`, error.stack);
|
|
71
|
+
throw new common_1.HttpException({
|
|
72
|
+
success: false,
|
|
73
|
+
message: error.message,
|
|
74
|
+
error: 'Failed to retrieve executions',
|
|
75
|
+
}, common_1.HttpStatus.INTERNAL_SERVER_ERROR);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async getAllExecutions(scenarioId, agentId, personaId, status, triggerId, triggeredBy, fromDate, toDate, pageStr, limitStr) {
|
|
79
|
+
try {
|
|
80
|
+
const filters = {};
|
|
81
|
+
if (scenarioId)
|
|
82
|
+
filters.scenarioId = scenarioId;
|
|
83
|
+
if (agentId)
|
|
84
|
+
filters.agentId = agentId;
|
|
85
|
+
if (personaId)
|
|
86
|
+
filters.personaId = personaId;
|
|
87
|
+
if (status)
|
|
88
|
+
filters.status = status;
|
|
89
|
+
if (triggerId)
|
|
90
|
+
filters.triggerId = triggerId;
|
|
91
|
+
if (triggeredBy)
|
|
92
|
+
filters.triggeredBy = triggeredBy;
|
|
93
|
+
if (fromDate)
|
|
94
|
+
filters.fromDate = fromDate;
|
|
95
|
+
if (toDate)
|
|
96
|
+
filters.toDate = toDate;
|
|
97
|
+
const page = pageStr ? parseInt(pageStr, 10) : 1;
|
|
98
|
+
const limit = limitStr ? parseInt(limitStr, 10) : 10;
|
|
99
|
+
const offset = (page - 1) * limit;
|
|
100
|
+
const result = await this.executionService.findAll(filters, { limit, offset });
|
|
101
|
+
return {
|
|
102
|
+
executions: result.executions,
|
|
103
|
+
total: result.total,
|
|
104
|
+
pagination: buildPaginationResponse(result.total, page, limit),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
this.logger.error(`Failed to retrieve executions: ${error.message}`, error.stack);
|
|
109
|
+
throw new common_1.HttpException({
|
|
110
|
+
success: false,
|
|
111
|
+
message: error.message,
|
|
112
|
+
error: 'Failed to retrieve executions',
|
|
113
|
+
}, common_1.HttpStatus.INTERNAL_SERVER_ERROR);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async getExecution(executionId) {
|
|
117
|
+
try {
|
|
118
|
+
const execution = await this.executionService.findOne(executionId);
|
|
119
|
+
return { execution };
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
this.logger.error(`Failed to retrieve execution: ${error.message}`, error.stack);
|
|
123
|
+
const status = error.message.includes('not found')
|
|
124
|
+
? common_1.HttpStatus.NOT_FOUND
|
|
125
|
+
: common_1.HttpStatus.INTERNAL_SERVER_ERROR;
|
|
126
|
+
throw new common_1.HttpException({
|
|
127
|
+
success: false,
|
|
128
|
+
message: error.message,
|
|
129
|
+
error: 'Failed to retrieve execution',
|
|
130
|
+
}, status);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async evaluateExecution(executionId, evaluateDto) {
|
|
134
|
+
try {
|
|
135
|
+
const execution = await this.executionService.evaluate(executionId, evaluateDto);
|
|
136
|
+
return { execution };
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
this.logger.error(`Failed to evaluate execution: ${error.message}`, error.stack);
|
|
140
|
+
const status = error.message?.includes('not found')
|
|
141
|
+
? common_1.HttpStatus.NOT_FOUND
|
|
142
|
+
: error.message?.includes('must be completed') ||
|
|
143
|
+
error.message?.includes('no step results') ||
|
|
144
|
+
error.message?.includes('no conversation steps')
|
|
145
|
+
? common_1.HttpStatus.BAD_REQUEST
|
|
146
|
+
: common_1.HttpStatus.INTERNAL_SERVER_ERROR;
|
|
147
|
+
throw new common_1.HttpException({
|
|
148
|
+
success: false,
|
|
149
|
+
message: error.message,
|
|
150
|
+
error: 'Evaluation failed',
|
|
151
|
+
}, status);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
async cancelExecution(executionId) {
|
|
155
|
+
try {
|
|
156
|
+
await this.executionService.cancel(executionId);
|
|
157
|
+
return {
|
|
158
|
+
deleted: true,
|
|
159
|
+
message: 'Execution cancelled successfully',
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
this.logger.error(`Failed to cancel execution: ${error.message}`, error.stack);
|
|
164
|
+
const status = error.message.includes('not found')
|
|
165
|
+
? common_1.HttpStatus.NOT_FOUND
|
|
166
|
+
: common_1.HttpStatus.BAD_REQUEST;
|
|
167
|
+
throw new common_1.HttpException({
|
|
168
|
+
success: false,
|
|
169
|
+
message: error.message,
|
|
170
|
+
error: 'Failed to cancel execution',
|
|
171
|
+
}, status);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
async retryExecution(executionId, retryDto) {
|
|
175
|
+
try {
|
|
176
|
+
const execution = await this.executionService.retry(executionId, retryDto);
|
|
177
|
+
return { execution };
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
this.logger.error(`Failed to retry execution: ${error.message}`, error.stack);
|
|
181
|
+
const status = error.message.includes('not found')
|
|
182
|
+
? common_1.HttpStatus.NOT_FOUND
|
|
183
|
+
: common_1.HttpStatus.BAD_REQUEST;
|
|
184
|
+
throw new common_1.HttpException({
|
|
185
|
+
success: false,
|
|
186
|
+
message: error.message,
|
|
187
|
+
error: 'Failed to retry execution',
|
|
188
|
+
}, status);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
exports.ScenarioExecutionController = ScenarioExecutionController;
|
|
193
|
+
__decorate([
|
|
194
|
+
(0, common_1.Post)(':id/execute'),
|
|
195
|
+
__param(0, (0, common_1.Param)('id')),
|
|
196
|
+
__param(1, (0, common_1.Body)()),
|
|
197
|
+
__metadata("design:type", Function),
|
|
198
|
+
__metadata("design:paramtypes", [String, execute_scenario_dto_1.ExecuteScenarioDto]),
|
|
199
|
+
__metadata("design:returntype", Promise)
|
|
200
|
+
], ScenarioExecutionController.prototype, "execute", null);
|
|
201
|
+
__decorate([
|
|
202
|
+
(0, common_1.Get)(':id/executions'),
|
|
203
|
+
__param(0, (0, common_1.Param)('id')),
|
|
204
|
+
__param(1, (0, common_1.Query)('page')),
|
|
205
|
+
__param(2, (0, common_1.Query)('limit')),
|
|
206
|
+
__metadata("design:type", Function),
|
|
207
|
+
__metadata("design:paramtypes", [String, String, String]),
|
|
208
|
+
__metadata("design:returntype", Promise)
|
|
209
|
+
], ScenarioExecutionController.prototype, "getScenarioExecutions", null);
|
|
210
|
+
__decorate([
|
|
211
|
+
(0, common_1.Get)('executions'),
|
|
212
|
+
__param(0, (0, common_1.Query)('scenarioId')),
|
|
213
|
+
__param(1, (0, common_1.Query)('agentId')),
|
|
214
|
+
__param(2, (0, common_1.Query)('personaId')),
|
|
215
|
+
__param(3, (0, common_1.Query)('status')),
|
|
216
|
+
__param(4, (0, common_1.Query)('triggerId')),
|
|
217
|
+
__param(5, (0, common_1.Query)('triggeredBy')),
|
|
218
|
+
__param(6, (0, common_1.Query)('fromDate')),
|
|
219
|
+
__param(7, (0, common_1.Query)('toDate')),
|
|
220
|
+
__param(8, (0, common_1.Query)('page')),
|
|
221
|
+
__param(9, (0, common_1.Query)('limit')),
|
|
222
|
+
__metadata("design:type", Function),
|
|
223
|
+
__metadata("design:paramtypes", [String, String, String, String, String, String, String, String, String, String]),
|
|
224
|
+
__metadata("design:returntype", Promise)
|
|
225
|
+
], ScenarioExecutionController.prototype, "getAllExecutions", null);
|
|
226
|
+
__decorate([
|
|
227
|
+
(0, common_1.Get)('executions/:executionId'),
|
|
228
|
+
__param(0, (0, common_1.Param)('executionId')),
|
|
229
|
+
__metadata("design:type", Function),
|
|
230
|
+
__metadata("design:paramtypes", [String]),
|
|
231
|
+
__metadata("design:returntype", Promise)
|
|
232
|
+
], ScenarioExecutionController.prototype, "getExecution", null);
|
|
233
|
+
__decorate([
|
|
234
|
+
(0, common_1.Post)('executions/:executionId/evaluate'),
|
|
235
|
+
__param(0, (0, common_1.Param)('executionId')),
|
|
236
|
+
__param(1, (0, common_1.Body)()),
|
|
237
|
+
__metadata("design:type", Function),
|
|
238
|
+
__metadata("design:paramtypes", [String, execute_scenario_dto_1.EvaluateExecutionDto]),
|
|
239
|
+
__metadata("design:returntype", Promise)
|
|
240
|
+
], ScenarioExecutionController.prototype, "evaluateExecution", null);
|
|
241
|
+
__decorate([
|
|
242
|
+
(0, common_1.Delete)('executions/:executionId'),
|
|
243
|
+
__param(0, (0, common_1.Param)('executionId')),
|
|
244
|
+
__metadata("design:type", Function),
|
|
245
|
+
__metadata("design:paramtypes", [String]),
|
|
246
|
+
__metadata("design:returntype", Promise)
|
|
247
|
+
], ScenarioExecutionController.prototype, "cancelExecution", null);
|
|
248
|
+
__decorate([
|
|
249
|
+
(0, common_1.Post)('executions/:executionId/retry'),
|
|
250
|
+
__param(0, (0, common_1.Param)('executionId')),
|
|
251
|
+
__param(1, (0, common_1.Body)()),
|
|
252
|
+
__metadata("design:type", Function),
|
|
253
|
+
__metadata("design:paramtypes", [String, execute_scenario_dto_1.RetryExecutionDto]),
|
|
254
|
+
__metadata("design:returntype", Promise)
|
|
255
|
+
], ScenarioExecutionController.prototype, "retryExecution", null);
|
|
256
|
+
exports.ScenarioExecutionController = ScenarioExecutionController = ScenarioExecutionController_1 = __decorate([
|
|
257
|
+
(0, common_1.Controller)('scenarios'),
|
|
258
|
+
__metadata("design:paramtypes", [scenario_execution_service_1.ScenarioExecutionService])
|
|
259
|
+
], ScenarioExecutionController);
|
|
260
|
+
//# sourceMappingURL=scenario-execution.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario-execution.controller.js","sourceRoot":"","sources":["../../../src/scenarios/controllers/scenario-execution.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAWwB;AACxB,uFAAkF;AAClF,sEAIqC;AAErC;;;GAGG;AACH,SAAS,uBAAuB,CAAC,KAAa,EAAE,IAAY,EAAE,KAAa;IACzE,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;IAC5C,OAAO;QACL,KAAK;QACL,IAAI;QACJ,KAAK;QACL,UAAU;QACV,WAAW,EAAE,IAAI,GAAG,UAAU;QAC9B,WAAW,EAAE,IAAI,GAAG,CAAC;KACtB,CAAC;AACJ,CAAC;AAGM,IAAM,2BAA2B,mCAAjC,MAAM,2BAA2B;IAGtC,YACmB,gBAA0C;QAA1C,qBAAgB,GAAhB,gBAAgB,CAA0B;QAH5C,WAAM,GAAG,IAAI,eAAM,CAAC,6BAA2B,C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