@solidxai/core 0.1.19 → 0.1.20-beta.1
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 +16 -0
- package/dist/controllers/agent-hub-tag.controller.d.ts +24 -0
- package/dist/controllers/agent-hub-tag.controller.d.ts.map +1 -0
- package/dist/controllers/agent-hub-tag.controller.js +175 -0
- package/dist/controllers/agent-hub-tag.controller.js.map +1 -0
- package/dist/controllers/agent-tool-registry.controller.d.ts +18 -0
- package/dist/controllers/agent-tool-registry.controller.d.ts.map +1 -1
- package/dist/controllers/agent-tool-registry.controller.js +13 -0
- package/dist/controllers/agent-tool-registry.controller.js.map +1 -1
- package/dist/dtos/create-agent-hub-tag.dto.d.ts +16 -0
- package/dist/dtos/create-agent-hub-tag.dto.d.ts.map +1 -0
- package/dist/dtos/create-agent-hub-tag.dto.js +98 -0
- package/dist/dtos/create-agent-hub-tag.dto.js.map +1 -0
- package/dist/dtos/create-agent-registry.dto.d.ts +4 -0
- package/dist/dtos/create-agent-registry.dto.d.ts.map +1 -1
- package/dist/dtos/create-agent-registry.dto.js +24 -1
- package/dist/dtos/create-agent-registry.dto.js.map +1 -1
- package/dist/dtos/create-agent-skill-registry.dto.d.ts +4 -1
- package/dist/dtos/create-agent-skill-registry.dto.d.ts.map +1 -1
- package/dist/dtos/create-agent-skill-registry.dto.js +21 -5
- package/dist/dtos/create-agent-skill-registry.dto.js.map +1 -1
- package/dist/dtos/create-agent-tool-registry.dto.d.ts +4 -1
- package/dist/dtos/create-agent-tool-registry.dto.d.ts.map +1 -1
- package/dist/dtos/create-agent-tool-registry.dto.js +24 -8
- package/dist/dtos/create-agent-tool-registry.dto.js.map +1 -1
- package/dist/dtos/create-email-template.dto.d.ts +2 -0
- package/dist/dtos/create-email-template.dto.d.ts.map +1 -1
- package/dist/dtos/create-email-template.dto.js +13 -1
- package/dist/dtos/create-email-template.dto.js.map +1 -1
- package/dist/dtos/create-sms-template.dto.d.ts +2 -0
- package/dist/dtos/create-sms-template.dto.d.ts.map +1 -1
- package/dist/dtos/create-sms-template.dto.js +13 -1
- package/dist/dtos/create-sms-template.dto.js.map +1 -1
- package/dist/dtos/update-agent-hub-tag.dto.d.ts +17 -0
- package/dist/dtos/update-agent-hub-tag.dto.d.ts.map +1 -0
- package/dist/dtos/update-agent-hub-tag.dto.js +104 -0
- package/dist/dtos/update-agent-hub-tag.dto.js.map +1 -0
- package/dist/dtos/update-agent-registry.dto.d.ts +4 -0
- package/dist/dtos/update-agent-registry.dto.d.ts.map +1 -1
- package/dist/dtos/update-agent-registry.dto.js +24 -1
- package/dist/dtos/update-agent-registry.dto.js.map +1 -1
- package/dist/dtos/update-agent-skill-registry.dto.d.ts +4 -1
- package/dist/dtos/update-agent-skill-registry.dto.d.ts.map +1 -1
- package/dist/dtos/update-agent-skill-registry.dto.js +20 -4
- package/dist/dtos/update-agent-skill-registry.dto.js.map +1 -1
- package/dist/dtos/update-agent-tool-registry.dto.d.ts +4 -1
- package/dist/dtos/update-agent-tool-registry.dto.d.ts.map +1 -1
- package/dist/dtos/update-agent-tool-registry.dto.js +24 -8
- package/dist/dtos/update-agent-tool-registry.dto.js.map +1 -1
- package/dist/entities/agent-hub-tag.entity.d.ts +11 -0
- package/dist/entities/agent-hub-tag.entity.d.ts.map +1 -0
- package/dist/entities/agent-hub-tag.entity.js +45 -0
- package/dist/entities/agent-hub-tag.entity.js.map +1 -0
- package/dist/entities/agent-human-request.entity.d.ts.map +1 -1
- package/dist/entities/agent-human-request.entity.js +2 -1
- package/dist/entities/agent-human-request.entity.js.map +1 -1
- package/dist/entities/agent-job.entity.d.ts.map +1 -1
- package/dist/entities/agent-job.entity.js +5 -4
- package/dist/entities/agent-job.entity.js.map +1 -1
- package/dist/entities/agent-process.entity.d.ts.map +1 -1
- package/dist/entities/agent-process.entity.js +4 -3
- package/dist/entities/agent-process.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 +7 -1
- package/dist/entities/agent-registry.entity.js.map +1 -1
- package/dist/entities/agent-session.entity.d.ts.map +1 -1
- package/dist/entities/agent-session.entity.js +4 -3
- package/dist/entities/agent-session.entity.js.map +1 -1
- package/dist/entities/agent-skill-registry.entity.d.ts +2 -1
- package/dist/entities/agent-skill-registry.entity.d.ts.map +1 -1
- package/dist/entities/agent-skill-registry.entity.js +5 -4
- package/dist/entities/agent-skill-registry.entity.js.map +1 -1
- package/dist/entities/agent-skill.entity.d.ts.map +1 -1
- package/dist/entities/agent-skill.entity.js +2 -1
- package/dist/entities/agent-skill.entity.js.map +1 -1
- package/dist/entities/agent-tool-registry.entity.d.ts +2 -1
- package/dist/entities/agent-tool-registry.entity.d.ts.map +1 -1
- package/dist/entities/agent-tool-registry.entity.js +7 -6
- package/dist/entities/agent-tool-registry.entity.js.map +1 -1
- package/dist/entities/agent-tool.entity.d.ts.map +1 -1
- package/dist/entities/agent-tool.entity.js +2 -1
- package/dist/entities/agent-tool.entity.js.map +1 -1
- package/dist/entities/email-template.entity.d.ts +2 -0
- package/dist/entities/email-template.entity.d.ts.map +1 -1
- package/dist/entities/email-template.entity.js +8 -1
- package/dist/entities/email-template.entity.js.map +1 -1
- package/dist/entities/secret.entity.js +1 -1
- package/dist/entities/secret.entity.js.map +1 -1
- package/dist/entities/sms-template.entity.d.ts +2 -0
- package/dist/entities/sms-template.entity.d.ts.map +1 -1
- package/dist/entities/sms-template.entity.js +8 -1
- package/dist/entities/sms-template.entity.js.map +1 -1
- package/dist/helpers/typeorm-db-helper.d.ts +1 -0
- package/dist/helpers/typeorm-db-helper.d.ts.map +1 -1
- package/dist/helpers/typeorm-db-helper.js +30 -0
- package/dist/helpers/typeorm-db-helper.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/repository/agent-hub-tag.repository.d.ts +12 -0
- package/dist/repository/agent-hub-tag.repository.d.ts.map +1 -0
- package/dist/repository/agent-hub-tag.repository.js +39 -0
- package/dist/repository/agent-hub-tag.repository.js.map +1 -0
- package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js +2 -0
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +408 -30
- package/dist/services/agent-hub-tag.service.d.ts +12 -0
- package/dist/services/agent-hub-tag.service.d.ts.map +1 -0
- package/dist/services/agent-hub-tag.service.js +38 -0
- package/dist/services/agent-hub-tag.service.js.map +1 -0
- package/dist/services/agent-tool-registry.service.d.ts +23 -1
- package/dist/services/agent-tool-registry.service.d.ts.map +1 -1
- package/dist/services/agent-tool-registry.service.js +168 -4
- package/dist/services/agent-tool-registry.service.js.map +1 -1
- package/dist/services/agent-tool-registry.service.spec.js +1 -1
- package/dist/services/agent-tool-registry.service.spec.js.map +1 -1
- package/dist/services/secret.service.d.ts +1 -0
- package/dist/services/secret.service.d.ts.map +1 -1
- package/dist/services/secret.service.js +10 -0
- package/dist/services/secret.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 +1 -1
- package/src/controllers/agent-hub-tag.controller.ts +86 -0
- package/src/controllers/agent-tool-registry.controller.ts +6 -0
- package/src/dtos/create-agent-hub-tag.dto.ts +70 -0
- package/src/dtos/create-agent-registry.dto.ts +20 -0
- package/src/dtos/create-agent-skill-registry.dto.ts +19 -4
- package/src/dtos/create-agent-tool-registry.dto.ts +21 -6
- package/src/dtos/create-email-template.dto.ts +11 -1
- package/src/dtos/create-sms-template.dto.ts +11 -1
- package/src/dtos/update-agent-hub-tag.dto.ts +75 -0
- package/src/dtos/update-agent-registry.dto.ts +20 -0
- package/src/dtos/update-agent-skill-registry.dto.ts +17 -3
- package/src/dtos/update-agent-tool-registry.dto.ts +20 -6
- package/src/entities/agent-hub-tag.entity.ts +21 -0
- package/src/entities/agent-human-request.entity.ts +2 -1
- package/src/entities/agent-job.entity.ts +5 -4
- package/src/entities/agent-process.entity.ts +4 -3
- package/src/entities/agent-registry.entity.ts +6 -1
- package/src/entities/agent-session.entity.ts +4 -3
- package/src/entities/agent-skill-registry.entity.ts +5 -3
- package/src/entities/agent-skill.entity.ts +2 -1
- package/src/entities/agent-tool-registry.entity.ts +6 -4
- package/src/entities/agent-tool.entity.ts +2 -1
- package/src/entities/email-template.entity.ts +8 -2
- package/src/entities/secret.entity.ts +1 -1
- package/src/entities/sms-template.entity.ts +8 -2
- package/src/helpers/typeorm-db-helper.ts +34 -0
- package/src/index.ts +6 -0
- package/src/repository/agent-hub-tag.repository.ts +19 -0
- package/src/seeders/module-metadata-seeder.service.ts +6 -0
- package/src/seeders/seed-data/solid-core-metadata.json +408 -30
- package/src/services/agent-hub-tag.service.ts +19 -0
- package/src/services/agent-tool-registry.service.spec.ts +1 -1
- package/src/services/agent-tool-registry.service.ts +161 -1
- package/src/services/secret.service.ts +10 -0
- package/src/solid-core.module.ts +8 -0
|
@@ -15,9 +15,10 @@ const class_validator_1 = require("class-validator");
|
|
|
15
15
|
const swagger_1 = require("@nestjs/swagger");
|
|
16
16
|
const class_transformer_1 = require("class-transformer");
|
|
17
17
|
const update_agent_skill_dto_1 = require("./update-agent-skill.dto");
|
|
18
|
+
const update_agent_hub_tag_dto_1 = require("./update-agent-hub-tag.dto");
|
|
18
19
|
class UpdateAgentSkillRegistryDto {
|
|
19
20
|
static _OPENAPI_METADATA_FACTORY() {
|
|
20
|
-
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 }, body: { required: true, type: () => String }, tags: { required: true, type: () => String }, agentSkills: { required: true, type: () => [require("./update-agent-skill.dto").UpdateAgentSkillDto] }, agentSkillsIds: { required: true, type: () => [Number] }, agentSkillsCommand: { 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 }, body: { 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 }, agentSkills: { required: true, type: () => [require("./update-agent-skill.dto").UpdateAgentSkillDto] }, agentSkillsIds: { required: true, type: () => [Number] }, agentSkillsCommand: { required: true, type: () => String } };
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
exports.UpdateAgentSkillRegistryDto = UpdateAgentSkillRegistryDto;
|
|
@@ -61,12 +62,27 @@ __decorate([
|
|
|
61
62
|
__metadata("design:type", String)
|
|
62
63
|
], UpdateAgentSkillRegistryDto.prototype, "body", void 0);
|
|
63
64
|
__decorate([
|
|
64
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
65
65
|
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
67
|
+
(0, class_validator_1.IsArray)(),
|
|
68
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
69
|
+
(0, class_transformer_1.Type)(() => update_agent_hub_tag_dto_1.UpdateAgentHubTagDto),
|
|
70
|
+
__metadata("design:type", Array)
|
|
71
|
+
], UpdateAgentSkillRegistryDto.prototype, "tags", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
(0, class_validator_1.IsArray)(),
|
|
75
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
76
|
+
(0, class_validator_1.IsInt)({ each: true }),
|
|
77
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
78
|
+
__metadata("design:type", Array)
|
|
79
|
+
], UpdateAgentSkillRegistryDto.prototype, "tagsIds", void 0);
|
|
80
|
+
__decorate([
|
|
66
81
|
(0, class_validator_1.IsString)(),
|
|
67
|
-
(0,
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
68
84
|
__metadata("design:type", String)
|
|
69
|
-
], UpdateAgentSkillRegistryDto.prototype, "
|
|
85
|
+
], UpdateAgentSkillRegistryDto.prototype, "tagsCommand", void 0);
|
|
70
86
|
__decorate([
|
|
71
87
|
(0, class_validator_1.IsOptional)(),
|
|
72
88
|
(0, swagger_1.ApiProperty)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-agent-skill-registry.dto.js","sourceRoot":"","sources":["../../src/dtos/update-agent-skill-registry.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAA0G;AAC1G,6CAA8C;AAC9C,yDAAyC;AACzC,qEAA+D;
|
|
1
|
+
{"version":3,"file":"update-agent-skill-registry.dto.js","sourceRoot":"","sources":["../../src/dtos/update-agent-skill-registry.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAA0G;AAC1G,6CAA8C;AAC9C,yDAAyC;AACzC,qEAA+D;AAC/D,yEAAkE;AAElE,MAAa,2BAA2B;;;;CAqEvC;AArED,kEAqEC;AAlEG;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;uDACG;AAMX;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yDACD;AAMb;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yDACD;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6DACf;AAMlB;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,GAAE;IACZ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from 'class-validator';\nimport { ApiProperty } from '@nestjs/swagger';\nimport { Type } from 'class-transformer';\nimport { UpdateAgentSkillDto } from './update-agent-skill.dto';\nimport { UpdateAgentHubTagDto } from './update-agent-hub-tag.dto';\n\nexport class UpdateAgentSkillRegistryDto {\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 body: 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(() => UpdateAgentSkillDto)\n agentSkills: UpdateAgentSkillDto[];\n\n @IsOptional()\n @IsArray()\n @ApiProperty()\n agentSkillsIds: number[];\n\n @IsString()\n @IsOptional()\n @ApiProperty()\n agentSkillsCommand: string;\n}\n"]}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { UpdateAgentToolDto } from './update-agent-tool.dto';
|
|
2
|
+
import { UpdateAgentHubTagDto } from './update-agent-hub-tag.dto';
|
|
2
3
|
export declare class UpdateAgentToolRegistryDto {
|
|
3
4
|
id: number;
|
|
4
5
|
name: string;
|
|
5
6
|
type: string;
|
|
6
7
|
iconName?: string;
|
|
7
8
|
description: string;
|
|
8
|
-
tags: string;
|
|
9
9
|
sourceCode: string;
|
|
10
10
|
checksum?: string;
|
|
11
11
|
status: string;
|
|
12
12
|
lastLoadError: string;
|
|
13
|
+
tags: UpdateAgentHubTagDto[];
|
|
14
|
+
tagsIds: number[];
|
|
15
|
+
tagsCommand: string;
|
|
13
16
|
agentTools: UpdateAgentToolDto[];
|
|
14
17
|
agentToolsIds: number[];
|
|
15
18
|
agentToolsCommand: string;
|
|
@@ -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;
|
|
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"}
|
|
@@ -15,9 +15,10 @@ const class_validator_1 = require("class-validator");
|
|
|
15
15
|
const swagger_1 = require("@nestjs/swagger");
|
|
16
16
|
const class_transformer_1 = require("class-transformer");
|
|
17
17
|
const update_agent_tool_dto_1 = require("./update-agent-tool.dto");
|
|
18
|
+
const update_agent_hub_tag_dto_1 = require("./update-agent-hub-tag.dto");
|
|
18
19
|
class UpdateAgentToolRegistryDto {
|
|
19
20
|
static _OPENAPI_METADATA_FACTORY() {
|
|
20
|
-
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 },
|
|
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
22
|
}
|
|
22
23
|
}
|
|
23
24
|
exports.UpdateAgentToolRegistryDto = UpdateAgentToolRegistryDto;
|
|
@@ -53,13 +54,6 @@ __decorate([
|
|
|
53
54
|
(0, swagger_1.ApiProperty)(),
|
|
54
55
|
__metadata("design:type", String)
|
|
55
56
|
], UpdateAgentToolRegistryDto.prototype, "description", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
58
|
-
(0, class_validator_1.IsOptional)(),
|
|
59
|
-
(0, class_validator_1.IsString)(),
|
|
60
|
-
(0, swagger_1.ApiProperty)(),
|
|
61
|
-
__metadata("design:type", String)
|
|
62
|
-
], UpdateAgentToolRegistryDto.prototype, "tags", void 0);
|
|
63
57
|
__decorate([
|
|
64
58
|
(0, class_validator_1.IsNotEmpty)(),
|
|
65
59
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -86,6 +80,28 @@ __decorate([
|
|
|
86
80
|
(0, swagger_1.ApiProperty)(),
|
|
87
81
|
__metadata("design:type", String)
|
|
88
82
|
], UpdateAgentToolRegistryDto.prototype, "lastLoadError", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_validator_1.IsOptional)(),
|
|
85
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
86
|
+
(0, class_validator_1.IsArray)(),
|
|
87
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
88
|
+
(0, class_transformer_1.Type)(() => update_agent_hub_tag_dto_1.UpdateAgentHubTagDto),
|
|
89
|
+
__metadata("design:type", Array)
|
|
90
|
+
], UpdateAgentToolRegistryDto.prototype, "tags", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, class_validator_1.IsOptional)(),
|
|
93
|
+
(0, class_validator_1.IsArray)(),
|
|
94
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
95
|
+
(0, class_validator_1.IsInt)({ each: true }),
|
|
96
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
97
|
+
__metadata("design:type", Array)
|
|
98
|
+
], UpdateAgentToolRegistryDto.prototype, "tagsIds", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_validator_1.IsString)(),
|
|
101
|
+
(0, class_validator_1.IsOptional)(),
|
|
102
|
+
(0, swagger_1.ApiProperty)({ required: false }),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], UpdateAgentToolRegistryDto.prototype, "tagsCommand", void 0);
|
|
89
105
|
__decorate([
|
|
90
106
|
(0, class_validator_1.IsOptional)(),
|
|
91
107
|
(0, swagger_1.ApiProperty)(),
|
|
@@ -1 +1 @@
|
|
|
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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AAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;iEACQ;AAOtB;IALC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAChC,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,+CAAoB,CAAC;;wDACJ;AAO7B;IALC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACrB,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;2DACf;AAKlB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;+DACb;AAOpB;IALC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,GAAE;IACb,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,0CAAkB,CAAC;;8DACE;AAKjC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,qBAAW,GAAE;;iEACU;AAKxB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,GAAE;;qEACY","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 @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"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CommonEntity } from '../entities/common.entity';
|
|
2
|
+
import { AgentSkillRegistry } from './agent-skill-registry.entity';
|
|
3
|
+
import { AgentToolRegistry } from './agent-tool-registry.entity';
|
|
4
|
+
import { AgentRegistry } from './agent-registry.entity';
|
|
5
|
+
export declare class AgentHubTag extends CommonEntity {
|
|
6
|
+
name: string;
|
|
7
|
+
skills: AgentSkillRegistry[];
|
|
8
|
+
tools: AgentToolRegistry[];
|
|
9
|
+
agents: AgentRegistry[];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=agent-hub-tag.entity.d.ts.map
|
|
@@ -0,0 +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;IAGb,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAG7B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAG3B,MAAM,EAAE,aAAa,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.AgentHubTag = void 0;
|
|
13
|
+
const openapi = require("@nestjs/swagger");
|
|
14
|
+
const common_entity_1 = require("./common.entity");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const agent_skill_registry_entity_1 = require("./agent-skill-registry.entity");
|
|
17
|
+
const agent_tool_registry_entity_1 = require("./agent-tool-registry.entity");
|
|
18
|
+
const agent_registry_entity_1 = require("./agent-registry.entity");
|
|
19
|
+
let AgentHubTag = class AgentHubTag extends common_entity_1.CommonEntity {
|
|
20
|
+
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
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.AgentHubTag = AgentHubTag;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Index)({ unique: true }),
|
|
27
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], AgentHubTag.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.ManyToMany)(() => agent_skill_registry_entity_1.AgentSkillRegistry, skill => skill.tags),
|
|
32
|
+
__metadata("design:type", Array)
|
|
33
|
+
], AgentHubTag.prototype, "skills", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToMany)(() => agent_tool_registry_entity_1.AgentToolRegistry, tool => tool.tags),
|
|
36
|
+
__metadata("design:type", Array)
|
|
37
|
+
], AgentHubTag.prototype, "tools", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToMany)(() => agent_registry_entity_1.AgentRegistry, agent => agent.tags),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], AgentHubTag.prototype, "agents", void 0);
|
|
42
|
+
exports.AgentHubTag = AgentHubTag = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)('ss_agent_hub_tag')
|
|
44
|
+
], AgentHubTag);
|
|
45
|
+
//# sourceMappingURL=agent-hub-tag.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-hub-tag.entity.js","sourceRoot":"","sources":["../../src/entities/agent-hub-tag.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAA4D;AAC5D,+EAAmE;AACnE,6EAAiE;AACjE,mEAAwD;AAGjD,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,4BAAY;;;;CAa5C,CAAA;AAbY,kCAAW;AAGpB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;yCACf;AAGb;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;sBAZf,WAAW;IADvB,IAAA,gBAAM,EAAC,kBAAkB,CAAC;GACd,WAAW,CAavB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, ManyToMany } from 'typeorm';\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 @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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-human-request.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-human-request.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"agent-human-request.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-human-request.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAG7C,qBACa,iBAAkB,SAAQ,YAAY;IAG/C,OAAO,EAAE,YAAY,CAAC;IAItB,GAAG,EAAE,QAAQ,CAAC;IAGd,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,MAAM,CAAC;IAGjB,OAAO,EAAE,MAAM,CAAC;IAGhB,OAAO,EAAE,MAAM,CAAC;IAGhB,UAAU,EAAE,MAAM,CAAC;IAGnB,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,EAAE,MAAM,CAAC;IAGtB,MAAM,EAAE,MAAM,CAAa;IAG3B,MAAM,EAAE,MAAM,CAAC;IAGf,UAAU,EAAE,MAAM,CAAC;IAGnB,UAAU,EAAE,IAAI,CAAC;CACpB"}
|
|
@@ -15,6 +15,7 @@ const common_entity_1 = require("./common.entity");
|
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const agent_session_entity_1 = require("./agent-session.entity");
|
|
17
17
|
const agent_job_entity_1 = require("./agent-job.entity");
|
|
18
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
18
19
|
let AgentHumanRequest = class AgentHumanRequest extends common_entity_1.CommonEntity {
|
|
19
20
|
constructor() {
|
|
20
21
|
super(...arguments);
|
|
@@ -76,7 +77,7 @@ __decorate([
|
|
|
76
77
|
__metadata("design:type", String)
|
|
77
78
|
], AgentHumanRequest.prototype, "answeredBy", void 0);
|
|
78
79
|
__decorate([
|
|
79
|
-
(0, typeorm_1.Column)({
|
|
80
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), nullable: true }),
|
|
80
81
|
__metadata("design:type", Date)
|
|
81
82
|
], AgentHumanRequest.prototype, "answeredAt", void 0);
|
|
82
83
|
exports.AgentHumanRequest = AgentHumanRequest = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-human-request.entity.js","sourceRoot":"","sources":["../../src/entities/agent-human-request.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAgE;AAChE,iEAAsD;AACtD,yDAA6C;
|
|
1
|
+
{"version":3,"file":"agent-human-request.entity.js","sourceRoot":"","sources":["../../src/entities/agent-human-request.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAgE;AAChE,iEAAsD;AACtD,yDAA6C;AAC7C,oEAA8D;AAGvD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,4BAAY;IAA5C;;QA+BH,WAAM,GAAW,SAAS,CAAC;KAU9B;;;;CAAA,CAAA;AAzCY,8CAAiB;AAG1B;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,EAAE,QAA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AAQ,EAAE,IAAI,EAAE,CAAC;8BACzD,IAAI;qDAAC;4BAxCR,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,wBAAwB,CAAC;GACpB,iBAAiB,CAyC7B","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, JoinColumn, ManyToOne, Column } from 'typeorm';\nimport { AgentSession } from './agent-session.entity';\nimport { AgentJob } from './agent-job.entity'\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_agent_human_request')\nexport class AgentHumanRequest extends CommonEntity {\n @ManyToOne(() => AgentSession, { onDelete: \"SET NULL\", nullable: true })\n @JoinColumn()\n session: AgentSession;\n\n @ManyToOne(() => AgentJob, { onDelete: \"SET NULL\", nullable: true })\n @JoinColumn()\n job: AgentJob;\n\n @Column({ type: \"varchar\" })\n kind: string;\n\n @Column({ type: \"text\" })\n question: string;\n\n @Column({ type: \"text\", nullable: true })\n options: string;\n\n @Column({ type: \"text\", nullable: true })\n context: string;\n\n @Column({ type: \"text\" })\n toolCallId: string;\n\n @Column({ type: \"text\" })\n toolName: string;\n\n @Column({ type: \"text\" })\n toolArguments: string;\n\n @Column({ type: \"varchar\", default: \"pending\" })\n status: string = \"pending\";\n\n @Column({ type: \"text\", nullable: true })\n answer: string;\n\n @Column({ type: \"varchar\", nullable: true })\n answeredBy: string;\n\n @Column({ ...getColumnType('datetimeWithTimezone'), nullable: true })\n answeredAt: Date;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-job.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-job.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-job.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-job.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,qBACa,QAAS,SAAQ,YAAY;IAGtC,OAAO,EAAE,YAAY,CAAC;IAItB,KAAK,EAAE,aAAa,CAAC;IAGrB,IAAI,EAAE,MAAM,CAAW;IAGvB,KAAK,EAAE,MAAM,CAAC;IAGd,cAAc,EAAE,MAAM,CAAC;IAGvB,MAAM,EAAE,MAAM,CAAY;IAG1B,UAAU,EAAE,MAAM,CAAC;IAGnB,cAAc,EAAE,IAAI,CAAC;IAGrB,QAAQ,EAAE,MAAM,CAAK;IAGrB,cAAc,EAAE,MAAM,CAAC;IAGvB,UAAU,EAAE,MAAM,CAAC;IAGnB,aAAa,EAAE,MAAM,CAAC;IAGtB,cAAc,EAAE,MAAM,CAAC;IAGvB,QAAQ,EAAE,MAAM,CAAC;IAGjB,MAAM,EAAE,MAAM,CAAC;IAGf,KAAK,EAAE,MAAM,CAAC;IAGd,QAAQ,EAAE,IAAI,CAAc;IAG5B,SAAS,EAAE,IAAI,CAAC;IAGhB,UAAU,EAAE,IAAI,CAAC;IAGjB,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CAC3C"}
|
|
@@ -16,6 +16,7 @@ const typeorm_1 = require("typeorm");
|
|
|
16
16
|
const agent_session_entity_1 = require("./agent-session.entity");
|
|
17
17
|
const agent_registry_entity_1 = require("./agent-registry.entity");
|
|
18
18
|
const agent_human_request_entity_1 = require("./agent-human-request.entity");
|
|
19
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
19
20
|
let AgentJob = class AgentJob extends common_entity_1.CommonEntity {
|
|
20
21
|
constructor() {
|
|
21
22
|
super(...arguments);
|
|
@@ -60,7 +61,7 @@ __decorate([
|
|
|
60
61
|
__metadata("design:type", String)
|
|
61
62
|
], AgentJob.prototype, "leaseToken", void 0);
|
|
62
63
|
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({
|
|
64
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), nullable: true }),
|
|
64
65
|
__metadata("design:type", Date)
|
|
65
66
|
], AgentJob.prototype, "leaseExpiresAt", void 0);
|
|
66
67
|
__decorate([
|
|
@@ -96,15 +97,15 @@ __decorate([
|
|
|
96
97
|
__metadata("design:type", String)
|
|
97
98
|
], AgentJob.prototype, "error", void 0);
|
|
98
99
|
__decorate([
|
|
99
|
-
(0, typeorm_1.Column)({
|
|
100
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), default: () => (0, typeorm_db_helper_1.getCurrentTimestampDefault)() }),
|
|
100
101
|
__metadata("design:type", Date)
|
|
101
102
|
], AgentJob.prototype, "queuedAt", void 0);
|
|
102
103
|
__decorate([
|
|
103
|
-
(0, typeorm_1.Column)({
|
|
104
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), nullable: true }),
|
|
104
105
|
__metadata("design:type", Date)
|
|
105
106
|
], AgentJob.prototype, "startedAt", void 0);
|
|
106
107
|
__decorate([
|
|
107
|
-
(0, typeorm_1.Column)({
|
|
108
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), nullable: true }),
|
|
108
109
|
__metadata("design:type", Date)
|
|
109
110
|
], AgentJob.prototype, "finishedAt", void 0);
|
|
110
111
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-job.entity.js","sourceRoot":"","sources":["../../src/entities/agent-job.entity.ts"],"names":[],"mappings":";;;;;;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I;0CAAc;AAG5B;IADC,IAAA,gBAAM,EAAC,EAAE,GAAG,IAAA,iCAAa,EAAC,sBAAsB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC1D,IAAI;2CAAC;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,GAAG,IAAA,iCAAa,EAAC,sBAAsB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACzD,IAAI;4CAAC;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8CAAiB,EAAE,iBAAiB,CAAC,EAAE,CAAC,iBAAiB,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;oDAC1D;mBA7D/B,QAAQ;IADpB,IAAA,gBAAM,EAAC,cAAc,CAAC;GACV,QAAQ,CA8DpB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, JoinColumn, ManyToOne, Column, OneToMany } from 'typeorm';\nimport { AgentSession } from './agent-session.entity';\nimport { AgentRegistry } from './agent-registry.entity';\nimport { AgentHumanRequest } from './agent-human-request.entity';\nimport { getColumnType, getCurrentTimestampDefault } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_agent_job')\nexport class AgentJob extends CommonEntity {\n @ManyToOne(() => AgentSession, { onDelete: \"SET NULL\", nullable: true })\n @JoinColumn()\n session: AgentSession;\n\n @ManyToOne(() => AgentRegistry, { onDelete: \"SET NULL\", nullable: true })\n @JoinColumn()\n agent: AgentRegistry;\n\n @Column({ type: \"varchar\", default: \"start\" })\n kind: string = \"start\";\n\n @Column({ type: \"text\", nullable: true })\n input: string;\n\n @Column({ type: \"text\" })\n callerSnapshot: string;\n\n @Column({ type: \"varchar\", default: \"queued\" })\n status: string = \"queued\";\n\n @Column({ type: \"varchar\", nullable: true })\n leaseToken: string;\n\n @Column({ ...getColumnType('datetimeWithTimezone'), nullable: true })\n leaseExpiresAt: Date;\n\n @Column({ type: \"integer\", default: 0 })\n attempts: number = 0;\n\n @Column({ type: \"text\", nullable: true })\n idempotencyKey: string;\n\n @Column({ type: \"text\", nullable: true })\n webhookUrl: string;\n\n @Column({ type: \"text\", nullable: true })\n webhookSecret: string;\n\n @Column({ type: \"integer\", nullable: true })\n timeoutSeconds: number;\n\n @Column({ type: \"integer\", nullable: true })\n maxSteps: number;\n\n @Column({ type: \"text\", nullable: true })\n result: string;\n\n @Column({ type: \"text\", nullable: true })\n error: string;\n\n @Column({ ...getColumnType('datetimeWithTimezone'), default: () => getCurrentTimestampDefault() })\n queuedAt: Date = new Date();\n\n @Column({ ...getColumnType('datetimeWithTimezone'), nullable: true })\n startedAt: Date;\n\n @Column({ ...getColumnType('datetimeWithTimezone'), nullable: true })\n finishedAt: Date;\n\n @OneToMany(() => AgentHumanRequest, agentHumanRequest => agentHumanRequest.job, { cascade: true })\n agentHumanRequests: AgentHumanRequest[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-process.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-process.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"agent-process.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-process.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAGrD,qBACa,YAAa,SAAQ,YAAY;IAG1C,KAAK,EAAE,aAAa,CAAC;IAGrB,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,GAAG,EAAE,MAAM,CAAC;IAGZ,KAAK,EAAE,MAAM,CAAM;IAGnB,MAAM,EAAE,MAAM,CAAc;IAG5B,aAAa,EAAE,MAAM,CAAK;IAG1B,YAAY,EAAE,MAAM,CAAK;IAGzB,YAAY,EAAE,MAAM,CAAK;IAGzB,WAAW,EAAE,MAAM,CAAM;IAGzB,eAAe,EAAE,MAAM,CAAK;IAG5B,UAAU,EAAE,MAAM,CAAQ;IAG1B,SAAS,EAAE,IAAI,CAAc;IAG7B,WAAW,EAAE,IAAI,CAAC;IAGlB,SAAS,EAAE,IAAI,CAAC;IAIhB,SAAS,EAAE,MAAM,CAAC;IAGlB,aAAa,EAAE,YAAY,EAAE,CAAC;CACjC"}
|
|
@@ -15,6 +15,7 @@ const common_entity_1 = require("./common.entity");
|
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const agent_registry_entity_1 = require("./agent-registry.entity");
|
|
17
17
|
const agent_session_entity_1 = require("./agent-session.entity");
|
|
18
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
18
19
|
let AgentProcess = class AgentProcess extends common_entity_1.CommonEntity {
|
|
19
20
|
constructor() {
|
|
20
21
|
super(...arguments);
|
|
@@ -83,15 +84,15 @@ __decorate([
|
|
|
83
84
|
__metadata("design:type", String)
|
|
84
85
|
], AgentProcess.prototype, "loadReport", void 0);
|
|
85
86
|
__decorate([
|
|
86
|
-
(0, typeorm_1.Column)({
|
|
87
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), default: () => (0, typeorm_db_helper_1.getCurrentTimestampDefault)() }),
|
|
87
88
|
__metadata("design:type", Date)
|
|
88
89
|
], AgentProcess.prototype, "startedAt", void 0);
|
|
89
90
|
__decorate([
|
|
90
|
-
(0, typeorm_1.Column)({
|
|
91
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), nullable: true }),
|
|
91
92
|
__metadata("design:type", Date)
|
|
92
93
|
], AgentProcess.prototype, "heartbeatAt", void 0);
|
|
93
94
|
__decorate([
|
|
94
|
-
(0, typeorm_1.Column)({
|
|
95
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), nullable: true }),
|
|
95
96
|
__metadata("design:type", Date)
|
|
96
97
|
], AgentProcess.prototype, "stoppedAt", void 0);
|
|
97
98
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-process.entity.js","sourceRoot":"","sources":["../../src/entities/agent-process.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAkF;AAClF,mEAAwD;AACxD,iEAAqD;
|
|
1
|
+
{"version":3,"file":"agent-process.entity.js","sourceRoot":"","sources":["../../src/entities/agent-process.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAkF;AAClF,mEAAwD;AACxD,iEAAqD;AACrD,oEAA0F;AAGnF,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,4BAAY;IAAvC;;QAeH,UAAK,GAAW,EAAE,CAAC;QAGnB,WAAM,GAAW,UAAU,CAAC;QAG5B,kBAAa,GAAW,CAAC,CAAC;QAG1B,iBAAY,GAAW,CAAC,CAAC;QAGzB,iBAAY,GAAW,CAAC,CAAC;QAGzB,gBAAW,GAAW,EAAE,CAAC;QAGzB,oBAAe,GAAW,CAAC,CAAC;QAG5B,eAAU,GAAW,IAAI,CAAC;QAG1B,cAAS,GAAS,IAAI,IAAI,EAAE,CAAC;KAchC;;6zBAdqB,IAAI,IAAI,EAAE;;CAc/B,CAAA;AArDY,oCAAY;AAGrB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxE,IAAA,oBAAU,GAAE;8BACN,qCAAa;2CAAC;AAGrB;IADC,IAAA,gBAAM,EAAC,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B,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC1D,IAAI;+CAAC;AAIhB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC1B;AAGlB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;mDACzD;uBApDrB,YAAY;IADxB,IAAA,gBAAM,EAAC,kBAAkB,CAAC;GACd,YAAY,CAqDxB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, JoinColumn, ManyToOne, Column, Index, OneToMany } from 'typeorm';\nimport { AgentRegistry } from './agent-registry.entity';\nimport { AgentSession } from './agent-session.entity'\nimport { getColumnType, getCurrentTimestampDefault } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_agent_process')\nexport class AgentProcess extends CommonEntity {\n @ManyToOne(() => AgentRegistry, { onDelete: \"SET NULL\", nullable: true })\n @JoinColumn()\n agent: AgentRegistry;\n\n @Column({ type: \"varchar\" })\n host: string;\n\n @Column({ type: \"integer\" })\n port: number;\n\n @Column({ type: \"integer\", nullable: true })\n pid: number;\n\n @Column({ type: \"varchar\" })\n wsUrl: string = \"\";\n\n @Column({ type: \"varchar\", default: \"starting\" })\n status: string = \"starting\";\n\n @Column({ type: \"integer\" })\n configVersion: number = 0;\n\n @Column({ type: \"integer\" })\n openSessions: number = 0;\n\n @Column({ type: \"integer\" })\n runningTurns: number = 0;\n\n @Column({ type: \"integer\" })\n maxSessions: number = 50;\n\n @Column({ type: \"integer\" })\n maxRunningTurns: number = 8;\n\n @Column({ type: \"text\", default: \"{}\" })\n loadReport: string = \"{}\";\n\n @Column({ ...getColumnType('datetimeWithTimezone'), default: () => getCurrentTimestampDefault() })\n startedAt: Date = new Date();\n\n @Column({ ...getColumnType('datetimeWithTimezone'), nullable: true })\n heartbeatAt: Date;\n\n @Column({ ...getColumnType('datetimeWithTimezone'), nullable: true })\n stoppedAt: Date;\n\n @Index({ unique: true })\n @Column({ type: \"varchar\", nullable: true })\n processId: string;\n\n @OneToMany(() => AgentSession, agentSession => agentSession.process, { cascade: true })\n agentSessions: AgentSession[];\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommonEntity } from '../entities/common.entity';
|
|
2
|
+
import { AgentHubTag } from './agent-hub-tag.entity';
|
|
2
3
|
import { AgentTool } from './agent-tool.entity';
|
|
3
4
|
import { AgentSkill } from './agent-skill.entity';
|
|
4
5
|
import { AgentRole } from './agent-role.entity';
|
|
@@ -20,6 +21,7 @@ export declare class AgentRegistry extends CommonEntity {
|
|
|
20
21
|
turnStepLimit: number;
|
|
21
22
|
costLimit: number;
|
|
22
23
|
configVersion?: number;
|
|
24
|
+
tags: AgentHubTag[];
|
|
23
25
|
agentTools: AgentTool[];
|
|
24
26
|
agentSkills: AgentSkill[];
|
|
25
27
|
agentRoles: AgentRole[];
|
|
@@ -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,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,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;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;IAI3B,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 agent_hub_tag_entity_1 = require("./agent-hub-tag.entity");
|
|
16
17
|
const agent_tool_entity_1 = require("./agent-tool.entity");
|
|
17
18
|
const agent_skill_entity_1 = require("./agent-skill.entity");
|
|
18
19
|
const agent_role_entity_1 = require("./agent-role.entity");
|
|
@@ -31,7 +32,7 @@ let AgentRegistry = class AgentRegistry extends common_entity_1.CommonEntity {
|
|
|
31
32
|
this.configVersion = 1;
|
|
32
33
|
}
|
|
33
34
|
static _OPENAPI_METADATA_FACTORY() {
|
|
34
|
-
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 }, 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] } };
|
|
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] } };
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
38
|
exports.AgentRegistry = AgentRegistry;
|
|
@@ -88,6 +89,11 @@ __decorate([
|
|
|
88
89
|
(0, typeorm_1.Column)({ type: "integer", nullable: true, default: 1 }),
|
|
89
90
|
__metadata("design:type", Number)
|
|
90
91
|
], AgentRegistry.prototype, "configVersion", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.ManyToMany)(() => agent_hub_tag_entity_1.AgentHubTag, tag => tag.agents, { cascade: ['insert', 'update'] }),
|
|
94
|
+
(0, typeorm_1.JoinTable)(),
|
|
95
|
+
__metadata("design:type", Array)
|
|
96
|
+
], AgentRegistry.prototype, "tags", void 0);
|
|
91
97
|
__decorate([
|
|
92
98
|
(0, typeorm_1.OneToMany)(() => agent_tool_entity_1.AgentTool, agentTool => agentTool.agentRegistry, { cascade: true }),
|
|
93
99
|
__metadata("design:type", Array)
|
|
@@ -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,qCAAkF;AAClF,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;KA0B9B;;;;CAAA,CAAA;AAlEY,sCAAa;AAGtB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE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aAAa,CAkEzB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Entity, Column, Index, JoinTable, ManyToMany, OneToMany } from 'typeorm';\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 } required 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 @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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-session.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-session.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-session.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-session.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,qBACa,YAAa,SAAQ,YAAY;IAG1C,SAAS,EAAE,MAAM,CAAC;IAIlB,KAAK,EAAE,aAAa,CAAC;IAKrB,OAAO,EAAE,YAAY,CAAC;IAGtB,OAAO,EAAE,MAAM,CAAC;IAIhB,OAAO,EAAE,QAAQ,GAAG,UAAU,GAAG,IAAI,CAAC;IAItC,IAAI,EAAE,IAAI,CAAC;IAGX,MAAM,EAAE,MAAM,CAAY;IAG1B,MAAM,EAAE,MAAM,CAAQ;IAGtB,aAAa,EAAE,MAAM,CAAC;IAGtB,SAAS,EAAE,MAAM,CAAK;IAGtB,UAAU,EAAE,MAAM,CAAK;IAGvB,gBAAgB,EAAE,MAAM,CAAK;IAG7B,iBAAiB,EAAE,MAAM,CAAK;IAG9B,SAAS,EAAE,MAAM,CAAK;IAGtB,KAAK,EAAE,MAAM,CAAC;IAGd,SAAS,EAAE,IAAI,CAAc;IAG7B,YAAY,EAAE,IAAI,CAAc;IAGhC,OAAO,EAAE,IAAI,CAAC;IAGd,iBAAiB,EAAE,MAAM,CAAC;IAG1B,YAAY,EAAE,MAAM,CAAC;IAGrB,SAAS,EAAE,QAAQ,EAAE,CAAC;IAGtB,WAAW,EAAE,UAAU,EAAE,CAAC;IAG1B,uBAAuB,EAAE,sBAAsB,EAAE,CAAC;IAGlD,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CAC3C"}
|
|
@@ -20,6 +20,7 @@ const agent_job_entity_1 = require("./agent-job.entity");
|
|
|
20
20
|
const agent_event_entity_1 = require("./agent-event.entity");
|
|
21
21
|
const agent_session_checkpoint_entity_1 = require("./agent-session-checkpoint.entity");
|
|
22
22
|
const agent_human_request_entity_1 = require("./agent-human-request.entity");
|
|
23
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
23
24
|
let AgentSession = class AgentSession extends common_entity_1.CommonEntity {
|
|
24
25
|
constructor() {
|
|
25
26
|
super(...arguments);
|
|
@@ -103,15 +104,15 @@ __decorate([
|
|
|
103
104
|
__metadata("design:type", String)
|
|
104
105
|
], AgentSession.prototype, "error", void 0);
|
|
105
106
|
__decorate([
|
|
106
|
-
(0, typeorm_1.Column)({
|
|
107
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), default: () => (0, typeorm_db_helper_1.getCurrentTimestampDefault)() }),
|
|
107
108
|
__metadata("design:type", Date)
|
|
108
109
|
], AgentSession.prototype, "startedAt", void 0);
|
|
109
110
|
__decorate([
|
|
110
|
-
(0, typeorm_1.Column)({
|
|
111
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), default: () => (0, typeorm_db_helper_1.getCurrentTimestampDefault)() }),
|
|
111
112
|
__metadata("design:type", Date)
|
|
112
113
|
], AgentSession.prototype, "lastActiveAt", void 0);
|
|
113
114
|
__decorate([
|
|
114
|
-
(0, typeorm_1.Column)({
|
|
115
|
+
(0, typeorm_1.Column)({ ...(0, typeorm_db_helper_1.getColumnType)('datetimeWithTimezone'), nullable: true }),
|
|
115
116
|
__metadata("design:type", Date)
|
|
116
117
|
], AgentSession.prototype, "endedAt", void 0);
|
|
117
118
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-session.entity.js","sourceRoot":"","sources":["../../src/entities/agent-session.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,+CAAgD;AAChD,qCAAkF;AAClF,mEAAwD;AACxD,iEAAsD;AACtD,yDAA8C;AAC9C,6DAAkD;AAClD,uFAA2E;AAC3E,6EAAiE;
|
|
1
|
+
{"version":3,"file":"agent-session.entity.js","sourceRoot":"","sources":["../../src/entities/agent-session.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,+CAAgD;AAChD,qCAAkF;AAClF,mEA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entities/user.entity';\nimport { Entity, Column, Index, JoinColumn, ManyToOne, OneToMany } from 'typeorm';\nimport { AgentRegistry } from './agent-registry.entity';\nimport { AgentProcess } from './agent-process.entity';\nimport { AgentJob } from './agent-job.entity';\nimport { AgentEvent } from './agent-event.entity';\nimport { AgentSessionCheckpoint } from './agent-session-checkpoint.entity';\nimport { AgentHumanRequest } from './agent-human-request.entity';\nimport { getColumnType, getCurrentTimestampDefault } from 'src/helpers/typeorm-db-helper';\n\n@Entity('ss_agent_session')\nexport class AgentSession extends CommonEntity {\n @Index({ unique: true })\n @Column({ type: \"varchar\", nullable: true })\n sessionId: string;\n\n @ManyToOne(() => AgentRegistry, { onDelete: \"SET NULL\", nullable: true })\n @JoinColumn()\n agent: AgentRegistry;\n\n // The most recent process that hosted this session; it remains linked after shutdown.\n @ManyToOne(() => AgentProcess, { onDelete: \"SET NULL\", nullable: true })\n @JoinColumn()\n process: AgentProcess;\n\n @Column({ type: \"varchar\" })\n trigger: string;\n\n // Runtime that created/hosted this session; nullable for legacy rows where it is unknown.\n @Column({ type: \"varchar\", nullable: true })\n runtime: \"solidx\" | \"agentHub\" | null;\n\n @ManyToOne(() => User, { onDelete: \"RESTRICT\", nullable: false })\n @JoinColumn()\n user: User;\n\n @Column({ type: \"varchar\", default: \"queued\" })\n status: string = \"queued\";\n\n @Column({ type: \"text\", default: \"{}\" })\n inputs: string = \"{}\";\n\n @Column({ type: \"integer\" })\n configVersion: number;\n\n @Column({ type: \"integer\", default: 0 })\n turnCount: number = 0;\n\n @Column({ type: \"integer\", default: 0 })\n totalSteps: number = 0;\n\n @Column({ type: \"integer\", default: 0 })\n totalInputTokens: number = 0;\n\n @Column({ type: \"integer\", default: 0 })\n totalOutputTokens: number = 0;\n\n @Column({ type: \"decimal\" })\n totalCost: number = 0;\n\n @Column({ type: \"text\", nullable: true })\n error: string;\n\n @Column({ ...getColumnType('datetimeWithTimezone'), default: () => getCurrentTimestampDefault() })\n startedAt: Date = new Date();\n\n @Column({ ...getColumnType('datetimeWithTimezone'), default: () => getCurrentTimestampDefault() })\n lastActiveAt: Date = new Date();\n\n @Column({ ...getColumnType('datetimeWithTimezone'), nullable: true })\n endedAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n reasoningModelKey: string;\n\n @Column({ type: \"varchar\", nullable: true })\n fastModelKey: string;\n\n @OneToMany(() => AgentJob, agentJob => agentJob.session, { cascade: true })\n agentJobs: AgentJob[];\n\n @OneToMany(() => AgentEvent, agentEvent => agentEvent.session, { cascade: true })\n agentEvents: AgentEvent[];\n\n @OneToMany(() => AgentSessionCheckpoint, agentSessionCheckpoint => agentSessionCheckpoint.session, { cascade: true })\n agentSessionCheckpoints: AgentSessionCheckpoint[];\n\n @OneToMany(() => AgentHumanRequest, agentHumanRequest => agentHumanRequest.session, { cascade: true })\n agentHumanRequests: AgentHumanRequest[];\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommonEntity } from '../entities/common.entity';
|
|
2
|
+
import { AgentHubTag } from './agent-hub-tag.entity';
|
|
2
3
|
import { AgentSkill } from './agent-skill.entity';
|
|
3
4
|
export declare class AgentSkillRegistry extends CommonEntity {
|
|
4
5
|
name: string;
|
|
@@ -6,7 +7,7 @@ export declare class AgentSkillRegistry extends CommonEntity {
|
|
|
6
7
|
iconName?: string;
|
|
7
8
|
description: string;
|
|
8
9
|
body: string;
|
|
9
|
-
tags:
|
|
10
|
+
tags: AgentHubTag[];
|
|
10
11
|
agentSkills: AgentSkill[];
|
|
11
12
|
}
|
|
12
13
|
//# sourceMappingURL=agent-skill-registry.entity.d.ts.map
|
|
@@ -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,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,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;IAIb,IAAI,EAAE,WAAW,EAAE,CAAC;IAGpB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC7B"}
|