@iqai/adk-cli 0.2.8 → 0.3.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/CHANGELOG.md +20 -0
- package/README.md +1 -0
- package/dist/app.module.d.ts +3 -0
- package/dist/app.module.d.ts.map +1 -0
- package/dist/app.module.js +24 -0
- package/dist/app.module.js.map +1 -0
- package/dist/cli/cli.module.d.ts +3 -0
- package/dist/cli/cli.module.d.ts.map +1 -0
- package/dist/cli/cli.module.js +25 -0
- package/dist/cli/cli.module.js.map +1 -0
- package/dist/cli/new.command.d.ts +10 -0
- package/dist/cli/new.command.d.ts.map +1 -0
- package/dist/cli/new.command.js +273 -0
- package/dist/cli/new.command.js.map +1 -0
- package/dist/cli/run.command.d.ts +20 -0
- package/dist/cli/run.command.d.ts.map +1 -0
- package/dist/cli/run.command.js +342 -0
- package/dist/cli/run.command.js.map +1 -0
- package/dist/cli/serve.command.d.ts +20 -0
- package/dist/cli/serve.command.d.ts.map +1 -0
- package/dist/cli/serve.command.js +137 -0
- package/dist/cli/serve.command.js.map +1 -0
- package/dist/cli/web.command.d.ts +20 -0
- package/dist/cli/web.command.d.ts.map +1 -0
- package/dist/cli/web.command.js +146 -0
- package/dist/cli/web.command.js.map +1 -0
- package/dist/common/tokens.d.ts +5 -0
- package/dist/common/tokens.d.ts.map +1 -0
- package/dist/common/tokens.js +8 -0
- package/dist/common/tokens.js.map +1 -0
- package/dist/common/types.d.ts +91 -0
- package/dist/common/types.d.ts.map +1 -0
- package/dist/common/types.js +3 -0
- package/dist/common/types.js.map +1 -0
- package/dist/http/bootstrap.d.ts +17 -0
- package/dist/http/bootstrap.d.ts.map +1 -0
- package/dist/http/bootstrap.js +221 -0
- package/dist/http/bootstrap.js.map +1 -0
- package/dist/http/config/config.module.d.ts +6 -0
- package/dist/http/config/config.module.d.ts.map +1 -0
- package/dist/http/config/config.module.js +32 -0
- package/dist/http/config/config.module.js.map +1 -0
- package/dist/http/discovery/agents.controller.d.ts +13 -0
- package/dist/http/discovery/agents.controller.d.ts.map +1 -0
- package/dist/http/discovery/agents.controller.js +73 -0
- package/dist/http/discovery/agents.controller.js.map +1 -0
- package/dist/http/discovery/discovery.module.d.ts +3 -0
- package/dist/http/discovery/discovery.module.d.ts.map +1 -0
- package/dist/http/discovery/discovery.module.js +22 -0
- package/dist/http/discovery/discovery.module.js.map +1 -0
- package/dist/http/dto/api.dto.d.ts +70 -0
- package/dist/http/dto/api.dto.d.ts.map +1 -0
- package/dist/http/dto/api.dto.js +268 -0
- package/dist/http/dto/api.dto.js.map +1 -0
- package/dist/http/events/events.controller.d.ts +8 -0
- package/dist/http/events/events.controller.d.ts.map +1 -0
- package/dist/http/events/events.controller.js +55 -0
- package/dist/http/events/events.controller.js.map +1 -0
- package/dist/http/events/events.module.d.ts +3 -0
- package/dist/http/events/events.module.d.ts.map +1 -0
- package/dist/http/events/events.module.js +25 -0
- package/dist/http/events/events.module.js.map +1 -0
- package/dist/http/events/events.service.d.ts +8 -0
- package/dist/http/events/events.service.d.ts.map +1 -0
- package/dist/http/events/events.service.js +37 -0
- package/dist/http/events/events.service.js.map +1 -0
- package/dist/http/health/health.controller.d.ts +6 -0
- package/dist/http/health/health.controller.d.ts.map +1 -0
- package/dist/http/health/health.controller.js +37 -0
- package/dist/http/health/health.controller.js.map +1 -0
- package/dist/http/health/health.module.d.ts +3 -0
- package/dist/http/health/health.module.d.ts.map +1 -0
- package/dist/http/health/health.module.js +20 -0
- package/dist/http/health/health.module.js.map +1 -0
- package/dist/http/http.module.d.ts +6 -0
- package/dist/http/http.module.d.ts.map +1 -0
- package/dist/http/http.module.js +43 -0
- package/dist/http/http.module.js.map +1 -0
- package/dist/http/messaging/messaging.controller.d.ts +9 -0
- package/dist/http/messaging/messaging.controller.d.ts.map +1 -0
- package/dist/http/messaging/messaging.controller.js +83 -0
- package/dist/http/messaging/messaging.controller.js.map +1 -0
- package/dist/http/messaging/messaging.module.d.ts +3 -0
- package/dist/http/messaging/messaging.module.d.ts.map +1 -0
- package/dist/http/messaging/messaging.module.js +25 -0
- package/dist/http/messaging/messaging.module.js.map +1 -0
- package/dist/http/messaging/messaging.service.d.ts +11 -0
- package/dist/http/messaging/messaging.service.d.ts.map +1 -0
- package/dist/http/messaging/messaging.service.js +48 -0
- package/dist/http/messaging/messaging.service.js.map +1 -0
- package/dist/http/providers/agent-loader.service.d.ts +49 -0
- package/dist/http/providers/agent-loader.service.d.ts.map +1 -0
- package/dist/http/providers/agent-loader.service.js +416 -0
- package/dist/http/providers/agent-loader.service.js.map +1 -0
- package/dist/http/providers/agent-manager.service.d.ts +24 -0
- package/dist/http/providers/agent-manager.service.d.ts.map +1 -0
- package/dist/http/providers/agent-manager.service.js +222 -0
- package/dist/http/providers/agent-manager.service.js.map +1 -0
- package/dist/http/providers/agent-scanner.service.d.ts +9 -0
- package/dist/http/providers/agent-scanner.service.d.ts.map +1 -0
- package/dist/http/providers/agent-scanner.service.js +108 -0
- package/dist/http/providers/agent-scanner.service.js.map +1 -0
- package/dist/http/providers/providers.module.d.ts +3 -0
- package/dist/http/providers/providers.module.d.ts.map +1 -0
- package/dist/http/providers/providers.module.js +47 -0
- package/dist/http/providers/providers.module.js.map +1 -0
- package/dist/http/reload/hot-reload.service.d.ts +16 -0
- package/dist/http/reload/hot-reload.service.d.ts.map +1 -0
- package/dist/http/reload/hot-reload.service.js +79 -0
- package/dist/http/reload/hot-reload.service.js.map +1 -0
- package/dist/http/reload/reload.controller.d.ts +14 -0
- package/dist/http/reload/reload.controller.d.ts.map +1 -0
- package/dist/http/reload/reload.controller.js +50 -0
- package/dist/http/reload/reload.controller.js.map +1 -0
- package/dist/http/reload/reload.module.d.ts +3 -0
- package/dist/http/reload/reload.module.d.ts.map +1 -0
- package/dist/http/reload/reload.module.js +23 -0
- package/dist/http/reload/reload.module.js.map +1 -0
- package/dist/http/runtime-config.d.ts +22 -0
- package/dist/http/runtime-config.d.ts.map +1 -0
- package/dist/http/runtime-config.js +5 -0
- package/dist/http/runtime-config.js.map +1 -0
- package/dist/http/sessions/sessions.controller.d.ts +11 -0
- package/dist/http/sessions/sessions.controller.d.ts.map +1 -0
- package/dist/http/sessions/sessions.controller.js +116 -0
- package/dist/http/sessions/sessions.controller.js.map +1 -0
- package/dist/http/sessions/sessions.module.d.ts +3 -0
- package/dist/http/sessions/sessions.module.d.ts.map +1 -0
- package/dist/http/sessions/sessions.module.js +25 -0
- package/dist/http/sessions/sessions.module.js.map +1 -0
- package/dist/http/sessions/sessions.service.d.ts +54 -0
- package/dist/http/sessions/sessions.service.d.ts.map +1 -0
- package/dist/http/sessions/sessions.service.js +353 -0
- package/dist/http/sessions/sessions.service.js.map +1 -0
- package/dist/http/state/state.controller.d.ts +9 -0
- package/dist/http/state/state.controller.d.ts.map +1 -0
- package/dist/http/state/state.controller.js +76 -0
- package/dist/http/state/state.controller.js.map +1 -0
- package/dist/http/state/state.module.d.ts +3 -0
- package/dist/http/state/state.module.d.ts.map +1 -0
- package/dist/http/state/state.module.js +25 -0
- package/dist/http/state/state.module.js.map +1 -0
- package/dist/http/state/state.service.d.ts +9 -0
- package/dist/http/state/state.service.d.ts.map +1 -0
- package/dist/http/state/state.service.js +55 -0
- package/dist/http/state/state.service.js.map +1 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +25 -0
- package/dist/main.js.map +1 -0
- package/package.json +18 -12
- package/dist/index.d.mts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -1187
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -1171
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AgentsController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const api_dto_1 = require("../dto/api.dto");
|
|
19
|
+
const agent_manager_service_1 = require("../providers/agent-manager.service");
|
|
20
|
+
function mapAgentsToResponse(agents) {
|
|
21
|
+
return Array.from(agents.values()).map((agent) => ({
|
|
22
|
+
path: agent.absolutePath,
|
|
23
|
+
name: agent.name,
|
|
24
|
+
directory: agent.absolutePath,
|
|
25
|
+
relativePath: agent.relativePath,
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
let AgentsController = class AgentsController {
|
|
29
|
+
agentManager;
|
|
30
|
+
constructor(agentManager) {
|
|
31
|
+
this.agentManager = agentManager;
|
|
32
|
+
}
|
|
33
|
+
listAgents() {
|
|
34
|
+
const agentsList = mapAgentsToResponse(this.agentManager.getAgents());
|
|
35
|
+
return { agents: agentsList };
|
|
36
|
+
}
|
|
37
|
+
refreshAgents() {
|
|
38
|
+
const agentsDir = process.cwd();
|
|
39
|
+
this.agentManager.scanAgents(agentsDir);
|
|
40
|
+
const agentsList = mapAgentsToResponse(this.agentManager.getAgents());
|
|
41
|
+
return { agents: agentsList };
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.AgentsController = AgentsController;
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, common_1.Get)(),
|
|
47
|
+
(0, swagger_1.ApiOperation)({
|
|
48
|
+
summary: "List discovered agents",
|
|
49
|
+
description: "Returns all agent entries found by scanning the agents directory. Each agent includes name, absolute, and relative paths.",
|
|
50
|
+
}),
|
|
51
|
+
(0, swagger_1.ApiOkResponse)({ type: api_dto_1.AgentsListResponseDto }),
|
|
52
|
+
__metadata("design:type", Function),
|
|
53
|
+
__metadata("design:paramtypes", []),
|
|
54
|
+
__metadata("design:returntype", Object)
|
|
55
|
+
], AgentsController.prototype, "listAgents", null);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, common_1.Post)("refresh"),
|
|
58
|
+
(0, swagger_1.ApiOperation)({
|
|
59
|
+
summary: "Rescan and list agents",
|
|
60
|
+
description: "Triggers a fresh scan of the agents directory and returns the updated agent list.",
|
|
61
|
+
}),
|
|
62
|
+
(0, swagger_1.ApiOkResponse)({ type: api_dto_1.AgentsListResponseDto }),
|
|
63
|
+
__metadata("design:type", Function),
|
|
64
|
+
__metadata("design:paramtypes", []),
|
|
65
|
+
__metadata("design:returntype", Object)
|
|
66
|
+
], AgentsController.prototype, "refreshAgents", null);
|
|
67
|
+
exports.AgentsController = AgentsController = __decorate([
|
|
68
|
+
(0, swagger_1.ApiTags)("agents"),
|
|
69
|
+
(0, common_1.Controller)("api/agents"),
|
|
70
|
+
__param(0, (0, common_1.Inject)(agent_manager_service_1.AgentManager)),
|
|
71
|
+
__metadata("design:paramtypes", [agent_manager_service_1.AgentManager])
|
|
72
|
+
], AgentsController);
|
|
73
|
+
//# sourceMappingURL=agents.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.controller.js","sourceRoot":"","sources":["../../../src/http/discovery/agents.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAuE;AAEvE,4CAAuD;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ACpF,CAAC;IACD,IAAA,uBAAa,EAAC,EAAE,IAAI,EAAE,+BAAqB,EAAE,CAAC;;;;qDAM9C;2BA7BW,gBAAgB;IAF5B,IAAA,iBAAO,EAAC,QAAQ,CAAC;IACjB,IAAA,mBAAU,EAAC,YAAY,CAAC;IAGtB,WAAA,IAAA,eAAM,EAAC,oCAAY,CAAC,CAAA;qCAAgC,oCAAY;GAFtD,gBAAgB,CA8B5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.module.d.ts","sourceRoot":"","sources":["../../../src/http/discovery/discovery.module.ts"],"names":[],"mappings":"AAIA,qBAIa,eAAe;CAAG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DiscoveryModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const providers_module_1 = require("../providers/providers.module");
|
|
12
|
+
const agents_controller_1 = require("./agents.controller");
|
|
13
|
+
let DiscoveryModule = class DiscoveryModule {
|
|
14
|
+
};
|
|
15
|
+
exports.DiscoveryModule = DiscoveryModule;
|
|
16
|
+
exports.DiscoveryModule = DiscoveryModule = __decorate([
|
|
17
|
+
(0, common_1.Module)({
|
|
18
|
+
imports: [providers_module_1.ProvidersModule],
|
|
19
|
+
controllers: [agents_controller_1.AgentsController],
|
|
20
|
+
})
|
|
21
|
+
], DiscoveryModule);
|
|
22
|
+
//# sourceMappingURL=discovery.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.module.js","sourceRoot":"","sources":["../../../src/http/discovery/discovery.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,oEAAgE;AAChE,2DAAuD;AAMhD,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAJ3B,IAAA,eAAM,EAAC;QACP,OAAO,EAAE,CAAC,kCAAe,CAAC;QAC1B,WAAW,EAAE,CAAC,oCAAgB,CAAC;KAC/B,CAAC;GACW,eAAe,CAAG"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare class SuccessResponseDto {
|
|
2
|
+
success: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare class ErrorResponseDto {
|
|
5
|
+
error: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class AgentListItemDto {
|
|
8
|
+
path: string;
|
|
9
|
+
name: string;
|
|
10
|
+
directory: string;
|
|
11
|
+
relativePath: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class AgentsListResponseDto {
|
|
14
|
+
agents: AgentListItemDto[];
|
|
15
|
+
}
|
|
16
|
+
export declare class MessageItemDto {
|
|
17
|
+
id: number;
|
|
18
|
+
type: "user" | "assistant";
|
|
19
|
+
content: string;
|
|
20
|
+
timestamp: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class MessagesResponseDto {
|
|
23
|
+
messages: MessageItemDto[];
|
|
24
|
+
}
|
|
25
|
+
export declare class MessageResponseDto {
|
|
26
|
+
response: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class SessionResponseDto {
|
|
29
|
+
id: string;
|
|
30
|
+
appName: string;
|
|
31
|
+
userId: string;
|
|
32
|
+
state: Record<string, any>;
|
|
33
|
+
eventCount: number;
|
|
34
|
+
lastUpdateTime: number;
|
|
35
|
+
createdAt: number;
|
|
36
|
+
}
|
|
37
|
+
export declare class SessionsResponseDto {
|
|
38
|
+
sessions: SessionResponseDto[];
|
|
39
|
+
}
|
|
40
|
+
export declare class EventItemDto {
|
|
41
|
+
id: string;
|
|
42
|
+
author: string;
|
|
43
|
+
timestamp: number;
|
|
44
|
+
content: any;
|
|
45
|
+
actions: any;
|
|
46
|
+
functionCalls: any[];
|
|
47
|
+
functionResponses: any[];
|
|
48
|
+
branch?: string;
|
|
49
|
+
isFinalResponse: boolean;
|
|
50
|
+
}
|
|
51
|
+
export declare class EventsResponseDto {
|
|
52
|
+
events: EventItemDto[];
|
|
53
|
+
totalCount: number;
|
|
54
|
+
}
|
|
55
|
+
export declare class StateMetadataDto {
|
|
56
|
+
lastUpdated: number;
|
|
57
|
+
changeCount: number;
|
|
58
|
+
totalKeys: number;
|
|
59
|
+
sizeBytes: number;
|
|
60
|
+
}
|
|
61
|
+
export declare class StateResponseDto {
|
|
62
|
+
agentState: Record<string, any>;
|
|
63
|
+
userState: Record<string, any>;
|
|
64
|
+
sessionState: Record<string, any>;
|
|
65
|
+
metadata: StateMetadataDto;
|
|
66
|
+
}
|
|
67
|
+
export declare class HealthResponseDto {
|
|
68
|
+
status: string;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=api.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.dto.d.ts","sourceRoot":"","sources":["../../../src/http/dto/api.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,kBAAkB;IAE9B,OAAO,EAAG,OAAO,CAAC;CAClB;AAED,qBAAa,gBAAgB;IAE5B,KAAK,EAAG,MAAM,CAAC;CACf;AAGD,qBAAa,gBAAgB;IACb,IAAI,EAAG,MAAM,CAAC;IACd,IAAI,EAAG,MAAM,CAAC;IACd,SAAS,EAAG,MAAM,CAAC;IACnB,YAAY,EAAG,MAAM,CAAC;CACrC;AAED,qBAAa,qBAAqB;IAEjC,MAAM,EA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AAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,SAAS,EAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,YAAY,EAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzB,QAAQ,EAAG,gBAAgB,CAAC;CACrE;AAGD,qBAAa,iBAAiB;IACG,MAAM,EAAG,MAAM,CAAC;CAChD"}
|
|
@@ -0,0 +1,268 @@
|
|
|
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.HealthResponseDto = exports.StateResponseDto = exports.StateMetadataDto = exports.EventsResponseDto = exports.EventItemDto = exports.SessionsResponseDto = exports.SessionResponseDto = exports.MessageResponseDto = exports.MessagesResponseDto = exports.MessageItemDto = exports.AgentsListResponseDto = exports.AgentListItemDto = exports.ErrorResponseDto = exports.SuccessResponseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
// Generic success / error
|
|
15
|
+
class SuccessResponseDto {
|
|
16
|
+
success;
|
|
17
|
+
}
|
|
18
|
+
exports.SuccessResponseDto = SuccessResponseDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)({ example: true }),
|
|
21
|
+
__metadata("design:type", Boolean)
|
|
22
|
+
], SuccessResponseDto.prototype, "success", void 0);
|
|
23
|
+
class ErrorResponseDto {
|
|
24
|
+
error;
|
|
25
|
+
}
|
|
26
|
+
exports.ErrorResponseDto = ErrorResponseDto;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({ example: "Failed to load agent" }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ErrorResponseDto.prototype, "error", void 0);
|
|
31
|
+
// Agents
|
|
32
|
+
class AgentListItemDto {
|
|
33
|
+
path;
|
|
34
|
+
name;
|
|
35
|
+
directory;
|
|
36
|
+
relativePath;
|
|
37
|
+
}
|
|
38
|
+
exports.AgentListItemDto = AgentListItemDto;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiProperty)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], AgentListItemDto.prototype, "path", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, swagger_1.ApiProperty)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], AgentListItemDto.prototype, "name", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, swagger_1.ApiProperty)(),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], AgentListItemDto.prototype, "directory", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, swagger_1.ApiProperty)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], AgentListItemDto.prototype, "relativePath", void 0);
|
|
55
|
+
class AgentsListResponseDto {
|
|
56
|
+
agents;
|
|
57
|
+
}
|
|
58
|
+
exports.AgentsListResponseDto = AgentsListResponseDto;
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, swagger_1.ApiProperty)({ type: [AgentListItemDto] }),
|
|
61
|
+
__metadata("design:type", Array)
|
|
62
|
+
], AgentsListResponseDto.prototype, "agents", void 0);
|
|
63
|
+
// Messages
|
|
64
|
+
class MessageItemDto {
|
|
65
|
+
id;
|
|
66
|
+
type;
|
|
67
|
+
content;
|
|
68
|
+
timestamp;
|
|
69
|
+
}
|
|
70
|
+
exports.MessageItemDto = MessageItemDto;
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, swagger_1.ApiProperty)({ example: 1 }),
|
|
73
|
+
__metadata("design:type", Number)
|
|
74
|
+
], MessageItemDto.prototype, "id", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiProperty)({ enum: ["user", "assistant"], example: "user" }),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], MessageItemDto.prototype, "type", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, swagger_1.ApiProperty)({ example: "Hello" }),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], MessageItemDto.prototype, "content", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, swagger_1.ApiProperty)({ example: new Date().toISOString() }),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], MessageItemDto.prototype, "timestamp", void 0);
|
|
87
|
+
class MessagesResponseDto {
|
|
88
|
+
messages;
|
|
89
|
+
}
|
|
90
|
+
exports.MessagesResponseDto = MessagesResponseDto;
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, swagger_1.ApiProperty)({ type: [MessageItemDto] }),
|
|
93
|
+
__metadata("design:type", Array)
|
|
94
|
+
], MessagesResponseDto.prototype, "messages", void 0);
|
|
95
|
+
class MessageResponseDto {
|
|
96
|
+
response;
|
|
97
|
+
}
|
|
98
|
+
exports.MessageResponseDto = MessageResponseDto;
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, swagger_1.ApiProperty)({ example: "Hi there!" }),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], MessageResponseDto.prototype, "response", void 0);
|
|
103
|
+
// Sessions
|
|
104
|
+
class SessionResponseDto {
|
|
105
|
+
id;
|
|
106
|
+
appName;
|
|
107
|
+
userId;
|
|
108
|
+
state;
|
|
109
|
+
eventCount;
|
|
110
|
+
lastUpdateTime;
|
|
111
|
+
createdAt;
|
|
112
|
+
}
|
|
113
|
+
exports.SessionResponseDto = SessionResponseDto;
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, swagger_1.ApiProperty)(),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], SessionResponseDto.prototype, "id", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, swagger_1.ApiProperty)(),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], SessionResponseDto.prototype, "appName", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, swagger_1.ApiProperty)(),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], SessionResponseDto.prototype, "userId", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, swagger_1.ApiProperty)({ type: Object }),
|
|
128
|
+
__metadata("design:type", Object)
|
|
129
|
+
], SessionResponseDto.prototype, "state", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, swagger_1.ApiProperty)({ example: 3 }),
|
|
132
|
+
__metadata("design:type", Number)
|
|
133
|
+
], SessionResponseDto.prototype, "eventCount", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, swagger_1.ApiProperty)({ example: Date.now() }),
|
|
136
|
+
__metadata("design:type", Number)
|
|
137
|
+
], SessionResponseDto.prototype, "lastUpdateTime", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, swagger_1.ApiProperty)({ example: Date.now() }),
|
|
140
|
+
__metadata("design:type", Number)
|
|
141
|
+
], SessionResponseDto.prototype, "createdAt", void 0);
|
|
142
|
+
class SessionsResponseDto {
|
|
143
|
+
sessions;
|
|
144
|
+
}
|
|
145
|
+
exports.SessionsResponseDto = SessionsResponseDto;
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, swagger_1.ApiProperty)({ type: [SessionResponseDto] }),
|
|
148
|
+
__metadata("design:type", Array)
|
|
149
|
+
], SessionsResponseDto.prototype, "sessions", void 0);
|
|
150
|
+
// Events
|
|
151
|
+
class EventItemDto {
|
|
152
|
+
id;
|
|
153
|
+
author;
|
|
154
|
+
timestamp;
|
|
155
|
+
content;
|
|
156
|
+
actions;
|
|
157
|
+
functionCalls;
|
|
158
|
+
functionResponses;
|
|
159
|
+
branch;
|
|
160
|
+
isFinalResponse;
|
|
161
|
+
}
|
|
162
|
+
exports.EventItemDto = EventItemDto;
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, swagger_1.ApiProperty)(),
|
|
165
|
+
__metadata("design:type", String)
|
|
166
|
+
], EventItemDto.prototype, "id", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, swagger_1.ApiProperty)(),
|
|
169
|
+
__metadata("design:type", String)
|
|
170
|
+
], EventItemDto.prototype, "author", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, swagger_1.ApiProperty)({ example: Date.now() }),
|
|
173
|
+
__metadata("design:type", Number)
|
|
174
|
+
], EventItemDto.prototype, "timestamp", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, swagger_1.ApiProperty)({ description: "Raw event content", type: Object }),
|
|
177
|
+
__metadata("design:type", Object)
|
|
178
|
+
], EventItemDto.prototype, "content", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, swagger_1.ApiProperty)({ type: Object, nullable: true }),
|
|
181
|
+
__metadata("design:type", Object)
|
|
182
|
+
], EventItemDto.prototype, "actions", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, swagger_1.ApiProperty)({ type: [Object] }),
|
|
185
|
+
__metadata("design:type", Array)
|
|
186
|
+
], EventItemDto.prototype, "functionCalls", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
(0, swagger_1.ApiProperty)({ type: [Object] }),
|
|
189
|
+
__metadata("design:type", Array)
|
|
190
|
+
], EventItemDto.prototype, "functionResponses", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, swagger_1.ApiProperty)({ required: false, nullable: true }),
|
|
193
|
+
__metadata("design:type", String)
|
|
194
|
+
], EventItemDto.prototype, "branch", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
(0, swagger_1.ApiProperty)({ example: false }),
|
|
197
|
+
__metadata("design:type", Boolean)
|
|
198
|
+
], EventItemDto.prototype, "isFinalResponse", void 0);
|
|
199
|
+
class EventsResponseDto {
|
|
200
|
+
events;
|
|
201
|
+
totalCount;
|
|
202
|
+
}
|
|
203
|
+
exports.EventsResponseDto = EventsResponseDto;
|
|
204
|
+
__decorate([
|
|
205
|
+
(0, swagger_1.ApiProperty)({ type: [EventItemDto] }),
|
|
206
|
+
__metadata("design:type", Array)
|
|
207
|
+
], EventsResponseDto.prototype, "events", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
(0, swagger_1.ApiProperty)({ example: 1 }),
|
|
210
|
+
__metadata("design:type", Number)
|
|
211
|
+
], EventsResponseDto.prototype, "totalCount", void 0);
|
|
212
|
+
// State
|
|
213
|
+
class StateMetadataDto {
|
|
214
|
+
lastUpdated;
|
|
215
|
+
changeCount;
|
|
216
|
+
totalKeys;
|
|
217
|
+
sizeBytes;
|
|
218
|
+
}
|
|
219
|
+
exports.StateMetadataDto = StateMetadataDto;
|
|
220
|
+
__decorate([
|
|
221
|
+
(0, swagger_1.ApiProperty)({ example: Date.now() }),
|
|
222
|
+
__metadata("design:type", Number)
|
|
223
|
+
], StateMetadataDto.prototype, "lastUpdated", void 0);
|
|
224
|
+
__decorate([
|
|
225
|
+
(0, swagger_1.ApiProperty)({ example: 0 }),
|
|
226
|
+
__metadata("design:type", Number)
|
|
227
|
+
], StateMetadataDto.prototype, "changeCount", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
(0, swagger_1.ApiProperty)({ example: 5 }),
|
|
230
|
+
__metadata("design:type", Number)
|
|
231
|
+
], StateMetadataDto.prototype, "totalKeys", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
(0, swagger_1.ApiProperty)({ example: 120 }),
|
|
234
|
+
__metadata("design:type", Number)
|
|
235
|
+
], StateMetadataDto.prototype, "sizeBytes", void 0);
|
|
236
|
+
class StateResponseDto {
|
|
237
|
+
agentState;
|
|
238
|
+
userState;
|
|
239
|
+
sessionState;
|
|
240
|
+
metadata;
|
|
241
|
+
}
|
|
242
|
+
exports.StateResponseDto = StateResponseDto;
|
|
243
|
+
__decorate([
|
|
244
|
+
(0, swagger_1.ApiProperty)({ type: Object }),
|
|
245
|
+
__metadata("design:type", Object)
|
|
246
|
+
], StateResponseDto.prototype, "agentState", void 0);
|
|
247
|
+
__decorate([
|
|
248
|
+
(0, swagger_1.ApiProperty)({ type: Object }),
|
|
249
|
+
__metadata("design:type", Object)
|
|
250
|
+
], StateResponseDto.prototype, "userState", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
(0, swagger_1.ApiProperty)({ type: Object }),
|
|
253
|
+
__metadata("design:type", Object)
|
|
254
|
+
], StateResponseDto.prototype, "sessionState", void 0);
|
|
255
|
+
__decorate([
|
|
256
|
+
(0, swagger_1.ApiProperty)({ type: StateMetadataDto }),
|
|
257
|
+
__metadata("design:type", StateMetadataDto)
|
|
258
|
+
], StateResponseDto.prototype, "metadata", void 0);
|
|
259
|
+
// Health
|
|
260
|
+
class HealthResponseDto {
|
|
261
|
+
status;
|
|
262
|
+
}
|
|
263
|
+
exports.HealthResponseDto = HealthResponseDto;
|
|
264
|
+
__decorate([
|
|
265
|
+
(0, swagger_1.ApiProperty)({ example: "ok" }),
|
|
266
|
+
__metadata("design:type", String)
|
|
267
|
+
], HealthResponseDto.prototype, "status", void 0);
|
|
268
|
+
//# sourceMappingURL=api.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.dto.js","sourceRoot":"","sources":["../../../src/http/dto/api.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAE9C,0BAA0B;AAC1B,MAAa,kBAAk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5B,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDAAsB;AACrB;IAA5B,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;mDAAoB;AACjB;IAA9B,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;;mDAAoB;AAGnD,MAAa,gBAAgB;IACG,UAAU,CAAuB;IACjC,SAAS,CAAuB;IAChC,YAAY,CAAuB;IACzB,QAAQ,CAAoB;CACrE;AALD,4CAKC;AAJ+B;IAA9B,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAAkC;AACjC;IAA9B,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDAAiC;AAChC;IAA9B,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAAoC;AACzB;IAAxC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;8BAAY,gBAAgB;kDAAC;AAGtE,SAAS;AACT,MAAa,iBAAiB;IACG,MAAM,CAAU;CAChD;AAFD,8CAEC;AADgC;IAA/B,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDAAiB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EventsResponse } from "../../common/types";
|
|
2
|
+
import { EventsService } from "./events.service";
|
|
3
|
+
export declare class EventsController {
|
|
4
|
+
private readonly events;
|
|
5
|
+
constructor(events: EventsService);
|
|
6
|
+
getEvents(id: string, sessionId: string): Promise<EventsResponse>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=events.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.controller.d.ts","sourceRoot":"","sources":["../../../src/http/events/events.controller.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAEa,gBAAgB;IAG3B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAejC,SAAS,CACD,EAAE,EAAE,MAAM,EACH,SAAS,EAAE,MAAM,GACnC,OAAO,CAAC,cAAc,CAAC;CAI1B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.EventsController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const api_dto_1 = require("../dto/api.dto");
|
|
19
|
+
const events_service_1 = require("./events.service");
|
|
20
|
+
let EventsController = class EventsController {
|
|
21
|
+
events;
|
|
22
|
+
constructor(events) {
|
|
23
|
+
this.events = events;
|
|
24
|
+
}
|
|
25
|
+
async getEvents(id, sessionId) {
|
|
26
|
+
const agentPath = decodeURIComponent(id);
|
|
27
|
+
return this.events.getEvents(agentPath, sessionId);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.EventsController = EventsController;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, common_1.Get)("events"),
|
|
33
|
+
(0, swagger_1.ApiOperation)({
|
|
34
|
+
summary: "Get session events",
|
|
35
|
+
description: "Returns chronological events for a specific agent session including actions, function calls, and responses.",
|
|
36
|
+
}),
|
|
37
|
+
(0, swagger_1.ApiParam)({
|
|
38
|
+
name: "id",
|
|
39
|
+
description: "URL-encoded absolute agent path or identifier",
|
|
40
|
+
}),
|
|
41
|
+
(0, swagger_1.ApiParam)({ name: "sessionId", description: "Target session identifier" }),
|
|
42
|
+
(0, swagger_1.ApiOkResponse)({ type: api_dto_1.EventsResponseDto }),
|
|
43
|
+
__param(0, (0, common_1.Param)("id")),
|
|
44
|
+
__param(1, (0, common_1.Param)("sessionId")),
|
|
45
|
+
__metadata("design:type", Function),
|
|
46
|
+
__metadata("design:paramtypes", [String, String]),
|
|
47
|
+
__metadata("design:returntype", Promise)
|
|
48
|
+
], EventsController.prototype, "getEvents", null);
|
|
49
|
+
exports.EventsController = EventsController = __decorate([
|
|
50
|
+
(0, swagger_1.ApiTags)("events"),
|
|
51
|
+
(0, common_1.Controller)("api/agents/:id/sessions/:sessionId"),
|
|
52
|
+
__param(0, (0, common_1.Inject)(events_service_1.EventsService)),
|
|
53
|
+
__metadata("design:paramtypes", [events_service_1.EventsService])
|
|
54
|
+
], EventsController);
|
|
55
|
+
//# sourceMappingURL=events.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.controller.js","sourceRoot":"","sources":["../../../src/http/events/events.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAgE;AAChE,6CAKyB;AAEzB,4CAAmD;AACnD,qDAAiD;AAI1C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAGV;IAFlB,YAEkB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IACpC,CAAC;IAcE,AAAN,KAAK,CAAC,SAAS,CACD,EAAU,EACH,SAAiB;QAErC,MAAM,SAAS,GAAG,kBAAkB,CAAC,EAAE,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACpD,CAAC;CACD,CAAA;AAzBY,4CAAgB;AAkBtB;IAZL,IAAA,YAAG,EAAC,QAAQ,CAAC;IACb,IAAA,sBAAY,EAAC;QACb,OAAO,EAAE,oBAAoB;QAC7B,WAAW,EACV,6GAA6G;KAC9G,CAAC;IACD,IAAA,kBAAQ,EAAC;QACT,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,+CAA+C;KAC5D,CAAC;IACD,IAAA,kBAAQ,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IACzE,IAAA,uBAAa,EAAC,EAAE,IAAI,EAAE,2BAAiB,EAAE,CAAC;IAEzC,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,cAAK,EAAC,WAAW,CAAC,CAAA;;;;iDAInB;2BAxBW,gBAAgB;IAF5B,IAAA,iBAAO,EAAC,QAAQ,CAAC;IACjB,IAAA,mBAAU,EAAC,oCAAoC,CAAC;IAG9C,WAAA,IAAA,eAAM,EAAC,8BAAa,CAAC,CAAA;qCACG,8BAAa;GAH3B,gBAAgB,CAyB5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.module.d.ts","sourceRoot":"","sources":["../../../src/http/events/events.module.ts"],"names":[],"mappings":"AAMA,qBAKa,YAAY;CAAG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.EventsModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const providers_module_1 = require("../providers/providers.module");
|
|
12
|
+
const sessions_module_1 = require("../sessions/sessions.module");
|
|
13
|
+
const events_controller_1 = require("./events.controller");
|
|
14
|
+
const events_service_1 = require("./events.service");
|
|
15
|
+
let EventsModule = class EventsModule {
|
|
16
|
+
};
|
|
17
|
+
exports.EventsModule = EventsModule;
|
|
18
|
+
exports.EventsModule = EventsModule = __decorate([
|
|
19
|
+
(0, common_1.Module)({
|
|
20
|
+
imports: [providers_module_1.ProvidersModule, sessions_module_1.SessionsModule],
|
|
21
|
+
providers: [events_service_1.EventsService],
|
|
22
|
+
controllers: [events_controller_1.EventsController],
|
|
23
|
+
})
|
|
24
|
+
], EventsModule);
|
|
25
|
+
//# sourceMappingURL=events.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.module.js","sourceRoot":"","sources":["../../../src/http/events/events.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,oEAAgE;AAChE,iEAA6D;AAC7D,2DAAuD;AACvD,qDAAiD;AAO1C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IALxB,IAAA,eAAM,EAAC;QACP,OAAO,EAAE,CAAC,kCAAe,EAAE,gCAAc,CAAC;QAC1C,SAAS,EAAE,CAAC,8BAAa,CAAC;QAC1B,WAAW,EAAE,CAAC,oCAAgB,CAAC;KAC/B,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EventsResponse } from "../../common/types";
|
|
2
|
+
import { SessionsService } from "../sessions/sessions.service";
|
|
3
|
+
export declare class EventsService {
|
|
4
|
+
private readonly sessionsService;
|
|
5
|
+
constructor(sessionsService: SessionsService);
|
|
6
|
+
getEvents(agentPath: string, sessionId: string): Promise<EventsResponse>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=events.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.service.d.ts","sourceRoot":"","sources":["../../../src/http/events/events.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,qBACa,aAAa;IAEC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,eAAe;IAGrE,SAAS,CACd,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GACf,OAAO,CAAC,cAAc,CAAC;CAO1B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.EventsService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const sessions_service_1 = require("../sessions/sessions.service");
|
|
18
|
+
let EventsService = class EventsService {
|
|
19
|
+
sessionsService;
|
|
20
|
+
constructor(sessionsService) {
|
|
21
|
+
this.sessionsService = sessionsService;
|
|
22
|
+
}
|
|
23
|
+
async getEvents(agentPath, sessionId) {
|
|
24
|
+
const loaded = await this.sessionsService.ensureAgentLoaded(agentPath);
|
|
25
|
+
if (!loaded) {
|
|
26
|
+
return { events: [], totalCount: 0 };
|
|
27
|
+
}
|
|
28
|
+
return this.sessionsService.getSessionEvents(loaded, sessionId);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.EventsService = EventsService;
|
|
32
|
+
exports.EventsService = EventsService = __decorate([
|
|
33
|
+
(0, common_1.Injectable)(),
|
|
34
|
+
__param(0, (0, common_1.Inject)(sessions_service_1.SessionsService)),
|
|
35
|
+
__metadata("design:paramtypes", [sessions_service_1.SessionsService])
|
|
36
|
+
], EventsService);
|
|
37
|
+
//# sourceMappingURL=events.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.service.js","sourceRoot":"","sources":["../../../src/http/events/events.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AAEpD,mEAA+D;AAGxD,IAAM,aAAa,GAAnB,MAAM,aAAa;IAEkB;IAD3C,YAC2C,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IACxE,CAAC;IAEJ,KAAK,CAAC,SAAS,CACd,SAAiB,EACjB,SAAiB;QAEjB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;QACtC,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjE,CAAC;CACD,CAAA;AAfY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;IAGV,WAAA,IAAA,eAAM,EAAC,kCAAe,CAAC,CAAA;qCAAmC,kCAAe;GAF/D,aAAa,CAezB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.controller.d.ts","sourceRoot":"","sources":["../../../src/http/health/health.controller.ts"],"names":[],"mappings":"AAIA,qBAEa,gBAAgB;IAQ5B,MAAM;;;CAGN"}
|