devchain-cli 0.8.4 → 0.9.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.
Files changed (100) hide show
  1. package/dist/drizzle/0038_soft_texas_twister.sql +51 -0
  2. package/dist/drizzle/0039_early_the_spike.sql +1 -0
  3. package/dist/drizzle/0040_typical_mole_man.sql +3 -0
  4. package/dist/drizzle/meta/0037_snapshot.json +3670 -0
  5. package/dist/drizzle/meta/0038_snapshot.json +4019 -0
  6. package/dist/drizzle/meta/0039_snapshot.json +4026 -0
  7. package/dist/drizzle/meta/0040_snapshot.json +4028 -0
  8. package/dist/drizzle/meta/_journal.json +22 -1
  9. package/dist/server/app.module.js +2 -0
  10. package/dist/server/app.module.js.map +1 -1
  11. package/dist/server/modules/epics/controllers/epics.controller.js +4 -0
  12. package/dist/server/modules/epics/controllers/epics.controller.js.map +1 -1
  13. package/dist/server/modules/epics/services/epics.service.js +6 -6
  14. package/dist/server/modules/epics/services/epics.service.js.map +1 -1
  15. package/dist/server/modules/mcp/dtos/mcp.dto.d.ts +74 -0
  16. package/dist/server/modules/mcp/dtos/mcp.dto.js +18 -1
  17. package/dist/server/modules/mcp/dtos/mcp.dto.js.map +1 -1
  18. package/dist/server/modules/mcp/dtos/schema-registry.js +2 -0
  19. package/dist/server/modules/mcp/dtos/schema-registry.js.map +1 -1
  20. package/dist/server/modules/mcp/mcp.module.js +2 -0
  21. package/dist/server/modules/mcp/mcp.module.js.map +1 -1
  22. package/dist/server/modules/mcp/services/mcp.service.d.ts +7 -1
  23. package/dist/server/modules/mcp/services/mcp.service.js +126 -2
  24. package/dist/server/modules/mcp/services/mcp.service.js.map +1 -1
  25. package/dist/server/modules/mcp/tool-definitions.d.ts +177 -0
  26. package/dist/server/modules/mcp/tool-definitions.js +48 -0
  27. package/dist/server/modules/mcp/tool-definitions.js.map +1 -1
  28. package/dist/server/modules/projects/dtos/export.dto.d.ts +15 -15
  29. package/dist/server/modules/seeders/seeders/0002_seed_replace_permission_mode_plan.d.ts +3 -0
  30. package/dist/server/modules/seeders/seeders/0002_seed_replace_permission_mode_plan.js +45 -0
  31. package/dist/server/modules/seeders/seeders/0002_seed_replace_permission_mode_plan.js.map +1 -0
  32. package/dist/server/modules/seeders/services/data-seeder.service.js +5 -1
  33. package/dist/server/modules/seeders/services/data-seeder.service.js.map +1 -1
  34. package/dist/server/modules/settings/dtos/settings.dto.d.ts +18 -0
  35. package/dist/server/modules/settings/dtos/settings.dto.js +5 -0
  36. package/dist/server/modules/settings/dtos/settings.dto.js.map +1 -1
  37. package/dist/server/modules/settings/services/settings.service.d.ts +5 -0
  38. package/dist/server/modules/settings/services/settings.service.js +80 -1
  39. package/dist/server/modules/settings/services/settings.service.js.map +1 -1
  40. package/dist/server/modules/skills/adapters/anthropic-skill-source.adapter.d.ts +9 -0
  41. package/dist/server/modules/skills/adapters/anthropic-skill-source.adapter.js +169 -0
  42. package/dist/server/modules/skills/adapters/anthropic-skill-source.adapter.js.map +1 -0
  43. package/dist/server/modules/skills/adapters/github-skill-source.base.d.ts +48 -0
  44. package/dist/server/modules/skills/adapters/github-skill-source.base.js +382 -0
  45. package/dist/server/modules/skills/adapters/github-skill-source.base.js.map +1 -0
  46. package/dist/server/modules/skills/adapters/microsoft-skill-source.adapter.d.ts +11 -0
  47. package/dist/server/modules/skills/adapters/microsoft-skill-source.adapter.js +227 -0
  48. package/dist/server/modules/skills/adapters/microsoft-skill-source.adapter.js.map +1 -0
  49. package/dist/server/modules/skills/adapters/openai-skill-source.adapter.d.ts +13 -0
  50. package/dist/server/modules/skills/adapters/openai-skill-source.adapter.js +260 -0
  51. package/dist/server/modules/skills/adapters/openai-skill-source.adapter.js.map +1 -0
  52. package/dist/server/modules/skills/adapters/skill-source.adapter.d.ts +26 -0
  53. package/dist/server/modules/skills/adapters/skill-source.adapter.js +5 -0
  54. package/dist/server/modules/skills/adapters/skill-source.adapter.js.map +1 -0
  55. package/dist/server/modules/skills/adapters/trailofbits-skill-source.adapter.d.ts +14 -0
  56. package/dist/server/modules/skills/adapters/trailofbits-skill-source.adapter.js +253 -0
  57. package/dist/server/modules/skills/adapters/trailofbits-skill-source.adapter.js.map +1 -0
  58. package/dist/server/modules/skills/adapters/vercel-skill-source.adapter.d.ts +15 -0
  59. package/dist/server/modules/skills/adapters/vercel-skill-source.adapter.js +292 -0
  60. package/dist/server/modules/skills/adapters/vercel-skill-source.adapter.js.map +1 -0
  61. package/dist/server/modules/skills/controllers/skills.controller.d.ts +42 -0
  62. package/dist/server/modules/skills/controllers/skills.controller.js +257 -0
  63. package/dist/server/modules/skills/controllers/skills.controller.js.map +1 -0
  64. package/dist/server/modules/skills/dtos/skill.dto.d.ts +169 -0
  65. package/dist/server/modules/skills/dtos/skill.dto.js +116 -0
  66. package/dist/server/modules/skills/dtos/skill.dto.js.map +1 -0
  67. package/dist/server/modules/skills/services/skill-category.service.d.ts +5 -0
  68. package/dist/server/modules/skills/services/skill-category.service.js +155 -0
  69. package/dist/server/modules/skills/services/skill-category.service.js.map +1 -0
  70. package/dist/server/modules/skills/services/skill-sync.service.d.ts +38 -0
  71. package/dist/server/modules/skills/services/skill-sync.service.js +283 -0
  72. package/dist/server/modules/skills/services/skill-sync.service.js.map +1 -0
  73. package/dist/server/modules/skills/services/skills.service.d.ts +119 -0
  74. package/dist/server/modules/skills/services/skills.service.js +731 -0
  75. package/dist/server/modules/skills/services/skills.service.js.map +1 -0
  76. package/dist/server/modules/skills/skills.module.d.ts +2 -0
  77. package/dist/server/modules/skills/skills.module.js +70 -0
  78. package/dist/server/modules/skills/skills.module.js.map +1 -0
  79. package/dist/server/modules/storage/db/schema.d.ts +629 -0
  80. package/dist/server/modules/storage/db/schema.js +56 -1
  81. package/dist/server/modules/storage/db/schema.js.map +1 -1
  82. package/dist/server/modules/storage/interfaces/storage.interface.d.ts +1 -0
  83. package/dist/server/modules/storage/interfaces/storage.interface.js.map +1 -1
  84. package/dist/server/modules/storage/local/local-storage.service.d.ts +2 -0
  85. package/dist/server/modules/storage/local/local-storage.service.js +50 -7
  86. package/dist/server/modules/storage/local/local-storage.service.js.map +1 -1
  87. package/dist/server/modules/storage/models/domain.models.d.ts +47 -1
  88. package/dist/server/templates/dev-loop.json +86 -79
  89. package/dist/server/tsconfig.tsbuildinfo +1 -1
  90. package/dist/server/ui/assets/{ReviewDetailPage-C4NizGFT.js → ReviewDetailPage-D_-bS1MK.js} +1 -1
  91. package/dist/server/ui/assets/{ReviewsPage-DLD6BGoH.js → ReviewsPage-BE1gxYlC.js} +1 -1
  92. package/dist/server/ui/assets/index-C094CE5I.js +945 -0
  93. package/dist/server/ui/assets/index-CbtpBUHu.css +32 -0
  94. package/dist/server/ui/assets/useReviewSubscription-Bs-17h-m.js +77 -0
  95. package/dist/server/ui/index.html +2 -2
  96. package/dist/templates/dev-loop.json +86 -79
  97. package/package.json +17 -1
  98. package/dist/server/ui/assets/index-BkiWahA0.css +0 -32
  99. package/dist/server/ui/assets/index-CHBUsbMb.js +0 -914
  100. package/dist/server/ui/assets/useReviewSubscription-CptabtYL.js +0 -83
@@ -0,0 +1,257 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.SkillsController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const logger_1 = require("../../../common/logging/logger");
18
+ const skill_dto_1 = require("../dtos/skill.dto");
19
+ const skill_sync_service_1 = require("../services/skill-sync.service");
20
+ const skills_service_1 = require("../services/skills.service");
21
+ const logger = (0, logger_1.createLogger)('SkillsController');
22
+ let SkillsController = class SkillsController {
23
+ constructor(skillsService, skillSyncService) {
24
+ this.skillsService = skillsService;
25
+ this.skillSyncService = skillSyncService;
26
+ }
27
+ async syncSkills(body) {
28
+ logger.info('POST /api/skills/sync');
29
+ const parsed = skill_dto_1.SkillSyncRequestSchema.parse(body ?? {});
30
+ if (parsed.sourceName) {
31
+ return this.skillSyncService.syncSource(parsed.sourceName);
32
+ }
33
+ return this.skillSyncService.syncAll();
34
+ }
35
+ async listSources() {
36
+ logger.info('GET /api/skills/sources');
37
+ return this.skillsService.listSources();
38
+ }
39
+ async enableSource(params) {
40
+ logger.info('POST /api/skills/sources/:name/enable');
41
+ const parsed = skill_dto_1.SkillSourceParamsSchema.parse(params);
42
+ return this.skillsService.setSourceEnabled(parsed.name, true);
43
+ }
44
+ async disableSource(params) {
45
+ logger.info('POST /api/skills/sources/:name/disable');
46
+ const parsed = skill_dto_1.SkillSourceParamsSchema.parse(params);
47
+ return this.skillsService.setSourceEnabled(parsed.name, false);
48
+ }
49
+ async listDisabled(query) {
50
+ logger.info('GET /api/skills/disabled');
51
+ const parsed = skill_dto_1.SkillDisabledQuerySchema.parse(query);
52
+ return this.skillsService.listDisabled(parsed.projectId);
53
+ }
54
+ async disableAll(body) {
55
+ logger.info('POST /api/skills/disable-all');
56
+ const parsed = skill_dto_1.SkillBulkActionSchema.parse(body);
57
+ const disabledCount = await this.skillsService.disableAll(parsed.projectId);
58
+ return { projectId: parsed.projectId, disabledCount };
59
+ }
60
+ async enableAll(body) {
61
+ logger.info('POST /api/skills/enable-all');
62
+ const parsed = skill_dto_1.SkillBulkActionSchema.parse(body);
63
+ const enabledCount = await this.skillsService.enableAll(parsed.projectId);
64
+ return { projectId: parsed.projectId, enabledCount };
65
+ }
66
+ async getUsageStats(query) {
67
+ logger.info('GET /api/skills/usage/stats');
68
+ const parsed = skill_dto_1.SkillUsageStatsQuerySchema.parse(query);
69
+ return this.skillsService.getUsageStats({
70
+ projectId: parsed.projectId,
71
+ from: parsed.from,
72
+ to: parsed.to,
73
+ limit: parsed.limit,
74
+ offset: parsed.offset,
75
+ });
76
+ }
77
+ async getUsageLog(query) {
78
+ logger.info('GET /api/skills/usage/log');
79
+ const parsed = skill_dto_1.SkillUsageLogQuerySchema.parse(query);
80
+ return this.skillsService.listUsageLog({
81
+ projectId: parsed.projectId,
82
+ skillId: parsed.skillId,
83
+ agentId: parsed.agentId,
84
+ from: parsed.from,
85
+ to: parsed.to,
86
+ limit: parsed.limit,
87
+ offset: parsed.offset,
88
+ });
89
+ }
90
+ async getBySlug(params) {
91
+ logger.info('GET /api/skills/by-slug/:source/:name');
92
+ const parsed = skill_dto_1.SkillBySlugParamsSchema.parse(params);
93
+ const slug = `${parsed.source.trim().toLowerCase()}/${parsed.name.trim().toLowerCase()}`;
94
+ return this.skillsService.getSkillBySlug(slug);
95
+ }
96
+ async listSkills(query) {
97
+ logger.info('GET /api/skills');
98
+ const parsed = skill_dto_1.SkillsListQuerySchema.parse(query);
99
+ if (parsed.projectId) {
100
+ return this.skillsService.listAllForProject(parsed.projectId, {
101
+ q: parsed.q,
102
+ source: parsed.source,
103
+ category: parsed.category,
104
+ });
105
+ }
106
+ return this.skillsService.listSkills({
107
+ q: parsed.q,
108
+ source: parsed.source,
109
+ category: parsed.category,
110
+ });
111
+ }
112
+ async resolveSkills(body) {
113
+ logger.info('POST /api/skills/resolve');
114
+ const parsed = skill_dto_1.SkillResolveSlugsBodySchema.parse(body);
115
+ return this.skillsService.resolveSkillSummariesBySlugs(parsed.slugs);
116
+ }
117
+ async disableSkill(params, body) {
118
+ logger.info('POST /api/skills/:id/disable');
119
+ const parsedParams = skill_dto_1.SkillDisableParamsSchema.parse(params);
120
+ const parsedBody = skill_dto_1.SkillDisableBodySchema.parse(body);
121
+ await this.skillsService.disableSkill(parsedBody.projectId, parsedParams.id);
122
+ return { projectId: parsedBody.projectId, skillId: parsedParams.id };
123
+ }
124
+ async enableSkill(params, body) {
125
+ logger.info('POST /api/skills/:id/enable');
126
+ const parsedParams = skill_dto_1.SkillEnableParamsSchema.parse(params);
127
+ const parsedBody = skill_dto_1.SkillEnableBodySchema.parse(body);
128
+ await this.skillsService.enableSkill(parsedBody.projectId, parsedParams.id);
129
+ return { projectId: parsedBody.projectId, skillId: parsedParams.id };
130
+ }
131
+ async getSkillById(params) {
132
+ logger.info('GET /api/skills/:id');
133
+ const parsed = skill_dto_1.SkillByIdParamsSchema.parse(params);
134
+ return this.skillsService.getSkill(parsed.id);
135
+ }
136
+ };
137
+ exports.SkillsController = SkillsController;
138
+ __decorate([
139
+ (0, common_1.Post)('sync'),
140
+ (0, common_1.HttpCode)(200),
141
+ __param(0, (0, common_1.Body)()),
142
+ __metadata("design:type", Function),
143
+ __metadata("design:paramtypes", [Object]),
144
+ __metadata("design:returntype", Promise)
145
+ ], SkillsController.prototype, "syncSkills", null);
146
+ __decorate([
147
+ (0, common_1.Get)('sources'),
148
+ __metadata("design:type", Function),
149
+ __metadata("design:paramtypes", []),
150
+ __metadata("design:returntype", Promise)
151
+ ], SkillsController.prototype, "listSources", null);
152
+ __decorate([
153
+ (0, common_1.Post)('sources/:name/enable'),
154
+ (0, common_1.HttpCode)(200),
155
+ __param(0, (0, common_1.Param)()),
156
+ __metadata("design:type", Function),
157
+ __metadata("design:paramtypes", [Object]),
158
+ __metadata("design:returntype", Promise)
159
+ ], SkillsController.prototype, "enableSource", null);
160
+ __decorate([
161
+ (0, common_1.Post)('sources/:name/disable'),
162
+ (0, common_1.HttpCode)(200),
163
+ __param(0, (0, common_1.Param)()),
164
+ __metadata("design:type", Function),
165
+ __metadata("design:paramtypes", [Object]),
166
+ __metadata("design:returntype", Promise)
167
+ ], SkillsController.prototype, "disableSource", null);
168
+ __decorate([
169
+ (0, common_1.Get)('disabled'),
170
+ __param(0, (0, common_1.Query)()),
171
+ __metadata("design:type", Function),
172
+ __metadata("design:paramtypes", [Object]),
173
+ __metadata("design:returntype", Promise)
174
+ ], SkillsController.prototype, "listDisabled", null);
175
+ __decorate([
176
+ (0, common_1.Post)('disable-all'),
177
+ (0, common_1.HttpCode)(200),
178
+ __param(0, (0, common_1.Body)()),
179
+ __metadata("design:type", Function),
180
+ __metadata("design:paramtypes", [Object]),
181
+ __metadata("design:returntype", Promise)
182
+ ], SkillsController.prototype, "disableAll", null);
183
+ __decorate([
184
+ (0, common_1.Post)('enable-all'),
185
+ (0, common_1.HttpCode)(200),
186
+ __param(0, (0, common_1.Body)()),
187
+ __metadata("design:type", Function),
188
+ __metadata("design:paramtypes", [Object]),
189
+ __metadata("design:returntype", Promise)
190
+ ], SkillsController.prototype, "enableAll", null);
191
+ __decorate([
192
+ (0, common_1.Get)('usage/stats'),
193
+ __param(0, (0, common_1.Query)()),
194
+ __metadata("design:type", Function),
195
+ __metadata("design:paramtypes", [Object]),
196
+ __metadata("design:returntype", Promise)
197
+ ], SkillsController.prototype, "getUsageStats", null);
198
+ __decorate([
199
+ (0, common_1.Get)('usage/log'),
200
+ __param(0, (0, common_1.Query)()),
201
+ __metadata("design:type", Function),
202
+ __metadata("design:paramtypes", [Object]),
203
+ __metadata("design:returntype", Promise)
204
+ ], SkillsController.prototype, "getUsageLog", null);
205
+ __decorate([
206
+ (0, common_1.Get)('by-slug/:source/:name'),
207
+ __param(0, (0, common_1.Param)()),
208
+ __metadata("design:type", Function),
209
+ __metadata("design:paramtypes", [Object]),
210
+ __metadata("design:returntype", Promise)
211
+ ], SkillsController.prototype, "getBySlug", null);
212
+ __decorate([
213
+ (0, common_1.Get)(),
214
+ __param(0, (0, common_1.Query)()),
215
+ __metadata("design:type", Function),
216
+ __metadata("design:paramtypes", [Object]),
217
+ __metadata("design:returntype", Promise)
218
+ ], SkillsController.prototype, "listSkills", null);
219
+ __decorate([
220
+ (0, common_1.Post)('resolve'),
221
+ (0, common_1.HttpCode)(200),
222
+ __param(0, (0, common_1.Body)()),
223
+ __metadata("design:type", Function),
224
+ __metadata("design:paramtypes", [Object]),
225
+ __metadata("design:returntype", Promise)
226
+ ], SkillsController.prototype, "resolveSkills", null);
227
+ __decorate([
228
+ (0, common_1.Post)(':id/disable'),
229
+ (0, common_1.HttpCode)(200),
230
+ __param(0, (0, common_1.Param)()),
231
+ __param(1, (0, common_1.Body)()),
232
+ __metadata("design:type", Function),
233
+ __metadata("design:paramtypes", [Object, Object]),
234
+ __metadata("design:returntype", Promise)
235
+ ], SkillsController.prototype, "disableSkill", null);
236
+ __decorate([
237
+ (0, common_1.Post)(':id/enable'),
238
+ (0, common_1.HttpCode)(200),
239
+ __param(0, (0, common_1.Param)()),
240
+ __param(1, (0, common_1.Body)()),
241
+ __metadata("design:type", Function),
242
+ __metadata("design:paramtypes", [Object, Object]),
243
+ __metadata("design:returntype", Promise)
244
+ ], SkillsController.prototype, "enableSkill", null);
245
+ __decorate([
246
+ (0, common_1.Get)(':id'),
247
+ __param(0, (0, common_1.Param)()),
248
+ __metadata("design:type", Function),
249
+ __metadata("design:paramtypes", [Object]),
250
+ __metadata("design:returntype", Promise)
251
+ ], SkillsController.prototype, "getSkillById", null);
252
+ exports.SkillsController = SkillsController = __decorate([
253
+ (0, common_1.Controller)('api/skills'),
254
+ __metadata("design:paramtypes", [skills_service_1.SkillsService,
255
+ skill_sync_service_1.SkillSyncService])
256
+ ], SkillsController);
257
+ //# sourceMappingURL=skills.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.controller.js","sourceRoot":"","sources":["../../../../src/modules/skills/controllers/skills.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAqF;AACrF,2DAA8D;AAE9D,iDAgB2B;AAC3B,uEAA8E;AAC9E,+DAMoC;AAEpC,MAAM,MAAM,GAAG,IAAA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ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
3
+ export declare const SkillsRequiredInputSchema: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">, string[], string[]>;
4
+ export declare const SkillSyncRequestSchema: z.ZodDefault<z.ZodObject<{
5
+ sourceName: z.ZodOptional<z.ZodString>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ sourceName?: string | undefined;
8
+ }, {
9
+ sourceName?: string | undefined;
10
+ }>>;
11
+ export declare const SkillDisableParamsSchema: z.ZodObject<{
12
+ id: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ id: string;
15
+ }, {
16
+ id: string;
17
+ }>;
18
+ export declare const SkillDisableBodySchema: z.ZodObject<{
19
+ projectId: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ projectId: string;
22
+ }, {
23
+ projectId: string;
24
+ }>;
25
+ export declare const SkillEnableParamsSchema: z.ZodObject<{
26
+ id: z.ZodString;
27
+ }, "strip", z.ZodTypeAny, {
28
+ id: string;
29
+ }, {
30
+ id: string;
31
+ }>;
32
+ export declare const SkillEnableBodySchema: z.ZodObject<{
33
+ projectId: z.ZodString;
34
+ }, "strip", z.ZodTypeAny, {
35
+ projectId: string;
36
+ }, {
37
+ projectId: string;
38
+ }>;
39
+ export declare const SkillDisabledQuerySchema: z.ZodObject<{
40
+ projectId: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ projectId: string;
43
+ }, {
44
+ projectId: string;
45
+ }>;
46
+ export declare const SkillBulkActionSchema: z.ZodObject<{
47
+ projectId: z.ZodString;
48
+ }, "strip", z.ZodTypeAny, {
49
+ projectId: string;
50
+ }, {
51
+ projectId: string;
52
+ }>;
53
+ export declare const SkillSourceParamsSchema: z.ZodObject<{
54
+ name: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ name: string;
57
+ }, {
58
+ name: string;
59
+ }>;
60
+ export declare const SkillsListQuerySchema: z.ZodObject<{
61
+ q: z.ZodOptional<z.ZodString>;
62
+ source: z.ZodOptional<z.ZodString>;
63
+ category: z.ZodOptional<z.ZodString>;
64
+ projectId: z.ZodOptional<z.ZodString>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ projectId?: string | undefined;
67
+ source?: string | undefined;
68
+ category?: string | undefined;
69
+ q?: string | undefined;
70
+ }, {
71
+ projectId?: string | undefined;
72
+ source?: string | undefined;
73
+ category?: string | undefined;
74
+ q?: string | undefined;
75
+ }>;
76
+ export declare const SkillUsageStatsQuerySchema: z.ZodObject<{
77
+ projectId: z.ZodOptional<z.ZodString>;
78
+ from: z.ZodOptional<z.ZodString>;
79
+ to: z.ZodOptional<z.ZodString>;
80
+ limit: z.ZodOptional<z.ZodNumber>;
81
+ offset: z.ZodOptional<z.ZodNumber>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ projectId?: string | undefined;
84
+ limit?: number | undefined;
85
+ offset?: number | undefined;
86
+ from?: string | undefined;
87
+ to?: string | undefined;
88
+ }, {
89
+ projectId?: string | undefined;
90
+ limit?: number | undefined;
91
+ offset?: number | undefined;
92
+ from?: string | undefined;
93
+ to?: string | undefined;
94
+ }>;
95
+ export declare const SkillUsageLogQuerySchema: z.ZodObject<{
96
+ projectId: z.ZodOptional<z.ZodString>;
97
+ from: z.ZodOptional<z.ZodString>;
98
+ to: z.ZodOptional<z.ZodString>;
99
+ limit: z.ZodOptional<z.ZodNumber>;
100
+ offset: z.ZodOptional<z.ZodNumber>;
101
+ } & {
102
+ skillId: z.ZodOptional<z.ZodString>;
103
+ agentId: z.ZodOptional<z.ZodString>;
104
+ }, "strip", z.ZodTypeAny, {
105
+ projectId?: string | undefined;
106
+ agentId?: string | undefined;
107
+ skillId?: string | undefined;
108
+ limit?: number | undefined;
109
+ offset?: number | undefined;
110
+ from?: string | undefined;
111
+ to?: string | undefined;
112
+ }, {
113
+ projectId?: string | undefined;
114
+ agentId?: string | undefined;
115
+ skillId?: string | undefined;
116
+ limit?: number | undefined;
117
+ offset?: number | undefined;
118
+ from?: string | undefined;
119
+ to?: string | undefined;
120
+ }>;
121
+ export declare const SkillBySlugParamsSchema: z.ZodObject<{
122
+ source: z.ZodString;
123
+ name: z.ZodString;
124
+ }, "strip", z.ZodTypeAny, {
125
+ name: string;
126
+ source: string;
127
+ }, {
128
+ name: string;
129
+ source: string;
130
+ }>;
131
+ export declare const SkillResolveSlugsBodySchema: z.ZodObject<{
132
+ slugs: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">, string[], string[]>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ slugs: string[];
135
+ }, {
136
+ slugs: string[];
137
+ }>;
138
+ export declare const SkillByIdParamsSchema: z.ZodObject<{
139
+ id: z.ZodString;
140
+ }, "strip", z.ZodTypeAny, {
141
+ id: string;
142
+ }, {
143
+ id: string;
144
+ }>;
145
+ export interface ResolvedSkillSummary {
146
+ id: string;
147
+ slug: string;
148
+ name: string;
149
+ displayName: string;
150
+ source: string;
151
+ category: string | null;
152
+ shortDescription: string | null;
153
+ description: string | null;
154
+ }
155
+ export type SkillSyncRequestDto = z.infer<typeof SkillSyncRequestSchema>;
156
+ export type SkillDisableParamsDto = z.infer<typeof SkillDisableParamsSchema>;
157
+ export type SkillDisableBodyDto = z.infer<typeof SkillDisableBodySchema>;
158
+ export type SkillEnableParamsDto = z.infer<typeof SkillEnableParamsSchema>;
159
+ export type SkillEnableBodyDto = z.infer<typeof SkillEnableBodySchema>;
160
+ export type SkillDisabledQueryDto = z.infer<typeof SkillDisabledQuerySchema>;
161
+ export type SkillBulkActionDto = z.infer<typeof SkillBulkActionSchema>;
162
+ export type SkillSourceParamsDto = z.infer<typeof SkillSourceParamsSchema>;
163
+ export type SkillsListQueryDto = z.infer<typeof SkillsListQuerySchema>;
164
+ export type SkillUsageStatsQueryDto = z.infer<typeof SkillUsageStatsQuerySchema>;
165
+ export type SkillUsageLogQueryDto = z.infer<typeof SkillUsageLogQuerySchema>;
166
+ export type SkillBySlugParamsDto = z.infer<typeof SkillBySlugParamsSchema>;
167
+ export type SkillResolveSlugsBodyDto = z.infer<typeof SkillResolveSlugsBodySchema>;
168
+ export type SkillByIdParamsDto = z.infer<typeof SkillByIdParamsSchema>;
169
+ export type SkillSlugDto = z.infer<typeof SkillSlugSchema>;
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SkillByIdParamsSchema = exports.SkillResolveSlugsBodySchema = exports.SkillBySlugParamsSchema = exports.SkillUsageLogQuerySchema = exports.SkillUsageStatsQuerySchema = exports.SkillsListQuerySchema = exports.SkillSourceParamsSchema = exports.SkillBulkActionSchema = exports.SkillDisabledQuerySchema = exports.SkillEnableBodySchema = exports.SkillEnableParamsSchema = exports.SkillDisableBodySchema = exports.SkillDisableParamsSchema = exports.SkillSyncRequestSchema = exports.SkillsRequiredInputSchema = exports.SkillSlugSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const SKILL_SLUG_SEGMENT_REGEX = /^[a-z0-9_-]+$/i;
6
+ const SKILL_SLUG_SEGMENT_MAX_LENGTH = 64;
7
+ const SKILL_SLUG_MAX_LENGTH = SKILL_SLUG_SEGMENT_MAX_LENGTH * 2 + 1;
8
+ const SOURCE_NAME_REGEX = /^[a-z0-9_-]+$/i;
9
+ exports.SkillSlugSchema = zod_1.z
10
+ .string()
11
+ .trim()
12
+ .min(3)
13
+ .max(SKILL_SLUG_MAX_LENGTH)
14
+ .transform((value) => value.toLowerCase())
15
+ .superRefine((value, context) => {
16
+ const segments = value.split('/');
17
+ if (segments.length !== 2) {
18
+ context.addIssue({
19
+ code: zod_1.z.ZodIssueCode.custom,
20
+ message: 'Skill slug must use source/name format.',
21
+ });
22
+ return;
23
+ }
24
+ for (const segment of segments) {
25
+ if (segment.length === 0) {
26
+ context.addIssue({
27
+ code: zod_1.z.ZodIssueCode.custom,
28
+ message: 'Skill slug segments cannot be empty.',
29
+ });
30
+ return;
31
+ }
32
+ if (segment.length > SKILL_SLUG_SEGMENT_MAX_LENGTH) {
33
+ context.addIssue({
34
+ code: zod_1.z.ZodIssueCode.custom,
35
+ message: `Skill slug segments must be at most ${SKILL_SLUG_SEGMENT_MAX_LENGTH} characters.`,
36
+ });
37
+ return;
38
+ }
39
+ if (!SKILL_SLUG_SEGMENT_REGEX.test(segment)) {
40
+ context.addIssue({
41
+ code: zod_1.z.ZodIssueCode.custom,
42
+ message: 'Skill slug segments may only contain alphanumeric characters, hyphens, and underscores.',
43
+ });
44
+ return;
45
+ }
46
+ }
47
+ });
48
+ exports.SkillsRequiredInputSchema = zod_1.z
49
+ .array(exports.SkillSlugSchema)
50
+ .transform((slugs) => Array.from(new Set(slugs)));
51
+ exports.SkillSyncRequestSchema = zod_1.z
52
+ .object({
53
+ sourceName: zod_1.z.string().trim().min(1).optional(),
54
+ })
55
+ .default({});
56
+ exports.SkillDisableParamsSchema = zod_1.z.object({
57
+ id: zod_1.z.string().uuid(),
58
+ });
59
+ exports.SkillDisableBodySchema = zod_1.z.object({
60
+ projectId: zod_1.z.string().uuid(),
61
+ });
62
+ exports.SkillEnableParamsSchema = zod_1.z.object({
63
+ id: zod_1.z.string().uuid(),
64
+ });
65
+ exports.SkillEnableBodySchema = zod_1.z.object({
66
+ projectId: zod_1.z.string().uuid(),
67
+ });
68
+ exports.SkillDisabledQuerySchema = zod_1.z.object({
69
+ projectId: zod_1.z.string().uuid(),
70
+ });
71
+ exports.SkillBulkActionSchema = zod_1.z.object({
72
+ projectId: zod_1.z.string().uuid(),
73
+ });
74
+ exports.SkillSourceParamsSchema = zod_1.z.object({
75
+ name: zod_1.z
76
+ .string()
77
+ .trim()
78
+ .min(1)
79
+ .max(SKILL_SLUG_SEGMENT_MAX_LENGTH)
80
+ .transform((value) => value.toLowerCase())
81
+ .refine((value) => SOURCE_NAME_REGEX.test(value), {
82
+ message: 'Source name may only contain alphanumeric characters, hyphens, and underscores.',
83
+ }),
84
+ });
85
+ exports.SkillsListQuerySchema = zod_1.z.object({
86
+ q: zod_1.z.string().trim().min(1).optional(),
87
+ source: zod_1.z.string().trim().min(1).optional(),
88
+ category: zod_1.z.string().trim().min(1).optional(),
89
+ projectId: zod_1.z.string().uuid().optional(),
90
+ });
91
+ exports.SkillUsageStatsQuerySchema = zod_1.z.object({
92
+ projectId: zod_1.z.string().uuid().optional(),
93
+ from: zod_1.z.string().datetime().optional(),
94
+ to: zod_1.z.string().datetime().optional(),
95
+ limit: zod_1.z.coerce.number().int().positive().max(1000).optional(),
96
+ offset: zod_1.z.coerce.number().int().min(0).optional(),
97
+ });
98
+ exports.SkillUsageLogQuerySchema = exports.SkillUsageStatsQuerySchema.extend({
99
+ skillId: zod_1.z.string().uuid().optional(),
100
+ agentId: zod_1.z.string().uuid().optional(),
101
+ });
102
+ exports.SkillBySlugParamsSchema = zod_1.z.object({
103
+ source: zod_1.z.string().trim().min(1),
104
+ name: zod_1.z.string().trim().min(1),
105
+ });
106
+ exports.SkillResolveSlugsBodySchema = zod_1.z.object({
107
+ slugs: zod_1.z
108
+ .array(exports.SkillSlugSchema)
109
+ .min(1)
110
+ .max(50)
111
+ .transform((slugs) => Array.from(new Set(slugs))),
112
+ });
113
+ exports.SkillByIdParamsSchema = zod_1.z.object({
114
+ id: zod_1.z.string().uuid(),
115
+ });
116
+ //# sourceMappingURL=skill.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.dto.js","sourceRoot":"","sources":["../../../../src/modules/skills/dtos/skill.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAClD,MAAM,6BAA6B,GAAG,EAAE,CAAC;AACzC,MAAM,qBAAqB,GAAG,6BAA6B,GAAG,CAAC,GAAG,CAAC,CAAC;AACpE,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAE9B,QAAA,eAAe,GAAG,OAAC;KAC7B,MAAM,EAA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9D,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,kCAA0B,CAAC,MAAM,CAAC;IACxE,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACrC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC/B,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,KAAK,EAAE,OAAC;SACL,KAAK,CAAC,uBAAe,CAAC;SACtB,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;CACpD,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CACtB,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export type SkillCategory = 'security' | 'testing' | 'deployment' | 'documents' | 'design' | 'integration' | 'creative' | 'communication' | 'development';
2
+ export declare class SkillCategoryService {
3
+ deriveCategory(name?: string | null, description?: string | null, compatibility?: string | null): SkillCategory;
4
+ private buildSearchText;
5
+ }