mcp-adr-analysis-server 2.7.23 → 2.7.25
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/.tsbuildinfo +1 -1
- package/dist/src/tools/bootstrap-validation-loop-tool.d.ts +0 -178
- package/dist/src/tools/bootstrap-validation-loop-tool.d.ts.map +1 -1
- package/dist/src/tools/bootstrap-validation-loop-tool.js +0 -1580
- package/dist/src/tools/bootstrap-validation-loop-tool.js.map +1 -1
- package/dist/src/tools/deployment-guidance-tool.d.ts +19 -1
- package/dist/src/tools/deployment-guidance-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-guidance-tool.js +9 -4
- package/dist/src/tools/deployment-guidance-tool.js.map +1 -1
- package/package.json +1 -2
- package/dist/src/utils/dag-executor.d.ts +0 -106
- package/dist/src/utils/dag-executor.d.ts.map +0 -1
- package/dist/src/utils/dag-executor.js +0 -453
- package/dist/src/utils/dag-executor.js.map +0 -1
- package/dist/src/utils/deployment-task-integration.d.ts +0 -260
- package/dist/src/utils/deployment-task-integration.d.ts.map +0 -1
- package/dist/src/utils/deployment-task-integration.js +0 -393
- package/dist/src/utils/deployment-task-integration.js.map +0 -1
- package/dist/src/utils/dynamic-deployment-intelligence.d.ts +0 -117
- package/dist/src/utils/dynamic-deployment-intelligence.d.ts.map +0 -1
- package/dist/src/utils/dynamic-deployment-intelligence.js +0 -445
- package/dist/src/utils/dynamic-deployment-intelligence.js.map +0 -1
- package/dist/src/utils/pattern-contribution-helper.d.ts +0 -60
- package/dist/src/utils/pattern-contribution-helper.d.ts.map +0 -1
- package/dist/src/utils/pattern-contribution-helper.js +0 -308
- package/dist/src/utils/pattern-contribution-helper.js.map +0 -1
- package/dist/src/utils/pattern-loader.d.ts +0 -183
- package/dist/src/utils/pattern-loader.d.ts.map +0 -1
- package/dist/src/utils/pattern-loader.js +0 -198
- package/dist/src/utils/pattern-loader.js.map +0 -1
- package/dist/src/utils/pattern-to-dag-converter.d.ts +0 -62
- package/dist/src/utils/pattern-to-dag-converter.d.ts.map +0 -1
- package/dist/src/utils/pattern-to-dag-converter.js +0 -265
- package/dist/src/utils/pattern-to-dag-converter.js.map +0 -1
- package/dist/src/utils/resource-extractor.d.ts +0 -57
- package/dist/src/utils/resource-extractor.d.ts.map +0 -1
- package/dist/src/utils/resource-extractor.js +0 -323
- package/dist/src/utils/resource-extractor.js.map +0 -1
- package/dist/src/utils/system-card-manager.d.ts +0 -194
- package/dist/src/utils/system-card-manager.d.ts.map +0 -1
- package/dist/src/utils/system-card-manager.js +0 -336
- package/dist/src/utils/system-card-manager.js.map +0 -1
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
import { promises as fs } from 'fs';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import * as yaml from 'js-yaml';
|
|
4
|
-
import { EnhancedLogger } from './enhanced-logging.js';
|
|
5
|
-
/**
|
|
6
|
-
* Manages SystemCard creation, updates, and persistence
|
|
7
|
-
*/
|
|
8
|
-
export class SystemCardManager {
|
|
9
|
-
systemCardPath;
|
|
10
|
-
logger;
|
|
11
|
-
currentCard = null;
|
|
12
|
-
constructor(projectPath) {
|
|
13
|
-
this.systemCardPath = path.join(projectPath, 'systemcard.yaml');
|
|
14
|
-
this.logger = new EnhancedLogger();
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Initialize a new SystemCard
|
|
18
|
-
*/
|
|
19
|
-
async initialize(options) {
|
|
20
|
-
try {
|
|
21
|
-
this.currentCard = {
|
|
22
|
-
version: '1.0',
|
|
23
|
-
systemId: options.systemId,
|
|
24
|
-
created: options.created,
|
|
25
|
-
lastUpdated: options.created,
|
|
26
|
-
platform: options.platform,
|
|
27
|
-
bootstrapContext: options.bootstrapContext,
|
|
28
|
-
resources: {},
|
|
29
|
-
cleanup: {
|
|
30
|
-
strategy: 'label-based',
|
|
31
|
-
labelSelector: {
|
|
32
|
-
'managed-by': 'mcp-adr-server',
|
|
33
|
-
'bootstrap-id': options.bootstrapContext.bootstrapId,
|
|
34
|
-
},
|
|
35
|
-
phases: [],
|
|
36
|
-
},
|
|
37
|
-
...(options.metadata && { metadata: options.metadata }),
|
|
38
|
-
};
|
|
39
|
-
await this.save();
|
|
40
|
-
this.logger.info(`SystemCard initialized: ${this.systemCardPath}`, 'SystemCardManager');
|
|
41
|
-
}
|
|
42
|
-
catch (error) {
|
|
43
|
-
this.logger.error('Failed to initialize SystemCard', 'SystemCardManager', error);
|
|
44
|
-
throw error;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Load existing SystemCard from disk
|
|
49
|
-
*/
|
|
50
|
-
async load() {
|
|
51
|
-
try {
|
|
52
|
-
const content = await fs.readFile(this.systemCardPath, 'utf-8');
|
|
53
|
-
this.currentCard = yaml.load(content);
|
|
54
|
-
this.logger.info('SystemCard loaded successfully', 'SystemCardManager');
|
|
55
|
-
return this.currentCard;
|
|
56
|
-
}
|
|
57
|
-
catch (error) {
|
|
58
|
-
if (error.code === 'ENOENT') {
|
|
59
|
-
this.logger.warn('SystemCard not found', 'SystemCardManager');
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
this.logger.error('Failed to load SystemCard', 'SystemCardManager', error);
|
|
63
|
-
throw error;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Save current SystemCard to disk
|
|
68
|
-
*/
|
|
69
|
-
async save() {
|
|
70
|
-
if (!this.currentCard) {
|
|
71
|
-
throw new Error('No SystemCard initialized. Call initialize() first.');
|
|
72
|
-
}
|
|
73
|
-
try {
|
|
74
|
-
this.currentCard.lastUpdated = new Date().toISOString();
|
|
75
|
-
const yamlContent = yaml.dump(this.currentCard, {
|
|
76
|
-
indent: 2,
|
|
77
|
-
lineWidth: -1,
|
|
78
|
-
noRefs: true,
|
|
79
|
-
});
|
|
80
|
-
await fs.writeFile(this.systemCardPath, yamlContent, 'utf-8');
|
|
81
|
-
this.logger.info('SystemCard saved successfully', 'SystemCardManager');
|
|
82
|
-
}
|
|
83
|
-
catch (error) {
|
|
84
|
-
this.logger.error('Failed to save SystemCard', 'SystemCardManager', error);
|
|
85
|
-
throw error;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Add resources to the SystemCard
|
|
90
|
-
*/
|
|
91
|
-
async addResources(resources, context) {
|
|
92
|
-
if (!this.currentCard) {
|
|
93
|
-
throw new Error('No SystemCard loaded. Call load() or initialize() first.');
|
|
94
|
-
}
|
|
95
|
-
try {
|
|
96
|
-
for (const resource of resources) {
|
|
97
|
-
// Add phase/task context if provided
|
|
98
|
-
if (context?.phase) {
|
|
99
|
-
resource.createdByPhase = context.phase;
|
|
100
|
-
}
|
|
101
|
-
if (context?.taskId && !resource.createdByTask) {
|
|
102
|
-
resource.createdByTask = context.taskId;
|
|
103
|
-
}
|
|
104
|
-
// Categorize by type
|
|
105
|
-
const category = this.getResourceCategory(resource.type);
|
|
106
|
-
if (!this.currentCard.resources[category]) {
|
|
107
|
-
this.currentCard.resources[category] = [];
|
|
108
|
-
}
|
|
109
|
-
// Check for duplicates
|
|
110
|
-
const exists = this.currentCard.resources[category].some(r => r.name === resource.name && r.namespace === resource.namespace);
|
|
111
|
-
if (!exists) {
|
|
112
|
-
this.currentCard.resources[category].push(resource);
|
|
113
|
-
this.logger.info(`Added resource: ${resource.type}/${resource.name}`, 'SystemCardManager');
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
await this.save();
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
this.logger.error('Failed to add resources', 'SystemCardManager', error);
|
|
120
|
-
throw error;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Remove a resource from the SystemCard
|
|
125
|
-
*/
|
|
126
|
-
async removeResource(type, name, namespace) {
|
|
127
|
-
if (!this.currentCard) {
|
|
128
|
-
throw new Error('No SystemCard loaded.');
|
|
129
|
-
}
|
|
130
|
-
try {
|
|
131
|
-
const category = this.getResourceCategory(type);
|
|
132
|
-
const resources = this.currentCard.resources[category];
|
|
133
|
-
if (resources) {
|
|
134
|
-
const index = resources.findIndex(r => r.name === name && (namespace ? r.namespace === namespace : true));
|
|
135
|
-
if (index !== -1) {
|
|
136
|
-
resources.splice(index, 1);
|
|
137
|
-
this.logger.info(`Removed resource: ${type}/${name}`, 'SystemCardManager');
|
|
138
|
-
await this.save();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
catch (error) {
|
|
143
|
-
this.logger.error('Failed to remove resource', 'SystemCardManager', error);
|
|
144
|
-
throw error;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Generate cleanup phases from current resources
|
|
149
|
-
* Resources are ordered in reverse of typical deployment order
|
|
150
|
-
*/
|
|
151
|
-
async generateCleanupPhases() {
|
|
152
|
-
if (!this.currentCard) {
|
|
153
|
-
throw new Error('No SystemCard loaded.');
|
|
154
|
-
}
|
|
155
|
-
try {
|
|
156
|
-
const phases = [];
|
|
157
|
-
let order = 1;
|
|
158
|
-
// Order of cleanup (reverse of typical deployment)
|
|
159
|
-
const cleanupOrder = [
|
|
160
|
-
'ingresses',
|
|
161
|
-
'services',
|
|
162
|
-
'deployments',
|
|
163
|
-
'statefulsets',
|
|
164
|
-
'pods',
|
|
165
|
-
'configmaps',
|
|
166
|
-
'secrets',
|
|
167
|
-
'persistentvolumeclaims',
|
|
168
|
-
'namespaces',
|
|
169
|
-
'custom',
|
|
170
|
-
];
|
|
171
|
-
for (const category of cleanupOrder) {
|
|
172
|
-
const resources = this.currentCard.resources[category];
|
|
173
|
-
if (resources && resources.length > 0) {
|
|
174
|
-
const phase = {
|
|
175
|
-
order: order++,
|
|
176
|
-
name: `Delete ${category}`,
|
|
177
|
-
description: `Remove all ${category} created during bootstrap`,
|
|
178
|
-
commands: resources.map(r => ({
|
|
179
|
-
description: `Delete ${r.type} ${r.name}`,
|
|
180
|
-
command: r.cleanupCommand,
|
|
181
|
-
expectedExitCode: 0,
|
|
182
|
-
continueOnError: false,
|
|
183
|
-
})),
|
|
184
|
-
canParallelize: true,
|
|
185
|
-
estimatedDuration: `${resources.length * 2}-${resources.length * 5} seconds`,
|
|
186
|
-
};
|
|
187
|
-
phases.push(phase);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
// Update SystemCard with generated cleanup phases
|
|
191
|
-
this.currentCard.cleanup.phases = phases;
|
|
192
|
-
await this.save();
|
|
193
|
-
this.logger.info(`Generated ${phases.length} cleanup phases`, 'SystemCardManager');
|
|
194
|
-
return phases;
|
|
195
|
-
}
|
|
196
|
-
catch (error) {
|
|
197
|
-
this.logger.error('Failed to generate cleanup phases', 'SystemCardManager', error);
|
|
198
|
-
throw error;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Create a state snapshot for rollback capability
|
|
203
|
-
*/
|
|
204
|
-
async createSnapshot(beforeAction) {
|
|
205
|
-
if (!this.currentCard) {
|
|
206
|
-
throw new Error('No SystemCard loaded.');
|
|
207
|
-
}
|
|
208
|
-
try {
|
|
209
|
-
const resourceCount = Object.values(this.currentCard.resources)
|
|
210
|
-
.filter(arr => Array.isArray(arr))
|
|
211
|
-
.reduce((sum, arr) => sum + arr.length, 0);
|
|
212
|
-
const checksum = this.calculateChecksum(this.currentCard);
|
|
213
|
-
const snapshot = {
|
|
214
|
-
timestamp: new Date().toISOString(),
|
|
215
|
-
beforeAction,
|
|
216
|
-
resourceCount,
|
|
217
|
-
checksum,
|
|
218
|
-
};
|
|
219
|
-
if (!this.currentCard.snapshots) {
|
|
220
|
-
this.currentCard.snapshots = [];
|
|
221
|
-
}
|
|
222
|
-
this.currentCard.snapshots.push(snapshot);
|
|
223
|
-
await this.save();
|
|
224
|
-
this.logger.info(`Snapshot created: ${beforeAction}`, 'SystemCardManager');
|
|
225
|
-
return snapshot;
|
|
226
|
-
}
|
|
227
|
-
catch (error) {
|
|
228
|
-
this.logger.error('Failed to create snapshot', 'SystemCardManager', error);
|
|
229
|
-
throw error;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Get all resources of a specific type
|
|
234
|
-
*/
|
|
235
|
-
getResourcesByType(type) {
|
|
236
|
-
if (!this.currentCard) {
|
|
237
|
-
return [];
|
|
238
|
-
}
|
|
239
|
-
const category = this.getResourceCategory(type);
|
|
240
|
-
return this.currentCard.resources[category] || [];
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Get all resources created by a specific task
|
|
244
|
-
*/
|
|
245
|
-
getResourcesByTask(taskId) {
|
|
246
|
-
if (!this.currentCard) {
|
|
247
|
-
return [];
|
|
248
|
-
}
|
|
249
|
-
const allResources = [];
|
|
250
|
-
for (const category of Object.keys(this.currentCard.resources)) {
|
|
251
|
-
const resources = this.currentCard.resources[category];
|
|
252
|
-
if (resources) {
|
|
253
|
-
allResources.push(...resources.filter(r => r.createdByTask === taskId));
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
return allResources;
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Get total count of all resources
|
|
260
|
-
*/
|
|
261
|
-
getResourceCount() {
|
|
262
|
-
if (!this.currentCard) {
|
|
263
|
-
return 0;
|
|
264
|
-
}
|
|
265
|
-
return Object.values(this.currentCard.resources)
|
|
266
|
-
.filter(arr => Array.isArray(arr))
|
|
267
|
-
.reduce((sum, arr) => sum + arr.length, 0);
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Get current SystemCard
|
|
271
|
-
*/
|
|
272
|
-
getCurrentCard() {
|
|
273
|
-
return this.currentCard;
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Check if SystemCard exists on disk
|
|
277
|
-
*/
|
|
278
|
-
async exists() {
|
|
279
|
-
try {
|
|
280
|
-
await fs.access(this.systemCardPath);
|
|
281
|
-
return true;
|
|
282
|
-
}
|
|
283
|
-
catch {
|
|
284
|
-
return false;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* Delete SystemCard file from disk
|
|
289
|
-
*/
|
|
290
|
-
async delete() {
|
|
291
|
-
try {
|
|
292
|
-
await fs.unlink(this.systemCardPath);
|
|
293
|
-
this.currentCard = null;
|
|
294
|
-
this.logger.info('SystemCard deleted', 'SystemCardManager');
|
|
295
|
-
}
|
|
296
|
-
catch (error) {
|
|
297
|
-
if (error.code !== 'ENOENT') {
|
|
298
|
-
this.logger.error('Failed to delete SystemCard', 'SystemCardManager', error);
|
|
299
|
-
throw error;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* Map resource type to storage category
|
|
305
|
-
*/
|
|
306
|
-
getResourceCategory(type) {
|
|
307
|
-
const typeMap = {
|
|
308
|
-
namespace: 'namespaces',
|
|
309
|
-
deployment: 'deployments',
|
|
310
|
-
service: 'services',
|
|
311
|
-
configmap: 'configmaps',
|
|
312
|
-
secret: 'secrets',
|
|
313
|
-
ingress: 'ingresses',
|
|
314
|
-
statefulset: 'statefulsets',
|
|
315
|
-
pod: 'pods',
|
|
316
|
-
persistentvolumeclaim: 'persistentvolumeclaims',
|
|
317
|
-
custom: 'custom',
|
|
318
|
-
};
|
|
319
|
-
return typeMap[type] || 'custom';
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Calculate checksum for state verification
|
|
323
|
-
*/
|
|
324
|
-
calculateChecksum(card) {
|
|
325
|
-
const contentString = JSON.stringify(card.resources);
|
|
326
|
-
// Simple hash function (in production, use crypto.createHash)
|
|
327
|
-
let hash = 0;
|
|
328
|
-
for (let i = 0; i < contentString.length; i++) {
|
|
329
|
-
const char = contentString.charCodeAt(i);
|
|
330
|
-
hash = (hash << 5) - hash + char;
|
|
331
|
-
hash = hash & hash; // Convert to 32-bit integer
|
|
332
|
-
}
|
|
333
|
-
return hash.toString(16);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
//# sourceMappingURL=system-card-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"system-card-manager.js","sourceRoot":"","sources":["../../../src/utils/system-card-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAgJvD;;GAEG;AACH,MAAM,OAAO,iBAAiB;IACpB,cAAc,CAAS;IACvB,MAAM,CAAiB;IACvB,WAAW,GAAsB,IAAI,CAAC;IAE9C,YAAY,WAAmB;QAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;QAChE,IAAI,CAAC,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,OAA8B;QAC7C,IAAI,CAAC;YACH,IAAI,CAAC,WAAW,GAAG;gBACjB,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,WAAW,EAAE,OAAO,CAAC,OAAO;gBAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;gBAC1C,SAAS,EAAE,EAAE;gBACb,OAAO,EAAE;oBACP,QAAQ,EAAE,aAAa;oBACvB,aAAa,EAAE;wBACb,YAAY,EAAE,gBAAgB;wBAC9B,cAAc,EAAE,OAAO,CAAC,gBAAgB,CAAC,WAAW;qBACrD;oBACD,MAAM,EAAE,EAAE;iBACX;gBACD,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,QAAQ,EAAE,OAAO,C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