@solidxai/core 0.1.10-beta.10 → 0.1.10-beta.11
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/.claude/settings.local.json +15 -0
- package/CLAUDE.md +18 -0
- package/CURRENT_PROMPT +6 -0
- package/dist/commands/refresh-model.command.d.ts +0 -4
- package/dist/commands/refresh-model.command.d.ts.map +1 -1
- package/dist/commands/refresh-model.command.js +0 -32
- package/dist/commands/refresh-model.command.js.map +1 -1
- package/dist/controllers/mcp-audit-log.controller.d.ts +35 -0
- package/dist/controllers/mcp-audit-log.controller.d.ts.map +1 -0
- package/dist/controllers/mcp-audit-log.controller.js +147 -0
- package/dist/controllers/mcp-audit-log.controller.js.map +1 -0
- package/dist/controllers/model-metadata.controller.d.ts +1 -1
- package/dist/controllers/model-metadata.controller.js +2 -2
- package/dist/controllers/model-metadata.controller.js.map +1 -1
- package/dist/controllers/module-metadata.controller.js +1 -1
- package/dist/controllers/module-metadata.controller.js.map +1 -1
- package/dist/dtos/create-mcp-audit-log.dto.d.ts +19 -0
- package/dist/dtos/create-mcp-audit-log.dto.d.ts.map +1 -0
- package/dist/dtos/create-mcp-audit-log.dto.js +118 -0
- package/dist/dtos/create-mcp-audit-log.dto.js.map +1 -0
- package/dist/dtos/update-mcp-audit-log.dto.d.ts +19 -0
- package/dist/dtos/update-mcp-audit-log.dto.d.ts.map +1 -0
- package/dist/dtos/update-mcp-audit-log.dto.js +117 -0
- package/dist/dtos/update-mcp-audit-log.dto.js.map +1 -0
- package/dist/entities/mcp-audit-log.entity.d.ts +19 -0
- package/dist/entities/mcp-audit-log.entity.d.ts.map +1 -0
- package/dist/entities/mcp-audit-log.entity.js +90 -0
- package/dist/entities/mcp-audit-log.entity.js.map +1 -0
- package/dist/helpers/command.service.d.ts +1 -0
- package/dist/helpers/command.service.d.ts.map +1 -1
- package/dist/helpers/command.service.js +1 -0
- package/dist/helpers/command.service.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +0 -2
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/repository/mcp-audit-log.repository.d.ts +12 -0
- package/dist/repository/mcp-audit-log.repository.d.ts.map +1 -0
- package/dist/repository/mcp-audit-log.repository.js +34 -0
- package/dist/repository/mcp-audit-log.repository.js.map +1 -0
- package/dist/seeders/seed-data/solid-core-metadata.json +346 -0
- package/dist/services/mcp-audit-log.service.d.ts +12 -0
- package/dist/services/mcp-audit-log.service.d.ts.map +1 -0
- package/dist/services/mcp-audit-log.service.js +38 -0
- package/dist/services/mcp-audit-log.service.js.map +1 -0
- package/dist/services/model-metadata.service.d.ts +4 -1
- package/dist/services/model-metadata.service.d.ts.map +1 -1
- package/dist/services/model-metadata.service.js +20 -11
- package/dist/services/model-metadata.service.js.map +1 -1
- package/dist/services/module-metadata.service.d.ts +4 -1
- package/dist/services/module-metadata.service.d.ts.map +1 -1
- package/dist/services/module-metadata.service.js +18 -2
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +8 -0
- package/dist/solid-core.module.js.map +1 -1
- package/package.json +4 -8
- package/src/commands/refresh-model.command.ts +1 -32
- package/src/controllers/mcp-audit-log.controller.ts +70 -0
- package/src/controllers/model-metadata.controller.ts +1 -1
- package/src/controllers/module-metadata.controller.ts +1 -1
- package/src/dtos/create-mcp-audit-log.dto.ts +84 -0
- package/src/dtos/update-mcp-audit-log.dto.ts +83 -0
- package/src/entities/mcp-audit-log.entity.ts +55 -0
- package/src/helpers/command.service.ts +2 -0
- package/src/index.ts +4 -0
- package/src/interfaces.ts +0 -2
- package/src/repository/mcp-audit-log.repository.ts +17 -0
- package/src/seeders/seed-data/solid-core-metadata.json +346 -0
- package/src/services/1.js +6 -0
- package/src/services/mcp-audit-log.service.ts +19 -0
- package/src/services/model-metadata.service.ts +13 -13
- package/src/services/module-metadata.service.ts +11 -0
- package/src/solid-core.module.ts +8 -0
- package/dist-tests/api/authenticate.spec.js +0 -119
- package/dist-tests/api/authenticate.spec.js.map +0 -1
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +0 -97
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +0 -1
- package/dist-tests/api/ping.spec.js +0 -21
- package/dist-tests/api/ping.spec.js.map +0 -1
- package/dist-tests/helpers/auth.js +0 -41
- package/dist-tests/helpers/auth.js.map +0 -1
- package/dist-tests/helpers/env.js +0 -11
- package/dist-tests/helpers/env.js.map +0 -1
- package/docs/grouping-enhancements.md +0 -89
- package/docs/java-spring/README.md +0 -3
- package/docs/java-spring/solid-core-module-deep-dive-report.md +0 -1317
- package/docs/seed-changes.md +0 -65
- package/docs/test-data-workflow.md +0 -200
- package/docs/type-declaration-import-issue.md +0 -24
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { forwardRef, Inject, Logger } from '@nestjs/common';
|
|
2
2
|
import { Command, CommandRunner, Option } from 'nest-commander';
|
|
3
3
|
import { ModelMetadataService } from 'src/services/model-metadata.service';
|
|
4
4
|
import { CommandError } from './helper';
|
|
5
|
-
import { In } from 'typeorm';
|
|
6
5
|
|
|
7
6
|
interface CommandOptions {
|
|
8
7
|
name?: string;
|
|
9
8
|
id?: number;
|
|
10
|
-
fieldIds?: number[];
|
|
11
|
-
fieldNames?: string[];
|
|
12
9
|
dryRun?: boolean;
|
|
13
10
|
}
|
|
14
11
|
|
|
@@ -36,8 +33,6 @@ export class RefreshModelCommand extends CommandRunner {
|
|
|
36
33
|
modelId: options.id,
|
|
37
34
|
modelUserKey: options.name,
|
|
38
35
|
dryRun: options.dryRun,
|
|
39
|
-
fieldIdsForRefresh: options.fieldIds,
|
|
40
|
-
fieldNamesForRefresh: options.fieldNames,
|
|
41
36
|
};
|
|
42
37
|
await this.modelMetadataService.handleGenerateCode(codeGenerationOptions);
|
|
43
38
|
}
|
|
@@ -70,32 +65,6 @@ export class RefreshModelCommand extends CommandRunner {
|
|
|
70
65
|
return (val === 'false') ? false : true;
|
|
71
66
|
}
|
|
72
67
|
|
|
73
|
-
// Accept field IDs as an argument
|
|
74
|
-
@Option({
|
|
75
|
-
flags: '-fids, --fieldIds [Array of field IDs]',
|
|
76
|
-
description: 'Json array of Field IDs from the ss_field_metadata table',
|
|
77
|
-
})
|
|
78
|
-
parseFieldIds(val: string): number[] {
|
|
79
|
-
//Check if the value is a json array
|
|
80
|
-
if (!val.startsWith('[') || !val.endsWith(']')) {
|
|
81
|
-
throw new BadRequestException('Field IDs should be a json array');
|
|
82
|
-
}
|
|
83
|
-
return JSON.parse(val).map((id: string) => parseInt(id));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Accept field Names as an argument
|
|
87
|
-
@Option({
|
|
88
|
-
flags: '-fnames, --fieldNames [Array of field Names]',
|
|
89
|
-
description: 'Json array of Field Names from the ss_field_metadata table',
|
|
90
|
-
})
|
|
91
|
-
parseFieldNames(val: string): string[] {
|
|
92
|
-
//Check if the value is a json array
|
|
93
|
-
if (!val.startsWith('[') || !val.endsWith(']')) {
|
|
94
|
-
throw new BadRequestException('Field Names should be a json array');
|
|
95
|
-
}
|
|
96
|
-
return JSON.parse(val).map((name: string) => name.toString());
|
|
97
|
-
}
|
|
98
|
-
|
|
99
68
|
// Validate the options passed
|
|
100
69
|
private validate(options: CommandOptions): CommandError[] {
|
|
101
70
|
if (!options.id && !options.name) {
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Body, Controller, Delete, Get, Param, Patch, Post, Put, Query, UploadedFiles, UseInterceptors } from '@nestjs/common';
|
|
2
|
+
import { AnyFilesInterceptor } from '@nestjs/platform-express';
|
|
3
|
+
import { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';
|
|
4
|
+
import { CreateMcpAuditLogDto } from 'src/dtos/create-mcp-audit-log.dto';
|
|
5
|
+
import { UpdateMcpAuditLogDto } from 'src/dtos/update-mcp-audit-log.dto';
|
|
6
|
+
import { McpAuditLogService } from 'src/services/mcp-audit-log.service';
|
|
7
|
+
|
|
8
|
+
@ApiTags('Solid Core')
|
|
9
|
+
@Controller('mcp-audit-log')
|
|
10
|
+
export class McpAuditLogController {
|
|
11
|
+
constructor(private readonly service: McpAuditLogService) {}
|
|
12
|
+
|
|
13
|
+
@ApiBearerAuth('jwt')
|
|
14
|
+
@Post()
|
|
15
|
+
@UseInterceptors(AnyFilesInterceptor())
|
|
16
|
+
create(@Body() createDto: CreateMcpAuditLogDto, @UploadedFiles() files: Array<Express.Multer.File>) {
|
|
17
|
+
return this.service.create(createDto, files);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@ApiBearerAuth('jwt')
|
|
21
|
+
@Post('/bulk')
|
|
22
|
+
@UseInterceptors(AnyFilesInterceptor())
|
|
23
|
+
insertMany(@Body() createDtos: CreateMcpAuditLogDto[], @UploadedFiles() filesArray: Express.Multer.File[][] = []) {
|
|
24
|
+
return this.service.insertMany(createDtos, filesArray);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@ApiBearerAuth('jwt')
|
|
28
|
+
@Put(':id')
|
|
29
|
+
@UseInterceptors(AnyFilesInterceptor())
|
|
30
|
+
update(@Param('id') id: number, @Body() updateDto: UpdateMcpAuditLogDto, @UploadedFiles() files: Array<Express.Multer.File>) {
|
|
31
|
+
return this.service.update(id, updateDto, files);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@ApiBearerAuth('jwt')
|
|
35
|
+
@Patch(':id')
|
|
36
|
+
@UseInterceptors(AnyFilesInterceptor())
|
|
37
|
+
partialUpdate(@Param('id') id: number, @Body() updateDto: UpdateMcpAuditLogDto, @UploadedFiles() files: Array<Express.Multer.File>) {
|
|
38
|
+
return this.service.update(id, updateDto, files, true);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@ApiBearerAuth('jwt')
|
|
42
|
+
@ApiQuery({ name: 'limit', required: false, type: Number })
|
|
43
|
+
@ApiQuery({ name: 'offset', required: false, type: Number })
|
|
44
|
+
@ApiQuery({ name: 'fields', required: false, type: Array })
|
|
45
|
+
@ApiQuery({ name: 'sort', required: false, type: Array })
|
|
46
|
+
@ApiQuery({ name: 'populate', required: false, type: Array })
|
|
47
|
+
@ApiQuery({ name: 'filters', required: false, type: Array })
|
|
48
|
+
@Get()
|
|
49
|
+
findMany(@Query() query: any) {
|
|
50
|
+
return this.service.find(query);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@ApiBearerAuth('jwt')
|
|
54
|
+
@Get(':id')
|
|
55
|
+
findOne(@Param('id') id: string, @Query() query: any) {
|
|
56
|
+
return this.service.findOne(+id, query);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@ApiBearerAuth('jwt')
|
|
60
|
+
@Delete('/bulk')
|
|
61
|
+
deleteMany(@Body() ids: number[]) {
|
|
62
|
+
return this.service.deleteMany(ids);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@ApiBearerAuth('jwt')
|
|
66
|
+
@Delete(':id')
|
|
67
|
+
delete(@Param('id') id: number) {
|
|
68
|
+
return this.service.delete(id);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -92,7 +92,7 @@ export class ModelMetadataController {
|
|
|
92
92
|
@ApiBearerAuth("jwt")
|
|
93
93
|
@Post(':id/generate-code')
|
|
94
94
|
generateCode(@Param('id', ParseIntPipe) id: number) {
|
|
95
|
-
return this.modelMetadataService.
|
|
95
|
+
return this.modelMetadataService.generateCodeViaCtl(id);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
@ApiBearerAuth("jwt")
|
|
@@ -62,7 +62,7 @@ export class ModuleMetadataController {
|
|
|
62
62
|
@ApiBearerAuth("jwt")
|
|
63
63
|
@Post(':id/generate-code')
|
|
64
64
|
generateCode(@Param('id', ParseIntPipe) id: number) {
|
|
65
|
-
return this.moduleMetadataService.
|
|
65
|
+
return this.moduleMetadataService.generateCodeViaCtl(id);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
import { IsDate, IsInt, IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
export class CreateMcpAuditLogDto {
|
|
5
|
+
@IsOptional()
|
|
6
|
+
@IsInt()
|
|
7
|
+
@ApiProperty()
|
|
8
|
+
userId: number;
|
|
9
|
+
|
|
10
|
+
@IsOptional()
|
|
11
|
+
@IsInt()
|
|
12
|
+
@ApiProperty()
|
|
13
|
+
apiKeyId: number;
|
|
14
|
+
|
|
15
|
+
@IsOptional()
|
|
16
|
+
@IsString()
|
|
17
|
+
@ApiProperty()
|
|
18
|
+
username: string;
|
|
19
|
+
|
|
20
|
+
@IsNotEmpty()
|
|
21
|
+
@IsString()
|
|
22
|
+
@ApiProperty()
|
|
23
|
+
transport: string;
|
|
24
|
+
|
|
25
|
+
@IsOptional()
|
|
26
|
+
@IsString()
|
|
27
|
+
@ApiProperty()
|
|
28
|
+
mcpSessionId: string;
|
|
29
|
+
|
|
30
|
+
@IsOptional()
|
|
31
|
+
@IsString()
|
|
32
|
+
@ApiProperty()
|
|
33
|
+
clientAddr: string;
|
|
34
|
+
|
|
35
|
+
@IsNotEmpty()
|
|
36
|
+
@IsString()
|
|
37
|
+
@ApiProperty()
|
|
38
|
+
method: string;
|
|
39
|
+
|
|
40
|
+
@IsOptional()
|
|
41
|
+
@IsString()
|
|
42
|
+
@ApiProperty()
|
|
43
|
+
requestId: string;
|
|
44
|
+
|
|
45
|
+
@IsOptional()
|
|
46
|
+
@IsString()
|
|
47
|
+
@ApiProperty()
|
|
48
|
+
toolName: string;
|
|
49
|
+
|
|
50
|
+
@IsOptional()
|
|
51
|
+
@IsString()
|
|
52
|
+
@ApiProperty()
|
|
53
|
+
requestParams: string;
|
|
54
|
+
|
|
55
|
+
@IsNotEmpty()
|
|
56
|
+
@IsString()
|
|
57
|
+
@ApiProperty()
|
|
58
|
+
status: string;
|
|
59
|
+
|
|
60
|
+
@IsOptional()
|
|
61
|
+
@IsString()
|
|
62
|
+
@ApiProperty()
|
|
63
|
+
responseResult: string;
|
|
64
|
+
|
|
65
|
+
@IsOptional()
|
|
66
|
+
@IsInt()
|
|
67
|
+
@ApiProperty()
|
|
68
|
+
errorCode: number;
|
|
69
|
+
|
|
70
|
+
@IsOptional()
|
|
71
|
+
@IsString()
|
|
72
|
+
@ApiProperty()
|
|
73
|
+
errorMessage: string;
|
|
74
|
+
|
|
75
|
+
@IsOptional()
|
|
76
|
+
@IsNumber()
|
|
77
|
+
@ApiProperty()
|
|
78
|
+
durationMs: number;
|
|
79
|
+
|
|
80
|
+
@IsOptional()
|
|
81
|
+
@IsDate()
|
|
82
|
+
@ApiProperty()
|
|
83
|
+
createdAt: Date;
|
|
84
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
import { IsInt, IsNumber, IsOptional, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
export class UpdateMcpAuditLogDto {
|
|
5
|
+
@IsOptional()
|
|
6
|
+
@IsInt()
|
|
7
|
+
id: number;
|
|
8
|
+
|
|
9
|
+
@IsOptional()
|
|
10
|
+
@IsInt()
|
|
11
|
+
@ApiProperty()
|
|
12
|
+
userId: number;
|
|
13
|
+
|
|
14
|
+
@IsOptional()
|
|
15
|
+
@IsInt()
|
|
16
|
+
@ApiProperty()
|
|
17
|
+
apiKeyId: number;
|
|
18
|
+
|
|
19
|
+
@IsOptional()
|
|
20
|
+
@IsString()
|
|
21
|
+
@ApiProperty()
|
|
22
|
+
username: string;
|
|
23
|
+
|
|
24
|
+
@IsOptional()
|
|
25
|
+
@IsString()
|
|
26
|
+
@ApiProperty()
|
|
27
|
+
transport: string;
|
|
28
|
+
|
|
29
|
+
@IsOptional()
|
|
30
|
+
@IsString()
|
|
31
|
+
@ApiProperty()
|
|
32
|
+
mcpSessionId: string;
|
|
33
|
+
|
|
34
|
+
@IsOptional()
|
|
35
|
+
@IsString()
|
|
36
|
+
@ApiProperty()
|
|
37
|
+
clientAddr: string;
|
|
38
|
+
|
|
39
|
+
@IsOptional()
|
|
40
|
+
@IsString()
|
|
41
|
+
@ApiProperty()
|
|
42
|
+
method: string;
|
|
43
|
+
|
|
44
|
+
@IsOptional()
|
|
45
|
+
@IsString()
|
|
46
|
+
@ApiProperty()
|
|
47
|
+
requestId: string;
|
|
48
|
+
|
|
49
|
+
@IsOptional()
|
|
50
|
+
@IsString()
|
|
51
|
+
@ApiProperty()
|
|
52
|
+
toolName: string;
|
|
53
|
+
|
|
54
|
+
@IsOptional()
|
|
55
|
+
@IsString()
|
|
56
|
+
@ApiProperty()
|
|
57
|
+
requestParams: string;
|
|
58
|
+
|
|
59
|
+
@IsOptional()
|
|
60
|
+
@IsString()
|
|
61
|
+
@ApiProperty()
|
|
62
|
+
status: string;
|
|
63
|
+
|
|
64
|
+
@IsOptional()
|
|
65
|
+
@IsString()
|
|
66
|
+
@ApiProperty()
|
|
67
|
+
responseResult: string;
|
|
68
|
+
|
|
69
|
+
@IsOptional()
|
|
70
|
+
@IsInt()
|
|
71
|
+
@ApiProperty()
|
|
72
|
+
errorCode: number;
|
|
73
|
+
|
|
74
|
+
@IsOptional()
|
|
75
|
+
@IsString()
|
|
76
|
+
@ApiProperty()
|
|
77
|
+
errorMessage: string;
|
|
78
|
+
|
|
79
|
+
@IsOptional()
|
|
80
|
+
@IsNumber()
|
|
81
|
+
@ApiProperty()
|
|
82
|
+
durationMs: number;
|
|
83
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Column, Entity, Index } from 'typeorm';
|
|
2
|
+
import { CommonEntity } from 'src/entities/common.entity';
|
|
3
|
+
import { getColumnType } from 'src/helpers/typeorm-db-helper';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'ss_mcp_audit_log' })
|
|
6
|
+
export class McpAuditLog extends CommonEntity {
|
|
7
|
+
@Index()
|
|
8
|
+
@Column({ nullable: true })
|
|
9
|
+
userId: number;
|
|
10
|
+
|
|
11
|
+
@Column({ nullable: true })
|
|
12
|
+
apiKeyId: number;
|
|
13
|
+
|
|
14
|
+
@Column({ nullable: true, length: 128 })
|
|
15
|
+
username: string;
|
|
16
|
+
|
|
17
|
+
@Column({ length: 32 })
|
|
18
|
+
transport: string;
|
|
19
|
+
|
|
20
|
+
@Index()
|
|
21
|
+
@Column({ nullable: true, length: 64 })
|
|
22
|
+
mcpSessionId: string;
|
|
23
|
+
|
|
24
|
+
@Column({ nullable: true, length: 64 })
|
|
25
|
+
clientAddr: string;
|
|
26
|
+
|
|
27
|
+
@Index()
|
|
28
|
+
@Column({ length: 64 })
|
|
29
|
+
method: string;
|
|
30
|
+
|
|
31
|
+
@Column({ nullable: true, length: 64 })
|
|
32
|
+
requestId: string;
|
|
33
|
+
|
|
34
|
+
@Index()
|
|
35
|
+
@Column({ nullable: true, length: 128 })
|
|
36
|
+
toolName: string;
|
|
37
|
+
|
|
38
|
+
@Column({ nullable: true, ...getColumnType('longText') })
|
|
39
|
+
requestParams: string;
|
|
40
|
+
|
|
41
|
+
@Column({ length: 16 })
|
|
42
|
+
status: string;
|
|
43
|
+
|
|
44
|
+
@Column({ nullable: true, ...getColumnType('longText') })
|
|
45
|
+
responseResult: string;
|
|
46
|
+
|
|
47
|
+
@Column({ nullable: true })
|
|
48
|
+
errorCode: number;
|
|
49
|
+
|
|
50
|
+
@Column({ nullable: true, ...getColumnType('longText') })
|
|
51
|
+
errorMessage: string;
|
|
52
|
+
|
|
53
|
+
@Column({ nullable: true, ...getColumnType('decimal') })
|
|
54
|
+
durationMs: number;
|
|
55
|
+
}
|
|
@@ -4,6 +4,7 @@ import { spawn } from 'child_process';
|
|
|
4
4
|
export type CommandWithArgs = {
|
|
5
5
|
command: string;
|
|
6
6
|
args: string[];
|
|
7
|
+
cwd?: string;
|
|
7
8
|
};
|
|
8
9
|
|
|
9
10
|
@Injectable()
|
|
@@ -43,6 +44,7 @@ export class CommandService {
|
|
|
43
44
|
const child = spawn(command, spawnArgs, {
|
|
44
45
|
shell: isWindows, // Use shell on Windows to handle .cmd files
|
|
45
46
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
47
|
+
cwd: commandWithArgs.cwd,
|
|
46
48
|
});
|
|
47
49
|
|
|
48
50
|
let stdout = '';
|
package/src/index.ts
CHANGED
|
@@ -49,6 +49,7 @@ export * from './dtos/create-mq-message-queue.dto'
|
|
|
49
49
|
export * from './dtos/create-mq-message.dto'
|
|
50
50
|
export * from './dtos/create-agent-session.dto'
|
|
51
51
|
export * from './dtos/create-agent-event.dto'
|
|
52
|
+
export * from './dtos/create-mcp-audit-log.dto'
|
|
52
53
|
export * from './dtos/create-scheduled-job.dto'
|
|
53
54
|
export * from './dtos/create-permission-metadata.dto'
|
|
54
55
|
export * from './dtos/create-role-metadata.dto'
|
|
@@ -89,6 +90,7 @@ export * from './dtos/update-mq-message-queue.dto'
|
|
|
89
90
|
export * from './dtos/update-mq-message.dto'
|
|
90
91
|
export * from './dtos/update-agent-session.dto'
|
|
91
92
|
export * from './dtos/update-agent-event.dto'
|
|
93
|
+
export * from './dtos/update-mcp-audit-log.dto'
|
|
92
94
|
export * from './dtos/update-scheduled-job.dto'
|
|
93
95
|
export * from './dtos/update-permission-metadata.dto'
|
|
94
96
|
export * from './dtos/update-role-metadata.dto'
|
|
@@ -122,6 +124,7 @@ export * from './entities/mq-message-queue.entity'
|
|
|
122
124
|
export * from './entities/mq-message.entity'
|
|
123
125
|
export * from './entities/agent-session.entity'
|
|
124
126
|
export * from './entities/agent-event.entity'
|
|
127
|
+
export * from './entities/mcp-audit-log.entity'
|
|
125
128
|
export * from './entities/scheduled-job.entity'
|
|
126
129
|
export * from './entities/permission-metadata.entity'
|
|
127
130
|
export * from './entities/role-metadata.entity'
|
|
@@ -297,6 +300,7 @@ export * from './services/mq-message-queue.service'
|
|
|
297
300
|
export * from './services/mq-message.service'
|
|
298
301
|
export * from './services/agent-session.service'
|
|
299
302
|
export * from './services/agent-event.service'
|
|
303
|
+
export * from './services/mcp-audit-log.service'
|
|
300
304
|
export * from './services/scheduled-job.service'
|
|
301
305
|
export * from './services/pdf.service'
|
|
302
306
|
export * from './services/permission-metadata.service'
|
package/src/interfaces.ts
CHANGED
|
@@ -121,8 +121,6 @@ export interface CodeGenerationOptions {
|
|
|
121
121
|
fieldIdsForRemoval?: number[];
|
|
122
122
|
fieldNamesForRemoval?: string[];
|
|
123
123
|
dryRun?: boolean;
|
|
124
|
-
fieldIdsForRefresh?: number[];
|
|
125
|
-
fieldNamesForRefresh?: string[];
|
|
126
124
|
}
|
|
127
125
|
|
|
128
126
|
export interface TriggerMcpClientOptions {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Injectable } from '@nestjs/common';
|
|
2
|
+
import { McpAuditLog } from 'src/entities/mcp-audit-log.entity';
|
|
3
|
+
import { RequestContextService } from 'src/services/request-context.service';
|
|
4
|
+
import { DataSource } from 'typeorm';
|
|
5
|
+
import { SecurityRuleRepository } from './security-rule.repository';
|
|
6
|
+
import { SolidBaseRepository } from './solid-base.repository';
|
|
7
|
+
|
|
8
|
+
@Injectable()
|
|
9
|
+
export class McpAuditLogRepository extends SolidBaseRepository<McpAuditLog> {
|
|
10
|
+
constructor(
|
|
11
|
+
readonly dataSource: DataSource,
|
|
12
|
+
readonly requestContextService: RequestContextService,
|
|
13
|
+
readonly securityRuleRepository: SecurityRuleRepository,
|
|
14
|
+
) {
|
|
15
|
+
super(McpAuditLog, dataSource, requestContextService, securityRuleRepository);
|
|
16
|
+
}
|
|
17
|
+
}
|