@solidxai/core 0.1.20 → 0.1.21-beta.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 +17 -0
- package/dist/dtos/create-agent-hub-tag.dto.d.ts +2 -0
- package/dist/dtos/create-agent-hub-tag.dto.d.ts.map +1 -1
- package/dist/dtos/create-agent-hub-tag.dto.js +13 -1
- package/dist/dtos/create-agent-hub-tag.dto.js.map +1 -1
- package/dist/dtos/create-agent-registry.dto.d.ts +2 -0
- package/dist/dtos/create-agent-registry.dto.d.ts.map +1 -1
- package/dist/dtos/create-agent-registry.dto.js +13 -1
- package/dist/dtos/create-agent-registry.dto.js.map +1 -1
- package/dist/dtos/create-agent-skill-registry.dto.d.ts +2 -0
- package/dist/dtos/create-agent-skill-registry.dto.d.ts.map +1 -1
- package/dist/dtos/create-agent-skill-registry.dto.js +13 -1
- package/dist/dtos/create-agent-skill-registry.dto.js.map +1 -1
- package/dist/dtos/create-agent-tool-registry.dto.d.ts +2 -0
- package/dist/dtos/create-agent-tool-registry.dto.d.ts.map +1 -1
- package/dist/dtos/create-agent-tool-registry.dto.js +13 -1
- package/dist/dtos/create-agent-tool-registry.dto.js.map +1 -1
- package/dist/dtos/update-agent-hub-tag.dto.d.ts +2 -0
- package/dist/dtos/update-agent-hub-tag.dto.d.ts.map +1 -1
- package/dist/dtos/update-agent-hub-tag.dto.js +13 -1
- package/dist/dtos/update-agent-hub-tag.dto.js.map +1 -1
- package/dist/dtos/update-agent-registry.dto.d.ts +2 -0
- package/dist/dtos/update-agent-registry.dto.d.ts.map +1 -1
- package/dist/dtos/update-agent-registry.dto.js +13 -1
- package/dist/dtos/update-agent-registry.dto.js.map +1 -1
- package/dist/dtos/update-agent-skill-registry.dto.d.ts +2 -0
- package/dist/dtos/update-agent-skill-registry.dto.d.ts.map +1 -1
- package/dist/dtos/update-agent-skill-registry.dto.js +13 -1
- package/dist/dtos/update-agent-skill-registry.dto.js.map +1 -1
- package/dist/dtos/update-agent-tool-registry.dto.d.ts +2 -0
- package/dist/dtos/update-agent-tool-registry.dto.d.ts.map +1 -1
- package/dist/dtos/update-agent-tool-registry.dto.js +13 -1
- package/dist/dtos/update-agent-tool-registry.dto.js.map +1 -1
- package/dist/entities/agent-hub-tag.entity.d.ts +2 -0
- package/dist/entities/agent-hub-tag.entity.d.ts.map +1 -1
- package/dist/entities/agent-hub-tag.entity.js +8 -1
- package/dist/entities/agent-hub-tag.entity.js.map +1 -1
- package/dist/entities/agent-registry.entity.d.ts +2 -0
- package/dist/entities/agent-registry.entity.d.ts.map +1 -1
- package/dist/entities/agent-registry.entity.js +8 -1
- package/dist/entities/agent-registry.entity.js.map +1 -1
- package/dist/entities/agent-skill-registry.entity.d.ts +2 -0
- package/dist/entities/agent-skill-registry.entity.d.ts.map +1 -1
- package/dist/entities/agent-skill-registry.entity.js +8 -1
- package/dist/entities/agent-skill-registry.entity.js.map +1 -1
- package/dist/entities/agent-skill.entity.d.ts +1 -0
- package/dist/entities/agent-skill.entity.d.ts.map +1 -1
- package/dist/entities/agent-skill.entity.js +5 -1
- package/dist/entities/agent-skill.entity.js.map +1 -1
- package/dist/entities/agent-tool-registry.entity.d.ts +2 -0
- package/dist/entities/agent-tool-registry.entity.d.ts.map +1 -1
- package/dist/entities/agent-tool-registry.entity.js +8 -1
- package/dist/entities/agent-tool-registry.entity.js.map +1 -1
- package/dist/entities/agent-tool.entity.d.ts +1 -0
- package/dist/entities/agent-tool.entity.d.ts.map +1 -1
- package/dist/entities/agent-tool.entity.js +5 -1
- package/dist/entities/agent-tool.entity.js.map +1 -1
- package/dist/helpers/bootstrap.helper.d.ts.map +1 -1
- package/dist/helpers/bootstrap.helper.js +28 -0
- package/dist/helpers/bootstrap.helper.js.map +1 -1
- package/dist/helpers/module-metadata-helper.service.js +2 -2
- package/dist/helpers/module-metadata-helper.service.js.map +1 -1
- package/dist/resources/agent-embed/solid-agent-embed.js +283 -75
- package/dist/seeders/module-metadata-agenthub.spec.d.ts +2 -0
- package/dist/seeders/module-metadata-agenthub.spec.d.ts.map +1 -0
- package/dist/seeders/module-metadata-agenthub.spec.js +62 -0
- package/dist/seeders/module-metadata-agenthub.spec.js.map +1 -0
- package/dist/seeders/module-metadata-seeder.service.d.ts +8 -0
- package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js +176 -0
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +216 -18
- package/dist/services/agent-config-version.service.d.ts +9 -0
- package/dist/services/agent-config-version.service.d.ts.map +1 -1
- package/dist/services/agent-config-version.service.js +13 -0
- package/dist/services/agent-config-version.service.js.map +1 -1
- package/dist/services/agent-hub-tag.service.d.ts +4 -0
- package/dist/services/agent-hub-tag.service.d.ts.map +1 -1
- package/dist/services/agent-hub-tag.service.js +65 -2
- package/dist/services/agent-hub-tag.service.js.map +1 -1
- package/dist/services/agent-registry.service.d.ts +1 -0
- package/dist/services/agent-registry.service.d.ts.map +1 -1
- package/dist/services/agent-registry.service.js +12 -2
- package/dist/services/agent-registry.service.js.map +1 -1
- package/dist/services/file/disk-file.service.d.ts.map +1 -1
- package/dist/services/file/disk-file.service.js +6 -1
- package/dist/services/file/disk-file.service.js.map +1 -1
- package/dist/services/file/index.d.ts +1 -0
- package/dist/services/file/index.d.ts.map +1 -1
- package/dist/services/file/index.js +1 -0
- package/dist/services/file/index.js.map +1 -1
- package/dist/services/file/media-storage-paths.d.ts +8 -0
- package/dist/services/file/media-storage-paths.d.ts.map +1 -0
- package/dist/services/file/media-storage-paths.js +78 -0
- package/dist/services/file/media-storage-paths.js.map +1 -0
- package/dist/services/file/storage-path-builder.d.ts +0 -2
- package/dist/services/file/storage-path-builder.d.ts.map +1 -1
- package/dist/services/file/storage-path-builder.js +3 -44
- package/dist/services/file/storage-path-builder.js.map +1 -1
- package/dist/services/media-storage.utils.d.ts +1 -1
- package/dist/services/media-storage.utils.d.ts.map +1 -1
- package/dist/services/media-storage.utils.js +3 -43
- package/dist/services/media-storage.utils.js.map +1 -1
- package/dist/services/module-metadata.service.d.ts +0 -1
- package/dist/services/module-metadata.service.d.ts.map +1 -1
- package/dist/services/module-metadata.service.js +7 -15
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/services/settings/default-settings-provider.service.d.ts +22 -2
- package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
- package/dist/services/settings/default-settings-provider.service.js +12 -1
- package/dist/services/settings/default-settings-provider.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +15 -2
- package/dist/solid-core.module.js.map +1 -1
- package/dist/subscribers/agent-hub-tag.subscriber.d.ts +19 -0
- package/dist/subscribers/agent-hub-tag.subscriber.d.ts.map +1 -0
- package/dist/subscribers/agent-hub-tag.subscriber.js +197 -0
- package/dist/subscribers/agent-hub-tag.subscriber.js.map +1 -0
- package/dist/subscribers/agent-registry-subscribers.spec.d.ts +2 -0
- package/dist/subscribers/agent-registry-subscribers.spec.d.ts.map +1 -0
- package/dist/subscribers/agent-registry-subscribers.spec.js +104 -0
- package/dist/subscribers/agent-registry-subscribers.spec.js.map +1 -0
- package/dist/subscribers/agent-registry.subscriber.d.ts +24 -0
- package/dist/subscribers/agent-registry.subscriber.d.ts.map +1 -0
- package/dist/subscribers/agent-registry.subscriber.js +229 -0
- package/dist/subscribers/agent-registry.subscriber.js.map +1 -0
- package/dist/subscribers/agent-skill-registry.subscriber.d.ts +19 -0
- package/dist/subscribers/agent-skill-registry.subscriber.d.ts.map +1 -0
- package/dist/subscribers/agent-skill-registry.subscriber.js +199 -0
- package/dist/subscribers/agent-skill-registry.subscriber.js.map +1 -0
- package/dist/subscribers/agent-skill.subscriber.d.ts +13 -0
- package/dist/subscribers/agent-skill.subscriber.d.ts.map +1 -0
- package/dist/subscribers/agent-skill.subscriber.js +61 -0
- package/dist/subscribers/agent-skill.subscriber.js.map +1 -0
- package/dist/subscribers/agent-tool-registry.subscriber.d.ts +19 -0
- package/dist/subscribers/agent-tool-registry.subscriber.d.ts.map +1 -0
- package/dist/subscribers/agent-tool-registry.subscriber.js +201 -0
- package/dist/subscribers/agent-tool-registry.subscriber.js.map +1 -0
- package/dist/subscribers/agent-tool.subscriber.d.ts +13 -0
- package/dist/subscribers/agent-tool.subscriber.d.ts.map +1 -0
- package/dist/subscribers/agent-tool.subscriber.js +61 -0
- package/dist/subscribers/agent-tool.subscriber.js.map +1 -0
- package/dist/subscribers/agenthub-metadata-sync.util.d.ts +16 -0
- package/dist/subscribers/agenthub-metadata-sync.util.d.ts.map +1 -0
- package/dist/subscribers/agenthub-metadata-sync.util.js +77 -0
- package/dist/subscribers/agenthub-metadata-sync.util.js.map +1 -0
- package/package.json +1 -1
- package/resources/agent-embed/solid-agent-embed.js +283 -75
- package/src/dtos/create-agent-hub-tag.dto.ts +10 -0
- package/src/dtos/create-agent-registry.dto.ts +10 -0
- package/src/dtos/create-agent-skill-registry.dto.ts +10 -0
- package/src/dtos/create-agent-tool-registry.dto.ts +10 -0
- package/src/dtos/update-agent-hub-tag.dto.ts +10 -0
- package/src/dtos/update-agent-registry.dto.ts +10 -0
- package/src/dtos/update-agent-skill-registry.dto.ts +10 -0
- package/src/dtos/update-agent-tool-registry.dto.ts +10 -0
- package/src/entities/agent-hub-tag.entity.ts +7 -1
- package/src/entities/agent-registry.entity.ts +7 -1
- package/src/entities/agent-skill-registry.entity.ts +7 -1
- package/src/entities/agent-skill.entity.ts +4 -1
- package/src/entities/agent-tool-registry.entity.ts +7 -1
- package/src/entities/agent-tool.entity.ts +4 -1
- package/src/helpers/bootstrap.helper.ts +36 -3
- package/src/helpers/module-metadata-helper.service.ts +2 -2
- package/src/seeders/module-metadata-agenthub.spec.ts +65 -0
- package/src/seeders/module-metadata-seeder.service.ts +180 -0
- package/src/seeders/seed-data/solid-core-metadata.json +216 -18
- package/src/services/agent-config-version.service.ts +28 -3
- package/src/services/agent-hub-tag.service.ts +81 -2
- package/src/services/agent-registry.service.ts +17 -1
- package/src/services/file/disk-file.service.ts +6 -1
- package/src/services/file/index.ts +1 -0
- package/src/services/file/media-storage-paths.ts +50 -0
- package/src/services/file/storage-path-builder.ts +2 -12
- package/src/services/media-storage.utils.ts +10 -16
- package/src/services/module-metadata.service.ts +7 -17
- package/src/services/settings/default-settings-provider.service.ts +12 -1
- package/src/solid-core.module.ts +16 -3
- package/src/subscribers/agent-hub-tag.subscriber.ts +149 -0
- package/src/subscribers/agent-registry-subscribers.spec.ts +71 -0
- package/src/subscribers/agent-registry.subscriber.ts +182 -0
- package/src/subscribers/agent-skill-registry.subscriber.ts +144 -0
- package/src/subscribers/agent-skill.subscriber.ts +46 -0
- package/src/subscribers/agent-tool-registry.subscriber.ts +146 -0
- package/src/subscribers/agent-tool.subscriber.ts +46 -0
- package/src/subscribers/agenthub-metadata-sync.util.ts +51 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-agent-tool-registry.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/update-agent-tool-registry.dto.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,qBAAa,0BAA0B;IAGnC,EAAE,EAAE,MAAM,CAAC;IAMX,IAAI,EAAE,MAAM,CAAC;IAMb,IAAI,EAAE,MAAM,CAAC;IAKb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,WAAW,EAAE,MAAM,CAAC;IAMpB,UAAU,EAAE,MAAM,CAAC;IAKnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,MAAM,EAAE,MAAM,CAAC;IAKf,aAAa,EAAE,MAAM,CAAC;IAOtB,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAO7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAKlB,WAAW,EAAE,MAAM,CAAC;IAOpB,UAAU,EAAE,kBAAkB,EAAE,CAAC;IAKjC,aAAa,EAAE,MAAM,EAAE,CAAC;IAKxB,iBAAiB,EAAE,MAAM,CAAC;CAC7B"}
|
|
1
|
+
{"version":3,"file":"update-agent-tool-registry.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/update-agent-tool-registry.dto.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,qBAAa,0BAA0B;IAGnC,EAAE,EAAE,MAAM,CAAC;IAMX,IAAI,EAAE,MAAM,CAAC;IAMb,IAAI,EAAE,MAAM,CAAC;IAKb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,WAAW,EAAE,MAAM,CAAC;IAMpB,UAAU,EAAE,MAAM,CAAC;IAKnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,MAAM,EAAE,MAAM,CAAC;IAKf,aAAa,EAAE,MAAM,CAAC;IAKtB,QAAQ,EAAE,MAAM,CAAC;IAKjB,aAAa,EAAE,MAAM,CAAC;IAOtB,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAO7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAKlB,WAAW,EAAE,MAAM,CAAC;IAOpB,UAAU,EAAE,kBAAkB,EAAE,CAAC;IAKjC,aAAa,EAAE,MAAM,EAAE,CAAC;IAKxB,iBAAiB,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -18,7 +18,7 @@ const update_agent_tool_dto_1 = require("./update-agent-tool.dto");
|
|
|
18
18
|
const update_agent_hub_tag_dto_1 = require("./update-agent-hub-tag.dto");
|
|
19
19
|
class UpdateAgentToolRegistryDto {
|
|
20
20
|
static _OPENAPI_METADATA_FACTORY() {
|
|
21
|
-
return { id: { required: true, type: () => Number }, name: { required: true, type: () => String }, type: { required: true, type: () => String }, iconName: { required: false, type: () => String }, description: { required: true, type: () => String }, sourceCode: { required: true, type: () => String }, checksum: { required: false, type: () => String }, status: { required: true, type: () => String }, lastLoadError: { required: true, type: () => String }, tags: { required: true, type: () => [require("./update-agent-hub-tag.dto").UpdateAgentHubTagDto] }, tagsIds: { required: true, type: () => [Number] }, tagsCommand: { required: true, type: () => String }, agentTools: { required: true, type: () => [require("./update-agent-tool.dto").UpdateAgentToolDto] }, agentToolsIds: { required: true, type: () => [Number] }, agentToolsCommand: { required: true, type: () => String } };
|
|
21
|
+
return { id: { required: true, type: () => Number }, name: { required: true, type: () => String }, type: { required: true, type: () => String }, iconName: { required: false, type: () => String }, description: { required: true, type: () => String }, sourceCode: { required: true, type: () => String }, checksum: { required: false, type: () => String }, status: { required: true, type: () => String }, lastLoadError: { required: true, type: () => String }, moduleId: { required: true, type: () => Number }, moduleUserKey: { required: true, type: () => String }, tags: { required: true, type: () => [require("./update-agent-hub-tag.dto").UpdateAgentHubTagDto] }, tagsIds: { required: true, type: () => [Number] }, tagsCommand: { required: true, type: () => String }, agentTools: { required: true, type: () => [require("./update-agent-tool.dto").UpdateAgentToolDto] }, agentToolsIds: { required: true, type: () => [Number] }, agentToolsCommand: { required: true, type: () => String } };
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
exports.UpdateAgentToolRegistryDto = UpdateAgentToolRegistryDto;
|
|
@@ -80,6 +80,18 @@ __decorate([
|
|
|
80
80
|
(0, swagger_1.ApiProperty)(),
|
|
81
81
|
__metadata("design:type", String)
|
|
82
82
|
], UpdateAgentToolRegistryDto.prototype, "lastLoadError", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_validator_1.IsOptional)(),
|
|
85
|
+
(0, class_validator_1.IsInt)(),
|
|
86
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
87
|
+
__metadata("design:type", Number)
|
|
88
|
+
], UpdateAgentToolRegistryDto.prototype, "moduleId", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.IsString)(),
|
|
91
|
+
(0, class_validator_1.IsOptional)(),
|
|
92
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], UpdateAgentToolRegistryDto.prototype, "moduleUserKey", void 0);
|
|
83
95
|
__decorate([
|
|
84
96
|
(0, class_validator_1.IsOptional)(),
|
|
85
97
|
(0, swagger_1.ApiProperty)({ required: false }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-agent-tool-registry.dto.js","sourceRoot":"","sources":["../../src/dtos/update-agent-tool-registry.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAAkG;AAClG,6CAA8C;AAC9C,yDAAyC;AACzC,mEAA6D;AAC7D,yEAAkE;AAElE,MAAa,0BAA0B;;;;
|
|
1
|
+
{"version":3,"file":"update-agent-tool-registry.dto.js","sourceRoot":"","sources":["../../src/dtos/update-agent-tool-registry.dto.ts"],"names":[],"mappings":"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","sourcesContent":["import { IsInt,IsOptional, IsString, IsNotEmpty, ValidateNested, IsArray } from 'class-validator';\nimport { ApiProperty } from '@nestjs/swagger';\nimport { Type } from 'class-transformer';\nimport { UpdateAgentToolDto } from './update-agent-tool.dto';\nimport { UpdateAgentHubTagDto } from './update-agent-hub-tag.dto';\n\nexport class UpdateAgentToolRegistryDto {\n @IsOptional()\n @IsInt()\n id: number;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n name: string;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n type: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty({ required: false })\n iconName?: string;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n description: string;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n sourceCode: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty({ required: false })\n checksum?: string;\n\n @IsNotEmpty()\n @IsOptional()\n @IsString()\n @ApiProperty()\n status: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n lastLoadError: string;\n\n @IsOptional()\n @IsInt()\n @ApiProperty({ required: false })\n moduleId: number;\n\n @IsString()\n @IsOptional()\n @ApiProperty({ required: false })\n moduleUserKey: string;\n\n @IsOptional()\n @ApiProperty({ required: false })\n @IsArray()\n @ValidateNested({ each: true })\n @Type(() => UpdateAgentHubTagDto)\n tags: UpdateAgentHubTagDto[];\n\n @IsOptional()\n @IsArray()\n @Type(() => Number)\n @IsInt({ each: true })\n @ApiProperty({ required: false })\n tagsIds: number[];\n\n @IsString()\n @IsOptional()\n @ApiProperty({ required: false })\n tagsCommand: string;\n\n @IsOptional()\n @ApiProperty()\n @IsArray()\n @ValidateNested({ each: true })\n @Type(() => UpdateAgentToolDto)\n agentTools: UpdateAgentToolDto[];\n\n @IsOptional()\n @IsArray()\n @ApiProperty()\n agentToolsIds: number[];\n\n @IsString()\n @IsOptional()\n @ApiProperty()\n agentToolsCommand: string;\n}\n"]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { CommonEntity } from '../entities/common.entity';
|
|
2
|
+
import { ModuleMetadata } from './module-metadata.entity';
|
|
2
3
|
import { AgentSkillRegistry } from './agent-skill-registry.entity';
|
|
3
4
|
import { AgentToolRegistry } from './agent-tool-registry.entity';
|
|
4
5
|
import { AgentRegistry } from './agent-registry.entity';
|
|
5
6
|
export declare class AgentHubTag extends CommonEntity {
|
|
6
7
|
name: string;
|
|
8
|
+
module: ModuleMetadata;
|
|
7
9
|
skills: AgentSkillRegistry[];
|
|
8
10
|
tools: AgentToolRegistry[];
|
|
9
11
|
agents: AgentRegistry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-hub-tag.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-hub-tag.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,qBACa,WAAY,SAAQ,YAAY;IAGzC,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-hub-tag.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-hub-tag.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,qBACa,WAAY,SAAQ,YAAY;IAGzC,IAAI,EAAE,MAAM,CAAC;IAKb,MAAM,EAAE,cAAc,CAAC;IAGvB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAG7B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAG3B,MAAM,EAAE,aAAa,EAAE,CAAC;CAC3B"}
|
|
@@ -13,12 +13,13 @@ exports.AgentHubTag = void 0;
|
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const common_entity_1 = require("./common.entity");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
+
const module_metadata_entity_1 = require("./module-metadata.entity");
|
|
16
17
|
const agent_skill_registry_entity_1 = require("./agent-skill-registry.entity");
|
|
17
18
|
const agent_tool_registry_entity_1 = require("./agent-tool-registry.entity");
|
|
18
19
|
const agent_registry_entity_1 = require("./agent-registry.entity");
|
|
19
20
|
let AgentHubTag = class AgentHubTag extends common_entity_1.CommonEntity {
|
|
20
21
|
static _OPENAPI_METADATA_FACTORY() {
|
|
21
|
-
return { name: { required: true, type: () => String }, skills: { required: true, type: () => [require("./agent-skill-registry.entity").AgentSkillRegistry] }, tools: { required: true, type: () => [require("./agent-tool-registry.entity").AgentToolRegistry] }, agents: { required: true, type: () => [require("./agent-registry.entity").AgentRegistry] } };
|
|
22
|
+
return { name: { required: true, type: () => String }, module: { required: true, type: () => require("./module-metadata.entity").ModuleMetadata }, skills: { required: true, type: () => [require("./agent-skill-registry.entity").AgentSkillRegistry] }, tools: { required: true, type: () => [require("./agent-tool-registry.entity").AgentToolRegistry] }, agents: { required: true, type: () => [require("./agent-registry.entity").AgentRegistry] } };
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
25
|
exports.AgentHubTag = AgentHubTag;
|
|
@@ -27,6 +28,12 @@ __decorate([
|
|
|
27
28
|
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
28
29
|
__metadata("design:type", String)
|
|
29
30
|
], AgentHubTag.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Index)(),
|
|
33
|
+
(0, typeorm_1.ManyToOne)(() => module_metadata_entity_1.ModuleMetadata, { onDelete: 'SET NULL', nullable: true }),
|
|
34
|
+
(0, typeorm_1.JoinColumn)({ name: 'module_id', referencedColumnName: 'id' }),
|
|
35
|
+
__metadata("design:type", module_metadata_entity_1.ModuleMetadata)
|
|
36
|
+
], AgentHubTag.prototype, "module", void 0);
|
|
30
37
|
__decorate([
|
|
31
38
|
(0, typeorm_1.ManyToMany)(() => agent_skill_registry_entity_1.AgentSkillRegistry, skill => skill.tags),
|
|
32
39
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-hub-tag.entity.js","sourceRoot":"","sources":["../../src/entities/agent-hub-tag.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"agent-hub-tag.entity.js","sourceRoot":"","sources":["../../src/entities/agent-hub-tag.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAmF;AACnF,qEAA0D;AAC1D,+EAAmE;AACnE,6EAAiE;AACjE,mEAAwD;AAGjD,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,4BAAY;;;;CAkB5C,CAAA;AAlBY,kCAAW;AAGpB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;yCACf;AAKb;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,uCAAc;2CAAC;AAGvB;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,gDAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;;2CAC7B;AAG7B;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,8CAAiB,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;;0CAC5B;AAG3B;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;;2CAC7B;sBAjBf,WAAW;IADvB,IAAA,gBAAM,EAAC,kBAAkB,CAAC;GACd,WAAW,CAkBvB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, JoinColumn, ManyToMany, ManyToOne } from 'typeorm';\nimport { ModuleMetadata } from './module-metadata.entity';\nimport { AgentSkillRegistry } from './agent-skill-registry.entity';\nimport { AgentToolRegistry } from './agent-tool-registry.entity';\nimport { AgentRegistry } from './agent-registry.entity';\n\n@Entity('ss_agent_hub_tag')\nexport class AgentHubTag extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: 'varchar' })\n name: string;\n\n @Index()\n @ManyToOne(() => ModuleMetadata, { onDelete: 'SET NULL', nullable: true })\n @JoinColumn({ name: 'module_id', referencedColumnName: 'id' })\n module: ModuleMetadata;\n\n @ManyToMany(() => AgentSkillRegistry, skill => skill.tags)\n skills: AgentSkillRegistry[];\n\n @ManyToMany(() => AgentToolRegistry, tool => tool.tags)\n tools: AgentToolRegistry[];\n\n @ManyToMany(() => AgentRegistry, agent => agent.tags)\n agents: AgentRegistry[];\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommonEntity } from '../entities/common.entity';
|
|
2
|
+
import { ModuleMetadata } from '../entities/module-metadata.entity';
|
|
2
3
|
import { AgentHubTag } from './agent-hub-tag.entity';
|
|
3
4
|
import { AgentTool } from './agent-tool.entity';
|
|
4
5
|
import { AgentSkill } from './agent-skill.entity';
|
|
@@ -21,6 +22,7 @@ export declare class AgentRegistry extends CommonEntity {
|
|
|
21
22
|
turnStepLimit: number;
|
|
22
23
|
costLimit: number;
|
|
23
24
|
configVersion?: number;
|
|
25
|
+
module: ModuleMetadata;
|
|
24
26
|
tags: AgentHubTag[];
|
|
25
27
|
agentTools: AgentTool[];
|
|
26
28
|
agentSkills: AgentSkill[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-registry.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-registry.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,qBACa,aAAc,SAAQ,YAAY;IAG3C,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,WAAW,EAAE,MAAM,CAAC;IAGpB,QAAQ,EAAE,MAAM,CAAC;IAGjB,YAAY,EAAE,MAAM,CAAC;IAIrB,cAAc,EAAE,MAAM,CAAQ;IAG9B,iBAAiB,EAAE,MAAM,CAAC;IAG1B,YAAY,EAAE,MAAM,CAAC;IAGrB,MAAM,EAAE,MAAM,CAAW;IAGzB,SAAS,EAAE,MAAM,CAAO;IAGxB,aAAa,EAAE,MAAM,CAAM;IAG3B,SAAS,EAAE,MAAM,CAAK;IAGtB,aAAa,CAAC,EAAE,MAAM,CAAK;
|
|
1
|
+
{"version":3,"file":"agent-registry.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-registry.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,qBACa,aAAc,SAAQ,YAAY;IAG3C,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,WAAW,EAAE,MAAM,CAAC;IAGpB,QAAQ,EAAE,MAAM,CAAC;IAGjB,YAAY,EAAE,MAAM,CAAC;IAIrB,cAAc,EAAE,MAAM,CAAQ;IAG9B,iBAAiB,EAAE,MAAM,CAAC;IAG1B,YAAY,EAAE,MAAM,CAAC;IAGrB,MAAM,EAAE,MAAM,CAAW;IAGzB,SAAS,EAAE,MAAM,CAAO;IAGxB,aAAa,EAAE,MAAM,CAAM;IAG3B,SAAS,EAAE,MAAM,CAAK;IAGtB,aAAa,CAAC,EAAE,MAAM,CAAK;IAK3B,MAAM,EAAE,cAAc,CAAC;IAIvB,IAAI,EAAE,WAAW,EAAE,CAAC;IAGpB,UAAU,EAAE,SAAS,EAAE,CAAC;IAGxB,WAAW,EAAE,UAAU,EAAE,CAAC;IAG1B,UAAU,EAAE,SAAS,EAAE,CAAC;IAGxB,YAAY,EAAE,WAAW,EAAE,CAAC;IAG5B,cAAc,EAAE,YAAY,EAAE,CAAC;IAG/B,aAAa,EAAE,YAAY,EAAE,CAAC;IAG9B,SAAS,EAAE,QAAQ,EAAE,CAAC;CACzB"}
|
|
@@ -13,6 +13,7 @@ exports.AgentRegistry = void 0;
|
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const common_entity_1 = require("./common.entity");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
+
const module_metadata_entity_1 = require("./module-metadata.entity");
|
|
16
17
|
const agent_hub_tag_entity_1 = require("./agent-hub-tag.entity");
|
|
17
18
|
const agent_tool_entity_1 = require("./agent-tool.entity");
|
|
18
19
|
const agent_skill_entity_1 = require("./agent-skill.entity");
|
|
@@ -32,7 +33,7 @@ let AgentRegistry = class AgentRegistry extends common_entity_1.CommonEntity {
|
|
|
32
33
|
this.configVersion = 1;
|
|
33
34
|
}
|
|
34
35
|
static _OPENAPI_METADATA_FACTORY() {
|
|
35
|
-
return { name: { required: true, type: () => String }, title: { required: true, type: () => String }, description: { required: true, type: () => String }, iconName: { required: true, type: () => String }, systemPrompt: { required: true, type: () => String }, requiredInputs: { required: true, type: () => String, default: "[]" }, reasoningModelKey: { required: true, type: () => String }, fastModelKey: { required: true, type: () => String }, status: { required: true, type: () => String, default: "draft" }, stepLimit: { required: true, type: () => Number, default: 100 }, turnStepLimit: { required: true, type: () => Number, default: 20 }, costLimit: { required: true, type: () => Number, default: 3 }, configVersion: { required: false, type: () => Number, default: 1 }, tags: { required: true, type: () => [require("./agent-hub-tag.entity").AgentHubTag] }, agentTools: { required: true, type: () => [require("./agent-tool.entity").AgentTool] }, agentSkills: { required: true, type: () => [require("./agent-skill.entity").AgentSkill] }, agentRoles: { required: true, type: () => [require("./agent-role.entity").AgentRole] }, agentSecrets: { required: true, type: () => [require("./agent-secret.entity").AgentSecret] }, agentProcesses: { required: true, type: () => [require("./agent-process.entity").AgentProcess] }, agentSessions: { required: true, type: () => [require("./agent-session.entity").AgentSession] }, agentJobs: { required: true, type: () => [require("./agent-job.entity").AgentJob] } };
|
|
36
|
+
return { name: { required: true, type: () => String }, title: { required: true, type: () => String }, description: { required: true, type: () => String }, iconName: { required: true, type: () => String }, systemPrompt: { required: true, type: () => String }, requiredInputs: { required: true, type: () => String, default: "[]" }, reasoningModelKey: { required: true, type: () => String }, fastModelKey: { required: true, type: () => String }, status: { required: true, type: () => String, default: "draft" }, stepLimit: { required: true, type: () => Number, default: 100 }, turnStepLimit: { required: true, type: () => Number, default: 20 }, costLimit: { required: true, type: () => Number, default: 3 }, configVersion: { required: false, type: () => Number, default: 1 }, module: { required: true, type: () => require("./module-metadata.entity").ModuleMetadata }, tags: { required: true, type: () => [require("./agent-hub-tag.entity").AgentHubTag] }, agentTools: { required: true, type: () => [require("./agent-tool.entity").AgentTool] }, agentSkills: { required: true, type: () => [require("./agent-skill.entity").AgentSkill] }, agentRoles: { required: true, type: () => [require("./agent-role.entity").AgentRole] }, agentSecrets: { required: true, type: () => [require("./agent-secret.entity").AgentSecret] }, agentProcesses: { required: true, type: () => [require("./agent-process.entity").AgentProcess] }, agentSessions: { required: true, type: () => [require("./agent-session.entity").AgentSession] }, agentJobs: { required: true, type: () => [require("./agent-job.entity").AgentJob] } };
|
|
36
37
|
}
|
|
37
38
|
};
|
|
38
39
|
exports.AgentRegistry = AgentRegistry;
|
|
@@ -89,6 +90,12 @@ __decorate([
|
|
|
89
90
|
(0, typeorm_1.Column)({ type: "integer", nullable: true, default: 1 }),
|
|
90
91
|
__metadata("design:type", Number)
|
|
91
92
|
], AgentRegistry.prototype, "configVersion", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Index)(),
|
|
95
|
+
(0, typeorm_1.ManyToOne)(() => module_metadata_entity_1.ModuleMetadata, { onDelete: "SET NULL", nullable: true }),
|
|
96
|
+
(0, typeorm_1.JoinColumn)({ name: 'module_id', referencedColumnName: 'id' }),
|
|
97
|
+
__metadata("design:type", module_metadata_entity_1.ModuleMetadata)
|
|
98
|
+
], AgentRegistry.prototype, "module", void 0);
|
|
92
99
|
__decorate([
|
|
93
100
|
(0, typeorm_1.ManyToMany)(() => agent_hub_tag_entity_1.AgentHubTag, tag => tag.agents, { cascade: ['insert', 'update'] }),
|
|
94
101
|
(0, typeorm_1.JoinTable)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-registry.entity.js","sourceRoot":"","sources":["../../src/entities/agent-registry.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"agent-registry.entity.js","sourceRoot":"","sources":["../../src/entities/agent-registry.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAyG;AACzG,qEAAqE;AACrE,iEAAqD;AACrD,2DAAgD;AAChD,6DAAkD;AAClD,2DAAgD;AAChD,+DAAoD;AACpD,iEAAsD;AACtD,iEAAsD;AACtD,yDAA6C;AAGtC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,4BAAY;IAAxC;;QAmBH,mBAAc,GAAW,IAAI,CAAC;QAS9B,WAAM,GAAW,OAAO,CAAC;QAGzB,cAAS,GAAW,GAAG,CAAC;QAGxB,kBAAa,GAAW,EAAE,CAAC;QAG3B,cAAS,GAAW,CAAC,CAAC;QAGtB,kBAAa,GAAY,CAAC,CAAC;KA+B9B;;;;CAAA,CAAA;AAvEY,sCAAa;AAGtB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;2CACf;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;4CACd;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACrB;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC3B;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACJ;AAIrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;qDACV;AAG9B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;wDACF;AAG1B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;mDACP;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;;6CACrB;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;gDACJ;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;oDACD;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gDAClB;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;oDAC7B;AAK3B;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,uCAAc;6CAAC;AAIvB;IAFC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kCAAW,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACnF,IAAA,mBAAS,GAAE;;2CACQ;AAGpB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6BAAS,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDAC5D;AAGxB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+BAAU,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;kDAC7D;AAG1B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6BAAS,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDAC5D;AAGxB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,iCAAW,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;mDAC9D;AAG5B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;qDACtD;AAG/B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;oDACvD;AAG9B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,2BAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;gDACnD;wBAtEb,aAAa;IADzB,IAAA,gBAAM,EAAC,mBAAmB,CAAC;GACf,aAAa,CAuEzB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany } from 'typeorm';\nimport { ModuleMetadata } from 'src/entities/module-metadata.entity';\nimport { AgentHubTag } from './agent-hub-tag.entity';\nimport { AgentTool } from './agent-tool.entity';\nimport { AgentSkill } from './agent-skill.entity';\nimport { AgentRole } from './agent-role.entity';\nimport { AgentSecret } from './agent-secret.entity';\nimport { AgentProcess } from './agent-process.entity';\nimport { AgentSession } from './agent-session.entity';\nimport { AgentJob } from './agent-job.entity'\n\n@Entity('ss_agent_registry')\nexport class AgentRegistry extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n name: string;\n\n @Column({ type: \"varchar\" })\n title: string;\n\n @Column({ type: \"text\", nullable: true })\n description: string;\n\n @Column({ type: \"varchar\", nullable: true })\n iconName: string;\n\n @Column({ type: \"text\" })\n systemPrompt: string;\n\n /** JSON array of { name, description, dataType, defaultValue, optional } consumed by AgentHub. */\n @Column({ type: \"text\", default: \"[]\" })\n requiredInputs: string = \"[]\";\n\n @Column({ type: \"varchar\" })\n reasoningModelKey: string;\n\n @Column({ type: \"varchar\" })\n fastModelKey: string;\n\n @Column({ type: \"varchar\", default: \"draft\" })\n status: string = \"draft\";\n\n @Column({ type: \"integer\" })\n stepLimit: number = 100;\n\n @Column({ type: \"integer\" })\n turnStepLimit: number = 20;\n\n @Column({ type: \"decimal\", default: 3 })\n costLimit: number = 3;\n\n @Column({ type: \"integer\", nullable: true, default: 1 })\n configVersion?: number = 1;\n\n @Index()\n @ManyToOne(() => ModuleMetadata, { onDelete: \"SET NULL\", nullable: true })\n @JoinColumn({ name: 'module_id', referencedColumnName: 'id' })\n module: ModuleMetadata;\n\n @ManyToMany(() => AgentHubTag, tag => tag.agents, { cascade: ['insert', 'update'] })\n @JoinTable()\n tags: AgentHubTag[];\n\n @OneToMany(() => AgentTool, agentTool => agentTool.agentRegistry, { cascade: true })\n agentTools: AgentTool[];\n\n @OneToMany(() => AgentSkill, agentSkill => agentSkill.agentRegistry, { cascade: true })\n agentSkills: AgentSkill[];\n\n @OneToMany(() => AgentRole, agentRole => agentRole.agentRegistry, { cascade: true })\n agentRoles: AgentRole[];\n\n @OneToMany(() => AgentSecret, agentSecret => agentSecret.agentRegistry, { cascade: true })\n agentSecrets: AgentSecret[];\n\n @OneToMany(() => AgentProcess, agentProcess => agentProcess.agent, { cascade: true })\n agentProcesses: AgentProcess[];\n\n @OneToMany(() => AgentSession, agentSession => agentSession.agent, { cascade: true })\n agentSessions: AgentSession[];\n\n @OneToMany(() => AgentJob, agentJob => agentJob.agent, { cascade: true })\n agentJobs: AgentJob[];\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommonEntity } from '../entities/common.entity';
|
|
2
|
+
import { ModuleMetadata } from '../entities/module-metadata.entity';
|
|
2
3
|
import { AgentHubTag } from './agent-hub-tag.entity';
|
|
3
4
|
import { AgentSkill } from './agent-skill.entity';
|
|
4
5
|
export declare class AgentSkillRegistry extends CommonEntity {
|
|
@@ -7,6 +8,7 @@ export declare class AgentSkillRegistry extends CommonEntity {
|
|
|
7
8
|
iconName?: string;
|
|
8
9
|
description: string;
|
|
9
10
|
body: string;
|
|
11
|
+
module: ModuleMetadata;
|
|
10
12
|
tags: AgentHubTag[];
|
|
11
13
|
agentSkills: AgentSkill[];
|
|
12
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-skill-registry.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-skill-registry.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,qBACa,kBAAmB,SAAQ,YAAY;IAGhD,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAY;IAGxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-skill-registry.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-skill-registry.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,qBACa,kBAAmB,SAAQ,YAAY;IAGhD,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAY;IAGxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,MAAM,CAAC;IAKb,MAAM,EAAE,cAAc,CAAC;IAIvB,IAAI,EAAE,WAAW,EAAE,CAAC;IAGpB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC7B"}
|
|
@@ -13,6 +13,7 @@ exports.AgentSkillRegistry = void 0;
|
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const common_entity_1 = require("./common.entity");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
+
const module_metadata_entity_1 = require("./module-metadata.entity");
|
|
16
17
|
const agent_hub_tag_entity_1 = require("./agent-hub-tag.entity");
|
|
17
18
|
const agent_skill_entity_1 = require("./agent-skill.entity");
|
|
18
19
|
let AgentSkillRegistry = class AgentSkillRegistry extends common_entity_1.CommonEntity {
|
|
@@ -21,7 +22,7 @@ let AgentSkillRegistry = class AgentSkillRegistry extends common_entity_1.Common
|
|
|
21
22
|
this.type = "custom";
|
|
22
23
|
}
|
|
23
24
|
static _OPENAPI_METADATA_FACTORY() {
|
|
24
|
-
return { name: { required: true, type: () => String }, type: { required: true, type: () => String, default: "custom" }, iconName: { required: false, type: () => String }, description: { required: true, type: () => String }, body: { required: true, type: () => String }, tags: { required: true, type: () => [require("./agent-hub-tag.entity").AgentHubTag] }, agentSkills: { required: true, type: () => [require("./agent-skill.entity").AgentSkill] } };
|
|
25
|
+
return { name: { required: true, type: () => String }, type: { required: true, type: () => String, default: "custom" }, iconName: { required: false, type: () => String }, description: { required: true, type: () => String }, body: { required: true, type: () => String }, module: { required: true, type: () => require("./module-metadata.entity").ModuleMetadata }, tags: { required: true, type: () => [require("./agent-hub-tag.entity").AgentHubTag] }, agentSkills: { required: true, type: () => [require("./agent-skill.entity").AgentSkill] } };
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
28
|
exports.AgentSkillRegistry = AgentSkillRegistry;
|
|
@@ -46,6 +47,12 @@ __decorate([
|
|
|
46
47
|
(0, typeorm_1.Column)({ type: "text" }),
|
|
47
48
|
__metadata("design:type", String)
|
|
48
49
|
], AgentSkillRegistry.prototype, "body", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Index)(),
|
|
52
|
+
(0, typeorm_1.ManyToOne)(() => module_metadata_entity_1.ModuleMetadata, { onDelete: "SET NULL", nullable: true }),
|
|
53
|
+
(0, typeorm_1.JoinColumn)({ name: 'module_id', referencedColumnName: 'id' }),
|
|
54
|
+
__metadata("design:type", module_metadata_entity_1.ModuleMetadata)
|
|
55
|
+
], AgentSkillRegistry.prototype, "module", void 0);
|
|
49
56
|
__decorate([
|
|
50
57
|
(0, typeorm_1.ManyToMany)(() => agent_hub_tag_entity_1.AgentHubTag, tag => tag.skills, { cascade: ['insert', 'update'] }),
|
|
51
58
|
(0, typeorm_1.JoinTable)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-skill-registry.entity.js","sourceRoot":"","sources":["../../src/entities/agent-skill-registry.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"agent-skill-registry.entity.js","sourceRoot":"","sources":["../../src/entities/agent-skill-registry.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAyG;AACzG,qEAAqE;AACrE,iEAAqD;AACrD,6DAAiD;AAG1C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,4BAAY;IAA7C;;QAMH,SAAI,GAAW,QAAQ,CAAC;KAsB3B;;;;CAAA,CAAA;AA5BY,gDAAkB;AAG3B;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;gDACf;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;;gDACvB;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDAC1B;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDACL;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACZ;AAKb;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,uCAAc;kDAAC;AAIvB;IAFC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kCAAW,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACnF,IAAA,mBAAS,GAAE;;gDACQ;AAGpB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+BAAU,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,kBAAkB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;uDAClE;6BA3BjB,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,yBAAyB,CAAC;GACrB,kBAAkB,CA4B9B","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany } from 'typeorm';\nimport { ModuleMetadata } from 'src/entities/module-metadata.entity';\nimport { AgentHubTag } from './agent-hub-tag.entity';\nimport { AgentSkill } from './agent-skill.entity'\n\n@Entity('ss_agent_skill_registry')\nexport class AgentSkillRegistry extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n name: string;\n\n @Column({ type: \"varchar\", default: \"custom\" })\n type: string = \"custom\";\n\n @Column({ type: \"varchar\", nullable: true })\n iconName?: string;\n\n @Column({ type: \"text\" })\n description: string;\n\n @Column({ type: \"text\" })\n body: string;\n\n @Index()\n @ManyToOne(() => ModuleMetadata, { onDelete: \"SET NULL\", nullable: true })\n @JoinColumn({ name: 'module_id', referencedColumnName: 'id' })\n module: ModuleMetadata;\n\n @ManyToMany(() => AgentHubTag, tag => tag.skills, { cascade: ['insert', 'update'] })\n @JoinTable()\n tags: AgentHubTag[];\n\n @OneToMany(() => AgentSkill, agentSkill => agentSkill.agentSkillRegistry, { cascade: true })\n agentSkills: AgentSkill[];\n}\n"]}
|
|
@@ -3,6 +3,7 @@ import { AgentRegistry } from './agent-registry.entity';
|
|
|
3
3
|
import { AgentSkillRegistry } from './agent-skill-registry.entity';
|
|
4
4
|
export declare class AgentSkill extends CommonEntity {
|
|
5
5
|
agentRegistry: AgentRegistry;
|
|
6
|
+
agentRegistryId: number;
|
|
6
7
|
agentSkillRegistry: AgentSkillRegistry;
|
|
7
8
|
alwaysInclude: boolean;
|
|
8
9
|
agentSkillKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-skill.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-skill.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAGlE,qBACa,UAAW,SAAQ,YAAY;IAGxC,aAAa,EAAE,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-skill.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-skill.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAGlE,qBACa,UAAW,SAAQ,YAAY;IAGxC,aAAa,EAAE,aAAa,CAAC;IAG7B,eAAe,EAAE,MAAM,CAAC;IAIxB,kBAAkB,EAAE,kBAAkB,CAAC;IAGvC,aAAa,EAAE,OAAO,CAAQ;IAI9B,aAAa,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -22,7 +22,7 @@ let AgentSkill = class AgentSkill extends common_entity_1.CommonEntity {
|
|
|
22
22
|
this.alwaysInclude = true;
|
|
23
23
|
}
|
|
24
24
|
static _OPENAPI_METADATA_FACTORY() {
|
|
25
|
-
return { agentRegistry: { required: true, type: () => require("./agent-registry.entity").AgentRegistry }, agentSkillRegistry: { required: true, type: () => require("./agent-skill-registry.entity").AgentSkillRegistry }, alwaysInclude: { required: true, type: () => Boolean, default: true }, agentSkillKey: { required: true, type: () => String } };
|
|
25
|
+
return { agentRegistry: { required: true, type: () => require("./agent-registry.entity").AgentRegistry }, agentRegistryId: { required: true, type: () => Number }, agentSkillRegistry: { required: true, type: () => require("./agent-skill-registry.entity").AgentSkillRegistry }, alwaysInclude: { required: true, type: () => Boolean, default: true }, agentSkillKey: { required: true, type: () => String } };
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
exports.AgentSkill = AgentSkill;
|
|
@@ -31,6 +31,10 @@ __decorate([
|
|
|
31
31
|
(0, typeorm_1.JoinColumn)(),
|
|
32
32
|
__metadata("design:type", agent_registry_entity_1.AgentRegistry)
|
|
33
33
|
], AgentSkill.prototype, "agentRegistry", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.RelationId)((agentSkill) => agentSkill.agentRegistry),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], AgentSkill.prototype, "agentRegistryId", void 0);
|
|
34
38
|
__decorate([
|
|
35
39
|
(0, typeorm_1.ManyToOne)(() => agent_skill_registry_entity_1.AgentSkillRegistry, { onDelete: "CASCADE", nullable: false }),
|
|
36
40
|
(0, typeorm_1.JoinColumn)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-skill.entity.js","sourceRoot":"","sources":["../../src/entities/agent-skill.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"agent-skill.entity.js","sourceRoot":"","sources":["../../src/entities/agent-skill.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAmF;AACnF,mEAAwD;AACxD,+EAAkE;AAClE,oEAA8D;AAGvD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,4BAAY;IAArC;;QAaH,kBAAa,GAAY,IAAI,CAAC;KAKjC;;2VAL4B,IAAI;;CAKhC,CAAA;AAlBY,gCAAU;AAGnB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACxE,IAAA,oBAAU,GAAE;8BACE,qCAAa;iDAAC;AAG7B;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;;mDACzC;AAIxB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gDAAkB,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7E,IAAA,oBAAU,GAAE;8BACO,gDAAkB;sDAAC;AAGvC;IADC,IAAA,gBAAM,EAAC,EAAE,GAAG,IAAA,iCAAa,EAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDACzB;AAI9B;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACtB;qBAjBb,UAAU;IADtB,IAAA,gBAAM,EAAC,gBAAgB,CAAC;GACZ,UAAU,CAkBtB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, JoinColumn, ManyToOne, Column, Index, RelationId } from 'typeorm';\nimport { AgentRegistry } from './agent-registry.entity';\nimport { AgentSkillRegistry } from './agent-skill-registry.entity'\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_agent_skill')\nexport class AgentSkill extends CommonEntity {\n @ManyToOne(() => AgentRegistry, { onDelete: \"CASCADE\", nullable: false })\n @JoinColumn()\n agentRegistry: AgentRegistry;\n\n @RelationId((agentSkill: AgentSkill) => agentSkill.agentRegistry)\n agentRegistryId: number;\n\n @ManyToOne(() => AgentSkillRegistry, { onDelete: \"CASCADE\", nullable: false })\n @JoinColumn()\n agentSkillRegistry: AgentSkillRegistry;\n\n @Column({ ...getColumnType('boolean'), default: true })\n alwaysInclude: boolean = true;\n\n @Index({ unique: true })\n @Column({ type: \"varchar\", nullable: true })\n agentSkillKey: string;\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommonEntity } from '../entities/common.entity';
|
|
2
|
+
import { ModuleMetadata } from '../entities/module-metadata.entity';
|
|
2
3
|
import { AgentHubTag } from './agent-hub-tag.entity';
|
|
3
4
|
import { AgentTool } from './agent-tool.entity';
|
|
4
5
|
export declare class AgentToolRegistry extends CommonEntity {
|
|
@@ -10,6 +11,7 @@ export declare class AgentToolRegistry extends CommonEntity {
|
|
|
10
11
|
checksum?: string;
|
|
11
12
|
status: string;
|
|
12
13
|
lastLoadError: string;
|
|
14
|
+
module: ModuleMetadata;
|
|
13
15
|
tags: AgentHubTag[];
|
|
14
16
|
agentTools: AgentTool[];
|
|
15
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-tool-registry.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-tool-registry.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,qBACa,iBAAkB,SAAQ,YAAY;IAG/C,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,MAAM,CAAM;IAGxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,MAAM,EAAE,MAAM,CAAc;IAG5B,aAAa,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-tool-registry.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-tool-registry.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,qBACa,iBAAkB,SAAQ,YAAY;IAG/C,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,MAAM,CAAM;IAGxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,MAAM,EAAE,MAAM,CAAc;IAG5B,aAAa,EAAE,MAAM,CAAC;IAKtB,MAAM,EAAE,cAAc,CAAC;IAIvB,IAAI,EAAE,WAAW,EAAE,CAAC;IAGpB,UAAU,EAAE,SAAS,EAAE,CAAC;CAC3B"}
|
|
@@ -13,6 +13,7 @@ exports.AgentToolRegistry = void 0;
|
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const common_entity_1 = require("./common.entity");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
+
const module_metadata_entity_1 = require("./module-metadata.entity");
|
|
16
17
|
const agent_hub_tag_entity_1 = require("./agent-hub-tag.entity");
|
|
17
18
|
const agent_tool_entity_1 = require("./agent-tool.entity");
|
|
18
19
|
let AgentToolRegistry = class AgentToolRegistry extends common_entity_1.CommonEntity {
|
|
@@ -22,7 +23,7 @@ let AgentToolRegistry = class AgentToolRegistry extends common_entity_1.CommonEn
|
|
|
22
23
|
this.status = "inactive";
|
|
23
24
|
}
|
|
24
25
|
static _OPENAPI_METADATA_FACTORY() {
|
|
25
|
-
return { name: { required: true, type: () => String }, type: { required: true, type: () => String }, iconName: { required: false, type: () => String }, description: { required: true, type: () => String }, sourceCode: { required: true, type: () => String, default: "" }, checksum: { required: false, type: () => String }, status: { required: true, type: () => String, default: "inactive" }, lastLoadError: { required: true, type: () => String }, tags: { required: true, type: () => [require("./agent-hub-tag.entity").AgentHubTag] }, agentTools: { required: true, type: () => [require("./agent-tool.entity").AgentTool] } };
|
|
26
|
+
return { name: { required: true, type: () => String }, type: { required: true, type: () => String }, iconName: { required: false, type: () => String }, description: { required: true, type: () => String }, sourceCode: { required: true, type: () => String, default: "" }, checksum: { required: false, type: () => String }, status: { required: true, type: () => String, default: "inactive" }, lastLoadError: { required: true, type: () => String }, module: { required: true, type: () => require("./module-metadata.entity").ModuleMetadata }, tags: { required: true, type: () => [require("./agent-hub-tag.entity").AgentHubTag] }, agentTools: { required: true, type: () => [require("./agent-tool.entity").AgentTool] } };
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
29
|
exports.AgentToolRegistry = AgentToolRegistry;
|
|
@@ -59,6 +60,12 @@ __decorate([
|
|
|
59
60
|
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
60
61
|
__metadata("design:type", String)
|
|
61
62
|
], AgentToolRegistry.prototype, "lastLoadError", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Index)(),
|
|
65
|
+
(0, typeorm_1.ManyToOne)(() => module_metadata_entity_1.ModuleMetadata, { onDelete: "SET NULL", nullable: true }),
|
|
66
|
+
(0, typeorm_1.JoinColumn)({ name: 'module_id', referencedColumnName: 'id' }),
|
|
67
|
+
__metadata("design:type", module_metadata_entity_1.ModuleMetadata)
|
|
68
|
+
], AgentToolRegistry.prototype, "module", void 0);
|
|
62
69
|
__decorate([
|
|
63
70
|
(0, typeorm_1.ManyToMany)(() => agent_hub_tag_entity_1.AgentHubTag, tag => tag.tools, { cascade: ['insert', 'update'] }),
|
|
64
71
|
(0, typeorm_1.JoinTable)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-tool-registry.entity.js","sourceRoot":"","sources":["../../src/entities/agent-tool-registry.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"agent-tool-registry.entity.js","sourceRoot":"","sources":["../../src/entities/agent-tool-registry.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAyG;AACzG,qEAAqE;AACrE,iEAAqD;AACrD,2DAA+C;AAGxC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,4BAAY;IAA5C;;QAeH,eAAU,GAAW,EAAE,CAAC;QAMxB,WAAM,GAAW,UAAU,CAAC;KAgB/B;;;;CAAA,CAAA;AArCY,8CAAiB;AAG1B;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;+CACf;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;+CACf;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAC1B;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDACL;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACD;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAC1B;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;;iDACrB;AAG5B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACnB;AAKtB;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,uCAAc;iDAAC;AAIvB;IAFC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kCAAW,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IAClF,IAAA,mBAAS,GAAE;;+CACQ;AAGpB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6BAAS,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;qDAChE;4BApCf,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,wBAAwB,CAAC;GACpB,iBAAiB,CAqC7B","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany } from 'typeorm';\nimport { ModuleMetadata } from 'src/entities/module-metadata.entity';\nimport { AgentHubTag } from './agent-hub-tag.entity';\nimport { AgentTool } from './agent-tool.entity'\n\n@Entity('ss_agent_tool_registry')\nexport class AgentToolRegistry extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n name: string;\n\n @Column({ type: \"varchar\" })\n type: string;\n\n @Column({ type: \"varchar\", nullable: true })\n iconName?: string;\n\n @Column({ type: \"text\" })\n description: string;\n\n @Column({ type: \"text\" })\n sourceCode: string = \"\";\n\n @Column({ type: \"varchar\", nullable: true })\n checksum?: string;\n\n @Column({ type: \"varchar\", default: \"inactive\" })\n status: string = \"inactive\";\n\n @Column({ type: \"text\", nullable: true })\n lastLoadError: string;\n\n @Index()\n @ManyToOne(() => ModuleMetadata, { onDelete: \"SET NULL\", nullable: true })\n @JoinColumn({ name: 'module_id', referencedColumnName: 'id' })\n module: ModuleMetadata;\n\n @ManyToMany(() => AgentHubTag, tag => tag.tools, { cascade: ['insert', 'update'] })\n @JoinTable()\n tags: AgentHubTag[];\n\n @OneToMany(() => AgentTool, agentTool => agentTool.agentToolRegistry, { cascade: true })\n agentTools: AgentTool[];\n}\n"]}
|
|
@@ -3,6 +3,7 @@ import { AgentRegistry } from './agent-registry.entity';
|
|
|
3
3
|
import { AgentToolRegistry } from './agent-tool-registry.entity';
|
|
4
4
|
export declare class AgentTool extends CommonEntity {
|
|
5
5
|
agentRegistry: AgentRegistry;
|
|
6
|
+
agentRegistryId: number;
|
|
6
7
|
agentToolRegistry: AgentToolRegistry;
|
|
7
8
|
requiresApproval: boolean;
|
|
8
9
|
agentToolKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-tool.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-tool.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAGhE,qBACa,SAAU,SAAQ,YAAY;IAGvC,aAAa,EAAE,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-tool.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-tool.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAGhE,qBACa,SAAU,SAAQ,YAAY;IAGvC,aAAa,EAAE,aAAa,CAAC;IAG7B,eAAe,EAAE,MAAM,CAAC;IAIxB,iBAAiB,EAAE,iBAAiB,CAAC;IAGrC,gBAAgB,EAAE,OAAO,CAAS;IAIlC,YAAY,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -22,7 +22,7 @@ let AgentTool = class AgentTool extends common_entity_1.CommonEntity {
|
|
|
22
22
|
this.requiresApproval = false;
|
|
23
23
|
}
|
|
24
24
|
static _OPENAPI_METADATA_FACTORY() {
|
|
25
|
-
return { agentRegistry: { required: true, type: () => require("./agent-registry.entity").AgentRegistry }, agentToolRegistry: { required: true, type: () => require("./agent-tool-registry.entity").AgentToolRegistry }, requiresApproval: { required: true, type: () => Boolean, default: false }, agentToolKey: { required: true, type: () => String } };
|
|
25
|
+
return { agentRegistry: { required: true, type: () => require("./agent-registry.entity").AgentRegistry }, agentRegistryId: { required: true, type: () => Number }, agentToolRegistry: { required: true, type: () => require("./agent-tool-registry.entity").AgentToolRegistry }, requiresApproval: { required: true, type: () => Boolean, default: false }, agentToolKey: { required: true, type: () => String } };
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
exports.AgentTool = AgentTool;
|
|
@@ -31,6 +31,10 @@ __decorate([
|
|
|
31
31
|
(0, typeorm_1.JoinColumn)(),
|
|
32
32
|
__metadata("design:type", agent_registry_entity_1.AgentRegistry)
|
|
33
33
|
], AgentTool.prototype, "agentRegistry", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.RelationId)((agentTool) => agentTool.agentRegistry),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], AgentTool.prototype, "agentRegistryId", void 0);
|
|
34
38
|
__decorate([
|
|
35
39
|
(0, typeorm_1.ManyToOne)(() => agent_tool_registry_entity_1.AgentToolRegistry, { onDelete: "CASCADE", nullable: false }),
|
|
36
40
|
(0, typeorm_1.JoinColumn)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-tool.entity.js","sourceRoot":"","sources":["../../src/entities/agent-tool.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"agent-tool.entity.js","sourceRoot":"","sources":["../../src/entities/agent-tool.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAmF;AACnF,mEAAwD;AACxD,6EAAgE;AAChE,oEAA8D;AAGvD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,4BAAY;IAApC;;QAaH,qBAAgB,GAAY,KAAK,CAAC;KAKrC;;2VAL+B,KAAK;;CAKpC,CAAA;AAlBY,8BAAS;AAGlB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACxE,IAAA,oBAAU,GAAE;8BACE,qCAAa;gDAAC;AAG7B;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC;;kDACtC;AAIxB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8CAAiB,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC5E,IAAA,oBAAU,GAAE;8BACM,8CAAiB;oDAAC;AAGrC;IADC,IAAA,gBAAM,EAAC,EAAE,GAAG,IAAA,iCAAa,EAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;mDACtB;AAIlC;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACvB;oBAjBZ,SAAS;IADrB,IAAA,gBAAM,EAAC,eAAe,CAAC;GACX,SAAS,CAkBrB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, JoinColumn, ManyToOne, Column, Index, RelationId } from 'typeorm';\nimport { AgentRegistry } from './agent-registry.entity';\nimport { AgentToolRegistry } from './agent-tool-registry.entity'\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_agent_tool')\nexport class AgentTool extends CommonEntity {\n @ManyToOne(() => AgentRegistry, { onDelete: \"CASCADE\", nullable: false })\n @JoinColumn()\n agentRegistry: AgentRegistry;\n\n @RelationId((agentTool: AgentTool) => agentTool.agentRegistry)\n agentRegistryId: number;\n\n @ManyToOne(() => AgentToolRegistry, { onDelete: \"CASCADE\", nullable: false })\n @JoinColumn()\n agentToolRegistry: AgentToolRegistry;\n\n @Column({ ...getColumnType('boolean'), default: false })\n requiresApproval: boolean = false;\n\n @Index({ unique: true })\n @Column({ type: \"varchar\", nullable: true })\n agentToolKey: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.helper.d.ts","sourceRoot":"","sources":["../../src/helpers/bootstrap.helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAalE,OAAO,EAGL,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"bootstrap.helper.d.ts","sourceRoot":"","sources":["../../src/helpers/bootstrap.helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAalE,OAAO,EAGL,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AA2B3B,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IAEpC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC;IAExC,0BAA0B,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAE9D,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAEhC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAU3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAYnB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA6CD,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,EACpC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,sBAAsB,CAAC,CAiKjC;AAgBD,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GACnC,OAAO,CAAC,IAAI,CAAC,CA4Cf"}
|
|
@@ -21,6 +21,7 @@ const cors_helper_1 = require("./cors.helper");
|
|
|
21
21
|
const security_helper_1 = require("./security.helper");
|
|
22
22
|
const environment_helper_1 = require("./environment.helper");
|
|
23
23
|
const disallow_in_production_decorator_1 = require("../decorators/disallow-in-production.decorator");
|
|
24
|
+
const media_storage_paths_1 = require("../services/file/media-storage-paths");
|
|
24
25
|
function registerGlobalProcessHandlers() {
|
|
25
26
|
process.on('unhandledRejection', (reason, promise) => {
|
|
26
27
|
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
|
|
@@ -35,6 +36,32 @@ function registerGlobalProcessHandlers() {
|
|
|
35
36
|
console.warn(warning);
|
|
36
37
|
});
|
|
37
38
|
}
|
|
39
|
+
async function syncBundledMediaAssets(logger) {
|
|
40
|
+
const packaged = (0, path_1.resolve)(__dirname, '../resources/images');
|
|
41
|
+
const source = (0, path_1.resolve)(__dirname, '../../resources/images');
|
|
42
|
+
const imagesDir = (0, fs_1.existsSync)(packaged) ? packaged : source;
|
|
43
|
+
if (!(0, fs_1.existsSync)(imagesDir)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const targetDir = (0, media_storage_paths_1.getPublicMediaStorageDir)();
|
|
47
|
+
try {
|
|
48
|
+
await fs_1.promises.mkdir(targetDir, { recursive: true });
|
|
49
|
+
for (const name of await fs_1.promises.readdir(imagesDir)) {
|
|
50
|
+
const from = (0, path_1.join)(imagesDir, name);
|
|
51
|
+
const to = (0, path_1.join)(targetDir, name);
|
|
52
|
+
const [fromStat, toStat] = await Promise.all([
|
|
53
|
+
fs_1.promises.stat(from),
|
|
54
|
+
fs_1.promises.stat(to).catch(() => null),
|
|
55
|
+
]);
|
|
56
|
+
if (fromStat.isFile() && (!toStat || toStat.size !== fromStat.size)) {
|
|
57
|
+
await fs_1.promises.copyFile(from, to);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
logger.warn(`Could not sync bundled media assets into ${targetDir}: ${error?.message ?? error}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
38
65
|
async function bootstrapSolidApp(appModuleFactory, options = {}) {
|
|
39
66
|
registerGlobalProcessHandlers();
|
|
40
67
|
const { globalPrefix = 'api', swagger, permissionsPolicyOverrides = {}, security = {}, verboseBootstrap = false, bodyLimit = '10mb', captureRawBody = false, } = options;
|
|
@@ -124,6 +151,7 @@ async function bootstrapSolidApp(appModuleFactory, options = {}) {
|
|
|
124
151
|
app.useWebSocketAdapter(new platform_ws_1.WsAdapter(app));
|
|
125
152
|
await app.listen(port);
|
|
126
153
|
app.useLogger(app.get(nest_winston_1.WINSTON_MODULE_NEST_PROVIDER));
|
|
154
|
+
await syncBundledMediaAssets(new common_1.Logger('bootstrapSolidApp'));
|
|
127
155
|
const elapsed = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
128
156
|
process.stdout.write(`\x1b[32mServer started on port ${port} in ${elapsed}s\x1b[0m\n`);
|
|
129
157
|
return app;
|