@vfarcic/dot-ai 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +27 -0
- package/dist/core/user-prompts-loader.d.ts.map +1 -1
- package/dist/core/user-prompts-loader.js +95 -8
- package/dist/interfaces/error-response.d.ts +2 -1
- package/dist/interfaces/error-response.d.ts.map +1 -1
- package/dist/interfaces/error-response.js +6 -2
- package/dist/interfaces/mcp.d.ts +32 -12
- package/dist/interfaces/mcp.d.ts.map +1 -1
- package/dist/interfaces/mcp.js +328 -231
- package/dist/interfaces/oauth/dex-api.proto +304 -0
- package/dist/interfaces/oauth/dex-client.d.ts +41 -0
- package/dist/interfaces/oauth/dex-client.d.ts.map +1 -0
- package/dist/interfaces/oauth/dex-client.js +145 -0
- package/dist/interfaces/oauth/index.d.ts +6 -0
- package/dist/interfaces/oauth/index.d.ts.map +1 -0
- package/dist/interfaces/oauth/index.js +16 -0
- package/dist/interfaces/oauth/jwt.d.ts +37 -0
- package/dist/interfaces/oauth/jwt.d.ts.map +1 -0
- package/dist/interfaces/oauth/jwt.js +106 -0
- package/dist/interfaces/oauth/middleware.d.ts +27 -0
- package/dist/interfaces/oauth/middleware.d.ts.map +1 -0
- package/dist/interfaces/oauth/middleware.js +106 -0
- package/dist/interfaces/oauth/provider.d.ts +94 -0
- package/dist/interfaces/oauth/provider.d.ts.map +1 -0
- package/dist/interfaces/oauth/provider.js +373 -0
- package/dist/interfaces/oauth/types.d.ts +98 -0
- package/dist/interfaces/oauth/types.d.ts.map +1 -0
- package/dist/interfaces/oauth/types.js +8 -0
- package/dist/interfaces/oauth/user-management.d.ts +36 -0
- package/dist/interfaces/oauth/user-management.d.ts.map +1 -0
- package/dist/interfaces/oauth/user-management.js +156 -0
- package/dist/interfaces/request-context.d.ts +19 -0
- package/dist/interfaces/request-context.d.ts.map +1 -0
- package/dist/interfaces/request-context.js +20 -0
- package/dist/interfaces/rest-api.d.ts +12 -0
- package/dist/interfaces/rest-api.d.ts.map +1 -1
- package/dist/interfaces/rest-api.js +107 -0
- package/dist/interfaces/routes/index.d.ts.map +1 -1
- package/dist/interfaces/routes/index.js +38 -0
- package/dist/interfaces/schemas/common.d.ts +1 -0
- package/dist/interfaces/schemas/common.d.ts.map +1 -1
- package/dist/interfaces/schemas/common.js +1 -0
- package/dist/interfaces/schemas/index.d.ts +2 -1
- package/dist/interfaces/schemas/index.d.ts.map +1 -1
- package/dist/interfaces/schemas/index.js +18 -2
- package/dist/interfaces/schemas/prompts.d.ts +16 -0
- package/dist/interfaces/schemas/prompts.d.ts.map +1 -1
- package/dist/interfaces/schemas/prompts.js +9 -1
- package/dist/interfaces/schemas/users.d.ts +128 -0
- package/dist/interfaces/schemas/users.d.ts.map +1 -0
- package/dist/interfaces/schemas/users.js +64 -0
- package/dist/tools/prompts.d.ts +8 -1
- package/dist/tools/prompts.d.ts.map +1 -1
- package/dist/tools/prompts.js +15 -3
- package/dist/tools/remediate.d.ts +1 -1
- package/dist/tools/remediate.d.ts.map +1 -1
- package/dist/tools/remediate.js +38 -26
- package/dist/tools/version.d.ts.map +1 -1
- package/dist/tools/version.js +4 -0
- package/package.json +7 -2
- package/shared-prompts/prd-start.md +13 -0
- package/dist/interfaces/auth.d.ts +0 -26
- package/dist/interfaces/auth.d.ts.map +0 -1
- package/dist/interfaces/auth.js +0 -82
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.ResourceSyncResponseSchema = exports.ResourceSyncDataSchema = exports.ResourceSyncRequestSchema = exports.NamespacesResponseSchema = exports.NamespacesDataSchema = exports.SingleResourceResponseSchema = exports.SingleResourceDataSchema = exports.ResourceListResponseSchema = exports.ResourceListDataSchema = exports.ResourceSearchResponseSchema = exports.ResourceSearchDataSchema = exports.ResourceSummarySchema = exports.ResourceKindsResponseSchema = exports.ResourceKindsDataSchema = exports.ResourceKindSchema = exports.VisualizationInternalErrorSchema = exports.VisualizationServiceUnavailableErrorSchema = exports.VisualizationNotFoundErrorSchema = exports.VisualizationResponseSchema = exports.VisualizationResponseDataSchema = exports.VisualizationSchema = exports.VisualizationContentSchema = exports.BarChartContentSchema = exports.BarChartDataItemSchema = exports.DiffContentSchema = exports.CardsContentSchema = exports.CardItemSchema = exports.TableContentSchema = exports.CodeContentSchema = exports.VisualizationTypeSchema = exports.ToolDiscoveryErrorSchema = exports.ToolExecutionErrorSchema = exports.InvalidToolRequestErrorSchema = exports.ToolNotFoundErrorSchema = exports.ToolExecutionResponseSchema = exports.ToolExecutionDataSchema = exports.ToolDiscoveryResponseSchema = exports.ToolDiscoveryDataSchema = exports.ToolInfoSchema = exports.ToolParameterSchema = exports.createSuccessResponseSchema = exports.InternalServerErrorSchema = exports.ServiceUnavailableErrorSchema = exports.MethodNotAllowedErrorSchema = exports.BadRequestErrorSchema = exports.NotFoundErrorSchema = exports.ErrorResponseSchema = exports.RestApiResponseSchema = exports.ErrorDetailsSchema = exports.MetaSchema = void 0;
|
|
15
|
-
exports.
|
|
16
|
-
exports.EmbeddingMigrationErrorSchema = exports.EmbeddingMigrationServiceUnavailableErrorSchema = exports.EmbeddingMigrationBadRequestErrorSchema = exports.EmbeddingMigrationResponseSchema = exports.EmbeddingMigrationDataSchema = exports.CollectionMigrationResultSchema = exports.EmbeddingMigrationRequestSchema = exports.KnowledgeAskErrorSchema = exports.KnowledgeAskPluginUnavailableErrorSchema = exports.KnowledgeAskAIUnavailableErrorSchema = exports.KnowledgeAskBadRequestErrorSchema = exports.KnowledgeAskResponseSchema = exports.KnowledgeAskDataSchema = void 0;
|
|
15
|
+
exports.KnowledgeAskSourceSchema = exports.KnowledgeAskRequestSchema = exports.DeleteBySourceErrorSchema = exports.DeleteBySourcePluginUnavailableErrorSchema = exports.DeleteBySourceBadRequestErrorSchema = exports.DeleteBySourceResponseSchema = exports.DeleteBySourceDataSchema = exports.PromptsCacheRefreshErrorSchema = exports.PromptsCacheRefreshResponseSchema = exports.PromptsCacheRefreshDataSchema = exports.PromptGetErrorSchema = exports.PromptsListErrorSchema = exports.PromptValidationErrorSchema = exports.PromptNotFoundErrorSchema = exports.PromptGetRequestSchema = exports.PromptGetResponseSchema = exports.PromptGetDataSchema = exports.PromptFileSchema = exports.PromptMessageSchema = exports.PromptsListResponseSchema = exports.PromptsListDataSchema = exports.PromptInfoSchema = exports.PromptArgumentSchema = exports.SessionRetrievalErrorSchema = exports.SessionNotFoundErrorSchema = exports.SessionResponseSchema = exports.SessionResponseDataSchema = exports.SessionDataSchema = exports.SessionMetadataSchema = exports.LogsErrorSchema = exports.LogsPluginUnavailableErrorSchema = exports.LogsBadRequestErrorSchema = exports.LogsResponseSchema = exports.LogsDataSchema = exports.EventsErrorSchema = exports.EventsPluginUnavailableErrorSchema = exports.EventsBadRequestErrorSchema = exports.EventsResponseSchema = exports.EventsDataSchema = exports.KubernetesEventSchema = exports.EventInvolvedObjectSchema = exports.ResourceSyncErrorSchema = exports.NamespacesErrorSchema = exports.SingleResourceErrorSchema = exports.ResourceListErrorSchema = exports.ResourceSearchErrorSchema = exports.ResourceKindsErrorSchema = exports.ResourcePluginUnavailableErrorSchema = exports.ResourceBadRequestErrorSchema = exports.ResourceNotFoundErrorSchema = void 0;
|
|
16
|
+
exports.UserManagementErrorSchema = exports.UserBadRequestErrorSchema = exports.UserNotFoundErrorSchema = exports.UserConflictErrorSchema = exports.UserEmailParamsSchema = exports.UserEntrySchema = exports.UserDeleteResponseSchema = exports.UserDeleteDataSchema = exports.UserListResponseSchema = exports.UserListDataSchema = exports.UserCreateResponseSchema = exports.UserCreateDataSchema = exports.UserCreateRequestSchema = exports.EmbeddingMigrationErrorSchema = exports.EmbeddingMigrationServiceUnavailableErrorSchema = exports.EmbeddingMigrationBadRequestErrorSchema = exports.EmbeddingMigrationResponseSchema = exports.EmbeddingMigrationDataSchema = exports.CollectionMigrationResultSchema = exports.EmbeddingMigrationRequestSchema = exports.KnowledgeAskErrorSchema = exports.KnowledgeAskPluginUnavailableErrorSchema = exports.KnowledgeAskAIUnavailableErrorSchema = exports.KnowledgeAskBadRequestErrorSchema = exports.KnowledgeAskResponseSchema = exports.KnowledgeAskDataSchema = exports.KnowledgeAskChunkSchema = void 0;
|
|
17
17
|
// Common schemas
|
|
18
18
|
var common_1 = require("./common");
|
|
19
19
|
Object.defineProperty(exports, "MetaSchema", { enumerable: true, get: function () { return common_1.MetaSchema; } });
|
|
@@ -112,6 +112,7 @@ Object.defineProperty(exports, "PromptInfoSchema", { enumerable: true, get: func
|
|
|
112
112
|
Object.defineProperty(exports, "PromptsListDataSchema", { enumerable: true, get: function () { return prompts_1.PromptsListDataSchema; } });
|
|
113
113
|
Object.defineProperty(exports, "PromptsListResponseSchema", { enumerable: true, get: function () { return prompts_1.PromptsListResponseSchema; } });
|
|
114
114
|
Object.defineProperty(exports, "PromptMessageSchema", { enumerable: true, get: function () { return prompts_1.PromptMessageSchema; } });
|
|
115
|
+
Object.defineProperty(exports, "PromptFileSchema", { enumerable: true, get: function () { return prompts_1.PromptFileSchema; } });
|
|
115
116
|
Object.defineProperty(exports, "PromptGetDataSchema", { enumerable: true, get: function () { return prompts_1.PromptGetDataSchema; } });
|
|
116
117
|
Object.defineProperty(exports, "PromptGetResponseSchema", { enumerable: true, get: function () { return prompts_1.PromptGetResponseSchema; } });
|
|
117
118
|
Object.defineProperty(exports, "PromptGetRequestSchema", { enumerable: true, get: function () { return prompts_1.PromptGetRequestSchema; } });
|
|
@@ -148,3 +149,18 @@ Object.defineProperty(exports, "EmbeddingMigrationResponseSchema", { enumerable:
|
|
|
148
149
|
Object.defineProperty(exports, "EmbeddingMigrationBadRequestErrorSchema", { enumerable: true, get: function () { return embeddings_1.EmbeddingMigrationBadRequestErrorSchema; } });
|
|
149
150
|
Object.defineProperty(exports, "EmbeddingMigrationServiceUnavailableErrorSchema", { enumerable: true, get: function () { return embeddings_1.EmbeddingMigrationServiceUnavailableErrorSchema; } });
|
|
150
151
|
Object.defineProperty(exports, "EmbeddingMigrationErrorSchema", { enumerable: true, get: function () { return embeddings_1.EmbeddingMigrationErrorSchema; } });
|
|
152
|
+
// Users schemas (PRD #380 Task 2.5)
|
|
153
|
+
var users_1 = require("./users");
|
|
154
|
+
Object.defineProperty(exports, "UserCreateRequestSchema", { enumerable: true, get: function () { return users_1.UserCreateRequestSchema; } });
|
|
155
|
+
Object.defineProperty(exports, "UserCreateDataSchema", { enumerable: true, get: function () { return users_1.UserCreateDataSchema; } });
|
|
156
|
+
Object.defineProperty(exports, "UserCreateResponseSchema", { enumerable: true, get: function () { return users_1.UserCreateResponseSchema; } });
|
|
157
|
+
Object.defineProperty(exports, "UserListDataSchema", { enumerable: true, get: function () { return users_1.UserListDataSchema; } });
|
|
158
|
+
Object.defineProperty(exports, "UserListResponseSchema", { enumerable: true, get: function () { return users_1.UserListResponseSchema; } });
|
|
159
|
+
Object.defineProperty(exports, "UserDeleteDataSchema", { enumerable: true, get: function () { return users_1.UserDeleteDataSchema; } });
|
|
160
|
+
Object.defineProperty(exports, "UserDeleteResponseSchema", { enumerable: true, get: function () { return users_1.UserDeleteResponseSchema; } });
|
|
161
|
+
Object.defineProperty(exports, "UserEntrySchema", { enumerable: true, get: function () { return users_1.UserEntrySchema; } });
|
|
162
|
+
Object.defineProperty(exports, "UserEmailParamsSchema", { enumerable: true, get: function () { return users_1.UserEmailParamsSchema; } });
|
|
163
|
+
Object.defineProperty(exports, "UserConflictErrorSchema", { enumerable: true, get: function () { return users_1.UserConflictErrorSchema; } });
|
|
164
|
+
Object.defineProperty(exports, "UserNotFoundErrorSchema", { enumerable: true, get: function () { return users_1.UserNotFoundErrorSchema; } });
|
|
165
|
+
Object.defineProperty(exports, "UserBadRequestErrorSchema", { enumerable: true, get: function () { return users_1.UserBadRequestErrorSchema; } });
|
|
166
|
+
Object.defineProperty(exports, "UserManagementErrorSchema", { enumerable: true, get: function () { return users_1.UserManagementErrorSchema; } });
|
|
@@ -78,6 +78,14 @@ export declare const PromptMessageSchema: z.ZodObject<{
|
|
|
78
78
|
}, z.core.$strip>;
|
|
79
79
|
}, z.core.$strip>;
|
|
80
80
|
export type PromptMessage = z.infer<typeof PromptMessageSchema>;
|
|
81
|
+
/**
|
|
82
|
+
* Supporting file for folder-based skills (base64-encoded)
|
|
83
|
+
*/
|
|
84
|
+
export declare const PromptFileSchema: z.ZodObject<{
|
|
85
|
+
path: z.ZodString;
|
|
86
|
+
content: z.ZodString;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
export type PromptFileData = z.infer<typeof PromptFileSchema>;
|
|
81
89
|
/**
|
|
82
90
|
* Prompt get response data
|
|
83
91
|
* POST /api/v1/prompts/:promptName
|
|
@@ -95,6 +103,10 @@ export declare const PromptGetDataSchema: z.ZodObject<{
|
|
|
95
103
|
text: z.ZodString;
|
|
96
104
|
}, z.core.$strip>;
|
|
97
105
|
}, z.core.$strip>>;
|
|
106
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
107
|
+
path: z.ZodString;
|
|
108
|
+
content: z.ZodString;
|
|
109
|
+
}, z.core.$strip>>>;
|
|
98
110
|
}, z.core.$strip>;
|
|
99
111
|
export type PromptGetData = z.infer<typeof PromptGetDataSchema>;
|
|
100
112
|
export declare const PromptGetResponseSchema: z.ZodObject<{
|
|
@@ -112,6 +124,10 @@ export declare const PromptGetResponseSchema: z.ZodObject<{
|
|
|
112
124
|
text: z.ZodString;
|
|
113
125
|
}, z.core.$strip>;
|
|
114
126
|
}, z.core.$strip>>;
|
|
127
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
128
|
+
path: z.ZodString;
|
|
129
|
+
content: z.ZodString;
|
|
130
|
+
}, z.core.$strip>>>;
|
|
115
131
|
}, z.core.$strip>;
|
|
116
132
|
meta: z.ZodOptional<z.ZodObject<{
|
|
117
133
|
timestamp: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/interfaces/schemas/prompts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;iBAI3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;iBAEhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;iBAAqD,CAAC;AAE5F,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/interfaces/schemas/prompts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;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AMtC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;iBAMjC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;iBAM/B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;iBAIxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;iBAA6D,CAAC;AAE5G,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,8BAA8B;;;;;;;;;;;;iBAMzC,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* PRD #354: REST API Route Registry with Auto-Generated OpenAPI and Test Fixtures
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.PromptsCacheRefreshErrorSchema = exports.PromptsCacheRefreshResponseSchema = exports.PromptsCacheRefreshDataSchema = exports.PromptGetErrorSchema = exports.PromptsListErrorSchema = exports.PromptValidationErrorSchema = exports.PromptNotFoundErrorSchema = exports.PromptGetRequestSchema = exports.PromptGetResponseSchema = exports.PromptGetDataSchema = exports.PromptMessageSchema = exports.PromptsListResponseSchema = exports.PromptsListDataSchema = exports.PromptInfoSchema = exports.PromptArgumentSchema = void 0;
|
|
9
|
+
exports.PromptsCacheRefreshErrorSchema = exports.PromptsCacheRefreshResponseSchema = exports.PromptsCacheRefreshDataSchema = exports.PromptGetErrorSchema = exports.PromptsListErrorSchema = exports.PromptValidationErrorSchema = exports.PromptNotFoundErrorSchema = exports.PromptGetRequestSchema = exports.PromptGetResponseSchema = exports.PromptGetDataSchema = exports.PromptFileSchema = exports.PromptMessageSchema = exports.PromptsListResponseSchema = exports.PromptsListDataSchema = exports.PromptInfoSchema = exports.PromptArgumentSchema = void 0;
|
|
10
10
|
const zod_1 = require("zod");
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
/**
|
|
@@ -43,6 +43,13 @@ exports.PromptMessageSchema = zod_1.z.object({
|
|
|
43
43
|
text: zod_1.z.string().describe('Message text content'),
|
|
44
44
|
}).describe('Message content'),
|
|
45
45
|
});
|
|
46
|
+
/**
|
|
47
|
+
* Supporting file for folder-based skills (base64-encoded)
|
|
48
|
+
*/
|
|
49
|
+
exports.PromptFileSchema = zod_1.z.object({
|
|
50
|
+
path: zod_1.z.string().describe('Relative path within skill folder'),
|
|
51
|
+
content: zod_1.z.string().describe('Base64-encoded file content'),
|
|
52
|
+
});
|
|
46
53
|
/**
|
|
47
54
|
* Prompt get response data
|
|
48
55
|
* POST /api/v1/prompts/:promptName
|
|
@@ -50,6 +57,7 @@ exports.PromptMessageSchema = zod_1.z.object({
|
|
|
50
57
|
exports.PromptGetDataSchema = zod_1.z.object({
|
|
51
58
|
description: zod_1.z.string().optional().describe('Prompt description'),
|
|
52
59
|
messages: zod_1.z.array(exports.PromptMessageSchema).describe('Prompt messages'),
|
|
60
|
+
files: zod_1.z.array(exports.PromptFileSchema).optional().describe('Supporting files for folder-based skills (base64-encoded)'),
|
|
53
61
|
});
|
|
54
62
|
exports.PromptGetResponseSchema = (0, common_1.createSuccessResponseSchema)(exports.PromptGetDataSchema);
|
|
55
63
|
/**
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User Management Endpoint Schemas (PRD #380 Task 2.5)
|
|
3
|
+
*
|
|
4
|
+
* Schemas for the /api/v1/users endpoints.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export declare const UserCreateRequestSchema: z.ZodObject<{
|
|
8
|
+
email: z.ZodString;
|
|
9
|
+
password: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type UserCreateRequest = z.infer<typeof UserCreateRequestSchema>;
|
|
12
|
+
export declare const UserEmailParamsSchema: z.ZodObject<{
|
|
13
|
+
email: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const UserEntrySchema: z.ZodObject<{
|
|
16
|
+
email: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const UserCreateDataSchema: z.ZodObject<{
|
|
19
|
+
email: z.ZodString;
|
|
20
|
+
message: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type UserCreateData = z.infer<typeof UserCreateDataSchema>;
|
|
23
|
+
export declare const UserCreateResponseSchema: z.ZodObject<{
|
|
24
|
+
success: z.ZodLiteral<true>;
|
|
25
|
+
data: z.ZodObject<{
|
|
26
|
+
email: z.ZodString;
|
|
27
|
+
message: z.ZodString;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
timestamp: z.ZodString;
|
|
31
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
32
|
+
version: z.ZodString;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type UserCreateResponse = z.infer<typeof UserCreateResponseSchema>;
|
|
36
|
+
export declare const UserListDataSchema: z.ZodObject<{
|
|
37
|
+
users: z.ZodArray<z.ZodObject<{
|
|
38
|
+
email: z.ZodString;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
total: z.ZodNumber;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export type UserListData = z.infer<typeof UserListDataSchema>;
|
|
43
|
+
export declare const UserListResponseSchema: z.ZodObject<{
|
|
44
|
+
success: z.ZodLiteral<true>;
|
|
45
|
+
data: z.ZodObject<{
|
|
46
|
+
users: z.ZodArray<z.ZodObject<{
|
|
47
|
+
email: z.ZodString;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
total: z.ZodNumber;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
52
|
+
timestamp: z.ZodString;
|
|
53
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
54
|
+
version: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type UserListResponse = z.infer<typeof UserListResponseSchema>;
|
|
58
|
+
export declare const UserDeleteDataSchema: z.ZodObject<{
|
|
59
|
+
email: z.ZodString;
|
|
60
|
+
message: z.ZodString;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type UserDeleteData = z.infer<typeof UserDeleteDataSchema>;
|
|
63
|
+
export declare const UserDeleteResponseSchema: z.ZodObject<{
|
|
64
|
+
success: z.ZodLiteral<true>;
|
|
65
|
+
data: z.ZodObject<{
|
|
66
|
+
email: z.ZodString;
|
|
67
|
+
message: z.ZodString;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
timestamp: z.ZodString;
|
|
71
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
72
|
+
version: z.ZodString;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type UserDeleteResponse = z.infer<typeof UserDeleteResponseSchema>;
|
|
76
|
+
export declare const UserConflictErrorSchema: z.ZodObject<{
|
|
77
|
+
success: z.ZodLiteral<false>;
|
|
78
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
timestamp: z.ZodString;
|
|
80
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
version: z.ZodString;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
error: z.ZodObject<{
|
|
84
|
+
message: z.ZodString;
|
|
85
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
86
|
+
code: z.ZodLiteral<"USER_CONFLICT">;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
export declare const UserNotFoundErrorSchema: z.ZodObject<{
|
|
90
|
+
success: z.ZodLiteral<false>;
|
|
91
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
timestamp: z.ZodString;
|
|
93
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
94
|
+
version: z.ZodString;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
error: z.ZodObject<{
|
|
97
|
+
message: z.ZodString;
|
|
98
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
99
|
+
code: z.ZodLiteral<"USER_NOT_FOUND">;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
export declare const UserBadRequestErrorSchema: z.ZodObject<{
|
|
103
|
+
success: z.ZodLiteral<false>;
|
|
104
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
timestamp: z.ZodString;
|
|
106
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
107
|
+
version: z.ZodString;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
error: z.ZodObject<{
|
|
110
|
+
message: z.ZodString;
|
|
111
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
112
|
+
code: z.ZodLiteral<"INVALID_REQUEST">;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
export declare const UserManagementErrorSchema: z.ZodObject<{
|
|
116
|
+
success: z.ZodLiteral<false>;
|
|
117
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
118
|
+
timestamp: z.ZodString;
|
|
119
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
120
|
+
version: z.ZodString;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
error: z.ZodObject<{
|
|
123
|
+
message: z.ZodString;
|
|
124
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
125
|
+
code: z.ZodLiteral<"USER_MANAGEMENT_ERROR">;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
//# sourceMappingURL=users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AEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;iBAIlC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;iBAIpC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;iBAIpC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* User Management Endpoint Schemas (PRD #380 Task 2.5)
|
|
4
|
+
*
|
|
5
|
+
* Schemas for the /api/v1/users endpoints.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.UserManagementErrorSchema = exports.UserBadRequestErrorSchema = exports.UserNotFoundErrorSchema = exports.UserConflictErrorSchema = exports.UserDeleteResponseSchema = exports.UserDeleteDataSchema = exports.UserListResponseSchema = exports.UserListDataSchema = exports.UserCreateResponseSchema = exports.UserCreateDataSchema = exports.UserEntrySchema = exports.UserEmailParamsSchema = exports.UserCreateRequestSchema = void 0;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const common_1 = require("./common");
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
// Request schemas
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
exports.UserCreateRequestSchema = zod_1.z.object({
|
|
15
|
+
email: zod_1.z.string().email().describe('User email address'),
|
|
16
|
+
password: zod_1.z.string().min(8).describe('User password (minimum 8 characters)'),
|
|
17
|
+
});
|
|
18
|
+
exports.UserEmailParamsSchema = zod_1.z.object({
|
|
19
|
+
email: zod_1.z.string().describe('User email address'),
|
|
20
|
+
});
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
// Response data schemas
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
exports.UserEntrySchema = zod_1.z.object({
|
|
25
|
+
email: zod_1.z.string().email().describe('User email address'),
|
|
26
|
+
});
|
|
27
|
+
exports.UserCreateDataSchema = zod_1.z.object({
|
|
28
|
+
email: zod_1.z.string().email().describe('Created user email'),
|
|
29
|
+
message: zod_1.z.string().describe('Result message'),
|
|
30
|
+
});
|
|
31
|
+
exports.UserCreateResponseSchema = (0, common_1.createSuccessResponseSchema)(exports.UserCreateDataSchema);
|
|
32
|
+
exports.UserListDataSchema = zod_1.z.object({
|
|
33
|
+
users: zod_1.z.array(exports.UserEntrySchema).describe('List of users'),
|
|
34
|
+
total: zod_1.z.number().describe('Total number of users'),
|
|
35
|
+
});
|
|
36
|
+
exports.UserListResponseSchema = (0, common_1.createSuccessResponseSchema)(exports.UserListDataSchema);
|
|
37
|
+
exports.UserDeleteDataSchema = zod_1.z.object({
|
|
38
|
+
email: zod_1.z.string().email().describe('Deleted user email'),
|
|
39
|
+
message: zod_1.z.string().describe('Result message'),
|
|
40
|
+
});
|
|
41
|
+
exports.UserDeleteResponseSchema = (0, common_1.createSuccessResponseSchema)(exports.UserDeleteDataSchema);
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
// Error schemas
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
exports.UserConflictErrorSchema = common_1.ErrorResponseSchema.extend({
|
|
46
|
+
error: common_1.ErrorDetailsSchema.extend({
|
|
47
|
+
code: zod_1.z.literal('USER_CONFLICT'),
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
exports.UserNotFoundErrorSchema = common_1.ErrorResponseSchema.extend({
|
|
51
|
+
error: common_1.ErrorDetailsSchema.extend({
|
|
52
|
+
code: zod_1.z.literal('USER_NOT_FOUND'),
|
|
53
|
+
}),
|
|
54
|
+
});
|
|
55
|
+
exports.UserBadRequestErrorSchema = common_1.ErrorResponseSchema.extend({
|
|
56
|
+
error: common_1.ErrorDetailsSchema.extend({
|
|
57
|
+
code: zod_1.z.literal('INVALID_REQUEST'),
|
|
58
|
+
}),
|
|
59
|
+
});
|
|
60
|
+
exports.UserManagementErrorSchema = common_1.InternalServerErrorSchema.extend({
|
|
61
|
+
error: common_1.ErrorDetailsSchema.extend({
|
|
62
|
+
code: zod_1.z.literal('USER_MANAGEMENT_ERROR'),
|
|
63
|
+
}),
|
|
64
|
+
});
|
package/dist/tools/prompts.d.ts
CHANGED
|
@@ -13,17 +13,22 @@ export interface PromptMetadata {
|
|
|
13
13
|
category?: string;
|
|
14
14
|
arguments?: PromptArgument[];
|
|
15
15
|
}
|
|
16
|
+
export interface PromptFile {
|
|
17
|
+
path: string;
|
|
18
|
+
content: string;
|
|
19
|
+
}
|
|
16
20
|
export interface Prompt {
|
|
17
21
|
name: string;
|
|
18
22
|
description: string;
|
|
19
23
|
content: string;
|
|
20
24
|
arguments?: PromptArgument[];
|
|
21
25
|
source: 'built-in' | 'user';
|
|
26
|
+
files?: PromptFile[];
|
|
22
27
|
}
|
|
23
28
|
/**
|
|
24
29
|
* Loads and parses a prompt file with YAML frontmatter
|
|
25
30
|
*/
|
|
26
|
-
export declare function loadPromptFile(filePath: string, source?: 'built-in' | 'user'): Prompt;
|
|
31
|
+
export declare function loadPromptFile(filePath: string, source?: 'built-in' | 'user', defaultName?: string): Prompt;
|
|
27
32
|
/**
|
|
28
33
|
* Loads built-in prompts from the shared-prompts directory
|
|
29
34
|
*/
|
|
@@ -40,6 +45,7 @@ export declare function mergePrompts(builtInPrompts: Prompt[], userPrompts: Prom
|
|
|
40
45
|
export declare function loadAllPrompts(logger: Logger, baseDir?: string, forceRefresh?: boolean): Promise<Prompt[]>;
|
|
41
46
|
export interface PromptsListArgs {
|
|
42
47
|
baseDir?: string;
|
|
48
|
+
excludeFileSkills?: boolean;
|
|
43
49
|
}
|
|
44
50
|
interface PromptsListResponse {
|
|
45
51
|
prompts: Array<{
|
|
@@ -66,6 +72,7 @@ interface PromptsGetResponse {
|
|
|
66
72
|
text: string;
|
|
67
73
|
};
|
|
68
74
|
}>;
|
|
75
|
+
files?: PromptFile[];
|
|
69
76
|
}
|
|
70
77
|
/**
|
|
71
78
|
* Handle prompts/get MCP request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/tools/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/tools/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WA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IACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,kBAAkB;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IAC3E,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,kBAAkB,CAAC,CA6G7B"}
|
package/dist/tools/prompts.js
CHANGED
|
@@ -121,7 +121,7 @@ function parseYamlFrontmatter(yaml) {
|
|
|
121
121
|
/**
|
|
122
122
|
* Loads and parses a prompt file with YAML frontmatter
|
|
123
123
|
*/
|
|
124
|
-
function loadPromptFile(filePath, source = 'built-in') {
|
|
124
|
+
function loadPromptFile(filePath, source = 'built-in', defaultName) {
|
|
125
125
|
try {
|
|
126
126
|
const content = fs.readFileSync(filePath, 'utf8');
|
|
127
127
|
// Parse YAML frontmatter
|
|
@@ -132,6 +132,10 @@ function loadPromptFile(filePath, source = 'built-in') {
|
|
|
132
132
|
const [, frontmatterYaml, promptContent] = frontmatterMatch;
|
|
133
133
|
// Parse YAML with support for arguments array
|
|
134
134
|
const metadata = parseYamlFrontmatter(frontmatterYaml);
|
|
135
|
+
// Use defaultName as fallback if frontmatter lacks name (for skill folders)
|
|
136
|
+
if (!metadata.name && defaultName) {
|
|
137
|
+
metadata.name = defaultName;
|
|
138
|
+
}
|
|
135
139
|
if (!metadata.name || !metadata.description) {
|
|
136
140
|
throw new Error(`Missing required metadata in ${filePath}: name, description`);
|
|
137
141
|
}
|
|
@@ -235,7 +239,11 @@ async function loadAllPrompts(logger, baseDir, forceRefresh = false) {
|
|
|
235
239
|
async function handlePromptsListRequest(args, logger, requestId) {
|
|
236
240
|
try {
|
|
237
241
|
logger.info('Processing prompts/list request', { requestId });
|
|
238
|
-
const
|
|
242
|
+
const allPrompts = await loadAllPrompts(logger, process.env.NODE_ENV === 'test' ? args?.baseDir : undefined);
|
|
243
|
+
// Filter out file-dependent skills when requested (MCP clients can't deliver files)
|
|
244
|
+
const prompts = args?.excludeFileSkills
|
|
245
|
+
? allPrompts.filter(p => !p.files || p.files.length === 0)
|
|
246
|
+
: allPrompts;
|
|
239
247
|
// Convert to MCP prompts/list response format (include arguments if present)
|
|
240
248
|
const promptList = prompts.map(prompt => {
|
|
241
249
|
const item = {
|
|
@@ -315,7 +323,7 @@ async function handlePromptsGetRequest(args, logger, requestId) {
|
|
|
315
323
|
argumentsProvided: Object.keys(providedArgs).length,
|
|
316
324
|
});
|
|
317
325
|
// Convert to MCP prompts/get response format
|
|
318
|
-
|
|
326
|
+
const response = {
|
|
319
327
|
description: prompt.description,
|
|
320
328
|
messages: [
|
|
321
329
|
{
|
|
@@ -327,6 +335,10 @@ async function handlePromptsGetRequest(args, logger, requestId) {
|
|
|
327
335
|
},
|
|
328
336
|
],
|
|
329
337
|
};
|
|
338
|
+
if (prompt.files && prompt.files.length > 0) {
|
|
339
|
+
response.files = prompt.files;
|
|
340
|
+
}
|
|
341
|
+
return response;
|
|
330
342
|
}
|
|
331
343
|
catch (error) {
|
|
332
344
|
logger.error('Prompts get request failed', error);
|
|
@@ -67,7 +67,7 @@ export interface ExecutionChoice {
|
|
|
67
67
|
risk?: 'low' | 'medium' | 'high';
|
|
68
68
|
}
|
|
69
69
|
export interface RemediateOutput {
|
|
70
|
-
status: 'success' | 'failed' | 'awaiting_user_approval';
|
|
70
|
+
status: 'success' | 'failed' | 'awaiting_user_approval' | 'partially_resolved';
|
|
71
71
|
sessionId: string;
|
|
72
72
|
investigation: {
|
|
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nB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;QAC7B,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;KACjC,CAAC;IACF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,uBAAuB,CAyHzB;AAqcD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAgOhC"}
|
package/dist/tools/remediate.js
CHANGED
|
@@ -547,35 +547,48 @@ ${executedCommands.map((cmd, i) => `${i + 1}. ${cmd}`).join('\n')}
|
|
|
547
547
|
Validation task: ${validationIntent}
|
|
548
548
|
|
|
549
549
|
IMPORTANT: You MUST respond with the final JSON analysis format as specified in your instructions. Verify the remediation was successful and return your analysis as JSON with issueStatus set to "resolved" if fixed, or "active" if issues remain.`;
|
|
550
|
-
|
|
550
|
+
// Run validation via conductInvestigation() directly (not handleRemediateTool)
|
|
551
|
+
// to avoid creating a new session with mode:'manual' which always returns awaiting_user_approval
|
|
552
|
+
const validationSession = sessionManager.createSession({
|
|
553
|
+
toolName: 'remediate',
|
|
551
554
|
issue: validationIssue,
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
const
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
555
|
+
mode: session.data.mode,
|
|
556
|
+
status: 'investigating',
|
|
557
|
+
interaction_id: currentInteractionId || session.data.interaction_id,
|
|
558
|
+
});
|
|
559
|
+
const validationAiProvider = (0, ai_provider_factory_1.createAIProvider)();
|
|
560
|
+
const validationOutput = await conductInvestigation(validationSession, sessionManager, validationAiProvider, logger, requestId, true, // isValidation
|
|
561
|
+
currentInteractionId || session.data.interaction_id);
|
|
562
|
+
const validationResolved = validationOutput.status === 'success';
|
|
563
|
+
// If validation discovered remaining issues, enhance with execution context
|
|
564
|
+
if (!validationResolved) {
|
|
565
|
+
logger.info('Validation discovered remaining issues, enhancing response with execution context', {
|
|
561
566
|
requestId,
|
|
562
567
|
sessionId: session.sessionId,
|
|
563
|
-
|
|
568
|
+
validationStatus: validationOutput.status,
|
|
569
|
+
newIssueConfidence: validationOutput.analysis?.confidence,
|
|
564
570
|
});
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
571
|
+
const enhancedResponse = {
|
|
572
|
+
...validationOutput,
|
|
573
|
+
status: 'partially_resolved',
|
|
574
|
+
executed: true,
|
|
575
|
+
results: results,
|
|
576
|
+
executedCommands: results.map(r => r.action),
|
|
577
|
+
previousExecution: {
|
|
578
|
+
sessionId: session.sessionId,
|
|
579
|
+
summary: `Previously executed ${results.length} remediation actions`,
|
|
580
|
+
actions: finalAnalysis.remediation.actions,
|
|
581
|
+
},
|
|
582
|
+
validation: {
|
|
583
|
+
success: false,
|
|
584
|
+
summary: 'Validation found remaining issues after remediation',
|
|
585
|
+
},
|
|
573
586
|
};
|
|
574
587
|
return {
|
|
575
588
|
content: [
|
|
576
589
|
{
|
|
577
590
|
type: 'text',
|
|
578
|
-
text: JSON.stringify(
|
|
591
|
+
text: JSON.stringify(enhancedResponse, null, 2),
|
|
579
592
|
},
|
|
580
593
|
],
|
|
581
594
|
};
|
|
@@ -584,23 +597,22 @@ IMPORTANT: You MUST respond with the final JSON analysis format as specified in
|
|
|
584
597
|
logger.info('Validation confirmed issue is resolved, creating success response', {
|
|
585
598
|
requestId,
|
|
586
599
|
sessionId: session.sessionId,
|
|
587
|
-
validationStatus:
|
|
600
|
+
validationStatus: validationOutput.status,
|
|
588
601
|
});
|
|
589
|
-
// Create success response with execution context
|
|
590
602
|
const successResponse = {
|
|
591
603
|
status: 'success',
|
|
592
604
|
sessionId: session.sessionId,
|
|
593
605
|
executed: true,
|
|
594
606
|
results: results,
|
|
595
607
|
executedCommands: results.map(r => r.action),
|
|
596
|
-
analysis:
|
|
608
|
+
analysis: validationOutput.analysis,
|
|
597
609
|
remediation: {
|
|
598
|
-
summary: `Successfully executed ${results.length} remediation actions. ${
|
|
610
|
+
summary: `Successfully executed ${results.length} remediation actions. ${validationOutput.remediation?.summary || 'Issue resolved.'}`,
|
|
599
611
|
actions: finalAnalysis.remediation.actions,
|
|
600
612
|
risk: finalAnalysis.remediation.risk,
|
|
601
613
|
},
|
|
602
|
-
investigation:
|
|
603
|
-
validationIntent:
|
|
614
|
+
investigation: validationOutput.investigation,
|
|
615
|
+
validationIntent: validationOutput.validationIntent,
|
|
604
616
|
guidance: `✅ REMEDIATION COMPLETE: Issue has been successfully resolved through executed commands.`,
|
|
605
617
|
agentInstructions: `1. Show user that the issue has been successfully resolved\n2. Display the actual kubectl commands that were executed (from remediation.actions[].command field)\n3. Show execution results with success/failure status for each command\n4. Show the validation results confirming the fix worked\n5. No further action required`,
|
|
606
618
|
message: `Issue successfully resolved. Executed ${results.length} remediation actions and validated the fix.`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/tools/version.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAOhD,OAAO,EAAuB,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/tools/version.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAOhD,OAAO,EAAuB,qBAAqB,EAAE,MA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C,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,eAAe,GAAG,SAAS,EACjC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,mBAAmB,CAAC,CAuI9B"}
|
package/dist/tools/version.js
CHANGED
|
@@ -57,6 +57,7 @@ const config_1 = require("../core/tracing/config");
|
|
|
57
57
|
const generic_session_manager_1 = require("../core/generic-session-manager");
|
|
58
58
|
const visualization_1 = require("../core/visualization");
|
|
59
59
|
const plugin_registry_1 = require("../core/plugin-registry");
|
|
60
|
+
const request_context_1 = require("../interfaces/request-context");
|
|
60
61
|
exports.VERSION_TOOL_NAME = 'version';
|
|
61
62
|
exports.VERSION_TOOL_DESCRIPTION = 'Get comprehensive system health and diagnostics';
|
|
62
63
|
exports.VERSION_TOOL_INPUT_SCHEMA = {
|
|
@@ -727,9 +728,12 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
727
728
|
});
|
|
728
729
|
// PRD #320: Generate visualization URL if configured
|
|
729
730
|
const visualizationUrl = (0, visualization_1.getVisualizationUrl)(session.sessionId);
|
|
731
|
+
// PRD #380: Include authenticated user identity in output
|
|
732
|
+
const identity = (0, request_context_1.getCurrentIdentity)();
|
|
730
733
|
// Build response with optional visualization URL in JSON
|
|
731
734
|
const responseData = {
|
|
732
735
|
status: 'success',
|
|
736
|
+
...(identity ? { identity } : {}),
|
|
733
737
|
system: systemStatus,
|
|
734
738
|
summary,
|
|
735
739
|
timestamp,
|