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.
Files changed (42) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/src/tools/bootstrap-validation-loop-tool.d.ts +0 -178
  3. package/dist/src/tools/bootstrap-validation-loop-tool.d.ts.map +1 -1
  4. package/dist/src/tools/bootstrap-validation-loop-tool.js +0 -1580
  5. package/dist/src/tools/bootstrap-validation-loop-tool.js.map +1 -1
  6. package/dist/src/tools/deployment-guidance-tool.d.ts +19 -1
  7. package/dist/src/tools/deployment-guidance-tool.d.ts.map +1 -1
  8. package/dist/src/tools/deployment-guidance-tool.js +9 -4
  9. package/dist/src/tools/deployment-guidance-tool.js.map +1 -1
  10. package/package.json +1 -2
  11. package/dist/src/utils/dag-executor.d.ts +0 -106
  12. package/dist/src/utils/dag-executor.d.ts.map +0 -1
  13. package/dist/src/utils/dag-executor.js +0 -453
  14. package/dist/src/utils/dag-executor.js.map +0 -1
  15. package/dist/src/utils/deployment-task-integration.d.ts +0 -260
  16. package/dist/src/utils/deployment-task-integration.d.ts.map +0 -1
  17. package/dist/src/utils/deployment-task-integration.js +0 -393
  18. package/dist/src/utils/deployment-task-integration.js.map +0 -1
  19. package/dist/src/utils/dynamic-deployment-intelligence.d.ts +0 -117
  20. package/dist/src/utils/dynamic-deployment-intelligence.d.ts.map +0 -1
  21. package/dist/src/utils/dynamic-deployment-intelligence.js +0 -445
  22. package/dist/src/utils/dynamic-deployment-intelligence.js.map +0 -1
  23. package/dist/src/utils/pattern-contribution-helper.d.ts +0 -60
  24. package/dist/src/utils/pattern-contribution-helper.d.ts.map +0 -1
  25. package/dist/src/utils/pattern-contribution-helper.js +0 -308
  26. package/dist/src/utils/pattern-contribution-helper.js.map +0 -1
  27. package/dist/src/utils/pattern-loader.d.ts +0 -183
  28. package/dist/src/utils/pattern-loader.d.ts.map +0 -1
  29. package/dist/src/utils/pattern-loader.js +0 -198
  30. package/dist/src/utils/pattern-loader.js.map +0 -1
  31. package/dist/src/utils/pattern-to-dag-converter.d.ts +0 -62
  32. package/dist/src/utils/pattern-to-dag-converter.d.ts.map +0 -1
  33. package/dist/src/utils/pattern-to-dag-converter.js +0 -265
  34. package/dist/src/utils/pattern-to-dag-converter.js.map +0 -1
  35. package/dist/src/utils/resource-extractor.d.ts +0 -57
  36. package/dist/src/utils/resource-extractor.d.ts.map +0 -1
  37. package/dist/src/utils/resource-extractor.js +0 -323
  38. package/dist/src/utils/resource-extractor.js.map +0 -1
  39. package/dist/src/utils/system-card-manager.d.ts +0 -194
  40. package/dist/src/utils/system-card-manager.d.ts.map +0 -1
  41. package/dist/src/utils/system-card-manager.js +0 -336
  42. package/dist/src/utils/system-card-manager.js.map +0 -1
@@ -1,308 +0,0 @@
1
- /**
2
- * Pattern Contribution Helper
3
- *
4
- * Helps users contribute missing patterns to the validatedpatterns project
5
- * by creating well-formatted GitHub issues with detection evidence.
6
- */
7
- import { EnhancedLogger } from './enhanced-logging.js';
8
- /**
9
- * Helper for creating GitHub issues for missing patterns
10
- */
11
- export class PatternContributionHelper {
12
- logger;
13
- constructor() {
14
- this.logger = new EnhancedLogger();
15
- }
16
- /**
17
- * Prompt user to contribute missing pattern
18
- */
19
- promptUserForContribution(platform, detection) {
20
- return `
21
- # 📝 Missing Validated Pattern Detected
22
-
23
- No validated pattern exists for platform: **${platform}**
24
-
25
- ## Detected Platform Evidence
26
-
27
- ${detection.evidence
28
- .slice(0, 5)
29
- .map((e, i) => `${i + 1}. **${e.file}**: ${e.indicator} (confidence: ${(e.weight * 100).toFixed(0)}%)`)
30
- .join('\n')}
31
-
32
- ## Contribute to validatedpatterns Community
33
-
34
- Would you like to create a GitHub issue to request this pattern be added to the
35
- [validatedpatterns repository](https://github.com/validatedpatterns)?
36
-
37
- This will help the entire community benefit from ${platform} deployment patterns.
38
-
39
- **Your contribution would include:**
40
- - Platform detection evidence from your project
41
- - Deployment requirements you've identified
42
- - Authentication and infrastructure needs
43
- - Suggested deployment phases and validation checks
44
-
45
- **Options:**
46
- 1. ✅ **Yes** - Create GitHub issue (recommended) - Helps the community
47
- 2. ⏭️ **Skip** - Use AI-generated fallback pattern (less tested, project-specific only)
48
-
49
- **Why contribute?**
50
- - Future users automatically benefit from validated patterns
51
- - Community-vetted deployment workflows
52
- - Reduces trial-and-error for everyone
53
- - Your project evidence helps create better patterns
54
-
55
- Please confirm: Create GitHub issue for ${platform} pattern?
56
- `.trim();
57
- }
58
- /**
59
- * Prepare GitHub issue content for missing pattern
60
- */
61
- prepareIssueContent(platform, detection) {
62
- const title = `[Pattern Request] Add ${platform} validated pattern`;
63
- const body = `
64
- ## Platform Information
65
-
66
- **Platform**: ${platform}
67
- **Detection Confidence**: ${(detection.confidence * 100).toFixed(1)}%
68
- **Detection Method**: Automated analysis via MCP ADR Analysis Server
69
-
70
- ## Detection Evidence
71
-
72
- ${detection.evidence
73
- .slice(0, 10)
74
- .map((e, i) => `${i + 1}. **${e.file}**: ${e.indicator} (weight: ${(e.weight * 100).toFixed(0)}%)`)
75
- .join('\n')}
76
-
77
- ${detection.evidence.length > 10 ? `\n*...and ${detection.evidence.length - 10} more evidence files*\n` : ''}
78
-
79
- ## Requested Pattern Components
80
-
81
- ### Deployment Phases
82
-
83
- Please include deployment phases for **${platform}**:
84
-
85
- - [ ] **Prerequisites Validation**
86
- - CLI tools installation and verification
87
- - Cluster/environment connectivity checks
88
- - Authentication validation
89
- - Required permissions verification
90
-
91
- - [ ] **Infrastructure Setup**
92
- - Namespaces / resource groups / projects
93
- - RBAC configuration
94
- - Network policies and security groups
95
- - Storage classes and persistent volumes
96
-
97
- - [ ] **Resource Deployment**
98
- - Service definitions
99
- - Ingress / routing configuration
100
- - Configuration maps and secrets
101
- - Load balancers and networking
102
-
103
- - [ ] **Validation Checks**
104
- - Health checks and readiness probes
105
- - Connectivity tests
106
- - Resource status verification
107
- - End-to-end deployment validation
108
-
109
- ### Authoritative Sources
110
-
111
- Please include links to:
112
-
113
- - [ ] Official **${platform}** documentation
114
- - [ ] **${platform}** deployment best practices
115
- - [ ] **${platform}** example repositories / quickstarts
116
- - [ ] **${platform}** community resources and forums
117
- - [ ] Relevant GitHub repositories with deployment examples
118
-
119
- ### Configuration Templates
120
-
121
- Please include templates for:
122
-
123
- - [ ] Deployment manifests (YAML/JSON)
124
- - [ ] Service definitions
125
- - [ ] Ingress/routing configuration
126
- - [ ] ConfigMap / Secret templates
127
- - [ ] Network policy templates
128
- - [ ] Storage configuration
129
-
130
- ### Dependencies
131
-
132
- Please specify required dependencies:
133
-
134
- - [ ] CLI tools (with installation commands)
135
- - [ ] Runtime requirements
136
- - [ ] Build-time dependencies
137
- - [ ] Verification commands for each dependency
138
-
139
- ## Use Case
140
-
141
- This pattern was requested during an **automated bootstrap validation loop** for a project
142
- that detected **${platform}** as the target deployment platform.
143
-
144
- The requesting system:
145
- - Analyzed project files and detected ${platform} indicators
146
- - Attempted to load a validated pattern from the pattern library
147
- - Found no existing pattern for this platform
148
- - Prompted user to contribute back to the community
149
-
150
- ## Additional Context
151
-
152
- - **All detected platforms**: ${detection.detectedPlatforms?.map(p => p.type).join(', ') || platform}
153
- - **Detection confidence breakdown**:
154
- ${detection.detectedPlatforms
155
- ?.slice(0, 5)
156
- .map(p => ` - ${p.type}: ${(p.confidence * 100).toFixed(0)}%`)
157
- .join('\n') || ` - ${platform}: ${(detection.confidence * 100).toFixed(0)}%`}
158
- - **Total evidence files**: ${detection.evidence.length}
159
- - **Project type**: Automatic detection from codebase analysis
160
- - **Deployment target**: Development/Staging/Production (pattern should support all)
161
-
162
- ## Benefits for Community
163
-
164
- Creating this pattern will:
165
- - ✅ Enable automatic infrastructure DAG generation for ${platform} projects
166
- - ✅ Provide battle-tested deployment workflows
167
- - ✅ Reduce deployment errors through validated checks
168
- - ✅ Accelerate onboarding for teams using ${platform}
169
- - ✅ Build community knowledge base
170
- - ✅ Support AI-assisted deployment automation
171
-
172
- ## Pattern Structure Reference
173
-
174
- See existing patterns for examples:
175
- - [Kubernetes Pattern](https://github.com/validatedpatterns/patterns/tree/main/infrastructure/kubernetes.yaml)
176
- - [OpenShift Pattern](https://github.com/validatedpatterns/patterns/tree/main/infrastructure/openshift.yaml)
177
- - [Pattern Schema Documentation](https://github.com/validatedpatterns/patterns/tree/main/docs/pattern-schema.md)
178
-
179
- ## Implementation Notes
180
-
181
- The pattern should include:
182
-
183
- 1. **authoritativeSources**: Array of documentation links with priority and query instructions
184
- 2. **deploymentPhases**: Step-by-step deployment commands with prerequisites
185
- 3. **validationChecks**: Health checks with remediation steps
186
- 4. **dependencies**: Required tools with install/verify commands
187
- 5. **configurations**: Config file templates that can be auto-generated
188
- 6. **metadata**: Source, maintainer, tags, changelog
189
-
190
- ---
191
-
192
- **Submitted by**: MCP ADR Analysis Server - Bootstrap Validation Loop
193
- **Generated**: ${new Date().toISOString()}
194
- **Repository**: [validatedpatterns project](https://github.com/validatedpatterns)
195
- **Related**: Hybrid DAG Bootstrap Architecture
196
-
197
- ## Labels
198
-
199
- Please add these labels:
200
- - \`pattern-request\`
201
- - \`${platform}\`
202
- - \`community-contribution\`
203
- - \`auto-generated\`
204
- - \`help-wanted\`
205
-
206
- Thank you for considering this pattern request! 🙏
207
- `.trim();
208
- return { title, body };
209
- }
210
- /**
211
- * Create GitHub issue (placeholder for actual GitHub API integration)
212
- *
213
- * In production, this would use Octokit to create the issue.
214
- * For now, it returns the issue content for manual creation.
215
- */
216
- async createGitHubIssue(platform, detection, _options) {
217
- const { title, body } = this.prepareIssueContent(platform, detection);
218
- this.logger.info(`📝 Preparing GitHub issue for missing ${platform} pattern`, 'PatternContributionHelper');
219
- // In production, use GitHub API:
220
- // import { Octokit } from '@octokit/rest';
221
- //
222
- // const octokit = new Octokit({ auth: options?.githubToken || process.env.GITHUB_TOKEN });
223
- //
224
- // const response = await octokit.issues.create({
225
- // owner: options?.owner || 'validatedpatterns',
226
- // repo: options?.repository || 'patterns',
227
- // title,
228
- // body,
229
- // labels: ['pattern-request', platform, 'community-contribution', 'auto-generated'],
230
- // });
231
- //
232
- // return {
233
- // success: true,
234
- // issueUrl: response.data.html_url,
235
- // issueNumber: response.data.number,
236
- // issueTitle: title,
237
- // issueBody: body,
238
- // };
239
- // For now, return the prepared content
240
- this.logger.info(`📋 GitHub issue content prepared:\n\nTitle: ${title}\n\nBody:\n${body}`, 'PatternContributionHelper');
241
- this.logger.info('💡 To enable automatic GitHub issue creation, set GITHUB_TOKEN environment variable', 'PatternContributionHelper');
242
- return {
243
- success: true,
244
- issueTitle: title,
245
- issueBody: body,
246
- };
247
- }
248
- /**
249
- * Generate summary message for user after issue creation
250
- */
251
- generateSuccessMessage(result, platform) {
252
- if (result.issueUrl) {
253
- return `
254
- ✅ **GitHub Issue Created Successfully!**
255
-
256
- **Platform**: ${platform}
257
- **Issue**: ${result.issueUrl}
258
- **Issue Number**: #${result.issueNumber}
259
-
260
- The validatedpatterns maintainers will be notified. Once the pattern is created,
261
- future users will automatically benefit from it!
262
-
263
- **Next Steps:**
264
- 1. Monitor the issue for community feedback
265
- 2. Provide additional context if requested
266
- 3. Once pattern is merged, update your local pattern library
267
- 4. Re-run bootstrap validation to use the new pattern
268
-
269
- **For now**: Falling back to AI-generated deployment plan...
270
- `.trim();
271
- }
272
- else {
273
- return `
274
- 📋 **GitHub Issue Content Prepared**
275
-
276
- **Platform**: ${platform}
277
-
278
- To create the issue manually:
279
- 1. Go to: https://github.com/validatedpatterns/patterns/issues/new
280
- 2. Use the title: ${result.issueTitle}
281
- 3. Paste the prepared issue body (see logs above)
282
- 4. Add labels: pattern-request, ${platform}, community-contribution
283
-
284
- **To enable automatic issue creation**: Set the GITHUB_TOKEN environment variable
285
-
286
- **For now**: Falling back to AI-generated deployment plan...
287
- `.trim();
288
- }
289
- }
290
- /**
291
- * Check if GitHub token is configured for automatic issue creation
292
- */
293
- isGitHubConfigured() {
294
- return !!process.env['GITHUB_TOKEN'];
295
- }
296
- /**
297
- * Get GitHub configuration status message
298
- */
299
- getConfigurationStatus() {
300
- if (this.isGitHubConfigured()) {
301
- return '✅ GitHub API configured - automatic issue creation enabled';
302
- }
303
- else {
304
- return '⚠️ GitHub API not configured - issue content will be prepared for manual creation';
305
- }
306
- }
307
- }
308
- //# sourceMappingURL=pattern-contribution-helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pattern-contribution-helper.js","sourceRoot":"","sources":["../../../src/utils/pattern-contribution-helper.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAcvD;;GAEG;AACH,MAAM,OAAO,yBAAyB;IAC5B,MAAM,CAAiB;IAE/B;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,yBAAyB,CAAC,QAAgB,EAAE,SAAkC;QAC5E,OAAO;;;8CAGmC,QAAQ;;;;EAIpD,SAAS,CAAC,QAAQ;aACjB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;aACX,GAAG,CACF,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACP,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,SAAS,iBAAiB,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAC1F;aACA,IAAI,CAAC,IAAI,CAAC;;;;;;;mDAOsC,QAAQ;;;;;;;;;;;;;;;;;;0CAkBjB,QAAQ;KAC7C,CAAC,IAAI,EAAE,CAAC;IACX,CAAC;IAED;;OAEG;IACH,mBAAmB,CACjB,QAAgB,EAChB,SAAkC;QAElC,MAAM,KAAK,GAAG,yBAAyB,QAAQ,oBAAoB,CAAC;QAEpE,MAAM,IAAI,GAAG;;;gBAGD,QAAQ;4BACI,CAAC,SAAS,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC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YhC,CAAC,IAAI,EAAE,CAAC;QACX,CAAC;aAAM,CAAC;YACN,OAAO;;;gBAGG,QAAQ;;;;oBAIJ,MAAM,CAAC,UAAU;;kCAEH,QAAQ;;;;;OAKnC,CAAC,IAAI,EAAE,CAAC;QACX,CAAC;IACH,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,sBAAsB;QACpB,IAAI,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;YAC9B,OAAO,4DAA4D,CAAC;QACtE,CAAC;aAAM,CAAC;YACN,OAAO,oFAAoF,CAAC;QAC9F,CAAC;IACH,CAAC;CACF"}
@@ -1,183 +0,0 @@
1
- /**
2
- * Authoritative source definition
3
- */
4
- export interface AuthoritativeSource {
5
- type: 'documentation' | 'repository' | 'specification' | 'examples' | 'community';
6
- url: string;
7
- purpose: string;
8
- priority: number;
9
- requiredForDeployment: boolean;
10
- queryInstructions: string;
11
- }
12
- /**
13
- * Deployment phase definition
14
- */
15
- export interface DeploymentPhase {
16
- order: number;
17
- name: string;
18
- description: string;
19
- estimatedDuration: string;
20
- canParallelize: boolean;
21
- prerequisites: string[];
22
- commands: Array<{
23
- description: string;
24
- command: string;
25
- expectedExitCode?: number;
26
- }>;
27
- }
28
- /**
29
- * Validation check definition
30
- */
31
- export interface ValidationCheck {
32
- id: string;
33
- name: string;
34
- description: string;
35
- command: string;
36
- expectedExitCode?: number;
37
- severity: 'critical' | 'error' | 'warning' | 'info';
38
- failureMessage: string;
39
- remediationSteps: string[];
40
- }
41
- /**
42
- * Dynamic pattern loaded from YAML
43
- */
44
- export interface DynamicPattern {
45
- version: string;
46
- id: string;
47
- name: string;
48
- description: string;
49
- composition?: {
50
- infrastructure?: string;
51
- runtime?: string;
52
- protocol?: string;
53
- strategy?: string;
54
- };
55
- authoritativeSources: AuthoritativeSource[];
56
- baseCodeRepository?: {
57
- url: string;
58
- purpose: string;
59
- integrationInstructions: string;
60
- requiredFiles?: string[];
61
- scriptEntrypoint?: string;
62
- };
63
- dependencies?: Array<{
64
- name: string;
65
- type: 'buildtime' | 'runtime';
66
- required: boolean;
67
- installCommand?: string;
68
- verificationCommand?: string;
69
- }>;
70
- configurations?: Array<{
71
- path: string;
72
- purpose: string;
73
- required: boolean;
74
- canAutoGenerate?: boolean;
75
- template?: string;
76
- }>;
77
- secrets?: Array<{
78
- name: string;
79
- purpose: string;
80
- environmentVariable?: string;
81
- required: boolean;
82
- }>;
83
- infrastructure?: Array<{
84
- component: string;
85
- purpose: string;
86
- required: boolean;
87
- minimumVersion?: string;
88
- setupCommands?: string[];
89
- healthCheckCommand?: string;
90
- alternatives?: string[];
91
- }>;
92
- deploymentPhases: DeploymentPhase[];
93
- validationChecks?: ValidationCheck[];
94
- healthChecks?: Array<{
95
- name: string;
96
- endpoint: string;
97
- interval?: number;
98
- timeout?: number;
99
- healthyThreshold?: number;
100
- unhealthyThreshold?: number;
101
- }>;
102
- environmentOverrides?: Array<{
103
- environment: 'development' | 'staging' | 'production';
104
- overrides: Record<string, any>;
105
- }>;
106
- metadata: {
107
- source: string;
108
- lastUpdated: string;
109
- maintainer?: string;
110
- tags: string[];
111
- contributors?: Array<{
112
- name: string;
113
- github?: string;
114
- }>;
115
- changeLog?: Array<{
116
- version: string;
117
- date: string;
118
- changes: string[];
119
- }>;
120
- };
121
- detectionHints?: {
122
- requiredFiles?: string[];
123
- optionalFiles?: string[];
124
- confidence?: Record<string, number>;
125
- };
126
- }
127
- /**
128
- * Loads and manages dynamic patterns from YAML files
129
- */
130
- export declare class PatternLoader {
131
- private logger;
132
- private patternsDir;
133
- private cache;
134
- constructor(patternsDir?: string);
135
- /**
136
- * Load a pattern from YAML file by ID
137
- * @param patternId - Pattern identifier (filename without .yaml)
138
- * @returns Loaded pattern or null if not found
139
- */
140
- loadPattern(patternId: string): Promise<DynamicPattern | null>;
141
- /**
142
- * Load pattern by composition (infrastructure + runtime)
143
- * @param infrastructure - Infrastructure platform
144
- * @param runtime - Runtime environment (optional)
145
- * @returns Loaded pattern or null if not found
146
- */
147
- loadPatternByComposition(infrastructure: string, runtime?: string): Promise<DynamicPattern | null>;
148
- /**
149
- * List all available patterns
150
- * @returns Array of pattern IDs
151
- */
152
- listPatterns(): Promise<string[]>;
153
- /**
154
- * List patterns by category
155
- * @param category - Pattern category (composite, infrastructure, runtime, protocol)
156
- * @returns Array of pattern IDs in that category
157
- */
158
- listPatternsByCategory(category: 'composite' | 'infrastructure' | 'runtime' | 'protocol'): Promise<string[]>;
159
- /**
160
- * Validate pattern structure
161
- * @param pattern - Pattern to validate
162
- * @throws Error if validation fails
163
- */
164
- private validatePattern;
165
- /**
166
- * Clear pattern cache
167
- * Useful for testing or reloading patterns
168
- */
169
- clearCache(): void;
170
- /**
171
- * Get pattern from cache
172
- * @param patternId - Pattern identifier
173
- * @returns Cached pattern or null
174
- */
175
- getCachedPattern(patternId: string): DynamicPattern | null;
176
- /**
177
- * Check if a pattern is cached
178
- * @param patternId - Pattern identifier
179
- * @returns True if cached
180
- */
181
- isCached(patternId: string): boolean;
182
- }
183
- //# sourceMappingURL=pattern-loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pattern-loader.d.ts","sourceRoot":"","sources":["../../../src/utils/pattern-loader.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,eAAe,GAAG,YAAY,GAAG,eAAe,GAAG,UAAU,GAAG,WAAW,CAAC;IAClF,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,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