@draftt-io/draftt-mcp 1.1.0 → 1.1.2
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/index.js +5 -23
- package/dist/index.js.map +1 -1
- package/dist/models/component.d.ts +4 -4
- package/dist/models/draftt.d.ts +1 -1
- package/dist/models/policy.d.ts +1 -1
- package/dist/schemas/componentSchema.d.ts +12 -12
- package/dist/schemas/componentSchema.js +4 -4
- package/dist/schemas/drafttSchema.d.ts +3 -3
- package/dist/schemas/drafttSchema.js +1 -1
- package/dist/schemas/policySchema.d.ts +3 -3
- package/dist/schemas/policySchema.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ async function main() {
|
|
|
39
39
|
version: "1.0.0",
|
|
40
40
|
});
|
|
41
41
|
// Register tools
|
|
42
|
-
server.tool("draftt_component_search", "Search and filter components in Draftt, component is a cloud asset with version, technology, type, etc.", componentSchema_1.componentSearchSchema.shape, async (args) => {
|
|
42
|
+
server.tool("draftt_component_search", "Search and filter components in Draftt, component is a cloud asset with version, technology, type, etc. For example: EKS cluster, AWS Lambda, Azure Function, etc.", componentSchema_1.componentSearchSchema.shape, async (args) => {
|
|
43
43
|
try {
|
|
44
44
|
const validatedArgs = componentSchema_1.componentSearchSchema.parse(args);
|
|
45
45
|
const result = await componentHandler.search(validatedArgs);
|
|
@@ -57,7 +57,7 @@ async function main() {
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
server.tool("draftt_component_get", "Get a detailed information about a component in Draftt where you can get all the data about a component", componentSchema_1.componentGetSchema.shape, async (args) => {
|
|
60
|
+
server.tool("draftt_component_get", "Get a detailed information about a component in Draftt where you can get all the data about a component like: name, version, technology, type, etc.", componentSchema_1.componentGetSchema.shape, async (args) => {
|
|
61
61
|
try {
|
|
62
62
|
const validatedArgs = componentSchema_1.componentGetSchema.parse(args);
|
|
63
63
|
const result = await componentHandler.get(validatedArgs);
|
|
@@ -111,7 +111,7 @@ async function main() {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
server.tool("draftt_policy_component_get", "Get a
|
|
114
|
+
server.tool("draftt_policy_component_get", "Get a analyzed information about a component meeting a draftt policy, for example: when an EKS cluster will reach end of life, what is the next version to upgrade to, etc.", componentSchema_1.policyComponentGetSchema.shape, async (args) => {
|
|
115
115
|
try {
|
|
116
116
|
const validatedArgs = componentSchema_1.policyComponentGetSchema.parse(args);
|
|
117
117
|
const result = await policyHandler.componentGet(validatedArgs);
|
|
@@ -129,24 +129,6 @@ async function main() {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
-
server.tool("draftt_get", "draftt representing an upgrade guide. currently for a k8s components only, draftt is a step by step guide for upgrading a k8s component from one version to another, it includes couple of sections (nodes,images, API, etc.), we generating it for a components that integrated to our platform", drafttSchema_1.drafttGetSchema.shape, async (args) => {
|
|
133
|
-
try {
|
|
134
|
-
const validatedArgs = drafttSchema_1.drafttGetSchema.parse(args);
|
|
135
|
-
const result = await drafttHandler.get(validatedArgs);
|
|
136
|
-
return {
|
|
137
|
-
content: result.content
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
catch (error) {
|
|
141
|
-
logger.error("Error in draftt_get:", error);
|
|
142
|
-
return {
|
|
143
|
-
content: [{
|
|
144
|
-
type: "text",
|
|
145
|
-
text: `Error: ${error instanceof Error ? error.message : 'Unknown error occurred'}`
|
|
146
|
-
}]
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
132
|
server.tool("draftt_policy_component_query", "Advanced query for policy components with rich filtering using operators like $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $exists. Supports tag filtering, pagination, field selection, and cost analysis. Policy components describe how components match specific policies (e.g., EOL status, compliance requirements).", componentSchema_1.policyComponentQuerySchema.shape, async (args) => {
|
|
151
133
|
try {
|
|
152
134
|
const validatedArgs = componentSchema_1.policyComponentQuerySchema.parse(args);
|
|
@@ -165,7 +147,7 @@ async function main() {
|
|
|
165
147
|
};
|
|
166
148
|
}
|
|
167
149
|
});
|
|
168
|
-
server.tool("
|
|
150
|
+
server.tool("draftt_upgrade_guide(draftt)_get", "Get a draftt which in this context represents an upgrade guide. currently for a k8s components only, draftt is a step by step guide for upgrading a k8s component from one version to another, it includes couple of sections (nodes,images, API, etc.), we generating it for a components that integrated to our platform", drafttSchema_1.drafttQuerySchema.shape, async (args) => {
|
|
169
151
|
try {
|
|
170
152
|
const validatedArgs = drafttSchema_1.drafttQuerySchema.parse(args);
|
|
171
153
|
const result = await drafttHandler.query(validatedArgs);
|
|
@@ -174,7 +156,7 @@ async function main() {
|
|
|
174
156
|
};
|
|
175
157
|
}
|
|
176
158
|
catch (error) {
|
|
177
|
-
logger.error("Error in
|
|
159
|
+
logger.error("Error in draftt_query:", error);
|
|
178
160
|
return {
|
|
179
161
|
content: [{
|
|
180
162
|
type: "text",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AACA,yBAAuB;AACvB,oEAAoE;AACpE,wEAAiF;AACjF,wDAAgC;AAEhC,qDAAkD;AAClD,kEAA+D;AAC/D,4DAAyD;AACzD,4DAAyD;AACzD,2CAAwD;AAExD,+DAA4I;AAC5I,yDAA6E;AAC7E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AACA,yBAAuB;AACvB,oEAAoE;AACpE,wEAAiF;AACjF,wDAAgC;AAEhC,qDAAkD;AAClD,kEAA+D;AAC/D,4DAAyD;AACzD,4DAAyD;AACzD,2CAAwD;AAExD,+DAA4I;AAC5I,yDAA6E;AAC7E,yDAA2D;AAK3D,KAAK,UAAU,IAAI;IACf,MAAM,IAAI,GAAG,IAAA,kBAAQ,EAAC,OAAO,CAAC,IAA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KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -37,14 +37,14 @@ export interface ComponentSearchArgs {
|
|
|
37
37
|
pageSize?: number;
|
|
38
38
|
}
|
|
39
39
|
export interface ComponentGetArgs {
|
|
40
|
-
componentId:
|
|
40
|
+
componentId: number;
|
|
41
41
|
}
|
|
42
42
|
export interface PolicyComponentGetArgs {
|
|
43
|
-
policyId:
|
|
44
|
-
componentId:
|
|
43
|
+
policyId: number;
|
|
44
|
+
componentId: number;
|
|
45
45
|
}
|
|
46
46
|
export interface PolicyComponentQueryArgs {
|
|
47
|
-
policyId:
|
|
47
|
+
policyId: number;
|
|
48
48
|
filter?: QueryFilter;
|
|
49
49
|
tagFilters?: TagFilterQuery;
|
|
50
50
|
selectTags?: boolean;
|
package/dist/models/draftt.d.ts
CHANGED
package/dist/models/policy.d.ts
CHANGED
|
@@ -221,21 +221,21 @@ export declare const componentSearchSchema: z.ZodObject<{
|
|
|
221
221
|
pageSize?: number | undefined;
|
|
222
222
|
}>;
|
|
223
223
|
export declare const componentGetSchema: z.ZodObject<{
|
|
224
|
-
componentId: z.
|
|
224
|
+
componentId: z.ZodNumber;
|
|
225
225
|
}, "strip", z.ZodTypeAny, {
|
|
226
|
-
componentId:
|
|
226
|
+
componentId: number;
|
|
227
227
|
}, {
|
|
228
|
-
componentId:
|
|
228
|
+
componentId: number;
|
|
229
229
|
}>;
|
|
230
230
|
export declare const policyComponentGetSchema: z.ZodObject<{
|
|
231
|
-
policyId: z.
|
|
232
|
-
componentId: z.
|
|
231
|
+
policyId: z.ZodNumber;
|
|
232
|
+
componentId: z.ZodNumber;
|
|
233
233
|
}, "strip", z.ZodTypeAny, {
|
|
234
|
-
policyId:
|
|
235
|
-
componentId:
|
|
234
|
+
policyId: number;
|
|
235
|
+
componentId: number;
|
|
236
236
|
}, {
|
|
237
|
-
policyId:
|
|
238
|
-
componentId:
|
|
237
|
+
policyId: number;
|
|
238
|
+
componentId: number;
|
|
239
239
|
}>;
|
|
240
240
|
declare const stringOperatorSchema: z.ZodObject<{
|
|
241
241
|
$eq: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -342,7 +342,7 @@ interface TagFilters {
|
|
|
342
342
|
[key: string]: z.infer<typeof stringOperatorSchema> | TagFilters[] | undefined;
|
|
343
343
|
}
|
|
344
344
|
export declare const policyComponentQuerySchema: z.ZodObject<{
|
|
345
|
-
policyId: z.
|
|
345
|
+
policyId: z.ZodNumber;
|
|
346
346
|
filter: z.ZodOptional<z.ZodType<PolicyComponentQueryFilter, z.ZodTypeDef, PolicyComponentQueryFilter>>;
|
|
347
347
|
tagFilters: z.ZodOptional<z.ZodType<TagFilters, z.ZodTypeDef, TagFilters>>;
|
|
348
348
|
selectTags: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -415,7 +415,7 @@ export declare const policyComponentQuerySchema: z.ZodObject<{
|
|
|
415
415
|
pageToken: z.ZodOptional<z.ZodString>;
|
|
416
416
|
pageSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
417
417
|
}, "strip", z.ZodTypeAny, {
|
|
418
|
-
policyId:
|
|
418
|
+
policyId: number;
|
|
419
419
|
filter?: PolicyComponentQueryFilter | undefined;
|
|
420
420
|
sort?: {
|
|
421
421
|
name?: "asc" | "desc" | undefined;
|
|
@@ -446,7 +446,7 @@ export declare const policyComponentQuerySchema: z.ZodObject<{
|
|
|
446
446
|
select?: ("name" | "policyId" | "componentId" | "status" | "technology" | "createdAt" | "updatedAt" | "id" | "urgency" | "effort" | "orgComplexity" | "priority" | "isCompliant" | "currentVersion" | "desiredVersion" | "recommendedVersion" | "extendedSupportAnnualCost" | "dueDate" | "deletedAt")[] | undefined;
|
|
447
447
|
pageToken?: string | undefined;
|
|
448
448
|
}, {
|
|
449
|
-
policyId:
|
|
449
|
+
policyId: number;
|
|
450
450
|
filter?: PolicyComponentQueryFilter | undefined;
|
|
451
451
|
sort?: {
|
|
452
452
|
name?: "asc" | "desc" | undefined;
|
|
@@ -48,11 +48,11 @@ exports.componentSearchSchema = zod_1.z.object({
|
|
|
48
48
|
pageSize: zod_1.z.number().int().min(1).max(100).default(10).optional(),
|
|
49
49
|
});
|
|
50
50
|
exports.componentGetSchema = zod_1.z.object({
|
|
51
|
-
componentId: zod_1.z.
|
|
51
|
+
componentId: zod_1.z.number(),
|
|
52
52
|
});
|
|
53
53
|
exports.policyComponentGetSchema = zod_1.z.object({
|
|
54
|
-
policyId: zod_1.z.
|
|
55
|
-
componentId: zod_1.z.
|
|
54
|
+
policyId: zod_1.z.number(),
|
|
55
|
+
componentId: zod_1.z.number(),
|
|
56
56
|
});
|
|
57
57
|
// Centralized operator schemas
|
|
58
58
|
const stringOperatorSchema = zod_1.z.object({
|
|
@@ -137,7 +137,7 @@ const policyComponentQuerySortSchema = zod_1.z.object({
|
|
|
137
137
|
}).partial();
|
|
138
138
|
// Policy component query schema that matches the OpenAPI spec
|
|
139
139
|
exports.policyComponentQuerySchema = zod_1.z.object({
|
|
140
|
-
policyId: zod_1.z.
|
|
140
|
+
policyId: zod_1.z.number(),
|
|
141
141
|
filter: policyComponentQueryFilterSchema.optional(),
|
|
142
142
|
tagFilters: tagFiltersSchema.optional(),
|
|
143
143
|
selectTags: zod_1.z.boolean().optional(),
|
|
@@ -7,12 +7,12 @@ export declare const drafttGetSchema: z.ZodObject<{
|
|
|
7
7
|
random_string?: string | undefined;
|
|
8
8
|
}>;
|
|
9
9
|
export declare const drafttQuerySchema: z.ZodObject<{
|
|
10
|
-
componentId: z.
|
|
10
|
+
componentId: z.ZodNumber;
|
|
11
11
|
sections: z.ZodOptional<z.ZodArray<z.ZodEnum<["eksAddOns", "deployments", "controlPlane", "nodes", "k8sApi"]>, "many">>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
componentId:
|
|
13
|
+
componentId: number;
|
|
14
14
|
sections?: ("eksAddOns" | "deployments" | "controlPlane" | "nodes" | "k8sApi")[] | undefined;
|
|
15
15
|
}, {
|
|
16
|
-
componentId:
|
|
16
|
+
componentId: number;
|
|
17
17
|
sections?: ("eksAddOns" | "deployments" | "controlPlane" | "nodes" | "k8sApi")[] | undefined;
|
|
18
18
|
}>;
|
|
@@ -7,7 +7,7 @@ exports.drafttGetSchema = zod_1.z.object({
|
|
|
7
7
|
});
|
|
8
8
|
// New draftt query schema for component-specific draftt sections
|
|
9
9
|
exports.drafttQuerySchema = zod_1.z.object({
|
|
10
|
-
componentId: zod_1.z.
|
|
10
|
+
componentId: zod_1.z.number(),
|
|
11
11
|
sections: zod_1.z.array(zod_1.z.enum([
|
|
12
12
|
"eksAddOns",
|
|
13
13
|
"deployments",
|
|
@@ -150,11 +150,11 @@ export declare const policySearchSchema: z.ZodObject<{
|
|
|
150
150
|
pageSize?: number | undefined;
|
|
151
151
|
}>;
|
|
152
152
|
export declare const policyGetSchema: z.ZodObject<{
|
|
153
|
-
policyId: z.
|
|
153
|
+
policyId: z.ZodNumber;
|
|
154
154
|
}, "strip", z.ZodTypeAny, {
|
|
155
|
-
policyId:
|
|
155
|
+
policyId: number;
|
|
156
156
|
}, {
|
|
157
|
-
policyId:
|
|
157
|
+
policyId: number;
|
|
158
158
|
}>;
|
|
159
159
|
declare const stringOperatorSchema: z.ZodObject<{
|
|
160
160
|
$eq: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -34,7 +34,7 @@ exports.policySearchSchema = zod_1.z.object({
|
|
|
34
34
|
pageSize: zod_1.z.number().int().min(1).max(100).default(10).optional(),
|
|
35
35
|
});
|
|
36
36
|
exports.policyGetSchema = zod_1.z.object({
|
|
37
|
-
policyId: zod_1.z.
|
|
37
|
+
policyId: zod_1.z.number(),
|
|
38
38
|
});
|
|
39
39
|
// Add operator schemas for policy queries
|
|
40
40
|
const stringOperatorSchema = zod_1.z.object({
|