autosnippet 3.3.7 → 3.3.9

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 (218) hide show
  1. package/README.md +1 -0
  2. package/dashboard/dist/assets/icons-BMNb0V6L.js +1 -0
  3. package/dashboard/dist/assets/index-DEU4tJtP.js +112 -0
  4. package/dashboard/dist/assets/index-DHJ1Dj7u.css +1 -0
  5. package/dashboard/dist/index.html +3 -3
  6. package/dist/bin/cli.js +7 -4
  7. package/dist/lib/agent/core/ChatAgentPrompts.js +57 -21
  8. package/dist/lib/agent/core/LoopContext.d.ts +1 -0
  9. package/dist/lib/agent/core/ToolExecutionPipeline.js +13 -0
  10. package/dist/lib/agent/memory/ActiveContext.d.ts +0 -2
  11. package/dist/lib/agent/memory/ActiveContext.js +0 -2
  12. package/dist/lib/agent/memory/MemoryEmbeddingStore.d.ts +49 -0
  13. package/dist/lib/agent/memory/MemoryEmbeddingStore.js +159 -0
  14. package/dist/lib/agent/memory/MemoryRetriever.d.ts +2 -0
  15. package/dist/lib/agent/memory/MemoryRetriever.js +25 -11
  16. package/dist/lib/agent/memory/MemoryStore.d.ts +8 -41
  17. package/dist/lib/agent/memory/MemoryStore.js +196 -261
  18. package/dist/lib/agent/memory/PersistentMemory.d.ts +2 -0
  19. package/dist/lib/agent/memory/PersistentMemory.js +4 -5
  20. package/dist/lib/agent/memory/SessionStore.d.ts +0 -2
  21. package/dist/lib/agent/memory/SessionStore.js +0 -2
  22. package/dist/lib/agent/tools/ast-graph.js +21 -19
  23. package/dist/lib/agent/tools/infrastructure.js +3 -2
  24. package/dist/lib/agent/tools/project-access.d.ts +2 -2
  25. package/dist/lib/agent/tools/project-access.js +5 -4
  26. package/dist/lib/bootstrap.js +8 -2
  27. package/dist/lib/cli/AiScanService.js +4 -17
  28. package/dist/lib/cli/KnowledgeSyncService.d.ts +7 -37
  29. package/dist/lib/cli/KnowledgeSyncService.js +23 -51
  30. package/dist/lib/cli/SetupService.js +5 -4
  31. package/dist/lib/core/ast/ProjectGraph.js +5 -27
  32. package/dist/lib/core/discovery/CustomConfigDiscoverer.d.ts +0 -2
  33. package/dist/lib/core/discovery/CustomConfigDiscoverer.js +0 -2
  34. package/dist/lib/domain/dimension/DimensionRegistry.d.ts +0 -2
  35. package/dist/lib/domain/dimension/DimensionRegistry.js +0 -2
  36. package/dist/lib/domain/dimension/DimensionSop.js +44 -33
  37. package/dist/lib/domain/dimension/UnifiedDimension.d.ts +0 -2
  38. package/dist/lib/domain/dimension/UnifiedDimension.js +0 -2
  39. package/dist/lib/domain/knowledge/Lifecycle.d.ts +26 -0
  40. package/dist/lib/domain/knowledge/Lifecycle.js +42 -0
  41. package/dist/lib/domain/knowledge/index.d.ts +2 -1
  42. package/dist/lib/domain/knowledge/index.js +1 -1
  43. package/dist/lib/external/mcp/McpServer.js +19 -2
  44. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.d.ts +2 -1
  45. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.js +102 -153
  46. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/mock-pipeline.js +10 -29
  47. package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js +33 -16
  48. package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.d.ts +1 -1
  49. package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.js +41 -37
  50. package/dist/lib/external/mcp/handlers/bootstrap-external.js +1 -1
  51. package/dist/lib/external/mcp/handlers/dimension-complete-external.js +7 -3
  52. package/dist/lib/external/mcp/handlers/evolve-external.d.ts +1 -0
  53. package/dist/lib/external/mcp/handlers/evolve-external.js +13 -16
  54. package/dist/lib/external/mcp/handlers/guard.js +15 -24
  55. package/dist/lib/external/mcp/handlers/panorama.js +9 -9
  56. package/dist/lib/external/mcp/handlers/rescan-external.js +7 -6
  57. package/dist/lib/external/mcp/handlers/rescan-internal.js +9 -5
  58. package/dist/lib/external/mcp/handlers/search.js +3 -1
  59. package/dist/lib/external/mcp/handlers/skill.js +4 -4
  60. package/dist/lib/external/mcp/handlers/structure.js +8 -12
  61. package/dist/lib/external/mcp/handlers/system.js +10 -34
  62. package/dist/lib/http/routes/ai.js +11 -13
  63. package/dist/lib/http/routes/guardReport.js +3 -5
  64. package/dist/lib/http/routes/panorama.js +12 -12
  65. package/dist/lib/http/routes/recipes.js +59 -8
  66. package/dist/lib/http/routes/remote.js +3 -13
  67. package/dist/lib/http/routes/search.js +11 -8
  68. package/dist/lib/infrastructure/audit/AuditLogger.d.ts +20 -3
  69. package/dist/lib/infrastructure/audit/AuditStore.d.ts +28 -29
  70. package/dist/lib/infrastructure/audit/AuditStore.js +81 -88
  71. package/dist/lib/infrastructure/database/DatabaseConnection.js +7 -6
  72. package/dist/lib/infrastructure/database/drizzle/schema.d.ts +180 -2
  73. package/dist/lib/infrastructure/database/drizzle/schema.js +23 -3
  74. package/dist/lib/injection/ServiceContainer.js +7 -4
  75. package/dist/lib/injection/ServiceMap.d.ts +20 -0
  76. package/dist/lib/injection/modules/AppModule.js +2 -1
  77. package/dist/lib/injection/modules/GuardModule.js +5 -5
  78. package/dist/lib/injection/modules/InfraModule.js +60 -0
  79. package/dist/lib/injection/modules/KnowledgeModule.js +86 -51
  80. package/dist/lib/injection/modules/PanoramaModule.js +16 -10
  81. package/dist/lib/injection/modules/VectorModule.js +3 -0
  82. package/dist/lib/repository/audit/AuditRepository.d.ts +107 -0
  83. package/dist/lib/repository/audit/AuditRepository.js +272 -0
  84. package/dist/lib/repository/base/RepositoryBase.d.ts +46 -0
  85. package/dist/lib/repository/base/RepositoryBase.js +32 -0
  86. package/dist/lib/repository/bootstrap/BootstrapRepository.d.ts +94 -0
  87. package/dist/lib/repository/bootstrap/BootstrapRepository.js +246 -0
  88. package/dist/lib/repository/code/CodeEntityRepository.d.ts +91 -0
  89. package/dist/lib/repository/code/CodeEntityRepository.js +361 -0
  90. package/dist/lib/repository/delivery/DeliveryRepoAdapter.d.ts +39 -0
  91. package/dist/lib/repository/delivery/DeliveryRepoAdapter.js +23 -0
  92. package/dist/lib/repository/evolution/LifecycleEventRepository.d.ts +51 -0
  93. package/dist/lib/repository/evolution/LifecycleEventRepository.js +119 -0
  94. package/dist/lib/repository/evolution/ProposalRepository.d.ts +9 -12
  95. package/dist/lib/repository/evolution/ProposalRepository.js +114 -57
  96. package/dist/lib/repository/guard/GuardViolationRepository.d.ts +104 -0
  97. package/dist/lib/repository/guard/GuardViolationRepository.js +217 -0
  98. package/dist/lib/repository/knowledge/KnowledgeEdgeRepository.d.ts +129 -0
  99. package/dist/lib/repository/knowledge/KnowledgeEdgeRepository.js +475 -0
  100. package/dist/lib/repository/knowledge/KnowledgeFileStore.d.ts +39 -0
  101. package/dist/lib/repository/knowledge/KnowledgeFileStore.js +12 -0
  102. package/dist/lib/repository/knowledge/KnowledgeRepository.impl.d.ts +295 -11
  103. package/dist/lib/repository/knowledge/KnowledgeRepository.impl.js +608 -13
  104. package/dist/lib/repository/knowledge/KnowledgeUnitOfWork.d.ts +61 -0
  105. package/dist/lib/repository/knowledge/KnowledgeUnitOfWork.js +156 -0
  106. package/dist/lib/repository/memory/MemoryRepository.d.ts +90 -0
  107. package/dist/lib/repository/memory/MemoryRepository.js +260 -0
  108. package/dist/lib/repository/search/SearchRepoAdapter.d.ts +92 -0
  109. package/dist/lib/repository/search/SearchRepoAdapter.js +124 -0
  110. package/dist/lib/repository/session/SessionRepository.d.ts +46 -0
  111. package/dist/lib/repository/session/SessionRepository.js +110 -0
  112. package/dist/lib/repository/sourceref/RecipeSourceRefRepository.d.ts +66 -0
  113. package/dist/lib/repository/sourceref/RecipeSourceRefRepository.js +182 -0
  114. package/dist/lib/repository/sync/SyncRepoAdapter.d.ts +58 -0
  115. package/dist/lib/repository/sync/SyncRepoAdapter.js +58 -0
  116. package/dist/lib/service/bootstrap/UiStartupTasks.js +5 -6
  117. package/dist/lib/service/bootstrap/bootstrap-event-types.d.ts +0 -1
  118. package/dist/lib/service/bootstrap/bootstrap-event-types.js +0 -1
  119. package/dist/lib/service/cleanup/CleanupService.js +8 -4
  120. package/dist/lib/service/delivery/CursorDeliveryPipeline.js +21 -9
  121. package/dist/lib/service/evolution/ConsolidationAdvisor.d.ts +4 -9
  122. package/dist/lib/service/evolution/ConsolidationAdvisor.js +34 -70
  123. package/dist/lib/service/evolution/ContentPatcher.d.ts +4 -12
  124. package/dist/lib/service/evolution/ContentPatcher.js +48 -19
  125. package/dist/lib/service/evolution/ContradictionDetector.d.ts +3 -7
  126. package/dist/lib/service/evolution/ContradictionDetector.js +17 -24
  127. package/dist/lib/service/evolution/DecayDetector.d.ts +10 -9
  128. package/dist/lib/service/evolution/DecayDetector.js +63 -57
  129. package/dist/lib/service/evolution/EnhancementSuggester.d.ts +3 -9
  130. package/dist/lib/service/evolution/EnhancementSuggester.js +42 -86
  131. package/dist/lib/service/evolution/KnowledgeMetabolism.d.ts +4 -4
  132. package/dist/lib/service/evolution/KnowledgeMetabolism.js +102 -71
  133. package/dist/lib/service/evolution/ProposalExecutor.d.ts +5 -12
  134. package/dist/lib/service/evolution/ProposalExecutor.js +64 -69
  135. package/dist/lib/service/evolution/RecipeLifecycleSupervisor.d.ts +9 -14
  136. package/dist/lib/service/evolution/RecipeLifecycleSupervisor.js +94 -155
  137. package/dist/lib/service/evolution/RecipeRelevanceAuditor.d.ts +4 -1
  138. package/dist/lib/service/evolution/RecipeRelevanceAuditor.js +50 -49
  139. package/dist/lib/service/evolution/RedundancyAnalyzer.d.ts +3 -7
  140. package/dist/lib/service/evolution/RedundancyAnalyzer.js +15 -22
  141. package/dist/lib/service/evolution/StagingManager.d.ts +6 -15
  142. package/dist/lib/service/evolution/StagingManager.js +37 -95
  143. package/dist/lib/service/evolution/createSupersedeProposal.d.ts +1 -1
  144. package/dist/lib/service/evolution/createSupersedeProposal.js +7 -8
  145. package/dist/lib/service/guard/CoverageAnalyzer.d.ts +3 -7
  146. package/dist/lib/service/guard/CoverageAnalyzer.js +9 -11
  147. package/dist/lib/service/guard/GuardCheckEngine.d.ts +3 -0
  148. package/dist/lib/service/guard/GuardCheckEngine.js +14 -22
  149. package/dist/lib/service/guard/ReverseGuard.d.ts +4 -7
  150. package/dist/lib/service/guard/ReverseGuard.js +21 -31
  151. package/dist/lib/service/guard/ViolationsStore.d.ts +15 -21
  152. package/dist/lib/service/guard/ViolationsStore.js +75 -69
  153. package/dist/lib/service/knowledge/CodeEntityGraph.d.ts +39 -63
  154. package/dist/lib/service/knowledge/CodeEntityGraph.js +418 -512
  155. package/dist/lib/service/knowledge/ConfidenceRouter.js +18 -9
  156. package/dist/lib/service/knowledge/KnowledgeFileWriter.d.ts +2 -1
  157. package/dist/lib/service/knowledge/KnowledgeGraphService.d.ts +18 -60
  158. package/dist/lib/service/knowledge/KnowledgeGraphService.js +58 -109
  159. package/dist/lib/service/knowledge/KnowledgeService.d.ts +15 -1
  160. package/dist/lib/service/knowledge/KnowledgeService.js +76 -38
  161. package/dist/lib/service/knowledge/RecipeProductionGateway.d.ts +0 -2
  162. package/dist/lib/service/knowledge/RecipeProductionGateway.js +0 -2
  163. package/dist/lib/service/knowledge/SourceRefReconciler.d.ts +5 -13
  164. package/dist/lib/service/knowledge/SourceRefReconciler.js +58 -78
  165. package/dist/lib/service/panorama/CouplingAnalyzer.d.ts +5 -3
  166. package/dist/lib/service/panorama/CouplingAnalyzer.js +102 -39
  167. package/dist/lib/service/panorama/DimensionAnalyzer.d.ts +7 -4
  168. package/dist/lib/service/panorama/DimensionAnalyzer.js +72 -25
  169. package/dist/lib/service/panorama/LayerInferrer.js +1 -1
  170. package/dist/lib/service/panorama/ModuleDiscoverer.d.ts +7 -6
  171. package/dist/lib/service/panorama/ModuleDiscoverer.js +174 -82
  172. package/dist/lib/service/panorama/PanoramaAggregator.d.ts +10 -3
  173. package/dist/lib/service/panorama/PanoramaAggregator.js +67 -79
  174. package/dist/lib/service/panorama/PanoramaScanner.d.ts +5 -1
  175. package/dist/lib/service/panorama/PanoramaScanner.js +32 -31
  176. package/dist/lib/service/panorama/PanoramaService.d.ts +11 -8
  177. package/dist/lib/service/panorama/PanoramaService.js +41 -66
  178. package/dist/lib/service/panorama/PanoramaTypes.d.ts +3 -0
  179. package/dist/lib/service/panorama/RoleRefiner.d.ts +8 -5
  180. package/dist/lib/service/panorama/RoleRefiner.js +52 -283
  181. package/dist/lib/service/panorama/TechStackProfiler.js +7 -119
  182. package/dist/lib/service/quality/QualityScorer.d.ts +45 -26
  183. package/dist/lib/service/quality/QualityScorer.js +157 -83
  184. package/dist/lib/service/search/SearchEngine.d.ts +1 -0
  185. package/dist/lib/service/search/SearchEngine.js +32 -37
  186. package/dist/lib/service/signal/HitRecorder.js +5 -5
  187. package/dist/lib/service/skills/RuleRecallStrategy.js +7 -3
  188. package/dist/lib/service/skills/SignalCollector.d.ts +5 -8
  189. package/dist/lib/service/skills/SignalCollector.js +28 -55
  190. package/dist/lib/service/skills/SkillAdvisor.d.ts +7 -13
  191. package/dist/lib/service/skills/SkillAdvisor.js +30 -79
  192. package/dist/lib/service/vector/SyncCoordinator.d.ts +3 -1
  193. package/dist/lib/service/vector/SyncCoordinator.js +25 -3
  194. package/dist/lib/service/vector/VectorService.d.ts +2 -0
  195. package/dist/lib/service/vector/VectorService.js +3 -0
  196. package/dist/lib/service/wiki/WikiGenerator.js +1 -1
  197. package/dist/lib/shared/LanguageProfiles.d.ts +109 -0
  198. package/dist/lib/shared/LanguageProfiles.js +939 -0
  199. package/dist/lib/shared/LanguageService.d.ts +6 -0
  200. package/dist/lib/shared/LanguageService.js +16 -0
  201. package/dist/lib/shared/PathGuard.js +16 -10
  202. package/dist/lib/shared/constants.d.ts +19 -19
  203. package/dist/lib/shared/constants.js +10 -10
  204. package/dist/lib/shared/isOwnDevRepo.d.ts +29 -4
  205. package/dist/lib/shared/isOwnDevRepo.js +64 -4
  206. package/dist/lib/shared/schemas/mcp-tools.d.ts +1 -1
  207. package/dist/lib/types/project-snapshot-builder.d.ts +0 -1
  208. package/dist/lib/types/project-snapshot-builder.js +0 -1
  209. package/dist/lib/types/project-snapshot.d.ts +0 -1
  210. package/dist/lib/types/project-snapshot.js +0 -1
  211. package/dist/lib/types/snapshot-views.d.ts +0 -2
  212. package/dist/lib/types/snapshot-views.js +0 -1
  213. package/package.json +2 -1
  214. package/dashboard/dist/assets/icons-FHns2ypa.js +0 -1
  215. package/dashboard/dist/assets/index-BRJv5Y3r.js +0 -135
  216. package/dashboard/dist/assets/index-DzoB7kxK.css +0 -1
  217. package/dist/lib/repository/base/BaseRepository.d.ts +0 -53
  218. package/dist/lib/repository/base/BaseRepository.js +0 -226
@@ -23,18 +23,10 @@
23
23
  * @module CodeEntityGraph
24
24
  */
25
25
  import Logger from '../../infrastructure/logging/Logger.js';
26
- interface CeDbLike {
27
- getDb?: () => CeDbLike;
28
- transaction(fn: () => void): () => void;
29
- exec(sql: string): void;
30
- prepare(sql: string): {
31
- run(...params: unknown[]): {
32
- changes: number;
33
- };
34
- get(...params: unknown[]): Record<string, unknown> | undefined;
35
- all(...params: unknown[]): Record<string, unknown>[];
36
- };
37
- }
26
+ import type { CodeEntityRepositoryImpl } from '../../repository/code/CodeEntityRepository.js';
27
+ import type { KnowledgeEdgeRepositoryImpl } from '../../repository/knowledge/KnowledgeEdgeRepository.js';
28
+ type EntityRepoLike = Pick<CodeEntityRepositoryImpl, 'upsert' | 'batchUpsert' | 'findByEntityId' | 'findByEntityIdOnly' | 'listByType' | 'searchByName' | 'clearProject' | 'deleteByFile' | 'deleteByFileAndType' | 'countByType'>;
29
+ type EdgeRepoLike = Pick<KnowledgeEdgeRepositoryImpl, 'upsertEdge' | 'removeEdge' | 'findOutgoing' | 'findIncoming' | 'findIncomingByRelation' | 'findOutgoingByRelation' | 'findOutgoingToId' | 'findIncomingByFromTypes' | 'findConformances' | 'findByRelation' | 'countByRelation' | 'getHotNodes' | 'countIncomingByRelation' | 'countByRelationType' | 'deleteByMetadataLike'>;
38
30
  interface AstClass {
39
31
  name: string;
40
32
  isCategory?: boolean;
@@ -144,16 +136,6 @@ interface MappedEdge {
144
136
  weight: number;
145
137
  metadata: Record<string, unknown>;
146
138
  }
147
- interface PreparedStatements {
148
- upsert: ReturnType<CeDbLike['prepare']>;
149
- getEntity: ReturnType<CeDbLike['prepare']>;
150
- listByType: ReturnType<CeDbLike['prepare']>;
151
- clearEntities: ReturnType<CeDbLike['prepare']>;
152
- addEdge: ReturnType<CeDbLike['prepare']>;
153
- getCallers: ReturnType<CeDbLike['prepare']>;
154
- getCallees: ReturnType<CeDbLike['prepare']>;
155
- getEdge: ReturnType<CeDbLike['prepare']>;
156
- }
157
139
  interface SearchOptions {
158
140
  type?: string;
159
141
  limit?: number;
@@ -165,10 +147,8 @@ interface ContextAgentOptions {
165
147
  export declare class CodeEntityGraph {
166
148
  #private;
167
149
  projectRoot: string;
168
- db: CeDbLike;
169
150
  log: ReturnType<typeof Logger.getInstance>;
170
- stmts: PreparedStatements;
171
- constructor(db: CeDbLike, options?: {
151
+ constructor(entityRepo: EntityRepoLike, edgeRepo: EdgeRepoLike, options?: {
172
152
  projectRoot?: string;
173
153
  logger?: ReturnType<typeof Logger.getInstance>;
174
154
  });
@@ -179,7 +159,7 @@ export declare class CodeEntityGraph {
179
159
  *
180
160
  * @param astSummary analyzeProject() 产出的 ProjectAstSummary
181
161
  */
182
- populateFromAst(astSummary: ProjectAstSummary | null): GraphPopulateResult;
162
+ populateFromAst(astSummary: ProjectAstSummary | null): Promise<GraphPopulateResult>;
183
163
  /**
184
164
  * 从 SPM 依赖图填充模块实体 (Phase 2)
185
165
  *
@@ -188,56 +168,53 @@ export declare class CodeEntityGraph {
188
168
  *
189
169
  * @param depGraphData spm.getDependencyGraph() 产出
190
170
  */
191
- populateFromSpm(depGraphData: DepGraphData | null): GraphPopulateResult;
171
+ populateFromSpm(depGraphData: DepGraphData | null): Promise<GraphPopulateResult>;
192
172
  /**
193
173
  * 从候选的 Relations 字段提取边写入图谱 (Phase 5/6)
194
174
  *
195
175
  * @param candidates 扁平关系数组或 Relations 对象
196
176
  */
197
- populateFromCandidateRelations(candidates: CandidateWithRelations[] | null): GraphPopulateResult;
177
+ populateFromCandidateRelations(candidates: CandidateWithRelations[] | null): Promise<GraphPopulateResult>;
198
178
  /** 获取单个实体信息 */
199
- getEntity(entityId: string, entityType?: string): MappedCodeEntity | null;
179
+ getEntity(entityId: string, entityType?: string): Promise<MappedCodeEntity | null>;
200
180
  /**
201
181
  * 按类型列出所有实体
202
182
  * @param entityType 'class'|'protocol'|'category'|'module'|'pattern'
203
183
  */
204
- listEntities(entityType: string, limit?: number): MappedCodeEntity[];
184
+ listEntities(entityType: string, limit?: number): Promise<MappedCodeEntity[]>;
205
185
  /**
206
186
  * 搜索实体 (名称模糊匹配)
207
187
  * @param [options.type] 过滤类型
208
188
  */
209
- searchEntities(query: string, options?: SearchOptions): MappedCodeEntity[];
189
+ searchEntities(query: string, options?: SearchOptions): Promise<MappedCodeEntity[]>;
210
190
  /**
211
191
  * 获取实体的所有关系边
212
- * @returns }
213
192
  */
214
- getEntityEdges(entityId: string, entityType: string, direction?: string): {
193
+ getEntityEdges(entityId: string, entityType: string, direction?: string): Promise<{
215
194
  outgoing: MappedEdge[];
216
195
  incoming: MappedEdge[];
217
- };
196
+ }>;
218
197
  /**
219
198
  * 获取继承链 (向上遍历 inherits 边)
220
199
  * @returns 继承链 [class, parent, grandparent, ...]
221
200
  */
222
- getInheritanceChain(className: string, maxDepth?: number): string[];
201
+ getInheritanceChain(className: string, maxDepth?: number): Promise<string[]>;
223
202
  /**
224
203
  * 获取所有子类/实现者 (向下遍历)
225
204
  * @param entityType 'class'|'protocol'
226
- * @returns >}
227
205
  */
228
- getDescendants(entityId: string, entityType: string, maxDepth?: number): {
206
+ getDescendants(entityId: string, entityType: string, maxDepth?: number): Promise<{
229
207
  id: string;
230
208
  type: string;
231
209
  depth: number;
232
210
  relation: string;
233
- }[];
211
+ }[]>;
234
212
  /** 获取协议遵循关系 (className → 遵循的协议列表) */
235
- getConformances(className: string): string[];
213
+ getConformances(className: string): Promise<string[]>;
236
214
  /**
237
215
  * 查找两个实体间的路径 (BFS)
238
- * @returns }
239
216
  */
240
- findPath(fromId: string, fromType: string, toId: string, toType: string, maxDepth?: number): {
217
+ findPath(fromId: string, fromType: string, toId: string, toType: string, maxDepth?: number): Promise<{
241
218
  found: boolean;
242
219
  path: {
243
220
  from: {
@@ -251,60 +228,59 @@ export declare class CodeEntityGraph {
251
228
  relation: string;
252
229
  }[];
253
230
  depth: number;
254
- };
231
+ }>;
255
232
  /**
256
233
  * 影响分析: 修改某实体后,哪些实体可能受影响
257
- * @returns >}
258
234
  */
259
- getImpactRadius(entityId: string, entityType: string, maxDepth?: number): {
235
+ getImpactRadius(entityId: string, entityType: string, maxDepth?: number): Promise<{
260
236
  id: string;
261
237
  type: string;
262
238
  relation: string;
263
239
  depth: number;
264
- }[];
240
+ }[]>;
265
241
  /** 项目拓扑概览 — 统计信息 + 关键度排名 */
266
- getTopology(): {
267
- entities: any;
268
- edges: any;
242
+ getTopology(): Promise<{
243
+ entities: Record<string, number>;
244
+ edges: Record<string, number>;
269
245
  totalEntities: number;
270
246
  totalEdges: number;
271
247
  hotNodes: {
272
- id: unknown;
273
- type: unknown;
274
- inDegree: unknown;
248
+ id: string;
249
+ type: string;
250
+ inDegree: number;
275
251
  }[];
276
- };
252
+ }>;
277
253
  /** 生成 Agent 可用的图谱上下文 (Markdown) */
278
- generateContextForAgent(options?: ContextAgentOptions): string;
254
+ generateContextForAgent(options?: ContextAgentOptions): Promise<string>;
279
255
  /**
280
256
  * 从解析后的调用边填充图谱 (Phase 5)
281
257
  *
282
258
  * @param callEdges
283
259
  * @param dataFlowEdges
284
260
  */
285
- populateCallGraph(callEdges: CallEdge[], dataFlowEdges: DataFlowEdge[]): GraphPopulateResult;
261
+ populateCallGraph(callEdges: CallEdge[], dataFlowEdges: DataFlowEdge[]): Promise<GraphPopulateResult>;
286
262
  /**
287
263
  * 获取调用者 — 谁调用了这个方法?
288
264
  *
289
265
  * @param methodId "ClassName.methodName" 或 FQN
290
266
  * @returns >}
291
267
  */
292
- getCallers(methodId: string, maxDepth?: number): {
268
+ getCallers(methodId: string, maxDepth?: number): Promise<{
293
269
  caller: string;
294
270
  depth: number;
295
271
  callType: string;
296
- }[];
272
+ }[]>;
297
273
  /**
298
274
  * 获取被调用者 — 这个方法调用了谁?
299
275
  *
300
276
  * @param methodId "ClassName.methodName" 或 FQN
301
277
  * @returns >}
302
278
  */
303
- getCallees(methodId: string, maxDepth?: number): {
279
+ getCallees(methodId: string, maxDepth?: number): Promise<{
304
280
  callee: string;
305
281
  depth: number;
306
282
  callType: string;
307
- }[];
283
+ }[]>;
308
284
  /**
309
285
  * 获取方法的 Impact Radius (基于调用图)
310
286
  * — 修改此方法可能影响哪些上游方法?
@@ -312,11 +288,11 @@ export declare class CodeEntityGraph {
312
288
  * @param methodId "ClassName.methodName"
313
289
  * @returns }
314
290
  */
315
- getCallImpactRadius(methodId: string): {
291
+ getCallImpactRadius(methodId: string): Promise<{
316
292
  directCallers: number;
317
293
  transitiveCallers: number;
318
294
  affectedFiles: string[];
319
- };
295
+ }>;
320
296
  /**
321
297
  * 从 FQN 中提取短 Entity ID
322
298
  *
@@ -325,16 +301,16 @@ export declare class CodeEntityGraph {
325
301
  */
326
302
  _extractEntityId(fqn: string): string;
327
303
  /** 清除项目的所有代码实体 (重新 populate 前调用) */
328
- clearProject(): void;
304
+ clearProject(): Promise<void>;
329
305
  /**
330
306
  * 增量清除 — 仅删除指定文件的 call graph 边和 method 实体
331
307
  *
332
308
  * @param filePaths 变更文件的相对路径列表
333
309
  * @returns }
334
310
  */
335
- clearCallGraphForFiles(filePaths: string[] | null): {
311
+ clearCallGraphForFiles(filePaths: string[] | null): Promise<{
336
312
  deletedEdges: number;
337
313
  deletedEntities: number;
338
- };
314
+ }>;
339
315
  }
340
316
  export default CodeEntityGraph;