mcp-adr-analysis-server 2.7.30 → 2.7.32

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 (34) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/package.json +1 -1
  3. package/dist/src/resources/adrs-review-resource.d.ts +0 -82
  4. package/dist/src/resources/adrs-review-resource.d.ts.map +0 -1
  5. package/dist/src/resources/adrs-review-resource.js +0 -160
  6. package/dist/src/resources/adrs-review-resource.js.map +0 -1
  7. package/dist/src/resources/architectural-context-resource.d.ts +0 -95
  8. package/dist/src/resources/architectural-context-resource.d.ts.map +0 -1
  9. package/dist/src/resources/architectural-context-resource.js +0 -428
  10. package/dist/src/resources/architectural-context-resource.js.map +0 -1
  11. package/dist/src/resources/memory-expand-resource.d.ts +0 -90
  12. package/dist/src/resources/memory-expand-resource.d.ts.map +0 -1
  13. package/dist/src/resources/memory-expand-resource.js +0 -176
  14. package/dist/src/resources/memory-expand-resource.js.map +0 -1
  15. package/dist/src/utils/bootstrap-task-integration.d.ts +0 -214
  16. package/dist/src/utils/bootstrap-task-integration.d.ts.map +0 -1
  17. package/dist/src/utils/bootstrap-task-integration.js +0 -365
  18. package/dist/src/utils/bootstrap-task-integration.js.map +0 -1
  19. package/dist/src/utils/index.d.ts +0 -9
  20. package/dist/src/utils/index.d.ts.map +0 -1
  21. package/dist/src/utils/index.js +0 -13
  22. package/dist/src/utils/index.js.map +0 -1
  23. package/dist/src/utils/interactive-approval.d.ts +0 -63
  24. package/dist/src/utils/interactive-approval.d.ts.map +0 -1
  25. package/dist/src/utils/interactive-approval.js +0 -445
  26. package/dist/src/utils/interactive-approval.js.map +0 -1
  27. package/dist/src/utils/llm-artifact-detector.d.ts +0 -76
  28. package/dist/src/utils/llm-artifact-detector.d.ts.map +0 -1
  29. package/dist/src/utils/llm-artifact-detector.js +0 -426
  30. package/dist/src/utils/llm-artifact-detector.js.map +0 -1
  31. package/dist/src/utils/location-filter.d.ts +0 -104
  32. package/dist/src/utils/location-filter.d.ts.map +0 -1
  33. package/dist/src/utils/location-filter.js +0 -593
  34. package/dist/src/utils/location-filter.js.map +0 -1
@@ -1,176 +0,0 @@
1
- /**
2
- * Memory Expand Resource - Detailed view of a specific memory entity
3
- * URI Pattern: adr://memory/{key}
4
- */
5
- import { McpAdrError } from '../types/index.js';
6
- import { resourceCache, generateETag } from './resource-cache.js';
7
- import { resourceRouter } from './resource-router.js';
8
- /**
9
- * Generate memory expand resource showing detailed entity information.
10
- *
11
- * Returns complete details about a specific memory entity including:
12
- * - Full entity content and metadata
13
- * - All relationships to other entities
14
- * - Related entities by relevance
15
- * - Access statistics
16
- *
17
- * **URI Pattern:** `adr://memory/{key}`
18
- *
19
- * **Query Parameters:**
20
- * - `includeRelated`: Include related entities (default: true)
21
- * - `relationshipDepth`: Depth of relationships to traverse (default: 2)
22
- * - `maxRelated`: Maximum related entities to return (default: 10)
23
- *
24
- * @param params - URL path parameters containing:
25
- * - key: Memory entity key/ID
26
- * @param searchParams - URL query parameters for customization
27
- * @param memoryManager - Optional memory entity manager instance
28
- *
29
- * @returns Promise resolving to resource generation result containing:
30
- * - data: Complete memory entity data with relationships
31
- * - contentType: "application/json"
32
- * - lastModified: ISO timestamp of generation
33
- * - cacheKey: Unique identifier "memory-expand:{key}"
34
- * - ttl: Cache duration (60 seconds / 1 minute)
35
- * - etag: Entity tag for cache validation
36
- *
37
- * @throws {McpAdrError} When memory expansion fails
38
- *
39
- * @example
40
- * ```typescript
41
- * // Get expanded memory entity
42
- * const memory = await generateMemoryExpandResource(
43
- * { key: 'adr-001' },
44
- * new URLSearchParams()
45
- * );
46
- *
47
- * console.log(`Entity type: ${memory.data.entity?.type}`);
48
- * console.log(`Relationships: ${memory.data.relationships.length}`);
49
- *
50
- * // With custom depth
51
- * const deep = await generateMemoryExpandResource(
52
- * { key: 'architecture-context' },
53
- * new URLSearchParams('relationshipDepth=3&maxRelated=20')
54
- * );
55
- * ```
56
- *
57
- * @since v2.2.0
58
- * @see {@link MemoryEntityManager} for memory management
59
- */
60
- export async function generateMemoryExpandResource(params, searchParams, memoryManager) {
61
- const key = params['key'];
62
- if (!key) {
63
- throw new McpAdrError('Missing required parameter: key', 'INVALID_PARAMS');
64
- }
65
- const includeRelated = searchParams.get('includeRelated') !== 'false';
66
- const relationshipDepth = parseInt(searchParams.get('relationshipDepth') || '2', 10);
67
- const maxRelated = parseInt(searchParams.get('maxRelated') || '10', 10);
68
- const cacheKey = `memory-expand:${key}`;
69
- // Check cache
70
- const cached = await resourceCache.get(cacheKey);
71
- if (cached) {
72
- return cached;
73
- }
74
- try {
75
- // If no memory manager provided, return a not-found response
76
- if (!memoryManager) {
77
- const notFoundData = {
78
- key,
79
- entity: null,
80
- relationships: [],
81
- relatedEntities: [],
82
- timestamp: new Date().toISOString(),
83
- found: false,
84
- };
85
- const result = {
86
- data: notFoundData,
87
- contentType: 'application/json',
88
- lastModified: new Date().toISOString(),
89
- cacheKey,
90
- ttl: 30, // Short cache for not-found
91
- etag: generateETag(notFoundData),
92
- };
93
- return result;
94
- }
95
- // Try to get the entity from memory manager
96
- let entity = null;
97
- let relationships = [];
98
- let relatedEntities = [];
99
- try {
100
- // Attempt to get entity by ID using queryEntities
101
- const queryResult = await memoryManager.queryEntities({
102
- textQuery: key,
103
- limit: 1,
104
- });
105
- const foundEntity = queryResult.entities?.[0];
106
- if (foundEntity) {
107
- entity = {
108
- id: foundEntity.id,
109
- type: foundEntity.type,
110
- name: foundEntity.title, // MemoryEntity uses 'title' not 'name'
111
- content: foundEntity.description, // MemoryEntity uses 'description' not 'content'
112
- metadata: foundEntity.context || {}, // MemoryEntity uses 'context' object
113
- tags: foundEntity.tags || [],
114
- confidence: foundEntity.confidence || 1.0,
115
- lastModified: foundEntity.lastModified || new Date().toISOString(),
116
- created: foundEntity.created || new Date().toISOString(),
117
- accessCount: foundEntity.accessPattern?.accessCount || 0, // Nested in accessPattern
118
- };
119
- // Get relationships if requested
120
- if (includeRelated) {
121
- try {
122
- const related = await memoryManager.findRelatedEntities(foundEntity.id, relationshipDepth);
123
- // Map relationshipPaths to our relationships format
124
- relationships =
125
- related.relationshipPaths
126
- ?.flatMap((path) => path.relationships?.map((rel) => ({
127
- targetId: rel.targetId,
128
- targetName: rel.targetId,
129
- relationshipType: rel.type || 'related',
130
- strength: rel.strength || 0.5,
131
- })) || [])
132
- .slice(0, maxRelated) || [];
133
- relatedEntities =
134
- related.entities?.slice(0, maxRelated).map((ent) => ({
135
- id: ent.id,
136
- name: ent.title || ent.id, // MemoryEntity uses 'title' not 'name'
137
- type: ent.type,
138
- relevance: ent.relevance || 0.5, // Use relevance if available
139
- })) || [];
140
- }
141
- catch {
142
- // Relationships not available
143
- }
144
- }
145
- }
146
- }
147
- catch {
148
- // Entity not found
149
- }
150
- const expandData = {
151
- key,
152
- entity,
153
- relationships,
154
- relatedEntities: relatedEntities.slice(0, maxRelated),
155
- timestamp: new Date().toISOString(),
156
- found: entity !== null,
157
- };
158
- const result = {
159
- data: expandData,
160
- contentType: 'application/json',
161
- lastModified: new Date().toISOString(),
162
- cacheKey,
163
- ttl: 60, // 1 minute cache
164
- etag: generateETag(expandData),
165
- };
166
- // Cache result
167
- resourceCache.set(cacheKey, result, result.ttl);
168
- return result;
169
- }
170
- catch (error) {
171
- throw new McpAdrError(`Failed to expand memory entity: ${error instanceof Error ? error.message : String(error)}`, 'RESOURCE_GENERATION_ERROR');
172
- }
173
- }
174
- // Register route
175
- resourceRouter.register('/memory/{key}', generateMemoryExpandResource, 'Detailed view of a specific memory entity');
176
- //# sourceMappingURL=memory-expand-resource.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory-expand-resource.js","sourceRoot":"","sources":["../../../src/resources/memory-expand-resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO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,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,KAAK,EAAE,MAAM,KAAK,IAAI;SACvB,CAAC;QAEF,MAAM,MAAM,GAA6B;YACvC,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,kBAAkB;YAC/B,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACtC,QAAQ;YACR,GAAG,EAAE,EAAE,EAAE,iBAAiB;YAC1B,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC;SAC/B,CAAC;QAEF,eAAe;QACf,aAAa,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;QAEhD,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,WAAW,CACnB,mCAAmC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAC3F,2BAA2B,CAC5B,CAAC;IACJ,CAAC;AACH,CAAC;AAED,iBAAiB;AACjB,cAAc,CAAC,QAAQ,CACrB,eAAe,EACf,4BAA4B,EAC5B,2CAA2C,CAC5C,CAAC"}
@@ -1,214 +0,0 @@
1
- /**
2
- * MCP Tasks Integration for Bootstrap Validation Loop
3
- *
4
- * This module provides standardized task tracking for the bootstrap validation loop tool,
5
- * implementing ADR-020: MCP Tasks Integration Strategy.
6
- *
7
- * Key features:
8
- * - Creates MCP Tasks for bootstrap operations
9
- * - Tracks progress through phases (platform_detection, infrastructure, application, validation)
10
- * - Supports cancellation between phases
11
- * - Migrates from custom executionId to standardized taskId
12
- *
13
- * @see ADR-020: MCP Tasks Integration Strategy
14
- * @see https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks
15
- */
16
- import { type AdrTask, type TaskResult, type TaskManager } from './task-manager.js';
17
- /**
18
- * Bootstrap phases that map to MCP Task phases
19
- */
20
- export declare const BOOTSTRAP_PHASES: readonly ["platform_detection", "infrastructure_setup", "application_deployment", "validation", "cleanup"];
21
- export type BootstrapPhase = (typeof BOOTSTRAP_PHASES)[number];
22
- /**
23
- * Bootstrap task context for tracking state across iterations
24
- */
25
- export interface BootstrapTaskContext {
26
- taskId: string;
27
- currentPhase: BootstrapPhase;
28
- iteration: number;
29
- maxIterations: number;
30
- cancelled: boolean;
31
- platformDetected?: string;
32
- infrastructureResult?: {
33
- success: boolean;
34
- executedTasks: string[];
35
- failedTasks: string[];
36
- };
37
- }
38
- /**
39
- * Options for creating a bootstrap task
40
- */
41
- export interface CreateBootstrapTaskOptions {
42
- projectPath: string;
43
- adrDirectory: string;
44
- targetEnvironment: string;
45
- maxIterations: number;
46
- autoFix: boolean;
47
- updateAdrsWithLearnings: boolean;
48
- }
49
- /**
50
- * Result from bootstrap task execution
51
- */
52
- export interface BootstrapTaskResult extends TaskResult {
53
- data?: {
54
- success: boolean;
55
- iterations: number;
56
- platformDetected?: string;
57
- deploymentPlan?: unknown;
58
- adrUpdates?: unknown[];
59
- learnings?: unknown[];
60
- bootstrapAdrPath?: string;
61
- contextDocumentPath?: string;
62
- };
63
- }
64
- /**
65
- * Bootstrap Task Manager - Provides MCP Tasks integration for bootstrap validation loop
66
- *
67
- * This class wraps the TaskManager to provide bootstrap-specific functionality:
68
- * - Creates tasks with bootstrap-specific phases
69
- * - Tracks iteration progress
70
- * - Supports cancellation checks between phases
71
- * - Converts between executionId and taskId patterns
72
- */
73
- export declare class BootstrapTaskManager {
74
- private taskManager;
75
- private activeContexts;
76
- constructor(taskManager?: TaskManager);
77
- /**
78
- * Initialize the bootstrap task manager
79
- */
80
- initialize(): Promise<void>;
81
- /**
82
- * Create a new bootstrap task
83
- *
84
- * @returns The created task and context
85
- */
86
- createBootstrapTask(options: CreateBootstrapTaskOptions): Promise<{
87
- task: AdrTask;
88
- context: BootstrapTaskContext;
89
- }>;
90
- /**
91
- * Get bootstrap task context
92
- */
93
- getContext(taskId: string): BootstrapTaskContext | undefined;
94
- /**
95
- * Start a bootstrap phase
96
- */
97
- startPhase(taskId: string, phase: BootstrapPhase, message?: string): Promise<void>;
98
- /**
99
- * Update phase progress
100
- */
101
- updatePhaseProgress(taskId: string, phase: BootstrapPhase, phaseProgress: number, message?: string): Promise<void>;
102
- /**
103
- * Complete a bootstrap phase
104
- */
105
- completePhase(taskId: string, phase: BootstrapPhase, _message?: string): Promise<void>;
106
- /**
107
- * Fail a bootstrap phase
108
- */
109
- failPhase(taskId: string, phase: BootstrapPhase, error: string): Promise<void>;
110
- /**
111
- * Update iteration progress
112
- */
113
- updateIteration(taskId: string, iteration: number): Promise<void>;
114
- /**
115
- * Store platform detection result
116
- */
117
- storePlatformDetection(taskId: string, platform: string, confidence: number): Promise<void>;
118
- /**
119
- * Store infrastructure result
120
- */
121
- storeInfrastructureResult(taskId: string, result: {
122
- success: boolean;
123
- executedTasks: string[];
124
- failedTasks: string[];
125
- }): Promise<void>;
126
- /**
127
- * Check if task is cancelled
128
- */
129
- isCancelled(taskId: string): Promise<boolean>;
130
- /**
131
- * Cancel a bootstrap task
132
- */
133
- cancelTask(taskId: string, reason?: string): Promise<void>;
134
- /**
135
- * Complete a bootstrap task successfully
136
- */
137
- completeTask(taskId: string, result: BootstrapTaskResult): Promise<void>;
138
- /**
139
- * Fail a bootstrap task
140
- */
141
- failTask(taskId: string, error: string): Promise<void>;
142
- /**
143
- * Get task status
144
- */
145
- getTaskStatus(taskId: string): Promise<{
146
- task: AdrTask | null;
147
- context: BootstrapTaskContext | undefined;
148
- }>;
149
- }
150
- export declare function getBootstrapTaskManager(): BootstrapTaskManager;
151
- /**
152
- * Reset the global BootstrapTaskManager (for testing)
153
- */
154
- export declare function resetBootstrapTaskManager(): Promise<void>;
155
- /**
156
- * Helper function to wrap bootstrap execution with task tracking
157
- *
158
- * This can be used by the bootstrap_validation_loop tool to automatically
159
- * track progress through MCP Tasks.
160
- *
161
- * @example
162
- * ```typescript
163
- * const result = await executeWithTaskTracking(
164
- * {
165
- * projectPath: '/path/to/project',
166
- * adrDirectory: 'docs/adrs',
167
- * targetEnvironment: 'development',
168
- * maxIterations: 5,
169
- * autoFix: true,
170
- * updateAdrsWithLearnings: true,
171
- * },
172
- * async (tracker) => {
173
- * // Platform detection phase
174
- * await tracker.startPhase('platform_detection');
175
- * const platform = await detectPlatform();
176
- * await tracker.storePlatformDetection(platform.name, platform.confidence);
177
- * await tracker.completePhase('platform_detection');
178
- *
179
- * // Infrastructure phase
180
- * await tracker.startPhase('infrastructure_setup');
181
- * const infraResult = await runInfrastructure();
182
- * await tracker.storeInfrastructureResult(infraResult);
183
- * await tracker.completePhase('infrastructure_setup');
184
- *
185
- * // Return final result
186
- * return { success: true, iterations: 3 };
187
- * }
188
- * );
189
- * ```
190
- */
191
- export declare function executeWithTaskTracking<T extends BootstrapTaskResult>(options: CreateBootstrapTaskOptions, executor: (tracker: TaskTracker) => Promise<T['data']>): Promise<{
192
- taskId: string;
193
- result: T;
194
- }>;
195
- /**
196
- * Task tracker interface provided to bootstrap executor
197
- */
198
- export interface TaskTracker {
199
- taskId: string;
200
- startPhase: (phase: BootstrapPhase, message?: string) => Promise<void>;
201
- updatePhaseProgress: (phase: BootstrapPhase, progress: number, message?: string) => Promise<void>;
202
- completePhase: (phase: BootstrapPhase, message?: string) => Promise<void>;
203
- failPhase: (phase: BootstrapPhase, error: string) => Promise<void>;
204
- updateIteration: (iteration: number) => Promise<void>;
205
- storePlatformDetection: (platform: string, confidence: number) => Promise<void>;
206
- storeInfrastructureResult: (result: {
207
- success: boolean;
208
- executedTasks: string[];
209
- failedTasks: string[];
210
- }) => Promise<void>;
211
- isCancelled: () => Promise<boolean>;
212
- getContext: () => BootstrapTaskContext;
213
- }
214
- //# sourceMappingURL=bootstrap-task-integration.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bootstrap-task-integration.d.ts","sourceRoot":"","sources":["../../../src/utils/bootstrap-task-integration.ts"],"names":[],"mappings":"AA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