repoburg 1.3.155 → 1.3.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/backend/dist/src/app.module.js +0 -2
- package/backend/dist/src/app.module.js.map +1 -1
- package/backend/dist/src/common/cache/cache-invalidation.service.d.ts +1 -4
- package/backend/dist/src/common/cache/cache-invalidation.service.js +0 -12
- package/backend/dist/src/common/cache/cache-invalidation.service.js.map +1 -1
- package/backend/dist/src/common/cache/cache-invalidation.subscriber.js +0 -6
- package/backend/dist/src/common/cache/cache-invalidation.subscriber.js.map +1 -1
- package/backend/dist/src/core-entities/enums.d.ts +0 -7
- package/backend/dist/src/core-entities/enums.js +1 -9
- package/backend/dist/src/core-entities/enums.js.map +1 -1
- package/backend/dist/src/interactive-chat/chat.service.d.ts +20 -1
- package/backend/dist/src/interactive-chat/chat.service.js +187 -6
- package/backend/dist/src/interactive-chat/chat.service.js.map +1 -1
- package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.d.ts +3 -3
- package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js +6 -6
- package/backend/dist/src/llm-orchestration/action-handlers/invoke-subagent.handler.js.map +1 -1
- package/backend/dist/src/llm-orchestration/hooks/follow-up-post-execution.hook.d.ts +3 -1
- package/backend/dist/src/llm-orchestration/hooks/follow-up-post-execution.hook.js +13 -3
- package/backend/dist/src/llm-orchestration/hooks/follow-up-post-execution.hook.js.map +1 -1
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.d.ts +3 -1
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.js +29 -2
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.js.map +1 -1
- package/backend/dist/src/sub-agents/sub-agent.entity.js.map +1 -1
- package/backend/dist/src/sub-agents/sub-agents.module.js +5 -17
- package/backend/dist/src/sub-agents/sub-agents.module.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/backend/dist/src/sub-agents/sub-agent-run.entity.d.ts +0 -21
- package/backend/dist/src/sub-agents/sub-agent-run.entity.js +0 -147
- package/backend/dist/src/sub-agents/sub-agent-run.entity.js.map +0 -1
- package/backend/dist/src/sub-agents/sub-agent-runner.service.d.ts +0 -49
- package/backend/dist/src/sub-agents/sub-agent-runner.service.js +0 -690
- package/backend/dist/src/sub-agents/sub-agent-runner.service.js.map +0 -1
- package/backend/dist/src/sub-agents/sub-agent-runs.controller.d.ts +0 -19
- package/backend/dist/src/sub-agents/sub-agent-runs.controller.js +0 -153
- package/backend/dist/src/sub-agents/sub-agent-runs.controller.js.map +0 -1
- package/backend/dist/src/sub-agents/sub-agent-runs.service.d.ts +0 -23
- package/backend/dist/src/sub-agents/sub-agent-runs.service.js +0 -132
- package/backend/dist/src/sub-agents/sub-agent-runs.service.js.map +0 -1
|
@@ -12,10 +12,10 @@ var InvokeSubAgentHandler_1;
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.InvokeSubAgentHandler = void 0;
|
|
14
14
|
const common_1 = require("@nestjs/common");
|
|
15
|
-
const
|
|
15
|
+
const chat_service_1 = require("../../interactive-chat/chat.service");
|
|
16
16
|
let InvokeSubAgentHandler = InvokeSubAgentHandler_1 = class InvokeSubAgentHandler {
|
|
17
|
-
constructor(
|
|
18
|
-
this.
|
|
17
|
+
constructor(chatService) {
|
|
18
|
+
this.chatService = chatService;
|
|
19
19
|
this.toolName = 'invoke_subagent';
|
|
20
20
|
this.logger = new common_1.Logger(InvokeSubAgentHandler_1.name);
|
|
21
21
|
}
|
|
@@ -92,12 +92,12 @@ args: { agent_name: "explore-codebase", prompt: "Now find the tests for those fi
|
|
|
92
92
|
const { agent_name, prompt, session_id } = args;
|
|
93
93
|
this.logger.log(`Invoking sub-agent "${agent_name}" from session ${context.session_id}${session_id ? ` (reusing session ${session_id})` : ''}`);
|
|
94
94
|
try {
|
|
95
|
-
const result = await this.
|
|
95
|
+
const result = await this.chatService.runAgentSync(agent_name, prompt, context.session_id, session_id ? { sessionId: session_id } : undefined);
|
|
96
96
|
const outputWithSessionId = `${result.content}\n\n[Session ID: ${result.childSessionId}]`;
|
|
97
97
|
if (result.success) {
|
|
98
98
|
return {
|
|
99
99
|
status: 'SUCCESS',
|
|
100
|
-
summary: `Sub-agent "${agent_name}" completed successfully
|
|
100
|
+
summary: `Sub-agent "${agent_name}" completed successfully.`,
|
|
101
101
|
persisted_args: {
|
|
102
102
|
arguments: JSON.stringify(args),
|
|
103
103
|
agentName: agent_name,
|
|
@@ -149,6 +149,6 @@ args: { agent_name: "explore-codebase", prompt: "Now find the tests for those fi
|
|
|
149
149
|
exports.InvokeSubAgentHandler = InvokeSubAgentHandler;
|
|
150
150
|
exports.InvokeSubAgentHandler = InvokeSubAgentHandler = InvokeSubAgentHandler_1 = __decorate([
|
|
151
151
|
(0, common_1.Injectable)(),
|
|
152
|
-
__metadata("design:paramtypes", [
|
|
152
|
+
__metadata("design:paramtypes", [chat_service_1.ChatService])
|
|
153
153
|
], InvokeSubAgentHandler);
|
|
154
154
|
//# sourceMappingURL=invoke-subagent.handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoke-subagent.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/invoke-subagent.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AAQpD,
|
|
1
|
+
{"version":3,"file":"invoke-subagent.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/invoke-subagent.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AAQpD,sEAAkE;AAG3D,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAIhC,YAA6B,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;QAH5C,aAAQ,GAAG,iBAAiB,CAAC;QACrB,WAAM,GAAG,IAAI,eAAM,CAAC,uBAAqB,CAAC,IAAI,CAAC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AM,EAAE,EAAE;oBACV,aAAa,EAAE,KAAK,CAAC,OAAO;iBAC7B;aACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAvJY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAK+B,0BAAW;GAJ1C,qBAAqB,CAuJjC"}
|
|
@@ -2,9 +2,11 @@ import { PostExecutionHook } from './post-execution-hook.interface';
|
|
|
2
2
|
import { PlanExecutionContext } from '../llm-orchestration.interfaces';
|
|
3
3
|
import { SessionInput } from '../../core-entities';
|
|
4
4
|
import { SessionInputsService } from '../../session-inputs/session-inputs.service';
|
|
5
|
+
import { SessionsService } from '../../sessions/sessions.service';
|
|
5
6
|
export declare class FollowUpPostExecutionHook implements PostExecutionHook {
|
|
6
7
|
private readonly sessionInputsService;
|
|
8
|
+
private readonly sessionsService;
|
|
7
9
|
private readonly logger;
|
|
8
|
-
constructor(sessionInputsService: SessionInputsService);
|
|
10
|
+
constructor(sessionInputsService: SessionInputsService, sessionsService: SessionsService);
|
|
9
11
|
run(sessionInput: SessionInput, context: PlanExecutionContext): Promise<void>;
|
|
10
12
|
}
|
|
@@ -16,9 +16,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.FollowUpPostExecutionHook = void 0;
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
18
|
const session_inputs_service_1 = require("../../session-inputs/session-inputs.service");
|
|
19
|
+
const sessions_service_1 = require("../../sessions/sessions.service");
|
|
19
20
|
let FollowUpPostExecutionHook = FollowUpPostExecutionHook_1 = class FollowUpPostExecutionHook {
|
|
20
|
-
constructor(sessionInputsService) {
|
|
21
|
+
constructor(sessionInputsService, sessionsService) {
|
|
21
22
|
this.sessionInputsService = sessionInputsService;
|
|
23
|
+
this.sessionsService = sessionsService;
|
|
22
24
|
this.logger = new common_1.Logger(FollowUpPostExecutionHook_1.name);
|
|
23
25
|
}
|
|
24
26
|
async run(sessionInput, context) {
|
|
@@ -32,12 +34,18 @@ let FollowUpPostExecutionHook = FollowUpPostExecutionHook_1 = class FollowUpPost
|
|
|
32
34
|
}
|
|
33
35
|
if (context.toolResults.length > 0) {
|
|
34
36
|
this.logger.log(`Triggering follow-up with ${context.toolResults.length} tool result(s)`);
|
|
37
|
+
let contextTemplateId;
|
|
38
|
+
const session = await this.sessionsService.findOne(sessionInput.session_id);
|
|
39
|
+
if (session?.default_followup_context_template_id) {
|
|
40
|
+
contextTemplateId = session.default_followup_context_template_id;
|
|
41
|
+
this.logger.log(`Using follow-up context template ${contextTemplateId} for session ${sessionInput.session_id}`);
|
|
42
|
+
}
|
|
35
43
|
await this.sessionInputsService.create(sessionInput.session_id, {
|
|
36
44
|
user_prompt: '',
|
|
37
45
|
execution_strategy: sessionInput.execution_strategy,
|
|
38
46
|
skip_persistence: true,
|
|
39
47
|
ad_hoc_context_definition: undefined,
|
|
40
|
-
context_template_id:
|
|
48
|
+
context_template_id: contextTemplateId,
|
|
41
49
|
});
|
|
42
50
|
context.flags.follow_up_initiated = true;
|
|
43
51
|
return;
|
|
@@ -49,6 +57,8 @@ exports.FollowUpPostExecutionHook = FollowUpPostExecutionHook;
|
|
|
49
57
|
exports.FollowUpPostExecutionHook = FollowUpPostExecutionHook = FollowUpPostExecutionHook_1 = __decorate([
|
|
50
58
|
(0, common_1.Injectable)(),
|
|
51
59
|
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => session_inputs_service_1.SessionInputsService))),
|
|
52
|
-
|
|
60
|
+
__param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => sessions_service_1.SessionsService))),
|
|
61
|
+
__metadata("design:paramtypes", [session_inputs_service_1.SessionInputsService,
|
|
62
|
+
sessions_service_1.SessionsService])
|
|
53
63
|
], FollowUpPostExecutionHook);
|
|
54
64
|
//# sourceMappingURL=follow-up-post-execution.hook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"follow-up-post-execution.hook.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/hooks/follow-up-post-execution.hook.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwE;AAIxE,wFAAmF;
|
|
1
|
+
{"version":3,"file":"follow-up-post-execution.hook.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/hooks/follow-up-post-execution.hook.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwE;AAIxE,wFAAmF;AACnF,sEAAkE;AAG3D,IAAM,yBAAyB,iCAA/B,MAAM,yBAAyB;IAGpC,YAEE,oBAA2D,EAE3D,eAAiD;QAFhC,yBAAoB,GAApB,oBAAoB,CAAsB;QAE1C,oBAAe,GAAf,eAAe,CAAiB;QANlC,WAAM,GAAG,IAAI,eAAM,CAAC,2BAAyB,CAAC,IAAI,CAAC,CAAC;IAOlE,CAAC;IAEJ,KAAK,CAAC,GAAG,CACP,YAA0B,EAC1B,OAA6B;QAG7B,IAAI,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC;YACpC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QAED,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QAGD,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,6BAA6B,OAAO,CAAC,WAAW,CAAC,MAAM,iBAAiB,CACzE,CAAC;YAGF,IAAI,iBAAqC,CAAC;YAE1C,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAChD,YAAY,CAAC,UAAU,CACxB,CAAC;YACF,IAAI,OAAO,EAAE,oCAAoC,EAAE,CAAC;gBAClD,iBAAiB,GAAG,OAAO,CAAC,oCAAoC,CAAC;gBACjE,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,oCAAoC,iBAAiB,gBAAgB,YAAY,CAAC,UAAU,EAAE,CAC/F,CAAC;YACJ,CAAC;YAED,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE;gBAC9D,WAAW,EAAE,EAAE;gBACf,kBAAkB,EAAE,YAAY,CAAC,kBAAkB;gBACnD,gBAAgB,EAAE,IAAI;gBACtB,yBAAyB,EAAE,SAAS;gBACpC,mBAAmB,EAAE,iBAAiB;aACvC,CAAC,CAAC;YAEH,OAAO,CAAC,KAAK,CAAC,mBAAmB,GAAG,IAAI,CAAC;YACzC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;CACF,CAAA;AA1DY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC,CAAC,CAAA;IAE9C,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kCAAe,CAAC,CAAC,CAAA;qCADH,6CAAoB;QAEzB,kCAAe;GAPxC,yBAAyB,CA0DrC"}
|
|
@@ -6,13 +6,15 @@ import { ApplicationStateService } from '../../application-state/application-sta
|
|
|
6
6
|
import { NotificationsService } from '../../notifications/notifications.service';
|
|
7
7
|
import { SessionsService } from '../../sessions/sessions.service';
|
|
8
8
|
import { AppService } from '../../app.service';
|
|
9
|
+
import { ChatService } from '../../interactive-chat/chat.service';
|
|
9
10
|
export declare class FrontendNotificationHook implements PostExecutionHook {
|
|
10
11
|
private readonly eventsGateway;
|
|
11
12
|
private readonly applicationStateService;
|
|
12
13
|
private readonly notificationsService;
|
|
13
14
|
private readonly sessionsService;
|
|
14
15
|
private readonly appService;
|
|
16
|
+
private readonly chatService;
|
|
15
17
|
private readonly logger;
|
|
16
|
-
constructor(eventsGateway: EventsGateway, applicationStateService: ApplicationStateService, notificationsService: NotificationsService, sessionsService: SessionsService, appService: AppService);
|
|
18
|
+
constructor(eventsGateway: EventsGateway, applicationStateService: ApplicationStateService, notificationsService: NotificationsService, sessionsService: SessionsService, appService: AppService, chatService: ChatService);
|
|
17
19
|
run(sessionInput: SessionInput, context: PlanExecutionContext): Promise<void>;
|
|
18
20
|
}
|
|
@@ -8,6 +8,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
11
14
|
var FrontendNotificationHook_1;
|
|
12
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
16
|
exports.FrontendNotificationHook = void 0;
|
|
@@ -17,14 +20,16 @@ const application_state_service_1 = require("../../application-state/application
|
|
|
17
20
|
const notifications_service_1 = require("../../notifications/notifications.service");
|
|
18
21
|
const sessions_service_1 = require("../../sessions/sessions.service");
|
|
19
22
|
const app_service_1 = require("../../app.service");
|
|
23
|
+
const chat_service_1 = require("../../interactive-chat/chat.service");
|
|
20
24
|
const os_1 = require("os");
|
|
21
25
|
let FrontendNotificationHook = FrontendNotificationHook_1 = class FrontendNotificationHook {
|
|
22
|
-
constructor(eventsGateway, applicationStateService, notificationsService, sessionsService, appService) {
|
|
26
|
+
constructor(eventsGateway, applicationStateService, notificationsService, sessionsService, appService, chatService) {
|
|
23
27
|
this.eventsGateway = eventsGateway;
|
|
24
28
|
this.applicationStateService = applicationStateService;
|
|
25
29
|
this.notificationsService = notificationsService;
|
|
26
30
|
this.sessionsService = sessionsService;
|
|
27
31
|
this.appService = appService;
|
|
32
|
+
this.chatService = chatService;
|
|
28
33
|
this.logger = new common_1.Logger(FrontendNotificationHook_1.name);
|
|
29
34
|
}
|
|
30
35
|
async run(sessionInput, context) {
|
|
@@ -65,15 +70,37 @@ let FrontendNotificationHook = FrontendNotificationHook_1 = class FrontendNotifi
|
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
}
|
|
73
|
+
const syncPromise = this.chatService.getSyncPromise(sessionInput.session_id);
|
|
74
|
+
if (syncPromise) {
|
|
75
|
+
this.logger.log(`Resolving sync promise for sub-agent session ${sessionInput.session_id}`);
|
|
76
|
+
let finalContent = '';
|
|
77
|
+
if (context.flags.is_final && sessionInput.aiActions) {
|
|
78
|
+
const finalAction = sessionInput.aiActions.find((a) => a.action_type === 'final');
|
|
79
|
+
if (finalAction?.plain) {
|
|
80
|
+
finalContent = finalAction.plain;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (!finalContent && sessionInput.raw_llm_response) {
|
|
84
|
+
finalContent = sessionInput.raw_llm_response;
|
|
85
|
+
}
|
|
86
|
+
this.chatService.resolveSyncPromise(sessionInput.session_id, {
|
|
87
|
+
content: finalContent,
|
|
88
|
+
success: true,
|
|
89
|
+
iterations: 0,
|
|
90
|
+
childSessionId: sessionInput.session_id,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
68
93
|
}
|
|
69
94
|
};
|
|
70
95
|
exports.FrontendNotificationHook = FrontendNotificationHook;
|
|
71
96
|
exports.FrontendNotificationHook = FrontendNotificationHook = FrontendNotificationHook_1 = __decorate([
|
|
72
97
|
(0, common_1.Injectable)(),
|
|
98
|
+
__param(5, (0, common_1.Inject)((0, common_1.forwardRef)(() => chat_service_1.ChatService))),
|
|
73
99
|
__metadata("design:paramtypes", [events_gateway_1.EventsGateway,
|
|
74
100
|
application_state_service_1.ApplicationStateService,
|
|
75
101
|
notifications_service_1.NotificationsService,
|
|
76
102
|
sessions_service_1.SessionsService,
|
|
77
|
-
app_service_1.AppService
|
|
103
|
+
app_service_1.AppService,
|
|
104
|
+
chat_service_1.ChatService])
|
|
78
105
|
], FrontendNotificationHook);
|
|
79
106
|
//# sourceMappingURL=frontend-notification.hook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontend-notification.hook.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/hooks/frontend-notification.hook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"frontend-notification.hook.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/hooks/frontend-notification.hook.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwE;AAIxE,gEAA4D;AAC5D,iGAA4F;AAC5F,qFAAiF;AACjF,sEAAkE;AAClE,mDAA+C;AAC/C,sEAAkE;AAClE,2BAA6B;AAGtB,IAAM,wBAAwB,gCAA9B,MAAM,wBAAwB;IAGnC,YACmB,aAA4B,EAC5B,uBAAgD,EAChD,oBAA0C,EAC1C,eAAgC,EAChC,UAAsB,EAEvC,WAAyC;QANxB,kBAAa,GAAb,aAAa,CAAe;QAC5B,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,oBAAe,GAAf,eAAe,CAAiB;QAChC,eAAU,GAAV,UAAU,CAAY;QAEtB,gBAAW,GAAX,WAAW,CAAa;QAT1B,WAAM,GAAG,IAAI,eAAM,CAAC,0BAAwB,CAAC,IAAI,CAAC,CAAC;IAUjE,CAAC;IAEJ,KAAK,CAAC,GAAG,CACP,YAA0B,EAC1B,OAA6B;QAG7B,IAAI,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,CAAC;YACtC,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,0EAA0E,CAC3E,CAAC;YAKF,OAAO;QACT,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;QACrE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,YAAY,EAAE;YACzC,SAAS,EAAE,YAAY,CAAC,UAA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;QAET,0BAAW;GAVhC,wBAAwB,CAwGpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-agent.entity.js","sourceRoot":"","sources":["../../../src/sub-agents/sub-agent.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,6CAAmE;AACnE,8DAA0D;AAC1D,gFAAqE;AACrE,sFAA2E;
|
|
1
|
+
{"version":3,"file":"sub-agent.entity.js","sourceRoot":"","sources":["../../../src/sub-agents/sub-agent.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,6CAAmE;AACnE,8DAA0D;AAC1D,gFAAqE;AACrE,sFAA2E;AAUpE,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,wBAAU;CAmHvC,CAAA;AAnHY,4BAAQ;AAMnB;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wBAAwB;QACrC,OAAO,EAAE,WAAW;KACrB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sCACZ;AAOb;IALC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,oDAAoD;KAC9D,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACd;AAO3B;IALC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,8CAA8C;QAC3D,MAAM,EAAE,MAAM;KACf,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACT;AAWhC;IATC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE,GAAG,EAAE,CAAC,mCAAY;KACzB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE;QAC7B,QAAQ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AAQ,CAmHpB"}
|
|
@@ -10,35 +10,23 @@ exports.SubAgentsModule = void 0;
|
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
12
|
const sub_agent_entity_1 = require("./sub-agent.entity");
|
|
13
|
-
const sub_agent_run_entity_1 = require("./sub-agent-run.entity");
|
|
14
13
|
const sub_agents_service_1 = require("./sub-agents.service");
|
|
15
|
-
const sub_agent_runs_service_1 = require("./sub-agent-runs.service");
|
|
16
|
-
const sub_agent_runner_service_1 = require("./sub-agent-runner.service");
|
|
17
14
|
const sub_agents_controller_1 = require("./sub-agents.controller");
|
|
18
|
-
const sub_agent_runs_controller_1 = require("./sub-agent-runs.controller");
|
|
19
|
-
const llm_provider_module_1 = require("../llm-provider/llm-provider.module");
|
|
20
|
-
const sessions_module_1 = require("../sessions/sessions.module");
|
|
21
|
-
const application_state_module_1 = require("../application-state/application-state.module");
|
|
22
|
-
const execution_logs_module_1 = require("../execution-logs/execution-logs.module");
|
|
23
|
-
const events_module_1 = require("../events/events.module");
|
|
24
15
|
const ai_action_entity_1 = require("../core-entities/ai-action.entity");
|
|
25
16
|
const session_input_entity_1 = require("../core-entities/session-input.entity");
|
|
17
|
+
const sessions_module_1 = require("../sessions/sessions.module");
|
|
26
18
|
let SubAgentsModule = class SubAgentsModule {
|
|
27
19
|
};
|
|
28
20
|
exports.SubAgentsModule = SubAgentsModule;
|
|
29
21
|
exports.SubAgentsModule = SubAgentsModule = __decorate([
|
|
30
22
|
(0, common_1.Module)({
|
|
31
23
|
imports: [
|
|
32
|
-
typeorm_1.TypeOrmModule.forFeature([sub_agent_entity_1.SubAgent,
|
|
33
|
-
llm_provider_module_1.LlmProviderModule,
|
|
24
|
+
typeorm_1.TypeOrmModule.forFeature([sub_agent_entity_1.SubAgent, ai_action_entity_1.AIAction, session_input_entity_1.SessionInput]),
|
|
34
25
|
sessions_module_1.SessionsModule,
|
|
35
|
-
application_state_module_1.ApplicationStateModule,
|
|
36
|
-
execution_logs_module_1.ExecutionLogsModule,
|
|
37
|
-
events_module_1.EventsModule,
|
|
38
26
|
],
|
|
39
|
-
controllers: [sub_agents_controller_1.SubAgentsController
|
|
40
|
-
providers: [sub_agents_service_1.SubAgentsService
|
|
41
|
-
exports: [sub_agents_service_1.SubAgentsService
|
|
27
|
+
controllers: [sub_agents_controller_1.SubAgentsController],
|
|
28
|
+
providers: [sub_agents_service_1.SubAgentsService],
|
|
29
|
+
exports: [sub_agents_service_1.SubAgentsService],
|
|
42
30
|
})
|
|
43
31
|
], SubAgentsModule);
|
|
44
32
|
//# sourceMappingURL=sub-agents.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-agents.module.js","sourceRoot":"","sources":["../../../src/sub-agents/sub-agents.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,yDAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"sub-agents.module.js","sourceRoot":"","sources":["../../../src/sub-agents/sub-agents.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,yDAA8C;AAC9C,6DAAwD;AACxD,mEAA8D;AAC9D,wEAA6D;AAC7D,gFAAqE;AACrE,iEAA6D;AAWtD,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAT3B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,2BAAQ,EAAE,2BAAQ,EAAE,mCAAY,CAAC,CAAC;YAC5D,gCAAc;SACf;QACD,WAAW,EAAE,CAAC,2CAAmB,CAAC;QAClC,SAAS,EAAE,CAAC,qCAAgB,CAAC;QAC7B,OAAO,EAAE,CAAC,qCAAgB,CAAC;KAC5B,CAAC;GACW,eAAe,CAAG"}
|