mcp-adr-analysis-server 2.7.24 → 2.7.26
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/README.md +1 -32
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -57
- package/dist/src/index.js.map +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/tool-catalog.d.ts.map +1 -1
- package/dist/src/tools/tool-catalog.js +2 -22
- package/dist/src/tools/tool-catalog.js.map +1 -1
- package/dist/src/utils/ai-executor.d.ts +1 -1
- package/dist/src/utils/ai-executor.js +1 -1
- package/dist/src/utils/config.d.ts +0 -3
- package/dist/src/utils/config.d.ts.map +1 -1
- package/dist/src/utils/config.js +0 -13
- package/dist/src/utils/config.js.map +1 -1
- package/dist/src/utils/research-orchestrator.d.ts +0 -28
- package/dist/src/utils/research-orchestrator.d.ts.map +1 -1
- package/dist/src/utils/research-orchestrator.js +15 -252
- package/dist/src/utils/research-orchestrator.js.map +1 -1
- package/dist/src/utils/server-context-generator.d.ts.map +1 -1
- package/dist/src/utils/server-context-generator.js +0 -1
- package/dist/src/utils/server-context-generator.js.map +1 -1
- package/package.json +1 -3
- package/dist/src/tools/llm-web-search-tool.d.ts +0 -59
- package/dist/src/tools/llm-web-search-tool.d.ts.map +0 -1
- package/dist/src/tools/llm-web-search-tool.js +0 -165
- package/dist/src/tools/llm-web-search-tool.js.map +0 -1
- 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,323 +0,0 @@
|
|
|
1
|
-
import { EnhancedLogger } from './enhanced-logging.js';
|
|
2
|
-
/**
|
|
3
|
-
* Extracts resource information from command outputs
|
|
4
|
-
* Supports kubectl, oc, docker, and other infrastructure commands
|
|
5
|
-
*/
|
|
6
|
-
export class ResourceExtractor {
|
|
7
|
-
logger;
|
|
8
|
-
patterns;
|
|
9
|
-
constructor() {
|
|
10
|
-
this.logger = new EnhancedLogger();
|
|
11
|
-
this.patterns = this.initializePatterns();
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Extract resources from a command and its output
|
|
15
|
-
*/
|
|
16
|
-
extract(command, stdout, stderr, taskId) {
|
|
17
|
-
const resources = [];
|
|
18
|
-
const warnings = [];
|
|
19
|
-
let confidence = 0;
|
|
20
|
-
try {
|
|
21
|
-
// Find matching patterns for this command
|
|
22
|
-
const matchingPatterns = this.patterns.filter(p => p.commandPattern.test(command));
|
|
23
|
-
if (matchingPatterns.length === 0) {
|
|
24
|
-
this.logger.debug(`No extraction patterns matched for command: ${command.slice(0, 50)}...`, 'ResourceExtractor');
|
|
25
|
-
return { resources, confidence: 0, warnings };
|
|
26
|
-
}
|
|
27
|
-
// Try each matching pattern
|
|
28
|
-
for (const pattern of matchingPatterns) {
|
|
29
|
-
const outputMatches = stdout.match(pattern.outputPattern);
|
|
30
|
-
if (outputMatches) {
|
|
31
|
-
try {
|
|
32
|
-
const resourceData = pattern.extractionFunction(outputMatches, command);
|
|
33
|
-
// Build complete resource record
|
|
34
|
-
const resource = {
|
|
35
|
-
type: pattern.resourceType,
|
|
36
|
-
name: resourceData.name || 'unknown',
|
|
37
|
-
...(resourceData.namespace && { namespace: resourceData.namespace }),
|
|
38
|
-
...(resourceData.uid && { uid: resourceData.uid }),
|
|
39
|
-
labels: resourceData.labels || {
|
|
40
|
-
'managed-by': 'mcp-adr-server',
|
|
41
|
-
'extracted-from': taskId,
|
|
42
|
-
},
|
|
43
|
-
...(resourceData.annotations && { annotations: resourceData.annotations }),
|
|
44
|
-
...(resourceData.metadata && { metadata: resourceData.metadata }),
|
|
45
|
-
created: new Date().toISOString(),
|
|
46
|
-
createdByTask: taskId,
|
|
47
|
-
cleanupCommand: this.generateCleanupCommand(pattern.resourceType, resourceData, command),
|
|
48
|
-
};
|
|
49
|
-
resources.push(resource);
|
|
50
|
-
confidence = Math.max(confidence, 0.8); // High confidence if pattern matched
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
warnings.push(`Failed to extract resource from pattern: ${error.message}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
// Check stderr for warnings
|
|
58
|
-
if (stderr && stderr.trim().length > 0) {
|
|
59
|
-
warnings.push(`Command produced stderr: ${stderr.slice(0, 200)}`);
|
|
60
|
-
confidence = Math.max(confidence * 0.8, 0.5); // Reduce confidence if stderr present
|
|
61
|
-
}
|
|
62
|
-
this.logger.info(`Extracted ${resources.length} resources from command output`, 'ResourceExtractor');
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
this.logger.error('Resource extraction failed', 'ResourceExtractor', error);
|
|
66
|
-
warnings.push(`Extraction error: ${error.message}`);
|
|
67
|
-
}
|
|
68
|
-
return { resources, confidence, warnings };
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Initialize extraction patterns for different commands
|
|
72
|
-
*/
|
|
73
|
-
initializePatterns() {
|
|
74
|
-
return [
|
|
75
|
-
// kubectl create namespace
|
|
76
|
-
{
|
|
77
|
-
resourceType: 'namespace',
|
|
78
|
-
commandPattern: /kubectl\s+create\s+(namespace|ns)/,
|
|
79
|
-
outputPattern: /namespace[/\s]+"?([a-z0-9-]+)"?\s+created/i,
|
|
80
|
-
extractionFunction: (matches, command) => {
|
|
81
|
-
const name = matches[1];
|
|
82
|
-
return {
|
|
83
|
-
name,
|
|
84
|
-
metadata: { command },
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
// oc new-project
|
|
89
|
-
{
|
|
90
|
-
resourceType: 'namespace',
|
|
91
|
-
commandPattern: /oc\s+new-project/,
|
|
92
|
-
outputPattern: /Now using project "([^"]+)"/,
|
|
93
|
-
extractionFunction: (matches, command) => {
|
|
94
|
-
const name = matches[1];
|
|
95
|
-
return {
|
|
96
|
-
name,
|
|
97
|
-
metadata: { command, platform: 'openshift' },
|
|
98
|
-
};
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
// kubectl create deployment
|
|
102
|
-
{
|
|
103
|
-
resourceType: 'deployment',
|
|
104
|
-
commandPattern: /kubectl\s+create\s+deployment/,
|
|
105
|
-
outputPattern: /deployment\.apps[/\s]+"?([a-z0-9-]+)"?\s+created/i,
|
|
106
|
-
extractionFunction: (matches, command) => {
|
|
107
|
-
const name = matches[1];
|
|
108
|
-
const namespaceMatch = command.match(/-n\s+([a-z0-9-]+)|--namespace[=\s]+([a-z0-9-]+)/);
|
|
109
|
-
const namespace = namespaceMatch ? (namespaceMatch[1] || namespaceMatch[2]) : 'default';
|
|
110
|
-
return {
|
|
111
|
-
name,
|
|
112
|
-
namespace,
|
|
113
|
-
metadata: { command },
|
|
114
|
-
};
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
// kubectl apply -f (generic)
|
|
118
|
-
{
|
|
119
|
-
resourceType: 'custom',
|
|
120
|
-
commandPattern: /kubectl\s+apply\s+-f/,
|
|
121
|
-
outputPattern: /([a-z]+)\.([a-z0-9./]+)[/\s]+"?([a-z0-9-]+)"?\s+(created|configured|unchanged)/gi,
|
|
122
|
-
extractionFunction: (matches, command) => {
|
|
123
|
-
const resourceKind = matches[1];
|
|
124
|
-
const resourceName = matches[3];
|
|
125
|
-
const namespaceMatch = command.match(/-n\s+([a-z0-9-]+)|--namespace[=\s]+([a-z0-9-]+)/);
|
|
126
|
-
const namespace = namespaceMatch ? (namespaceMatch[1] || namespaceMatch[2]) : 'default';
|
|
127
|
-
// Map kubectl resource kinds to our types
|
|
128
|
-
const typeMap = {
|
|
129
|
-
namespace: 'namespace',
|
|
130
|
-
deployment: 'deployment',
|
|
131
|
-
service: 'service',
|
|
132
|
-
configmap: 'configmap',
|
|
133
|
-
secret: 'secret',
|
|
134
|
-
ingress: 'ingress',
|
|
135
|
-
statefulset: 'statefulset',
|
|
136
|
-
pod: 'pod',
|
|
137
|
-
persistentvolumeclaim: 'persistentvolumeclaim',
|
|
138
|
-
};
|
|
139
|
-
return {
|
|
140
|
-
name: resourceName,
|
|
141
|
-
namespace,
|
|
142
|
-
type: typeMap[resourceKind.toLowerCase()] || 'custom',
|
|
143
|
-
metadata: { command, resourceKind },
|
|
144
|
-
};
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
// kubectl create service
|
|
148
|
-
{
|
|
149
|
-
resourceType: 'service',
|
|
150
|
-
commandPattern: /kubectl\s+create\s+service/,
|
|
151
|
-
outputPattern: /service[/\s]+"?([a-z0-9-]+)"?\s+created/i,
|
|
152
|
-
extractionFunction: (matches, command) => {
|
|
153
|
-
const name = matches[1];
|
|
154
|
-
const namespaceMatch = command.match(/-n\s+([a-z0-9-]+)|--namespace[=\s]+([a-z0-9-]+)/);
|
|
155
|
-
const namespace = namespaceMatch ? (namespaceMatch[1] || namespaceMatch[2]) : 'default';
|
|
156
|
-
return {
|
|
157
|
-
name,
|
|
158
|
-
namespace,
|
|
159
|
-
metadata: { command },
|
|
160
|
-
};
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
// kubectl create configmap
|
|
164
|
-
{
|
|
165
|
-
resourceType: 'configmap',
|
|
166
|
-
commandPattern: /kubectl\s+create\s+configmap/,
|
|
167
|
-
outputPattern: /configmap[/\s]+"?([a-z0-9-]+)"?\s+created/i,
|
|
168
|
-
extractionFunction: (matches, command) => {
|
|
169
|
-
const name = matches[1];
|
|
170
|
-
const namespaceMatch = command.match(/-n\s+([a-z0-9-]+)|--namespace[=\s]+([a-z0-9-]+)/);
|
|
171
|
-
const namespace = namespaceMatch ? (namespaceMatch[1] || namespaceMatch[2]) : 'default';
|
|
172
|
-
return {
|
|
173
|
-
name,
|
|
174
|
-
namespace,
|
|
175
|
-
metadata: { command },
|
|
176
|
-
};
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
// kubectl create secret
|
|
180
|
-
{
|
|
181
|
-
resourceType: 'secret',
|
|
182
|
-
commandPattern: /kubectl\s+create\s+secret/,
|
|
183
|
-
outputPattern: /secret[/\s]+"?([a-z0-9-]+)"?\s+created/i,
|
|
184
|
-
extractionFunction: (matches, command) => {
|
|
185
|
-
const name = matches[1];
|
|
186
|
-
const namespaceMatch = command.match(/-n\s+([a-z0-9-]+)|--namespace[=\s]+([a-z0-9-]+)/);
|
|
187
|
-
const namespace = namespaceMatch ? (namespaceMatch[1] || namespaceMatch[2]) : 'default';
|
|
188
|
-
return {
|
|
189
|
-
name,
|
|
190
|
-
namespace,
|
|
191
|
-
metadata: { command },
|
|
192
|
-
};
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
// helm install
|
|
196
|
-
{
|
|
197
|
-
resourceType: 'custom',
|
|
198
|
-
commandPattern: /helm\s+install/,
|
|
199
|
-
outputPattern: /NAME:\s+([a-z0-9-]+)/i,
|
|
200
|
-
extractionFunction: (matches, command) => {
|
|
201
|
-
const releaseName = matches[1];
|
|
202
|
-
const namespaceMatch = command.match(/-n\s+([a-z0-9-]+)|--namespace[=\s]+([a-z0-9-]+)/);
|
|
203
|
-
const namespace = namespaceMatch ? (namespaceMatch[1] || namespaceMatch[2]) : 'default';
|
|
204
|
-
return {
|
|
205
|
-
name: releaseName,
|
|
206
|
-
namespace,
|
|
207
|
-
metadata: {
|
|
208
|
-
command,
|
|
209
|
-
type: 'helm-release',
|
|
210
|
-
},
|
|
211
|
-
};
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
// docker run
|
|
215
|
-
{
|
|
216
|
-
resourceType: 'pod',
|
|
217
|
-
commandPattern: /docker\s+run/,
|
|
218
|
-
outputPattern: /([a-f0-9]{12,64})/,
|
|
219
|
-
extractionFunction: (matches, command) => {
|
|
220
|
-
const containerId = matches[1];
|
|
221
|
-
const nameMatch = command.match(/--name[=\s]+([a-z0-9-]+)/);
|
|
222
|
-
const name = nameMatch ? nameMatch[1] : containerId.slice(0, 12);
|
|
223
|
-
return {
|
|
224
|
-
name,
|
|
225
|
-
uid: containerId,
|
|
226
|
-
metadata: {
|
|
227
|
-
command,
|
|
228
|
-
platform: 'docker',
|
|
229
|
-
containerId,
|
|
230
|
-
},
|
|
231
|
-
};
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
// docker-compose up
|
|
235
|
-
{
|
|
236
|
-
resourceType: 'custom',
|
|
237
|
-
commandPattern: /docker-compose\s+up/,
|
|
238
|
-
outputPattern: /Creating\s+([a-z0-9_-]+)\s+\.\.\.\s+done/gi,
|
|
239
|
-
extractionFunction: (matches, command) => {
|
|
240
|
-
const serviceName = matches[1];
|
|
241
|
-
return {
|
|
242
|
-
name: serviceName,
|
|
243
|
-
metadata: {
|
|
244
|
-
command,
|
|
245
|
-
platform: 'docker-compose',
|
|
246
|
-
type: 'compose-service',
|
|
247
|
-
},
|
|
248
|
-
};
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
];
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Generate cleanup command for a resource
|
|
255
|
-
*/
|
|
256
|
-
generateCleanupCommand(type, resourceData, originalCommand) {
|
|
257
|
-
const name = resourceData.name || 'unknown';
|
|
258
|
-
const namespace = resourceData.namespace;
|
|
259
|
-
// Detect platform from command
|
|
260
|
-
const isOpenShift = originalCommand.includes('oc ');
|
|
261
|
-
const isDocker = originalCommand.includes('docker ');
|
|
262
|
-
const isDockerCompose = originalCommand.includes('docker-compose');
|
|
263
|
-
const isHelm = originalCommand.includes('helm');
|
|
264
|
-
if (isHelm && resourceData.metadata?.['type'] === 'helm-release') {
|
|
265
|
-
return namespace ? `helm uninstall ${name} -n ${namespace}` : `helm uninstall ${name}`;
|
|
266
|
-
}
|
|
267
|
-
if (isDockerCompose && resourceData.metadata?.['type'] === 'compose-service') {
|
|
268
|
-
return `docker-compose down`;
|
|
269
|
-
}
|
|
270
|
-
if (isDocker && resourceData.metadata?.['containerId']) {
|
|
271
|
-
return `docker rm -f ${resourceData.metadata['containerId']}`;
|
|
272
|
-
}
|
|
273
|
-
// Kubernetes/OpenShift cleanup
|
|
274
|
-
const cli = isOpenShift ? 'oc' : 'kubectl';
|
|
275
|
-
const resourceTypeMap = {
|
|
276
|
-
namespace: 'namespace',
|
|
277
|
-
deployment: 'deployment',
|
|
278
|
-
service: 'service',
|
|
279
|
-
configmap: 'configmap',
|
|
280
|
-
secret: 'secret',
|
|
281
|
-
ingress: 'ingress',
|
|
282
|
-
statefulset: 'statefulset',
|
|
283
|
-
pod: 'pod',
|
|
284
|
-
persistentvolumeclaim: 'pvc',
|
|
285
|
-
custom: resourceData.metadata?.['resourceKind'] || 'resource',
|
|
286
|
-
};
|
|
287
|
-
const resourceType = resourceTypeMap[type];
|
|
288
|
-
if (type === 'namespace') {
|
|
289
|
-
return `${cli} delete namespace ${name}`;
|
|
290
|
-
}
|
|
291
|
-
return namespace
|
|
292
|
-
? `${cli} delete ${resourceType} ${name} -n ${namespace}`
|
|
293
|
-
: `${cli} delete ${resourceType} ${name}`;
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* Extract multiple resources from batch command output
|
|
297
|
-
*/
|
|
298
|
-
extractBatch(commands) {
|
|
299
|
-
const allResources = [];
|
|
300
|
-
for (const cmd of commands) {
|
|
301
|
-
const result = this.extract(cmd.command, cmd.stdout, cmd.stderr, cmd.taskId);
|
|
302
|
-
allResources.push(...result.resources);
|
|
303
|
-
if (result.warnings.length > 0) {
|
|
304
|
-
this.logger.warn(`Resource extraction warnings: ${result.warnings.join(', ')}`, 'ResourceExtractor');
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
return allResources;
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Add a custom extraction pattern
|
|
311
|
-
*/
|
|
312
|
-
addPattern(pattern) {
|
|
313
|
-
this.patterns.push(pattern);
|
|
314
|
-
this.logger.info(`Added custom extraction pattern for ${pattern.resourceType}`, 'ResourceExtractor');
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Get all registered patterns
|
|
318
|
-
*/
|
|
319
|
-
getPatterns() {
|
|
320
|
-
return [...this.patterns];
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
//# sourceMappingURL=resource-extractor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resource-extractor.js","sourceRoot":"","sources":["../../../src/utils/resource-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAsBvD;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IACpB,MAAM,CAAiB;IACvB,QAAQ,CAAsB;IAEtC;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAAe,EAAE,MAAc,EAAE,MAAc,EAAE,MAAc;QACrE,MAAM,SAAS,GAAqB,EAAE,CAAC;QACvC,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,IAAI,UAAU,GAAG,CAAC,CAAC;QAEnB,IAAI,CAAC;YACH,0CAA0C;YAC1C,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YAEnF,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAClC,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,+CAA+C,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,EACxE,mBAAmB,CACpB,CAAC;gBACF,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;YAChD,CAAC;YAED,4BAA4B;YAC5B,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE,CAAC;gBACvC,MAAM,aAAa,GAAG,MAAM,CAAC,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,EAAE,EAC7D,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,WAAW;QACT,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Platform information detected during bootstrap
|
|
3
|
-
*/
|
|
4
|
-
export interface PlatformInfo {
|
|
5
|
-
type: 'kubernetes' | 'openshift' | 'docker-compose' | 'systemd' | 'unknown';
|
|
6
|
-
version?: string;
|
|
7
|
-
detectionConfidence: number;
|
|
8
|
-
namespace?: string;
|
|
9
|
-
clusterInfo?: Record<string, any>;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Bootstrap context references
|
|
13
|
-
*/
|
|
14
|
-
export interface BootstrapContext {
|
|
15
|
-
adrPath?: string;
|
|
16
|
-
contextPath?: string;
|
|
17
|
-
validatedPatternId?: string;
|
|
18
|
-
bootstrapId: string;
|
|
19
|
-
initiatedBy?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Individual resource record
|
|
23
|
-
*/
|
|
24
|
-
export interface ResourceRecord {
|
|
25
|
-
type: 'namespace' | 'deployment' | 'service' | 'configmap' | 'secret' | 'ingress' | 'statefulset' | 'pod' | 'persistentvolumeclaim' | 'custom';
|
|
26
|
-
name: string;
|
|
27
|
-
namespace?: string;
|
|
28
|
-
uid?: string;
|
|
29
|
-
labels?: Record<string, string>;
|
|
30
|
-
annotations?: Record<string, string>;
|
|
31
|
-
metadata?: Record<string, any>;
|
|
32
|
-
created: string;
|
|
33
|
-
createdByTask: string;
|
|
34
|
-
createdByPhase?: string;
|
|
35
|
-
cleanupCommand: string;
|
|
36
|
-
cleanupOrder?: number;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Cleanup strategy configuration
|
|
40
|
-
*/
|
|
41
|
-
export interface CleanupStrategy {
|
|
42
|
-
strategy: 'label-based' | 'explicit' | 'namespace-cascade';
|
|
43
|
-
labelSelector?: Record<string, string>;
|
|
44
|
-
dryRun?: boolean;
|
|
45
|
-
phases: CleanupPhase[];
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Individual cleanup phase
|
|
49
|
-
*/
|
|
50
|
-
export interface CleanupPhase {
|
|
51
|
-
order: number;
|
|
52
|
-
name: string;
|
|
53
|
-
description?: string;
|
|
54
|
-
commands: CleanupCommand[];
|
|
55
|
-
canParallelize?: boolean;
|
|
56
|
-
estimatedDuration?: string;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Individual cleanup command
|
|
60
|
-
*/
|
|
61
|
-
export interface CleanupCommand {
|
|
62
|
-
description: string;
|
|
63
|
-
command: string;
|
|
64
|
-
expectedExitCode?: number;
|
|
65
|
-
continueOnError?: boolean;
|
|
66
|
-
verificationCommand?: string;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* State snapshot for rollback capability
|
|
70
|
-
*/
|
|
71
|
-
export interface StateSnapshot {
|
|
72
|
-
timestamp: string;
|
|
73
|
-
beforeAction: string;
|
|
74
|
-
resourceCount: number;
|
|
75
|
-
checksum: string;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Complete SystemCard structure
|
|
79
|
-
*/
|
|
80
|
-
export interface SystemCard {
|
|
81
|
-
version: string;
|
|
82
|
-
systemId: string;
|
|
83
|
-
created: string;
|
|
84
|
-
lastUpdated?: string;
|
|
85
|
-
platform: PlatformInfo;
|
|
86
|
-
bootstrapContext: BootstrapContext;
|
|
87
|
-
resources: {
|
|
88
|
-
namespaces?: ResourceRecord[];
|
|
89
|
-
deployments?: ResourceRecord[];
|
|
90
|
-
services?: ResourceRecord[];
|
|
91
|
-
configmaps?: ResourceRecord[];
|
|
92
|
-
secrets?: ResourceRecord[];
|
|
93
|
-
ingresses?: ResourceRecord[];
|
|
94
|
-
statefulsets?: ResourceRecord[];
|
|
95
|
-
pods?: ResourceRecord[];
|
|
96
|
-
persistentvolumeclaims?: ResourceRecord[];
|
|
97
|
-
custom?: ResourceRecord[];
|
|
98
|
-
};
|
|
99
|
-
cleanup: CleanupStrategy;
|
|
100
|
-
snapshots?: StateSnapshot[];
|
|
101
|
-
metadata?: {
|
|
102
|
-
tags?: string[];
|
|
103
|
-
description?: string;
|
|
104
|
-
owner?: string;
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Options for SystemCard initialization
|
|
109
|
-
*/
|
|
110
|
-
export interface SystemCardInitOptions {
|
|
111
|
-
systemId: string;
|
|
112
|
-
created: string;
|
|
113
|
-
platform: PlatformInfo;
|
|
114
|
-
bootstrapContext: BootstrapContext;
|
|
115
|
-
metadata?: {
|
|
116
|
-
tags?: string[];
|
|
117
|
-
description?: string;
|
|
118
|
-
owner?: string;
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Manages SystemCard creation, updates, and persistence
|
|
123
|
-
*/
|
|
124
|
-
export declare class SystemCardManager {
|
|
125
|
-
private systemCardPath;
|
|
126
|
-
private logger;
|
|
127
|
-
private currentCard;
|
|
128
|
-
constructor(projectPath: string);
|
|
129
|
-
/**
|
|
130
|
-
* Initialize a new SystemCard
|
|
131
|
-
*/
|
|
132
|
-
initialize(options: SystemCardInitOptions): Promise<void>;
|
|
133
|
-
/**
|
|
134
|
-
* Load existing SystemCard from disk
|
|
135
|
-
*/
|
|
136
|
-
load(): Promise<SystemCard | null>;
|
|
137
|
-
/**
|
|
138
|
-
* Save current SystemCard to disk
|
|
139
|
-
*/
|
|
140
|
-
save(): Promise<void>;
|
|
141
|
-
/**
|
|
142
|
-
* Add resources to the SystemCard
|
|
143
|
-
*/
|
|
144
|
-
addResources(resources: ResourceRecord[], context?: {
|
|
145
|
-
phase?: string;
|
|
146
|
-
taskId?: string;
|
|
147
|
-
}): Promise<void>;
|
|
148
|
-
/**
|
|
149
|
-
* Remove a resource from the SystemCard
|
|
150
|
-
*/
|
|
151
|
-
removeResource(type: string, name: string, namespace?: string): Promise<void>;
|
|
152
|
-
/**
|
|
153
|
-
* Generate cleanup phases from current resources
|
|
154
|
-
* Resources are ordered in reverse of typical deployment order
|
|
155
|
-
*/
|
|
156
|
-
generateCleanupPhases(): Promise<CleanupPhase[]>;
|
|
157
|
-
/**
|
|
158
|
-
* Create a state snapshot for rollback capability
|
|
159
|
-
*/
|
|
160
|
-
createSnapshot(beforeAction: string): Promise<StateSnapshot>;
|
|
161
|
-
/**
|
|
162
|
-
* Get all resources of a specific type
|
|
163
|
-
*/
|
|
164
|
-
getResourcesByType(type: string): ResourceRecord[];
|
|
165
|
-
/**
|
|
166
|
-
* Get all resources created by a specific task
|
|
167
|
-
*/
|
|
168
|
-
getResourcesByTask(taskId: string): ResourceRecord[];
|
|
169
|
-
/**
|
|
170
|
-
* Get total count of all resources
|
|
171
|
-
*/
|
|
172
|
-
getResourceCount(): number;
|
|
173
|
-
/**
|
|
174
|
-
* Get current SystemCard
|
|
175
|
-
*/
|
|
176
|
-
getCurrentCard(): SystemCard | null;
|
|
177
|
-
/**
|
|
178
|
-
* Check if SystemCard exists on disk
|
|
179
|
-
*/
|
|
180
|
-
exists(): Promise<boolean>;
|
|
181
|
-
/**
|
|
182
|
-
* Delete SystemCard file from disk
|
|
183
|
-
*/
|
|
184
|
-
delete(): Promise<void>;
|
|
185
|
-
/**
|
|
186
|
-
* Map resource type to storage category
|
|
187
|
-
*/
|
|
188
|
-
private getResourceCategory;
|
|
189
|
-
/**
|
|
190
|
-
* Calculate checksum for state verification
|
|
191
|
-
*/
|
|
192
|
-
private calculateChecksum;
|
|
193
|
-
}
|
|
194
|
-
//# sourceMappingURL=system-card-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"system-card-manager.d.ts","sourceRoot":"","sources":["../../../src/utils/system-card-manager.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,YAAY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