autosnippet 3.2.9 → 3.2.11
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 +36 -54
- package/config/default.json +19 -1
- package/dashboard/dist/assets/icons-0-btqT36.js +531 -0
- package/dashboard/dist/assets/index--XYC2yVO.js +128 -0
- package/dashboard/dist/assets/index-DNCrgh_C.css +1 -0
- package/dashboard/dist/index.html +3 -3
- package/dist/bin/api-server.d.ts +7 -0
- package/dist/bin/api-server.d.ts.map +1 -0
- package/dist/bin/api-server.js +87 -0
- package/dist/bin/api-server.js.map +1 -0
- package/dist/bin/cli.d.ts +20 -0
- package/dist/bin/cli.d.ts.map +1 -0
- package/dist/bin/cli.js +1169 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/bin/mcp-server.d.ts +28 -0
- package/dist/bin/mcp-server.d.ts.map +1 -0
- package/dist/bin/mcp-server.js +59 -0
- package/dist/bin/mcp-server.js.map +1 -0
- package/dist/lib/bootstrap.d.ts +92 -0
- package/dist/lib/bootstrap.d.ts.map +1 -0
- package/dist/lib/bootstrap.js +206 -0
- package/dist/lib/bootstrap.js.map +1 -0
- package/dist/lib/cli/AiScanService.d.ts +72 -0
- package/dist/lib/cli/AiScanService.d.ts.map +1 -0
- package/dist/lib/cli/AiScanService.js +252 -0
- package/dist/lib/cli/AiScanService.js.map +1 -0
- package/dist/lib/cli/CliLogger.d.ts +41 -0
- package/dist/lib/cli/CliLogger.d.ts.map +1 -0
- package/dist/lib/cli/CliLogger.js +73 -0
- package/dist/lib/cli/CliLogger.js.map +1 -0
- package/dist/lib/cli/KnowledgeSyncService.d.ts +156 -0
- package/dist/lib/cli/KnowledgeSyncService.d.ts.map +1 -0
- package/dist/lib/cli/KnowledgeSyncService.js +338 -0
- package/dist/lib/cli/KnowledgeSyncService.js.map +1 -0
- package/dist/lib/cli/SetupService.d.ts +136 -0
- package/dist/lib/cli/SetupService.d.ts.map +1 -0
- package/dist/lib/cli/SetupService.js +510 -0
- package/dist/lib/cli/SetupService.js.map +1 -0
- package/dist/lib/cli/UpgradeService.d.ts +30 -0
- package/dist/lib/cli/UpgradeService.d.ts.map +1 -0
- package/dist/lib/cli/UpgradeService.js +83 -0
- package/dist/lib/cli/UpgradeService.js.map +1 -0
- package/dist/lib/cli/deploy/FileDeployer.d.ts +108 -0
- package/dist/lib/cli/deploy/FileDeployer.d.ts.map +1 -0
- package/dist/lib/cli/deploy/FileDeployer.js +543 -0
- package/dist/lib/cli/deploy/FileDeployer.js.map +1 -0
- package/dist/lib/cli/deploy/FileManifest.d.ts +210 -0
- package/dist/lib/cli/deploy/FileManifest.d.ts.map +1 -0
- package/dist/lib/cli/deploy/FileManifest.js +252 -0
- package/dist/lib/cli/deploy/FileManifest.js.map +1 -0
- package/dist/lib/core/AstAnalyzer.d.ts +278 -0
- package/dist/lib/core/AstAnalyzer.d.ts.map +1 -0
- package/dist/lib/core/AstAnalyzer.js +774 -0
- package/dist/lib/core/AstAnalyzer.js.map +1 -0
- package/dist/lib/core/analysis/CallEdgeResolver.d.ts +145 -0
- package/dist/lib/core/analysis/CallEdgeResolver.d.ts.map +1 -0
- package/dist/lib/core/analysis/CallEdgeResolver.js +374 -0
- package/dist/lib/core/analysis/CallEdgeResolver.js.map +1 -0
- package/dist/lib/core/analysis/CallGraphAnalyzer.d.ts +139 -0
- package/dist/lib/core/analysis/CallGraphAnalyzer.d.ts.map +1 -0
- package/dist/lib/core/analysis/CallGraphAnalyzer.js +313 -0
- package/dist/lib/core/analysis/CallGraphAnalyzer.js.map +1 -0
- package/dist/lib/core/analysis/CallSiteExtractor.d.ts +79 -0
- package/dist/lib/core/analysis/CallSiteExtractor.d.ts.map +1 -0
- package/dist/lib/core/analysis/CallSiteExtractor.js +654 -0
- package/dist/lib/core/analysis/CallSiteExtractor.js.map +1 -0
- package/dist/lib/core/analysis/DataFlowInferrer.d.ts +37 -0
- package/dist/lib/core/analysis/DataFlowInferrer.d.ts.map +1 -0
- package/dist/lib/core/analysis/DataFlowInferrer.js +52 -0
- package/dist/lib/core/analysis/DataFlowInferrer.js.map +1 -0
- package/dist/lib/core/analysis/ImportPathResolver.d.ts +59 -0
- package/dist/lib/core/analysis/ImportPathResolver.d.ts.map +1 -0
- package/dist/lib/core/analysis/ImportPathResolver.js +189 -0
- package/dist/lib/core/analysis/ImportPathResolver.js.map +1 -0
- package/dist/lib/core/analysis/ImportRecord.d.ts +63 -0
- package/dist/lib/core/analysis/ImportRecord.d.ts.map +1 -0
- package/dist/lib/core/analysis/ImportRecord.js +93 -0
- package/dist/lib/core/analysis/ImportRecord.js.map +1 -0
- package/dist/lib/core/analysis/SymbolTableBuilder.d.ts +84 -0
- package/dist/lib/core/analysis/SymbolTableBuilder.d.ts.map +1 -0
- package/dist/lib/core/analysis/SymbolTableBuilder.js +194 -0
- package/dist/lib/core/analysis/SymbolTableBuilder.js.map +1 -0
- package/dist/lib/core/ast/ProjectGraph.d.ts +161 -0
- package/dist/lib/core/ast/ProjectGraph.d.ts.map +1 -0
- package/dist/lib/core/ast/ProjectGraph.js +729 -0
- package/dist/lib/core/ast/ProjectGraph.js.map +1 -0
- package/dist/lib/core/ast/ensure-grammars.d.ts +42 -0
- package/dist/lib/core/ast/ensure-grammars.d.ts.map +1 -0
- package/dist/lib/core/ast/ensure-grammars.js +114 -0
- package/dist/lib/core/ast/ensure-grammars.js.map +1 -0
- package/dist/lib/core/ast/index.d.ts +31 -0
- package/dist/lib/core/ast/index.d.ts.map +1 -0
- package/dist/lib/core/ast/index.js +155 -0
- package/dist/lib/core/ast/index.js.map +1 -0
- package/dist/lib/core/ast/lang-dart.d.ts +35 -0
- package/dist/lib/core/ast/lang-dart.d.ts.map +1 -0
- package/dist/lib/core/ast/lang-dart.js +873 -0
- package/dist/lib/core/ast/lang-dart.js.map +1 -0
- package/dist/lib/core/ast/lang-go.d.ts +32 -0
- package/dist/lib/core/ast/lang-go.d.ts.map +1 -0
- package/dist/lib/core/ast/lang-go.js +680 -0
- package/dist/lib/core/ast/lang-go.js.map +1 -0
- package/dist/lib/core/ast/lang-java.d.ts +25 -0
- package/dist/lib/core/ast/lang-java.d.ts.map +1 -0
- package/dist/lib/core/ast/lang-java.js +592 -0
- package/dist/lib/core/ast/lang-java.js.map +1 -0
- package/dist/lib/core/ast/lang-javascript.d.ts +18 -0
- package/dist/lib/core/ast/lang-javascript.d.ts.map +1 -0
- package/dist/lib/core/ast/lang-javascript.js +233 -0
- package/dist/lib/core/ast/lang-javascript.js.map +1 -0
- package/dist/lib/core/ast/lang-kotlin.d.ts +24 -0
- package/dist/lib/core/ast/lang-kotlin.d.ts.map +1 -0
- package/dist/lib/core/ast/lang-kotlin.js +699 -0
- package/dist/lib/core/ast/lang-kotlin.js.map +1 -0
- package/dist/lib/core/ast/lang-objc.d.ts +16 -0
- package/dist/lib/core/ast/lang-objc.d.ts.map +1 -0
- package/dist/lib/core/ast/lang-objc.js +341 -0
- package/dist/lib/core/ast/lang-objc.js.map +1 -0
- package/dist/lib/core/ast/lang-python.d.ts +23 -0
- package/dist/lib/core/ast/lang-python.d.ts.map +1 -0
- package/dist/lib/core/ast/lang-python.js +358 -0
- package/dist/lib/core/ast/lang-python.js.map +1 -0
- package/dist/lib/core/ast/lang-rust.d.ts +32 -0
- package/dist/lib/core/ast/lang-rust.d.ts.map +1 -0
- package/dist/lib/core/ast/lang-rust.js +919 -0
- package/dist/lib/core/ast/lang-rust.js.map +1 -0
- package/dist/lib/core/ast/lang-swift.d.ts +28 -0
- package/dist/lib/core/ast/lang-swift.d.ts.map +1 -0
- package/dist/lib/core/ast/lang-swift.js +456 -0
- package/dist/lib/core/ast/lang-swift.js.map +1 -0
- package/dist/lib/core/ast/lang-typescript.d.ts +32 -0
- package/dist/lib/core/ast/lang-typescript.d.ts.map +1 -0
- package/dist/lib/core/ast/lang-typescript.js +712 -0
- package/dist/lib/core/ast/lang-typescript.js.map +1 -0
- package/dist/lib/core/ast/parser-init.d.ts +33 -0
- package/dist/lib/core/ast/parser-init.d.ts.map +1 -0
- package/dist/lib/core/ast/parser-init.js +79 -0
- package/dist/lib/core/ast/parser-init.js.map +1 -0
- package/dist/lib/core/capability/CapabilityProbe.d.ts +105 -0
- package/dist/lib/core/capability/CapabilityProbe.d.ts.map +1 -0
- package/dist/lib/core/capability/CapabilityProbe.js +240 -0
- package/dist/lib/core/capability/CapabilityProbe.js.map +1 -0
- package/dist/lib/core/constitution/Constitution.d.ts +106 -0
- package/dist/lib/core/constitution/Constitution.d.ts.map +1 -0
- package/dist/lib/core/constitution/Constitution.js +132 -0
- package/dist/lib/core/constitution/Constitution.js.map +1 -0
- package/dist/lib/core/constitution/ConstitutionValidator.d.ts +60 -0
- package/dist/lib/core/constitution/ConstitutionValidator.d.ts.map +1 -0
- package/dist/lib/core/constitution/ConstitutionValidator.js +189 -0
- package/dist/lib/core/constitution/ConstitutionValidator.js.map +1 -0
- package/dist/lib/core/discovery/DartDiscoverer.d.ts +23 -0
- package/dist/lib/core/discovery/DartDiscoverer.d.ts.map +1 -0
- package/dist/lib/core/discovery/DartDiscoverer.js +490 -0
- package/dist/lib/core/discovery/DartDiscoverer.js.map +1 -0
- package/dist/lib/core/discovery/DiscovererRegistry.d.ts +38 -0
- package/dist/lib/core/discovery/DiscovererRegistry.d.ts.map +1 -0
- package/dist/lib/core/discovery/DiscovererRegistry.js +70 -0
- package/dist/lib/core/discovery/DiscovererRegistry.js.map +1 -0
- package/dist/lib/core/discovery/GenericDiscoverer.d.ts +27 -0
- package/dist/lib/core/discovery/GenericDiscoverer.d.ts.map +1 -0
- package/dist/lib/core/discovery/GenericDiscoverer.js +184 -0
- package/dist/lib/core/discovery/GenericDiscoverer.js.map +1 -0
- package/dist/lib/core/discovery/GoDiscoverer.d.ts +23 -0
- package/dist/lib/core/discovery/GoDiscoverer.d.ts.map +1 -0
- package/dist/lib/core/discovery/GoDiscoverer.js +507 -0
- package/dist/lib/core/discovery/GoDiscoverer.js.map +1 -0
- package/dist/lib/core/discovery/JvmDiscoverer.d.ts +25 -0
- package/dist/lib/core/discovery/JvmDiscoverer.d.ts.map +1 -0
- package/dist/lib/core/discovery/JvmDiscoverer.js +457 -0
- package/dist/lib/core/discovery/JvmDiscoverer.js.map +1 -0
- package/dist/lib/core/discovery/NodeDiscoverer.d.ts +23 -0
- package/dist/lib/core/discovery/NodeDiscoverer.d.ts.map +1 -0
- package/dist/lib/core/discovery/NodeDiscoverer.js +440 -0
- package/dist/lib/core/discovery/NodeDiscoverer.js.map +1 -0
- package/dist/lib/core/discovery/ProjectDiscoverer.d.ts +74 -0
- package/dist/lib/core/discovery/ProjectDiscoverer.d.ts.map +1 -0
- package/dist/lib/core/discovery/ProjectDiscoverer.js +52 -0
- package/dist/lib/core/discovery/ProjectDiscoverer.js.map +1 -0
- package/dist/lib/core/discovery/PythonDiscoverer.d.ts +23 -0
- package/dist/lib/core/discovery/PythonDiscoverer.d.ts.map +1 -0
- package/dist/lib/core/discovery/PythonDiscoverer.js +312 -0
- package/dist/lib/core/discovery/PythonDiscoverer.js.map +1 -0
- package/dist/lib/core/discovery/RustDiscoverer.d.ts +23 -0
- package/dist/lib/core/discovery/RustDiscoverer.d.ts.map +1 -0
- package/dist/lib/core/discovery/RustDiscoverer.js +492 -0
- package/dist/lib/core/discovery/RustDiscoverer.js.map +1 -0
- package/dist/lib/core/discovery/index.d.ts +25 -0
- package/dist/lib/core/discovery/index.d.ts.map +1 -0
- package/dist/lib/core/discovery/index.js +52 -0
- package/dist/lib/core/discovery/index.js.map +1 -0
- package/dist/lib/core/enhancement/EnhancementPack.d.ts +145 -0
- package/dist/lib/core/enhancement/EnhancementPack.d.ts.map +1 -0
- package/dist/lib/core/enhancement/EnhancementPack.js +64 -0
- package/dist/lib/core/enhancement/EnhancementPack.js.map +1 -0
- package/dist/lib/core/enhancement/EnhancementRegistry.d.ts +28 -0
- package/dist/lib/core/enhancement/EnhancementRegistry.d.ts.map +1 -0
- package/dist/lib/core/enhancement/EnhancementRegistry.js +43 -0
- package/dist/lib/core/enhancement/EnhancementRegistry.js.map +1 -0
- package/dist/lib/core/enhancement/android-enhancement.d.ts +30 -0
- package/dist/lib/core/enhancement/android-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/android-enhancement.js +95 -0
- package/dist/lib/core/enhancement/android-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/django-enhancement.d.ts +48 -0
- package/dist/lib/core/enhancement/django-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/django-enhancement.js +216 -0
- package/dist/lib/core/enhancement/django-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/fastapi-enhancement.d.ts +46 -0
- package/dist/lib/core/enhancement/fastapi-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/fastapi-enhancement.js +189 -0
- package/dist/lib/core/enhancement/fastapi-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/go-grpc-enhancement.d.ts +45 -0
- package/dist/lib/core/enhancement/go-grpc-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/go-grpc-enhancement.js +140 -0
- package/dist/lib/core/enhancement/go-grpc-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/go-web-enhancement.d.ts +42 -0
- package/dist/lib/core/enhancement/go-web-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/go-web-enhancement.js +186 -0
- package/dist/lib/core/enhancement/go-web-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/index.d.ts +25 -0
- package/dist/lib/core/enhancement/index.d.ts.map +1 -0
- package/dist/lib/core/enhancement/index.js +63 -0
- package/dist/lib/core/enhancement/index.js.map +1 -0
- package/dist/lib/core/enhancement/langchain-enhancement.d.ts +47 -0
- package/dist/lib/core/enhancement/langchain-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/langchain-enhancement.js +210 -0
- package/dist/lib/core/enhancement/langchain-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/ml-enhancement.d.ts +47 -0
- package/dist/lib/core/enhancement/ml-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/ml-enhancement.js +240 -0
- package/dist/lib/core/enhancement/ml-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/nextjs-enhancement.d.ts +47 -0
- package/dist/lib/core/enhancement/nextjs-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/nextjs-enhancement.js +201 -0
- package/dist/lib/core/enhancement/nextjs-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/node-server-enhancement.d.ts +45 -0
- package/dist/lib/core/enhancement/node-server-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/node-server-enhancement.js +242 -0
- package/dist/lib/core/enhancement/node-server-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/react-enhancement.d.ts +46 -0
- package/dist/lib/core/enhancement/react-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/react-enhancement.js +229 -0
- package/dist/lib/core/enhancement/react-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/rust-tokio-enhancement.d.ts +47 -0
- package/dist/lib/core/enhancement/rust-tokio-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/rust-tokio-enhancement.js +207 -0
- package/dist/lib/core/enhancement/rust-tokio-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/rust-web-enhancement.d.ts +45 -0
- package/dist/lib/core/enhancement/rust-web-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/rust-web-enhancement.js +229 -0
- package/dist/lib/core/enhancement/rust-web-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/spring-enhancement.d.ts +39 -0
- package/dist/lib/core/enhancement/spring-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/spring-enhancement.js +108 -0
- package/dist/lib/core/enhancement/spring-enhancement.js.map +1 -0
- package/dist/lib/core/enhancement/vue-enhancement.d.ts +54 -0
- package/dist/lib/core/enhancement/vue-enhancement.d.ts.map +1 -0
- package/dist/lib/core/enhancement/vue-enhancement.js +214 -0
- package/dist/lib/core/enhancement/vue-enhancement.js.map +1 -0
- package/dist/lib/core/gateway/Gateway.d.ts +135 -0
- package/dist/lib/core/gateway/Gateway.d.ts.map +1 -0
- package/dist/lib/core/gateway/Gateway.js +261 -0
- package/dist/lib/core/gateway/Gateway.js.map +1 -0
- package/dist/lib/core/gateway/GatewayActionRegistry.d.ts +35 -0
- package/dist/lib/core/gateway/GatewayActionRegistry.d.ts.map +1 -0
- package/dist/lib/core/gateway/GatewayActionRegistry.js +195 -0
- package/dist/lib/core/gateway/GatewayActionRegistry.js.map +1 -0
- package/dist/lib/core/permission/PermissionManager.d.ts +63 -0
- package/dist/lib/core/permission/PermissionManager.d.ts.map +1 -0
- package/dist/lib/core/permission/PermissionManager.js +221 -0
- package/dist/lib/core/permission/PermissionManager.js.map +1 -0
- package/dist/lib/domain/index.d.ts +14 -0
- package/dist/lib/domain/index.d.ts.map +1 -0
- package/dist/lib/domain/index.js +16 -0
- package/dist/lib/domain/index.js.map +1 -0
- package/dist/lib/domain/knowledge/KnowledgeEntry.d.ts +297 -0
- package/dist/lib/domain/knowledge/KnowledgeEntry.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/KnowledgeEntry.js +315 -0
- package/dist/lib/domain/knowledge/KnowledgeEntry.js.map +1 -0
- package/dist/lib/domain/knowledge/KnowledgeRepository.d.ts +36 -0
- package/dist/lib/domain/knowledge/KnowledgeRepository.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/KnowledgeRepository.js +46 -0
- package/dist/lib/domain/knowledge/KnowledgeRepository.js.map +1 -0
- package/dist/lib/domain/knowledge/Lifecycle.d.ts +50 -0
- package/dist/lib/domain/knowledge/Lifecycle.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/Lifecycle.js +91 -0
- package/dist/lib/domain/knowledge/Lifecycle.js.map +1 -0
- package/dist/lib/domain/knowledge/index.d.ts +13 -0
- package/dist/lib/domain/knowledge/index.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/index.js +17 -0
- package/dist/lib/domain/knowledge/index.js.map +1 -0
- package/dist/lib/domain/knowledge/values/Constraints.d.ts +84 -0
- package/dist/lib/domain/knowledge/values/Constraints.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/values/Constraints.js +115 -0
- package/dist/lib/domain/knowledge/values/Constraints.js.map +1 -0
- package/dist/lib/domain/knowledge/values/Content.d.ts +92 -0
- package/dist/lib/domain/knowledge/values/Content.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/values/Content.js +74 -0
- package/dist/lib/domain/knowledge/values/Content.js.map +1 -0
- package/dist/lib/domain/knowledge/values/Quality.d.ts +55 -0
- package/dist/lib/domain/knowledge/values/Quality.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/values/Quality.js +90 -0
- package/dist/lib/domain/knowledge/values/Quality.js.map +1 -0
- package/dist/lib/domain/knowledge/values/Reasoning.d.ts +47 -0
- package/dist/lib/domain/knowledge/values/Reasoning.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/values/Reasoning.js +75 -0
- package/dist/lib/domain/knowledge/values/Reasoning.js.map +1 -0
- package/dist/lib/domain/knowledge/values/Relations.d.ts +72 -0
- package/dist/lib/domain/knowledge/values/Relations.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/values/Relations.js +152 -0
- package/dist/lib/domain/knowledge/values/Relations.js.map +1 -0
- package/dist/lib/domain/knowledge/values/Stats.d.ts +55 -0
- package/dist/lib/domain/knowledge/values/Stats.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/values/Stats.js +74 -0
- package/dist/lib/domain/knowledge/values/Stats.js.map +1 -0
- package/dist/lib/domain/knowledge/values/index.d.ts +10 -0
- package/dist/lib/domain/knowledge/values/index.d.ts.map +1 -0
- package/dist/lib/domain/knowledge/values/index.js +10 -0
- package/dist/lib/domain/knowledge/values/index.js.map +1 -0
- package/dist/lib/domain/snippet/Snippet.d.ts +95 -0
- package/dist/lib/domain/snippet/Snippet.d.ts.map +1 -0
- package/dist/lib/domain/snippet/Snippet.js +110 -0
- package/dist/lib/domain/snippet/Snippet.js.map +1 -0
- package/dist/lib/domain/task/Task.d.ts +145 -0
- package/dist/lib/domain/task/Task.d.ts.map +1 -0
- package/dist/lib/domain/task/Task.js +259 -0
- package/dist/lib/domain/task/Task.js.map +1 -0
- package/dist/lib/domain/task/TaskDependency.d.ts +32 -0
- package/dist/lib/domain/task/TaskDependency.d.ts.map +1 -0
- package/dist/lib/domain/task/TaskDependency.js +43 -0
- package/dist/lib/domain/task/TaskDependency.js.map +1 -0
- package/dist/lib/domain/task/TaskIdGenerator.d.ts +42 -0
- package/dist/lib/domain/task/TaskIdGenerator.d.ts.map +1 -0
- package/dist/lib/domain/task/TaskIdGenerator.js +78 -0
- package/dist/lib/domain/task/TaskIdGenerator.js.map +1 -0
- package/dist/lib/domain/task/index.d.ts +7 -0
- package/dist/lib/domain/task/index.d.ts.map +1 -0
- package/dist/lib/domain/task/index.js +7 -0
- package/dist/lib/domain/task/index.js.map +1 -0
- package/dist/lib/external/ai/AiFactory.d.ts +66 -0
- package/dist/lib/external/ai/AiFactory.d.ts.map +1 -0
- package/dist/lib/external/ai/AiFactory.js +219 -0
- package/dist/lib/external/ai/AiFactory.js.map +1 -0
- package/dist/lib/external/ai/AiProvider.d.ts +311 -0
- package/dist/lib/external/ai/AiProvider.d.ts.map +1 -0
- package/dist/lib/external/ai/AiProvider.js +756 -0
- package/dist/lib/external/ai/AiProvider.js.map +1 -0
- package/dist/lib/external/ai/providers/ClaudeProvider.d.ts +40 -0
- package/dist/lib/external/ai/providers/ClaudeProvider.d.ts.map +1 -0
- package/dist/lib/external/ai/providers/ClaudeProvider.js +269 -0
- package/dist/lib/external/ai/providers/ClaudeProvider.js.map +1 -0
- package/dist/lib/external/ai/providers/GoogleGeminiProvider.d.ts +46 -0
- package/dist/lib/external/ai/providers/GoogleGeminiProvider.d.ts.map +1 -0
- package/dist/lib/external/ai/providers/GoogleGeminiProvider.js +402 -0
- package/dist/lib/external/ai/providers/GoogleGeminiProvider.js.map +1 -0
- package/dist/lib/external/ai/providers/MockProvider.d.ts +34 -0
- package/dist/lib/external/ai/providers/MockProvider.d.ts.map +1 -0
- package/dist/lib/external/ai/providers/MockProvider.js +59 -0
- package/dist/lib/external/ai/providers/MockProvider.js.map +1 -0
- package/dist/lib/external/ai/providers/OpenAiProvider.d.ts +43 -0
- package/dist/lib/external/ai/providers/OpenAiProvider.d.ts.map +1 -0
- package/dist/lib/external/ai/providers/OpenAiProvider.js +271 -0
- package/dist/lib/external/ai/providers/OpenAiProvider.js.map +1 -0
- package/dist/lib/external/mcp/McpServer.d.ts +127 -0
- package/dist/lib/external/mcp/McpServer.d.ts.map +1 -0
- package/dist/lib/external/mcp/McpServer.js +429 -0
- package/dist/lib/external/mcp/McpServer.js.map +1 -0
- package/dist/lib/external/mcp/autoApproveInjector.d.ts +59 -0
- package/dist/lib/external/mcp/autoApproveInjector.d.ts.map +1 -0
- package/dist/lib/external/mcp/autoApproveInjector.js +148 -0
- package/dist/lib/external/mcp/autoApproveInjector.js.map +1 -0
- package/dist/lib/external/mcp/envelope.d.ts +41 -0
- package/dist/lib/external/mcp/envelope.d.ts.map +1 -0
- package/dist/lib/external/mcp/envelope.js +24 -0
- package/dist/lib/external/mcp/envelope.js.map +1 -0
- package/dist/lib/external/mcp/errorHandler.d.ts +33 -0
- package/dist/lib/external/mcp/errorHandler.d.ts.map +1 -0
- package/dist/lib/external/mcp/errorHandler.js +123 -0
- package/dist/lib/external/mcp/errorHandler.js.map +1 -0
- package/dist/lib/external/mcp/handlers/LanguageExtensions.d.ts +33 -0
- package/dist/lib/external/mcp/handlers/LanguageExtensions.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/LanguageExtensions.js +941 -0
- package/dist/lib/external/mcp/handlers/LanguageExtensions.js.map +1 -0
- package/dist/lib/external/mcp/handlers/TargetClassifier.d.ts +12 -0
- package/dist/lib/external/mcp/handlers/TargetClassifier.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/TargetClassifier.js +69 -0
- package/dist/lib/external/mcp/handlers/TargetClassifier.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/BootstrapSession.d.ts +165 -0
- package/dist/lib/external/mcp/handlers/bootstrap/BootstrapSession.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/BootstrapSession.js +230 -0
- package/dist/lib/external/mcp/handlers/bootstrap/BootstrapSession.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/ExternalSubmissionTracker.d.ts +186 -0
- package/dist/lib/external/mcp/handlers/bootstrap/ExternalSubmissionTracker.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/ExternalSubmissionTracker.js +315 -0
- package/dist/lib/external/mcp/handlers/bootstrap/ExternalSubmissionTracker.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.d.ts +299 -0
- package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.js +817 -0
- package/dist/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/base-dimensions.d.ts +110 -0
- package/dist/lib/external/mcp/handlers/bootstrap/base-dimensions.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/base-dimensions.js +219 -0
- package/dist/lib/external/mcp/handlers/bootstrap/base-dimensions.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.d.ts +168 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.js +535 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.d.ts +87 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.js +190 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/checkpoint.d.ts +33 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/checkpoint.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/checkpoint.js +86 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/checkpoint.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.d.ts +148 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.js +186 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-context.d.ts +154 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-context.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-context.js +213 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/dimension-context.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/noAiFallback.d.ts +170 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/noAiFallback.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/noAiFallback.js +728 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/noAiFallback.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.d.ts +53 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js +1287 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/tier-scheduler.d.ts +65 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/tier-scheduler.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/tier-scheduler.js +154 -0
- package/dist/lib/external/mcp/handlers/bootstrap/pipeline/tier-scheduler.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/refine.d.ts +35 -0
- package/dist/lib/external/mcp/handlers/bootstrap/refine.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/refine.js +343 -0
- package/dist/lib/external/mcp/handlers/bootstrap/refine.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.d.ts +377 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.js +776 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-sop.d.ts +371 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-sop.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-sop.js +809 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-sop.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-text.d.ts +172 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-text.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-text.js +212 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/dimension-text.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/skill-generator.d.ts +43 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/skill-generator.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/skill-generator.js +237 -0
- package/dist/lib/external/mcp/handlers/bootstrap/shared/skill-generator.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/skills.d.ts +68 -0
- package/dist/lib/external/mcp/handlers/bootstrap/skills.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap/skills.js +102 -0
- package/dist/lib/external/mcp/handlers/bootstrap/skills.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap-external.d.ts +78 -0
- package/dist/lib/external/mcp/handlers/bootstrap-external.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap-external.js +163 -0
- package/dist/lib/external/mcp/handlers/bootstrap-external.js.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap-internal.d.ts +111 -0
- package/dist/lib/external/mcp/handlers/bootstrap-internal.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/bootstrap-internal.js +392 -0
- package/dist/lib/external/mcp/handlers/bootstrap-internal.js.map +1 -0
- package/dist/lib/external/mcp/handlers/browse.d.ts +151 -0
- package/dist/lib/external/mcp/handlers/browse.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/browse.js +287 -0
- package/dist/lib/external/mcp/handlers/browse.js.map +1 -0
- package/dist/lib/external/mcp/handlers/candidate.d.ts +66 -0
- package/dist/lib/external/mcp/handlers/candidate.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/candidate.js +224 -0
- package/dist/lib/external/mcp/handlers/candidate.js.map +1 -0
- package/dist/lib/external/mcp/handlers/consolidated.d.ts +446 -0
- package/dist/lib/external/mcp/handlers/consolidated.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/consolidated.js +292 -0
- package/dist/lib/external/mcp/handlers/consolidated.js.map +1 -0
- package/dist/lib/external/mcp/handlers/dimension-complete-external.d.ts +57 -0
- package/dist/lib/external/mcp/handlers/dimension-complete-external.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/dimension-complete-external.js +395 -0
- package/dist/lib/external/mcp/handlers/dimension-complete-external.js.map +1 -0
- package/dist/lib/external/mcp/handlers/guard.d.ts +275 -0
- package/dist/lib/external/mcp/handlers/guard.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/guard.js +612 -0
- package/dist/lib/external/mcp/handlers/guard.js.map +1 -0
- package/dist/lib/external/mcp/handlers/knowledge.d.ts +110 -0
- package/dist/lib/external/mcp/handlers/knowledge.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/knowledge.js +334 -0
- package/dist/lib/external/mcp/handlers/knowledge.js.map +1 -0
- package/dist/lib/external/mcp/handlers/search.d.ts +139 -0
- package/dist/lib/external/mcp/handlers/search.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/search.js +265 -0
- package/dist/lib/external/mcp/handlers/search.js.map +1 -0
- package/dist/lib/external/mcp/handlers/skill.d.ts +83 -0
- package/dist/lib/external/mcp/handlers/skill.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/skill.js +634 -0
- package/dist/lib/external/mcp/handlers/skill.js.map +1 -0
- package/dist/lib/external/mcp/handlers/structure.d.ts +189 -0
- package/dist/lib/external/mcp/handlers/structure.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/structure.js +593 -0
- package/dist/lib/external/mcp/handlers/structure.js.map +1 -0
- package/dist/lib/external/mcp/handlers/system.d.ts +95 -0
- package/dist/lib/external/mcp/handlers/system.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/system.js +259 -0
- package/dist/lib/external/mcp/handlers/system.js.map +1 -0
- package/dist/lib/external/mcp/handlers/task.d.ts +58 -0
- package/dist/lib/external/mcp/handlers/task.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/task.js +652 -0
- package/dist/lib/external/mcp/handlers/task.js.map +1 -0
- package/dist/lib/external/mcp/handlers/types.d.ts +325 -0
- package/dist/lib/external/mcp/handlers/types.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/types.js +6 -0
- package/dist/lib/external/mcp/handlers/types.js.map +1 -0
- package/dist/lib/external/mcp/handlers/wiki-external.d.ts +93 -0
- package/dist/lib/external/mcp/handlers/wiki-external.d.ts.map +1 -0
- package/dist/lib/external/mcp/handlers/wiki-external.js +571 -0
- package/dist/lib/external/mcp/handlers/wiki-external.js.map +1 -0
- package/dist/lib/external/mcp/tools.d.ts +75 -0
- package/dist/lib/external/mcp/tools.d.ts.map +1 -0
- package/dist/lib/external/mcp/tools.js +241 -0
- package/dist/lib/external/mcp/tools.js.map +1 -0
- package/dist/lib/external/mcp/zodToMcpSchema.d.ts +32 -0
- package/dist/lib/external/mcp/zodToMcpSchema.d.ts.map +1 -0
- package/dist/lib/external/mcp/zodToMcpSchema.js +84 -0
- package/dist/lib/external/mcp/zodToMcpSchema.js.map +1 -0
- package/dist/lib/http/HttpServer.d.ts +83 -0
- package/dist/lib/http/HttpServer.d.ts.map +1 -0
- package/dist/lib/http/HttpServer.js +437 -0
- package/dist/lib/http/HttpServer.js.map +1 -0
- package/dist/lib/http/api-spec.d.ts +232 -0
- package/dist/lib/http/api-spec.d.ts.map +1 -0
- package/dist/lib/http/api-spec.js +191 -0
- package/dist/lib/http/api-spec.js.map +1 -0
- package/dist/lib/http/middleware/RateLimiter.d.ts +31 -0
- package/dist/lib/http/middleware/RateLimiter.d.ts.map +1 -0
- package/dist/lib/http/middleware/RateLimiter.js +60 -0
- package/dist/lib/http/middleware/RateLimiter.js.map +1 -0
- package/dist/lib/http/middleware/errorHandler.d.ts +29 -0
- package/dist/lib/http/middleware/errorHandler.d.ts.map +1 -0
- package/dist/lib/http/middleware/errorHandler.js +80 -0
- package/dist/lib/http/middleware/errorHandler.js.map +1 -0
- package/dist/lib/http/middleware/gatewayMiddleware.d.ts +17 -0
- package/dist/lib/http/middleware/gatewayMiddleware.d.ts.map +1 -0
- package/dist/lib/http/middleware/gatewayMiddleware.js +63 -0
- package/dist/lib/http/middleware/gatewayMiddleware.js.map +1 -0
- package/dist/lib/http/middleware/requestLogger.d.ts +25 -0
- package/dist/lib/http/middleware/requestLogger.d.ts.map +1 -0
- package/dist/lib/http/middleware/requestLogger.js +67 -0
- package/dist/lib/http/middleware/requestLogger.js.map +1 -0
- package/dist/lib/http/middleware/roleResolver.d.ts +23 -0
- package/dist/lib/http/middleware/roleResolver.d.ts.map +1 -0
- package/dist/lib/http/middleware/roleResolver.js +107 -0
- package/dist/lib/http/middleware/roleResolver.js.map +1 -0
- package/dist/lib/http/middleware/validate.d.ts +41 -0
- package/dist/lib/http/middleware/validate.d.ts.map +1 -0
- package/dist/lib/http/middleware/validate.js +92 -0
- package/dist/lib/http/middleware/validate.js.map +1 -0
- package/dist/lib/http/routes/ai.d.ts +7 -0
- package/dist/lib/http/routes/ai.d.ts.map +1 -0
- package/dist/lib/http/routes/ai.js +764 -0
- package/dist/lib/http/routes/ai.js.map +1 -0
- package/dist/lib/http/routes/auth.d.ts +15 -0
- package/dist/lib/http/routes/auth.d.ts.map +1 -0
- package/dist/lib/http/routes/auth.js +126 -0
- package/dist/lib/http/routes/auth.js.map +1 -0
- package/dist/lib/http/routes/candidates.d.ts +7 -0
- package/dist/lib/http/routes/candidates.d.ts.map +1 -0
- package/dist/lib/http/routes/candidates.js +721 -0
- package/dist/lib/http/routes/candidates.js.map +1 -0
- package/dist/lib/http/routes/commands.d.ts +7 -0
- package/dist/lib/http/routes/commands.d.ts.map +1 -0
- package/dist/lib/http/routes/commands.js +281 -0
- package/dist/lib/http/routes/commands.js.map +1 -0
- package/dist/lib/http/routes/extract.d.ts +7 -0
- package/dist/lib/http/routes/extract.d.ts.map +1 -0
- package/dist/lib/http/routes/extract.js +163 -0
- package/dist/lib/http/routes/extract.js.map +1 -0
- package/dist/lib/http/routes/guard.d.ts +13 -0
- package/dist/lib/http/routes/guard.d.ts.map +1 -0
- package/dist/lib/http/routes/guard.js +228 -0
- package/dist/lib/http/routes/guard.js.map +1 -0
- package/dist/lib/http/routes/guardRules.d.ts +7 -0
- package/dist/lib/http/routes/guardRules.d.ts.map +1 -0
- package/dist/lib/http/routes/guardRules.js +307 -0
- package/dist/lib/http/routes/guardRules.js.map +1 -0
- package/dist/lib/http/routes/health.d.ts +6 -0
- package/dist/lib/http/routes/health.d.ts.map +1 -0
- package/dist/lib/http/routes/health.js +31 -0
- package/dist/lib/http/routes/health.js.map +1 -0
- package/dist/lib/http/routes/knowledge.d.ts +8 -0
- package/dist/lib/http/routes/knowledge.d.ts.map +1 -0
- package/dist/lib/http/routes/knowledge.js +214 -0
- package/dist/lib/http/routes/knowledge.js.map +1 -0
- package/dist/lib/http/routes/modules.d.ts +9 -0
- package/dist/lib/http/routes/modules.d.ts.map +1 -0
- package/dist/lib/http/routes/modules.js +459 -0
- package/dist/lib/http/routes/modules.js.map +1 -0
- package/dist/lib/http/routes/monitoring.d.ts +7 -0
- package/dist/lib/http/routes/monitoring.d.ts.map +1 -0
- package/dist/lib/http/routes/monitoring.js +311 -0
- package/dist/lib/http/routes/monitoring.js.map +1 -0
- package/dist/lib/http/routes/recipes.d.ts +10 -0
- package/dist/lib/http/routes/recipes.d.ts.map +1 -0
- package/dist/lib/http/routes/recipes.js +147 -0
- package/dist/lib/http/routes/recipes.js.map +1 -0
- package/dist/lib/http/routes/remote.d.ts +41 -0
- package/dist/lib/http/routes/remote.d.ts.map +1 -0
- package/dist/lib/http/routes/remote.js +941 -0
- package/dist/lib/http/routes/remote.js.map +1 -0
- package/dist/lib/http/routes/search.d.ts +7 -0
- package/dist/lib/http/routes/search.d.ts.map +1 -0
- package/dist/lib/http/routes/search.js +380 -0
- package/dist/lib/http/routes/search.js.map +1 -0
- package/dist/lib/http/routes/skills.d.ts +7 -0
- package/dist/lib/http/routes/skills.d.ts.map +1 -0
- package/dist/lib/http/routes/skills.js +197 -0
- package/dist/lib/http/routes/skills.js.map +1 -0
- package/dist/lib/http/routes/snippets.d.ts +7 -0
- package/dist/lib/http/routes/snippets.d.ts.map +1 -0
- package/dist/lib/http/routes/snippets.js +51 -0
- package/dist/lib/http/routes/snippets.js.map +1 -0
- package/dist/lib/http/routes/task.d.ts +13 -0
- package/dist/lib/http/routes/task.d.ts.map +1 -0
- package/dist/lib/http/routes/task.js +384 -0
- package/dist/lib/http/routes/task.js.map +1 -0
- package/dist/lib/http/routes/violations.d.ts +7 -0
- package/dist/lib/http/routes/violations.d.ts.map +1 -0
- package/dist/lib/http/routes/violations.js +71 -0
- package/dist/lib/http/routes/violations.js.map +1 -0
- package/dist/lib/http/routes/wiki.d.ts +27 -0
- package/dist/lib/http/routes/wiki.d.ts.map +1 -0
- package/dist/lib/http/routes/wiki.js +312 -0
- package/dist/lib/http/routes/wiki.js.map +1 -0
- package/dist/lib/http/utils/routeHelpers.d.ts +48 -0
- package/dist/lib/http/utils/routeHelpers.d.ts.map +1 -0
- package/dist/lib/http/utils/routeHelpers.js +61 -0
- package/dist/lib/http/utils/routeHelpers.js.map +1 -0
- package/dist/lib/http/utils/sse-sessions.d.ts +59 -0
- package/dist/lib/http/utils/sse-sessions.d.ts.map +1 -0
- package/dist/lib/http/utils/sse-sessions.js +111 -0
- package/dist/lib/http/utils/sse-sessions.js.map +1 -0
- package/dist/lib/http/utils/sse.d.ts +50 -0
- package/dist/lib/http/utils/sse.d.ts.map +1 -0
- package/dist/lib/http/utils/sse.js +125 -0
- package/dist/lib/http/utils/sse.js.map +1 -0
- package/dist/lib/infrastructure/audit/AuditLogger.d.ts +123 -0
- package/dist/lib/infrastructure/audit/AuditLogger.d.ts.map +1 -0
- package/dist/lib/infrastructure/audit/AuditLogger.js +110 -0
- package/dist/lib/infrastructure/audit/AuditLogger.js.map +1 -0
- package/dist/lib/infrastructure/audit/AuditStore.d.ts +125 -0
- package/dist/lib/infrastructure/audit/AuditStore.d.ts.map +1 -0
- package/dist/lib/infrastructure/audit/AuditStore.js +194 -0
- package/dist/lib/infrastructure/audit/AuditStore.js.map +1 -0
- package/dist/lib/infrastructure/cache/CacheService.d.ts +69 -0
- package/dist/lib/infrastructure/cache/CacheService.d.ts.map +1 -0
- package/dist/lib/infrastructure/cache/CacheService.js +132 -0
- package/dist/lib/infrastructure/cache/CacheService.js.map +1 -0
- package/dist/lib/infrastructure/cache/GraphCache.d.ts +66 -0
- package/dist/lib/infrastructure/cache/GraphCache.d.ts.map +1 -0
- package/dist/lib/infrastructure/cache/GraphCache.js +141 -0
- package/dist/lib/infrastructure/cache/GraphCache.js.map +1 -0
- package/dist/lib/infrastructure/cache/UnifiedCacheAdapter.d.ts +61 -0
- package/dist/lib/infrastructure/cache/UnifiedCacheAdapter.d.ts.map +1 -0
- package/dist/lib/infrastructure/cache/UnifiedCacheAdapter.js +110 -0
- package/dist/lib/infrastructure/cache/UnifiedCacheAdapter.js.map +1 -0
- package/dist/lib/infrastructure/config/ConfigLoader.d.ts +20 -0
- package/dist/lib/infrastructure/config/ConfigLoader.d.ts.map +1 -0
- package/dist/lib/infrastructure/config/ConfigLoader.js +131 -0
- package/dist/lib/infrastructure/config/ConfigLoader.js.map +1 -0
- package/dist/lib/infrastructure/config/Defaults.d.ts +76 -0
- package/dist/lib/infrastructure/config/Defaults.d.ts.map +1 -0
- package/dist/lib/infrastructure/config/Defaults.js +84 -0
- package/dist/lib/infrastructure/config/Defaults.js.map +1 -0
- package/dist/lib/infrastructure/config/Paths.d.ts +97 -0
- package/dist/lib/infrastructure/config/Paths.d.ts.map +1 -0
- package/dist/lib/infrastructure/config/Paths.js +154 -0
- package/dist/lib/infrastructure/config/Paths.js.map +1 -0
- package/dist/lib/infrastructure/config/TriggerSymbol.d.ts +21 -0
- package/dist/lib/infrastructure/config/TriggerSymbol.d.ts.map +1 -0
- package/dist/lib/infrastructure/config/TriggerSymbol.js +67 -0
- package/dist/lib/infrastructure/config/TriggerSymbol.js.map +1 -0
- package/dist/lib/infrastructure/database/DatabaseConnection.d.ts +44 -0
- package/dist/lib/infrastructure/database/DatabaseConnection.d.ts.map +1 -0
- package/dist/lib/infrastructure/database/DatabaseConnection.js +152 -0
- package/dist/lib/infrastructure/database/DatabaseConnection.js.map +1 -0
- package/dist/lib/infrastructure/database/drizzle/index.d.ts +27 -0
- package/dist/lib/infrastructure/database/drizzle/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/database/drizzle/index.js +38 -0
- package/dist/lib/infrastructure/database/drizzle/index.js.map +1 -0
- package/dist/lib/infrastructure/database/drizzle/schema.d.ts +3716 -0
- package/dist/lib/infrastructure/database/drizzle/schema.d.ts.map +1 -0
- package/dist/lib/infrastructure/database/drizzle/schema.js +373 -0
- package/dist/lib/infrastructure/database/drizzle/schema.js.map +1 -0
- package/dist/lib/infrastructure/database/migrations/001_initial_schema.d.ts +20 -0
- package/dist/lib/infrastructure/database/migrations/001_initial_schema.d.ts.map +1 -0
- package/dist/lib/infrastructure/database/migrations/001_initial_schema.js +306 -0
- package/dist/lib/infrastructure/database/migrations/001_initial_schema.js.map +1 -0
- package/dist/lib/infrastructure/database/migrations/002_add_tasks.d.ts +12 -0
- package/dist/lib/infrastructure/database/migrations/002_add_tasks.d.ts.map +1 -0
- package/dist/lib/infrastructure/database/migrations/002_add_tasks.js +87 -0
- package/dist/lib/infrastructure/database/migrations/002_add_tasks.js.map +1 -0
- package/dist/lib/infrastructure/database/migrations/003_add_remote_commands.d.ts +8 -0
- package/dist/lib/infrastructure/database/migrations/003_add_remote_commands.d.ts.map +1 -0
- package/dist/lib/infrastructure/database/migrations/003_add_remote_commands.js +28 -0
- package/dist/lib/infrastructure/database/migrations/003_add_remote_commands.js.map +1 -0
- package/dist/lib/infrastructure/event/EventBus.d.ts +45 -0
- package/dist/lib/infrastructure/event/EventBus.d.ts.map +1 -0
- package/dist/lib/infrastructure/event/EventBus.js +75 -0
- package/dist/lib/infrastructure/event/EventBus.js.map +1 -0
- package/dist/lib/infrastructure/external/ClipboardManager.d.ts +29 -0
- package/dist/lib/infrastructure/external/ClipboardManager.d.ts.map +1 -0
- package/dist/lib/infrastructure/external/ClipboardManager.js +151 -0
- package/dist/lib/infrastructure/external/ClipboardManager.js.map +1 -0
- package/dist/lib/infrastructure/external/NativeUi.d.ts +59 -0
- package/dist/lib/infrastructure/external/NativeUi.d.ts.map +1 -0
- package/dist/lib/infrastructure/external/NativeUi.js +290 -0
- package/dist/lib/infrastructure/external/NativeUi.js.map +1 -0
- package/dist/lib/infrastructure/external/OpenBrowser.d.ts +20 -0
- package/dist/lib/infrastructure/external/OpenBrowser.d.ts.map +1 -0
- package/dist/lib/infrastructure/external/OpenBrowser.js +122 -0
- package/dist/lib/infrastructure/external/OpenBrowser.js.map +1 -0
- package/dist/lib/infrastructure/logging/Logger.d.ts +34 -0
- package/dist/lib/infrastructure/logging/Logger.d.ts.map +1 -0
- package/dist/lib/infrastructure/logging/Logger.js +156 -0
- package/dist/lib/infrastructure/logging/Logger.js.map +1 -0
- package/dist/lib/infrastructure/monitoring/ErrorTracker.d.ts +158 -0
- package/dist/lib/infrastructure/monitoring/ErrorTracker.d.ts.map +1 -0
- package/dist/lib/infrastructure/monitoring/ErrorTracker.js +295 -0
- package/dist/lib/infrastructure/monitoring/ErrorTracker.js.map +1 -0
- package/dist/lib/infrastructure/monitoring/PerformanceMonitor.d.ts +121 -0
- package/dist/lib/infrastructure/monitoring/PerformanceMonitor.d.ts.map +1 -0
- package/dist/lib/infrastructure/monitoring/PerformanceMonitor.js +250 -0
- package/dist/lib/infrastructure/monitoring/PerformanceMonitor.js.map +1 -0
- package/dist/lib/infrastructure/paths/HeaderResolver.d.ts +45 -0
- package/dist/lib/infrastructure/paths/HeaderResolver.d.ts.map +1 -0
- package/dist/lib/infrastructure/paths/HeaderResolver.js +102 -0
- package/dist/lib/infrastructure/paths/HeaderResolver.js.map +1 -0
- package/dist/lib/infrastructure/paths/PathFinder.d.ts +38 -0
- package/dist/lib/infrastructure/paths/PathFinder.d.ts.map +1 -0
- package/dist/lib/infrastructure/paths/PathFinder.js +127 -0
- package/dist/lib/infrastructure/paths/PathFinder.js.map +1 -0
- package/dist/lib/infrastructure/realtime/RealtimeService.d.ts +59 -0
- package/dist/lib/infrastructure/realtime/RealtimeService.d.ts.map +1 -0
- package/dist/lib/infrastructure/realtime/RealtimeService.js +160 -0
- package/dist/lib/infrastructure/realtime/RealtimeService.js.map +1 -0
- package/dist/lib/infrastructure/vector/ASTChunker.d.ts +73 -0
- package/dist/lib/infrastructure/vector/ASTChunker.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/ASTChunker.js +389 -0
- package/dist/lib/infrastructure/vector/ASTChunker.js.map +1 -0
- package/dist/lib/infrastructure/vector/AsyncPersistence.d.ts +90 -0
- package/dist/lib/infrastructure/vector/AsyncPersistence.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/AsyncPersistence.js +292 -0
- package/dist/lib/infrastructure/vector/AsyncPersistence.js.map +1 -0
- package/dist/lib/infrastructure/vector/BatchEmbedder.d.ts +42 -0
- package/dist/lib/infrastructure/vector/BatchEmbedder.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/BatchEmbedder.js +130 -0
- package/dist/lib/infrastructure/vector/BatchEmbedder.js.map +1 -0
- package/dist/lib/infrastructure/vector/BinaryPersistence.d.ts +169 -0
- package/dist/lib/infrastructure/vector/BinaryPersistence.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/BinaryPersistence.js +394 -0
- package/dist/lib/infrastructure/vector/BinaryPersistence.js.map +1 -0
- package/dist/lib/infrastructure/vector/Chunker.d.ts +34 -0
- package/dist/lib/infrastructure/vector/Chunker.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/Chunker.js +203 -0
- package/dist/lib/infrastructure/vector/Chunker.js.map +1 -0
- package/dist/lib/infrastructure/vector/HnswIndex.d.ts +208 -0
- package/dist/lib/infrastructure/vector/HnswIndex.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/HnswIndex.js +660 -0
- package/dist/lib/infrastructure/vector/HnswIndex.js.map +1 -0
- package/dist/lib/infrastructure/vector/HnswVectorAdapter.d.ts +145 -0
- package/dist/lib/infrastructure/vector/HnswVectorAdapter.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/HnswVectorAdapter.js +747 -0
- package/dist/lib/infrastructure/vector/HnswVectorAdapter.js.map +1 -0
- package/dist/lib/infrastructure/vector/IndexingPipeline.d.ts +68 -0
- package/dist/lib/infrastructure/vector/IndexingPipeline.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/IndexingPipeline.js +236 -0
- package/dist/lib/infrastructure/vector/IndexingPipeline.js.map +1 -0
- package/dist/lib/infrastructure/vector/JsonVectorAdapter.d.ts +80 -0
- package/dist/lib/infrastructure/vector/JsonVectorAdapter.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/JsonVectorAdapter.js +253 -0
- package/dist/lib/infrastructure/vector/JsonVectorAdapter.js.map +1 -0
- package/dist/lib/infrastructure/vector/ScalarQuantizer.d.ts +88 -0
- package/dist/lib/infrastructure/vector/ScalarQuantizer.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/ScalarQuantizer.js +202 -0
- package/dist/lib/infrastructure/vector/ScalarQuantizer.js.map +1 -0
- package/dist/lib/infrastructure/vector/VectorMigration.d.ts +34 -0
- package/dist/lib/infrastructure/vector/VectorMigration.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/VectorMigration.js +87 -0
- package/dist/lib/infrastructure/vector/VectorMigration.js.map +1 -0
- package/dist/lib/infrastructure/vector/VectorStore.d.ts +81 -0
- package/dist/lib/infrastructure/vector/VectorStore.d.ts.map +1 -0
- package/dist/lib/infrastructure/vector/VectorStore.js +89 -0
- package/dist/lib/infrastructure/vector/VectorStore.js.map +1 -0
- package/dist/lib/injection/ServiceContainer.d.ts +99 -0
- package/dist/lib/injection/ServiceContainer.d.ts.map +1 -0
- package/dist/lib/injection/ServiceContainer.js +451 -0
- package/dist/lib/injection/ServiceContainer.js.map +1 -0
- package/dist/lib/injection/modules/AgentModule.d.ts +11 -0
- package/dist/lib/injection/modules/AgentModule.d.ts.map +1 -0
- package/dist/lib/injection/modules/AgentModule.js +33 -0
- package/dist/lib/injection/modules/AgentModule.js.map +1 -0
- package/dist/lib/injection/modules/AppModule.d.ts +20 -0
- package/dist/lib/injection/modules/AppModule.d.ts.map +1 -0
- package/dist/lib/injection/modules/AppModule.js +93 -0
- package/dist/lib/injection/modules/AppModule.js.map +1 -0
- package/dist/lib/injection/modules/GuardModule.d.ts +13 -0
- package/dist/lib/injection/modules/GuardModule.d.ts.map +1 -0
- package/dist/lib/injection/modules/GuardModule.js +52 -0
- package/dist/lib/injection/modules/GuardModule.js.map +1 -0
- package/dist/lib/injection/modules/InfraModule.d.ts +14 -0
- package/dist/lib/injection/modules/InfraModule.d.ts.map +1 -0
- package/dist/lib/injection/modules/InfraModule.js +63 -0
- package/dist/lib/injection/modules/InfraModule.js.map +1 -0
- package/dist/lib/injection/modules/KnowledgeModule.d.ts +14 -0
- package/dist/lib/injection/modules/KnowledgeModule.d.ts.map +1 -0
- package/dist/lib/injection/modules/KnowledgeModule.js +134 -0
- package/dist/lib/injection/modules/KnowledgeModule.js.map +1 -0
- package/dist/lib/platform/ScreenCaptureService.d.ts +74 -0
- package/dist/lib/platform/ScreenCaptureService.d.ts.map +1 -0
- package/dist/lib/platform/ScreenCaptureService.js +161 -0
- package/dist/lib/platform/ScreenCaptureService.js.map +1 -0
- package/dist/lib/platform/ios/index.d.ts +39 -0
- package/dist/lib/platform/ios/index.d.ts.map +1 -0
- package/dist/lib/platform/ios/index.js +43 -0
- package/dist/lib/platform/ios/index.js.map +1 -0
- package/dist/lib/platform/ios/routes/spm.d.ts +10 -0
- package/dist/lib/platform/ios/routes/spm.d.ts.map +1 -0
- package/dist/lib/platform/ios/routes/spm.js +375 -0
- package/dist/lib/platform/ios/routes/spm.js.map +1 -0
- package/dist/lib/platform/ios/snippet/PlaceholderConverter.d.ts +30 -0
- package/dist/lib/platform/ios/snippet/PlaceholderConverter.d.ts.map +1 -0
- package/dist/lib/platform/ios/snippet/PlaceholderConverter.js +57 -0
- package/dist/lib/platform/ios/snippet/PlaceholderConverter.js.map +1 -0
- package/dist/lib/platform/ios/snippet/XcodeCodec.d.ts +30 -0
- package/dist/lib/platform/ios/snippet/XcodeCodec.d.ts.map +1 -0
- package/dist/lib/platform/ios/snippet/XcodeCodec.js +103 -0
- package/dist/lib/platform/ios/snippet/XcodeCodec.js.map +1 -0
- package/dist/lib/platform/ios/spm/DependencyGraph.d.ts +71 -0
- package/dist/lib/platform/ios/spm/DependencyGraph.d.ts.map +1 -0
- package/dist/lib/platform/ios/spm/DependencyGraph.js +210 -0
- package/dist/lib/platform/ios/spm/DependencyGraph.js.map +1 -0
- package/dist/lib/platform/ios/spm/PackageSwiftParser.d.ts +76 -0
- package/dist/lib/platform/ios/spm/PackageSwiftParser.d.ts.map +1 -0
- package/dist/lib/platform/ios/spm/PackageSwiftParser.js +238 -0
- package/dist/lib/platform/ios/spm/PackageSwiftParser.js.map +1 -0
- package/dist/lib/platform/ios/spm/PolicyEngine.d.ts +49 -0
- package/dist/lib/platform/ios/spm/PolicyEngine.d.ts.map +1 -0
- package/dist/lib/platform/ios/spm/PolicyEngine.js +82 -0
- package/dist/lib/platform/ios/spm/PolicyEngine.js.map +1 -0
- package/dist/lib/platform/ios/spm/SpmDiscoverer.d.ts +56 -0
- package/dist/lib/platform/ios/spm/SpmDiscoverer.d.ts.map +1 -0
- package/dist/lib/platform/ios/spm/SpmDiscoverer.js +312 -0
- package/dist/lib/platform/ios/spm/SpmDiscoverer.js.map +1 -0
- package/dist/lib/platform/ios/spm/SpmHelper.d.ts +106 -0
- package/dist/lib/platform/ios/spm/SpmHelper.d.ts.map +1 -0
- package/dist/lib/platform/ios/spm/SpmHelper.js +479 -0
- package/dist/lib/platform/ios/spm/SpmHelper.js.map +1 -0
- package/dist/lib/platform/ios/xcode/SaveEventFilter.d.ts +69 -0
- package/dist/lib/platform/ios/xcode/SaveEventFilter.d.ts.map +1 -0
- package/dist/lib/platform/ios/xcode/SaveEventFilter.js +145 -0
- package/dist/lib/platform/ios/xcode/SaveEventFilter.js.map +1 -0
- package/dist/lib/platform/ios/xcode/XcodeAutomation.d.ts +76 -0
- package/dist/lib/platform/ios/xcode/XcodeAutomation.d.ts.map +1 -0
- package/dist/lib/platform/ios/xcode/XcodeAutomation.js +333 -0
- package/dist/lib/platform/ios/xcode/XcodeAutomation.js.map +1 -0
- package/dist/lib/platform/ios/xcode/XcodeImportResolver.d.ts +138 -0
- package/dist/lib/platform/ios/xcode/XcodeImportResolver.d.ts.map +1 -0
- package/dist/lib/platform/ios/xcode/XcodeImportResolver.js +412 -0
- package/dist/lib/platform/ios/xcode/XcodeImportResolver.js.map +1 -0
- package/dist/lib/platform/ios/xcode/XcodeIntegration.d.ts +98 -0
- package/dist/lib/platform/ios/xcode/XcodeIntegration.d.ts.map +1 -0
- package/dist/lib/platform/ios/xcode/XcodeIntegration.js +597 -0
- package/dist/lib/platform/ios/xcode/XcodeIntegration.js.map +1 -0
- package/dist/lib/platform/ios/xcode/XcodeWriteUtils.d.ts +105 -0
- package/dist/lib/platform/ios/xcode/XcodeWriteUtils.d.ts.map +1 -0
- package/dist/lib/platform/ios/xcode/XcodeWriteUtils.js +196 -0
- package/dist/lib/platform/ios/xcode/XcodeWriteUtils.js.map +1 -0
- package/dist/lib/repository/base/BaseRepository.d.ts +72 -0
- package/dist/lib/repository/base/BaseRepository.d.ts.map +1 -0
- package/dist/lib/repository/base/BaseRepository.js +245 -0
- package/dist/lib/repository/base/BaseRepository.js.map +1 -0
- package/dist/lib/repository/knowledge/KnowledgeRepository.impl.d.ts +199 -0
- package/dist/lib/repository/knowledge/KnowledgeRepository.impl.d.ts.map +1 -0
- package/dist/lib/repository/knowledge/KnowledgeRepository.impl.js +321 -0
- package/dist/lib/repository/knowledge/KnowledgeRepository.impl.js.map +1 -0
- package/dist/lib/repository/remote/RemoteCommandRepository.d.ts +114 -0
- package/dist/lib/repository/remote/RemoteCommandRepository.d.ts.map +1 -0
- package/dist/lib/repository/remote/RemoteCommandRepository.js +242 -0
- package/dist/lib/repository/remote/RemoteCommandRepository.js.map +1 -0
- package/dist/lib/repository/task/TaskRepository.impl.d.ts +188 -0
- package/dist/lib/repository/task/TaskRepository.impl.d.ts.map +1 -0
- package/dist/lib/repository/task/TaskRepository.impl.js +369 -0
- package/dist/lib/repository/task/TaskRepository.impl.js.map +1 -0
- package/dist/lib/repository/token/TokenUsageStore.d.ts +90 -0
- package/dist/lib/repository/token/TokenUsageStore.d.ts.map +1 -0
- package/dist/lib/repository/token/TokenUsageStore.js +160 -0
- package/dist/lib/repository/token/TokenUsageStore.js.map +1 -0
- package/dist/lib/service/agent/AgentEventBus.d.ts +103 -0
- package/dist/lib/service/agent/AgentEventBus.d.ts.map +1 -0
- package/dist/lib/service/agent/AgentEventBus.js +187 -0
- package/dist/lib/service/agent/AgentEventBus.js.map +1 -0
- package/dist/lib/service/agent/AgentFactory.d.ts +251 -0
- package/dist/lib/service/agent/AgentFactory.d.ts.map +1 -0
- package/dist/lib/service/agent/AgentFactory.js +494 -0
- package/dist/lib/service/agent/AgentFactory.js.map +1 -0
- package/dist/lib/service/agent/AgentMessage.d.ts +226 -0
- package/dist/lib/service/agent/AgentMessage.d.ts.map +1 -0
- package/dist/lib/service/agent/AgentMessage.js +227 -0
- package/dist/lib/service/agent/AgentMessage.js.map +1 -0
- package/dist/lib/service/agent/AgentRouter.d.ts +86 -0
- package/dist/lib/service/agent/AgentRouter.d.ts.map +1 -0
- package/dist/lib/service/agent/AgentRouter.js +224 -0
- package/dist/lib/service/agent/AgentRouter.js.map +1 -0
- package/dist/lib/service/agent/AgentRuntime.d.ts +247 -0
- package/dist/lib/service/agent/AgentRuntime.d.ts.map +1 -0
- package/dist/lib/service/agent/AgentRuntime.js +947 -0
- package/dist/lib/service/agent/AgentRuntime.js.map +1 -0
- package/dist/lib/service/agent/AgentState.d.ts +120 -0
- package/dist/lib/service/agent/AgentState.d.ts.map +1 -0
- package/dist/lib/service/agent/AgentState.js +198 -0
- package/dist/lib/service/agent/AgentState.js.map +1 -0
- package/dist/lib/service/agent/ConversationStore.d.ts +120 -0
- package/dist/lib/service/agent/ConversationStore.d.ts.map +1 -0
- package/dist/lib/service/agent/ConversationStore.js +373 -0
- package/dist/lib/service/agent/ConversationStore.js.map +1 -0
- package/dist/lib/service/agent/IntentClassifier.d.ts +64 -0
- package/dist/lib/service/agent/IntentClassifier.d.ts.map +1 -0
- package/dist/lib/service/agent/IntentClassifier.js +307 -0
- package/dist/lib/service/agent/IntentClassifier.js.map +1 -0
- package/dist/lib/service/agent/LarkTransport.d.ts +104 -0
- package/dist/lib/service/agent/LarkTransport.d.ts.map +1 -0
- package/dist/lib/service/agent/LarkTransport.js +486 -0
- package/dist/lib/service/agent/LarkTransport.js.map +1 -0
- package/dist/lib/service/agent/PipelineStrategy.d.ts +114 -0
- package/dist/lib/service/agent/PipelineStrategy.d.ts.map +1 -0
- package/dist/lib/service/agent/PipelineStrategy.js +402 -0
- package/dist/lib/service/agent/PipelineStrategy.js.map +1 -0
- package/dist/lib/service/agent/capabilities.d.ts +207 -0
- package/dist/lib/service/agent/capabilities.d.ts.map +1 -0
- package/dist/lib/service/agent/capabilities.js +405 -0
- package/dist/lib/service/agent/capabilities.js.map +1 -0
- package/dist/lib/service/agent/context/ContextWindow.d.ts +192 -0
- package/dist/lib/service/agent/context/ContextWindow.d.ts.map +1 -0
- package/dist/lib/service/agent/context/ContextWindow.js +610 -0
- package/dist/lib/service/agent/context/ContextWindow.js.map +1 -0
- package/dist/lib/service/agent/context/ExplorationTracker.d.ts +181 -0
- package/dist/lib/service/agent/context/ExplorationTracker.d.ts.map +1 -0
- package/dist/lib/service/agent/context/ExplorationTracker.js +491 -0
- package/dist/lib/service/agent/context/ExplorationTracker.js.map +1 -0
- package/dist/lib/service/agent/context/exploration/ExplorationStrategies.d.ts +173 -0
- package/dist/lib/service/agent/context/exploration/ExplorationStrategies.d.ts.map +1 -0
- package/dist/lib/service/agent/context/exploration/ExplorationStrategies.js +119 -0
- package/dist/lib/service/agent/context/exploration/ExplorationStrategies.js.map +1 -0
- package/dist/lib/service/agent/context/exploration/NudgeGenerator.d.ts +79 -0
- package/dist/lib/service/agent/context/exploration/NudgeGenerator.d.ts.map +1 -0
- package/dist/lib/service/agent/context/exploration/NudgeGenerator.js +307 -0
- package/dist/lib/service/agent/context/exploration/NudgeGenerator.js.map +1 -0
- package/dist/lib/service/agent/context/exploration/PlanTracker.d.ts +91 -0
- package/dist/lib/service/agent/context/exploration/PlanTracker.d.ts.map +1 -0
- package/dist/lib/service/agent/context/exploration/PlanTracker.js +303 -0
- package/dist/lib/service/agent/context/exploration/PlanTracker.js.map +1 -0
- package/dist/lib/service/agent/context/exploration/SignalDetector.d.ts +38 -0
- package/dist/lib/service/agent/context/exploration/SignalDetector.d.ts.map +1 -0
- package/dist/lib/service/agent/context/exploration/SignalDetector.js +164 -0
- package/dist/lib/service/agent/context/exploration/SignalDetector.js.map +1 -0
- package/dist/lib/service/agent/core/ChatAgentPrompts.d.ts +52 -0
- package/dist/lib/service/agent/core/ChatAgentPrompts.d.ts.map +1 -0
- package/dist/lib/service/agent/core/ChatAgentPrompts.js +151 -0
- package/dist/lib/service/agent/core/ChatAgentPrompts.js.map +1 -0
- package/dist/lib/service/agent/core/LLMResultType.d.ts +32 -0
- package/dist/lib/service/agent/core/LLMResultType.d.ts.map +1 -0
- package/dist/lib/service/agent/core/LLMResultType.js +32 -0
- package/dist/lib/service/agent/core/LLMResultType.js.map +1 -0
- package/dist/lib/service/agent/core/LoopContext.d.ts +158 -0
- package/dist/lib/service/agent/core/LoopContext.d.ts.map +1 -0
- package/dist/lib/service/agent/core/LoopContext.js +139 -0
- package/dist/lib/service/agent/core/LoopContext.js.map +1 -0
- package/dist/lib/service/agent/core/MessageAdapter.d.ts +154 -0
- package/dist/lib/service/agent/core/MessageAdapter.d.ts.map +1 -0
- package/dist/lib/service/agent/core/MessageAdapter.js +206 -0
- package/dist/lib/service/agent/core/MessageAdapter.js.map +1 -0
- package/dist/lib/service/agent/core/SystemPromptBuilder.d.ts +86 -0
- package/dist/lib/service/agent/core/SystemPromptBuilder.d.ts.map +1 -0
- package/dist/lib/service/agent/core/SystemPromptBuilder.js +115 -0
- package/dist/lib/service/agent/core/SystemPromptBuilder.js.map +1 -0
- package/dist/lib/service/agent/core/ToolExecutionPipeline.d.ts +186 -0
- package/dist/lib/service/agent/core/ToolExecutionPipeline.d.ts.map +1 -0
- package/dist/lib/service/agent/core/ToolExecutionPipeline.js +334 -0
- package/dist/lib/service/agent/core/ToolExecutionPipeline.js.map +1 -0
- package/dist/lib/service/agent/domain/ChatAgentTasks.d.ts +134 -0
- package/dist/lib/service/agent/domain/ChatAgentTasks.d.ts.map +1 -0
- package/dist/lib/service/agent/domain/ChatAgentTasks.js +182 -0
- package/dist/lib/service/agent/domain/ChatAgentTasks.js.map +1 -0
- package/dist/lib/service/agent/domain/EpisodicConsolidator.d.ts +110 -0
- package/dist/lib/service/agent/domain/EpisodicConsolidator.d.ts.map +1 -0
- package/dist/lib/service/agent/domain/EpisodicConsolidator.js +317 -0
- package/dist/lib/service/agent/domain/EpisodicConsolidator.js.map +1 -0
- package/dist/lib/service/agent/domain/EvidenceCollector.d.ts +152 -0
- package/dist/lib/service/agent/domain/EvidenceCollector.d.ts.map +1 -0
- package/dist/lib/service/agent/domain/EvidenceCollector.js +478 -0
- package/dist/lib/service/agent/domain/EvidenceCollector.js.map +1 -0
- package/dist/lib/service/agent/domain/insight-analyst.d.ts +96 -0
- package/dist/lib/service/agent/domain/insight-analyst.d.ts.map +1 -0
- package/dist/lib/service/agent/domain/insight-analyst.js +224 -0
- package/dist/lib/service/agent/domain/insight-analyst.js.map +1 -0
- package/dist/lib/service/agent/domain/insight-gate.d.ts +223 -0
- package/dist/lib/service/agent/domain/insight-gate.d.ts.map +1 -0
- package/dist/lib/service/agent/domain/insight-gate.js +417 -0
- package/dist/lib/service/agent/domain/insight-gate.js.map +1 -0
- package/dist/lib/service/agent/domain/insight-producer.d.ts +123 -0
- package/dist/lib/service/agent/domain/insight-producer.d.ts.map +1 -0
- package/dist/lib/service/agent/domain/insight-producer.js +243 -0
- package/dist/lib/service/agent/domain/insight-producer.js.map +1 -0
- package/dist/lib/service/agent/domain/scan-prompts.d.ts +145 -0
- package/dist/lib/service/agent/domain/scan-prompts.d.ts.map +1 -0
- package/dist/lib/service/agent/domain/scan-prompts.js +413 -0
- package/dist/lib/service/agent/domain/scan-prompts.js.map +1 -0
- package/dist/lib/service/agent/forced-summary.d.ts +77 -0
- package/dist/lib/service/agent/forced-summary.d.ts.map +1 -0
- package/dist/lib/service/agent/forced-summary.js +243 -0
- package/dist/lib/service/agent/forced-summary.js.map +1 -0
- package/dist/lib/service/agent/index.d.ts +61 -0
- package/dist/lib/service/agent/index.d.ts.map +1 -0
- package/dist/lib/service/agent/index.js +67 -0
- package/dist/lib/service/agent/index.js.map +1 -0
- package/dist/lib/service/agent/memory/ActiveContext.d.ts +383 -0
- package/dist/lib/service/agent/memory/ActiveContext.d.ts.map +1 -0
- package/dist/lib/service/agent/memory/ActiveContext.js +890 -0
- package/dist/lib/service/agent/memory/ActiveContext.js.map +1 -0
- package/dist/lib/service/agent/memory/MemoryConsolidator.d.ts +70 -0
- package/dist/lib/service/agent/memory/MemoryConsolidator.d.ts.map +1 -0
- package/dist/lib/service/agent/memory/MemoryConsolidator.js +335 -0
- package/dist/lib/service/agent/memory/MemoryConsolidator.js.map +1 -0
- package/dist/lib/service/agent/memory/MemoryCoordinator.d.ts +245 -0
- package/dist/lib/service/agent/memory/MemoryCoordinator.d.ts.map +1 -0
- package/dist/lib/service/agent/memory/MemoryCoordinator.js +637 -0
- package/dist/lib/service/agent/memory/MemoryCoordinator.js.map +1 -0
- package/dist/lib/service/agent/memory/MemoryRetriever.d.ts +123 -0
- package/dist/lib/service/agent/memory/MemoryRetriever.d.ts.map +1 -0
- package/dist/lib/service/agent/memory/MemoryRetriever.js +260 -0
- package/dist/lib/service/agent/memory/MemoryRetriever.js.map +1 -0
- package/dist/lib/service/agent/memory/MemoryStore.d.ts +230 -0
- package/dist/lib/service/agent/memory/MemoryStore.d.ts.map +1 -0
- package/dist/lib/service/agent/memory/MemoryStore.js +481 -0
- package/dist/lib/service/agent/memory/MemoryStore.js.map +1 -0
- package/dist/lib/service/agent/memory/PersistentMemory.d.ts +117 -0
- package/dist/lib/service/agent/memory/PersistentMemory.d.ts.map +1 -0
- package/dist/lib/service/agent/memory/PersistentMemory.js +162 -0
- package/dist/lib/service/agent/memory/PersistentMemory.js.map +1 -0
- package/dist/lib/service/agent/memory/SessionStore.d.ts +298 -0
- package/dist/lib/service/agent/memory/SessionStore.d.ts.map +1 -0
- package/dist/lib/service/agent/memory/SessionStore.js +803 -0
- package/dist/lib/service/agent/memory/SessionStore.js.map +1 -0
- package/dist/lib/service/agent/memory/index.d.ts +17 -0
- package/dist/lib/service/agent/memory/index.d.ts.map +1 -0
- package/dist/lib/service/agent/memory/index.js +18 -0
- package/dist/lib/service/agent/memory/index.js.map +1 -0
- package/dist/lib/service/agent/policies.d.ts +294 -0
- package/dist/lib/service/agent/policies.d.ts.map +1 -0
- package/dist/lib/service/agent/policies.js +424 -0
- package/dist/lib/service/agent/policies.js.map +1 -0
- package/dist/lib/service/agent/presets.d.ts +381 -0
- package/dist/lib/service/agent/presets.d.ts.map +1 -0
- package/dist/lib/service/agent/presets.js +308 -0
- package/dist/lib/service/agent/presets.js.map +1 -0
- package/dist/lib/service/agent/strategies.d.ts +208 -0
- package/dist/lib/service/agent/strategies.d.ts.map +1 -0
- package/dist/lib/service/agent/strategies.js +316 -0
- package/dist/lib/service/agent/strategies.js.map +1 -0
- package/dist/lib/service/agent/tools/ToolRegistry.d.ts +68 -0
- package/dist/lib/service/agent/tools/ToolRegistry.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/ToolRegistry.js +200 -0
- package/dist/lib/service/agent/tools/ToolRegistry.js.map +1 -0
- package/dist/lib/service/agent/tools/_shared.d.ts +73 -0
- package/dist/lib/service/agent/tools/_shared.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/_shared.js +50 -0
- package/dist/lib/service/agent/tools/_shared.js.map +1 -0
- package/dist/lib/service/agent/tools/ai-analysis.d.ts +81 -0
- package/dist/lib/service/agent/tools/ai-analysis.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/ai-analysis.js +63 -0
- package/dist/lib/service/agent/tools/ai-analysis.js.map +1 -0
- package/dist/lib/service/agent/tools/ast-graph.d.ts +242 -0
- package/dist/lib/service/agent/tools/ast-graph.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/ast-graph.js +799 -0
- package/dist/lib/service/agent/tools/ast-graph.js.map +1 -0
- package/dist/lib/service/agent/tools/composite.d.ts +397 -0
- package/dist/lib/service/agent/tools/composite.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/composite.js +522 -0
- package/dist/lib/service/agent/tools/composite.js.map +1 -0
- package/dist/lib/service/agent/tools/guard.d.ts +125 -0
- package/dist/lib/service/agent/tools/guard.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/guard.js +125 -0
- package/dist/lib/service/agent/tools/guard.js.map +1 -0
- package/dist/lib/service/agent/tools/index.d.ts +1908 -0
- package/dist/lib/service/agent/tools/index.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/index.js +137 -0
- package/dist/lib/service/agent/tools/index.js.map +1 -0
- package/dist/lib/service/agent/tools/infrastructure.d.ts +198 -0
- package/dist/lib/service/agent/tools/infrastructure.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/infrastructure.js +219 -0
- package/dist/lib/service/agent/tools/infrastructure.js.map +1 -0
- package/dist/lib/service/agent/tools/knowledge-graph.d.ts +91 -0
- package/dist/lib/service/agent/tools/knowledge-graph.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/knowledge-graph.js +97 -0
- package/dist/lib/service/agent/tools/knowledge-graph.js.map +1 -0
- package/dist/lib/service/agent/tools/lifecycle.d.ts +382 -0
- package/dist/lib/service/agent/tools/lifecycle.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/lifecycle.js +453 -0
- package/dist/lib/service/agent/tools/lifecycle.js.map +1 -0
- package/dist/lib/service/agent/tools/project-access.d.ts +392 -0
- package/dist/lib/service/agent/tools/project-access.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/project-access.js +823 -0
- package/dist/lib/service/agent/tools/project-access.js.map +1 -0
- package/dist/lib/service/agent/tools/query.d.ts +181 -0
- package/dist/lib/service/agent/tools/query.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/query.js +244 -0
- package/dist/lib/service/agent/tools/query.js.map +1 -0
- package/dist/lib/service/agent/tools/scan-recipe.d.ts +186 -0
- package/dist/lib/service/agent/tools/scan-recipe.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/scan-recipe.js +195 -0
- package/dist/lib/service/agent/tools/scan-recipe.js.map +1 -0
- package/dist/lib/service/agent/tools/system-interaction.d.ts +154 -0
- package/dist/lib/service/agent/tools/system-interaction.d.ts.map +1 -0
- package/dist/lib/service/agent/tools/system-interaction.js +457 -0
- package/dist/lib/service/agent/tools/system-interaction.js.map +1 -0
- package/dist/lib/service/automation/ActionPipeline.d.ts +38 -0
- package/dist/lib/service/automation/ActionPipeline.d.ts.map +1 -0
- package/dist/lib/service/automation/ActionPipeline.js +57 -0
- package/dist/lib/service/automation/ActionPipeline.js.map +1 -0
- package/dist/lib/service/automation/AutomationOrchestrator.d.ts +93 -0
- package/dist/lib/service/automation/AutomationOrchestrator.d.ts.map +1 -0
- package/dist/lib/service/automation/AutomationOrchestrator.js +64 -0
- package/dist/lib/service/automation/AutomationOrchestrator.js.map +1 -0
- package/dist/lib/service/automation/ContextCollector.d.ts +25 -0
- package/dist/lib/service/automation/ContextCollector.d.ts.map +1 -0
- package/dist/lib/service/automation/ContextCollector.js +36 -0
- package/dist/lib/service/automation/ContextCollector.js.map +1 -0
- package/dist/lib/service/automation/DirectiveDetector.d.ts +56 -0
- package/dist/lib/service/automation/DirectiveDetector.d.ts.map +1 -0
- package/dist/lib/service/automation/DirectiveDetector.js +121 -0
- package/dist/lib/service/automation/DirectiveDetector.js.map +1 -0
- package/dist/lib/service/automation/FileWatcher.d.ts +68 -0
- package/dist/lib/service/automation/FileWatcher.d.ts.map +1 -0
- package/dist/lib/service/automation/FileWatcher.js +389 -0
- package/dist/lib/service/automation/FileWatcher.js.map +1 -0
- package/dist/lib/service/automation/TriggerResolver.d.ts +38 -0
- package/dist/lib/service/automation/TriggerResolver.d.ts.map +1 -0
- package/dist/lib/service/automation/TriggerResolver.js +64 -0
- package/dist/lib/service/automation/TriggerResolver.js.map +1 -0
- package/dist/lib/service/automation/handlers/AlinkHandler.d.ts +11 -0
- package/dist/lib/service/automation/handlers/AlinkHandler.d.ts.map +1 -0
- package/dist/lib/service/automation/handlers/AlinkHandler.js +82 -0
- package/dist/lib/service/automation/handlers/AlinkHandler.js.map +1 -0
- package/dist/lib/service/automation/handlers/CreateHandler.d.ts +17 -0
- package/dist/lib/service/automation/handlers/CreateHandler.d.ts.map +1 -0
- package/dist/lib/service/automation/handlers/CreateHandler.js +178 -0
- package/dist/lib/service/automation/handlers/CreateHandler.js.map +1 -0
- package/dist/lib/service/automation/handlers/GuardHandler.d.ts +18 -0
- package/dist/lib/service/automation/handlers/GuardHandler.d.ts.map +1 -0
- package/dist/lib/service/automation/handlers/GuardHandler.js +223 -0
- package/dist/lib/service/automation/handlers/GuardHandler.js.map +1 -0
- package/dist/lib/service/automation/handlers/HeaderHandler.d.ts +12 -0
- package/dist/lib/service/automation/handlers/HeaderHandler.d.ts.map +1 -0
- package/dist/lib/service/automation/handlers/HeaderHandler.js +42 -0
- package/dist/lib/service/automation/handlers/HeaderHandler.js.map +1 -0
- package/dist/lib/service/automation/handlers/SearchHandler.d.ts +22 -0
- package/dist/lib/service/automation/handlers/SearchHandler.d.ts.map +1 -0
- package/dist/lib/service/automation/handlers/SearchHandler.js +289 -0
- package/dist/lib/service/automation/handlers/SearchHandler.js.map +1 -0
- package/dist/lib/service/bootstrap/BootstrapTaskManager.d.ts +189 -0
- package/dist/lib/service/bootstrap/BootstrapTaskManager.d.ts.map +1 -0
- package/dist/lib/service/bootstrap/BootstrapTaskManager.js +398 -0
- package/dist/lib/service/bootstrap/BootstrapTaskManager.js.map +1 -0
- package/dist/lib/service/candidate/CandidateAggregator.d.ts +32 -0
- package/dist/lib/service/candidate/CandidateAggregator.d.ts.map +1 -0
- package/dist/lib/service/candidate/CandidateAggregator.js +44 -0
- package/dist/lib/service/candidate/CandidateAggregator.js.map +1 -0
- package/dist/lib/service/candidate/SimilarityService.d.ts +32 -0
- package/dist/lib/service/candidate/SimilarityService.d.ts.map +1 -0
- package/dist/lib/service/candidate/SimilarityService.js +82 -0
- package/dist/lib/service/candidate/SimilarityService.js.map +1 -0
- package/dist/lib/service/context/RecipeExtractor.d.ts +69 -0
- package/dist/lib/service/context/RecipeExtractor.d.ts.map +1 -0
- package/dist/lib/service/context/RecipeExtractor.js +307 -0
- package/dist/lib/service/context/RecipeExtractor.js.map +1 -0
- package/dist/lib/service/cursor/AgentInstructionsGenerator.d.ts +133 -0
- package/dist/lib/service/cursor/AgentInstructionsGenerator.d.ts.map +1 -0
- package/dist/lib/service/cursor/AgentInstructionsGenerator.js +410 -0
- package/dist/lib/service/cursor/AgentInstructionsGenerator.js.map +1 -0
- package/dist/lib/service/cursor/CursorDeliveryPipeline.d.ts +305 -0
- package/dist/lib/service/cursor/CursorDeliveryPipeline.d.ts.map +1 -0
- package/dist/lib/service/cursor/CursorDeliveryPipeline.js +677 -0
- package/dist/lib/service/cursor/CursorDeliveryPipeline.js.map +1 -0
- package/dist/lib/service/cursor/FileProtection.d.ts +66 -0
- package/dist/lib/service/cursor/FileProtection.d.ts.map +1 -0
- package/dist/lib/service/cursor/FileProtection.js +101 -0
- package/dist/lib/service/cursor/FileProtection.js.map +1 -0
- package/dist/lib/service/cursor/KnowledgeCompressor.d.ts +79 -0
- package/dist/lib/service/cursor/KnowledgeCompressor.d.ts.map +1 -0
- package/dist/lib/service/cursor/KnowledgeCompressor.js +169 -0
- package/dist/lib/service/cursor/KnowledgeCompressor.js.map +1 -0
- package/dist/lib/service/cursor/RulesGenerator.d.ts +59 -0
- package/dist/lib/service/cursor/RulesGenerator.d.ts.map +1 -0
- package/dist/lib/service/cursor/RulesGenerator.js +161 -0
- package/dist/lib/service/cursor/RulesGenerator.js.map +1 -0
- package/dist/lib/service/cursor/SkillsSyncer.d.ts +61 -0
- package/dist/lib/service/cursor/SkillsSyncer.d.ts.map +1 -0
- package/dist/lib/service/cursor/SkillsSyncer.js +287 -0
- package/dist/lib/service/cursor/SkillsSyncer.js.map +1 -0
- package/dist/lib/service/cursor/TokenBudget.d.ts +27 -0
- package/dist/lib/service/cursor/TokenBudget.d.ts.map +1 -0
- package/dist/lib/service/cursor/TokenBudget.js +38 -0
- package/dist/lib/service/cursor/TokenBudget.js.map +1 -0
- package/dist/lib/service/cursor/TopicClassifier.d.ts +48 -0
- package/dist/lib/service/cursor/TopicClassifier.d.ts.map +1 -0
- package/dist/lib/service/cursor/TopicClassifier.js +176 -0
- package/dist/lib/service/cursor/TopicClassifier.js.map +1 -0
- package/dist/lib/service/guard/ComplianceReporter.d.ts +156 -0
- package/dist/lib/service/guard/ComplianceReporter.d.ts.map +1 -0
- package/dist/lib/service/guard/ComplianceReporter.js +317 -0
- package/dist/lib/service/guard/ComplianceReporter.js.map +1 -0
- package/dist/lib/service/guard/ExclusionManager.d.ts +108 -0
- package/dist/lib/service/guard/ExclusionManager.d.ts.map +1 -0
- package/dist/lib/service/guard/ExclusionManager.js +256 -0
- package/dist/lib/service/guard/ExclusionManager.js.map +1 -0
- package/dist/lib/service/guard/GuardCheckEngine.d.ts +216 -0
- package/dist/lib/service/guard/GuardCheckEngine.d.ts.map +1 -0
- package/dist/lib/service/guard/GuardCheckEngine.js +982 -0
- package/dist/lib/service/guard/GuardCheckEngine.js.map +1 -0
- package/dist/lib/service/guard/GuardCodeChecks.d.ts +34 -0
- package/dist/lib/service/guard/GuardCodeChecks.d.ts.map +1 -0
- package/dist/lib/service/guard/GuardCodeChecks.js +351 -0
- package/dist/lib/service/guard/GuardCodeChecks.js.map +1 -0
- package/dist/lib/service/guard/GuardCrossFileChecks.d.ts +43 -0
- package/dist/lib/service/guard/GuardCrossFileChecks.d.ts.map +1 -0
- package/dist/lib/service/guard/GuardCrossFileChecks.js +290 -0
- package/dist/lib/service/guard/GuardCrossFileChecks.js.map +1 -0
- package/dist/lib/service/guard/GuardFeedbackLoop.d.ts +91 -0
- package/dist/lib/service/guard/GuardFeedbackLoop.d.ts.map +1 -0
- package/dist/lib/service/guard/GuardFeedbackLoop.js +141 -0
- package/dist/lib/service/guard/GuardFeedbackLoop.js.map +1 -0
- package/dist/lib/service/guard/GuardPatternUtils.d.ts +47 -0
- package/dist/lib/service/guard/GuardPatternUtils.d.ts.map +1 -0
- package/dist/lib/service/guard/GuardPatternUtils.js +171 -0
- package/dist/lib/service/guard/GuardPatternUtils.js.map +1 -0
- package/dist/lib/service/guard/GuardService.d.ts +217 -0
- package/dist/lib/service/guard/GuardService.d.ts.map +1 -0
- package/dist/lib/service/guard/GuardService.js +305 -0
- package/dist/lib/service/guard/GuardService.js.map +1 -0
- package/dist/lib/service/guard/RuleLearner.d.ts +98 -0
- package/dist/lib/service/guard/RuleLearner.d.ts.map +1 -0
- package/dist/lib/service/guard/RuleLearner.js +298 -0
- package/dist/lib/service/guard/RuleLearner.js.map +1 -0
- package/dist/lib/service/guard/SourceFileCollector.d.ts +42 -0
- package/dist/lib/service/guard/SourceFileCollector.d.ts.map +1 -0
- package/dist/lib/service/guard/SourceFileCollector.js +106 -0
- package/dist/lib/service/guard/SourceFileCollector.js.map +1 -0
- package/dist/lib/service/guard/ViolationsStore.d.ts +118 -0
- package/dist/lib/service/guard/ViolationsStore.d.ts.map +1 -0
- package/dist/lib/service/guard/ViolationsStore.js +228 -0
- package/dist/lib/service/guard/ViolationsStore.js.map +1 -0
- package/dist/lib/service/knowledge/CodeEntityGraph.d.ts +418 -0
- package/dist/lib/service/knowledge/CodeEntityGraph.d.ts.map +1 -0
- package/dist/lib/service/knowledge/CodeEntityGraph.js +1050 -0
- package/dist/lib/service/knowledge/CodeEntityGraph.js.map +1 -0
- package/dist/lib/service/knowledge/ConfidenceRouter.d.ts +63 -0
- package/dist/lib/service/knowledge/ConfidenceRouter.d.ts.map +1 -0
- package/dist/lib/service/knowledge/ConfidenceRouter.js +155 -0
- package/dist/lib/service/knowledge/ConfidenceRouter.js.map +1 -0
- package/dist/lib/service/knowledge/KnowledgeFileWriter.d.ts +100 -0
- package/dist/lib/service/knowledge/KnowledgeFileWriter.d.ts.map +1 -0
- package/dist/lib/service/knowledge/KnowledgeFileWriter.js +658 -0
- package/dist/lib/service/knowledge/KnowledgeFileWriter.js.map +1 -0
- package/dist/lib/service/knowledge/KnowledgeGraphService.d.ts +121 -0
- package/dist/lib/service/knowledge/KnowledgeGraphService.d.ts.map +1 -0
- package/dist/lib/service/knowledge/KnowledgeGraphService.js +230 -0
- package/dist/lib/service/knowledge/KnowledgeGraphService.js.map +1 -0
- package/dist/lib/service/knowledge/KnowledgeService.d.ts +225 -0
- package/dist/lib/service/knowledge/KnowledgeService.d.ts.map +1 -0
- package/dist/lib/service/knowledge/KnowledgeService.js +852 -0
- package/dist/lib/service/knowledge/KnowledgeService.js.map +1 -0
- package/dist/lib/service/module/ModuleService.d.ts +156 -0
- package/dist/lib/service/module/ModuleService.d.ts.map +1 -0
- package/dist/lib/service/module/ModuleService.js +951 -0
- package/dist/lib/service/module/ModuleService.js.map +1 -0
- package/dist/lib/service/quality/FeedbackCollector.d.ts +55 -0
- package/dist/lib/service/quality/FeedbackCollector.d.ts.map +1 -0
- package/dist/lib/service/quality/FeedbackCollector.js +137 -0
- package/dist/lib/service/quality/FeedbackCollector.js.map +1 -0
- package/dist/lib/service/quality/QualityScorer.d.ts +70 -0
- package/dist/lib/service/quality/QualityScorer.d.ts.map +1 -0
- package/dist/lib/service/quality/QualityScorer.js +183 -0
- package/dist/lib/service/quality/QualityScorer.js.map +1 -0
- package/dist/lib/service/recipe/RecipeCandidateValidator.d.ts +80 -0
- package/dist/lib/service/recipe/RecipeCandidateValidator.d.ts.map +1 -0
- package/dist/lib/service/recipe/RecipeCandidateValidator.js +184 -0
- package/dist/lib/service/recipe/RecipeCandidateValidator.js.map +1 -0
- package/dist/lib/service/recipe/RecipeParser.d.ts +88 -0
- package/dist/lib/service/recipe/RecipeParser.d.ts.map +1 -0
- package/dist/lib/service/recipe/RecipeParser.js +280 -0
- package/dist/lib/service/recipe/RecipeParser.js.map +1 -0
- package/dist/lib/service/search/CoarseRanker.d.ts +64 -0
- package/dist/lib/service/search/CoarseRanker.d.ts.map +1 -0
- package/dist/lib/service/search/CoarseRanker.js +114 -0
- package/dist/lib/service/search/CoarseRanker.js.map +1 -0
- package/dist/lib/service/search/CrossEncoderReranker.d.ts +60 -0
- package/dist/lib/service/search/CrossEncoderReranker.d.ts.map +1 -0
- package/dist/lib/service/search/CrossEncoderReranker.js +158 -0
- package/dist/lib/service/search/CrossEncoderReranker.js.map +1 -0
- package/dist/lib/service/search/HybridRetriever.d.ts +80 -0
- package/dist/lib/service/search/HybridRetriever.d.ts.map +1 -0
- package/dist/lib/service/search/HybridRetriever.js +123 -0
- package/dist/lib/service/search/HybridRetriever.js.map +1 -0
- package/dist/lib/service/search/InvertedIndex.d.ts +34 -0
- package/dist/lib/service/search/InvertedIndex.d.ts.map +1 -0
- package/dist/lib/service/search/InvertedIndex.js +83 -0
- package/dist/lib/service/search/InvertedIndex.js.map +1 -0
- package/dist/lib/service/search/MultiSignalRanker.d.ts +109 -0
- package/dist/lib/service/search/MultiSignalRanker.d.ts.map +1 -0
- package/dist/lib/service/search/MultiSignalRanker.js +257 -0
- package/dist/lib/service/search/MultiSignalRanker.js.map +1 -0
- package/dist/lib/service/search/RetrievalFunnel.d.ts +26 -0
- package/dist/lib/service/search/RetrievalFunnel.d.ts.map +1 -0
- package/dist/lib/service/search/RetrievalFunnel.js +77 -0
- package/dist/lib/service/search/RetrievalFunnel.js.map +1 -0
- package/dist/lib/service/search/SearchEngine.d.ts +389 -0
- package/dist/lib/service/search/SearchEngine.d.ts.map +1 -0
- package/dist/lib/service/search/SearchEngine.js +971 -0
- package/dist/lib/service/search/SearchEngine.js.map +1 -0
- package/dist/lib/service/search/contextBoost.d.ts +47 -0
- package/dist/lib/service/search/contextBoost.d.ts.map +1 -0
- package/dist/lib/service/search/contextBoost.js +45 -0
- package/dist/lib/service/search/contextBoost.js.map +1 -0
- package/dist/lib/service/skills/EventAggregator.d.ts +63 -0
- package/dist/lib/service/skills/EventAggregator.d.ts.map +1 -0
- package/dist/lib/service/skills/EventAggregator.js +178 -0
- package/dist/lib/service/skills/EventAggregator.js.map +1 -0
- package/dist/lib/service/skills/SignalCollector.d.ts +125 -0
- package/dist/lib/service/skills/SignalCollector.d.ts.map +1 -0
- package/dist/lib/service/skills/SignalCollector.js +575 -0
- package/dist/lib/service/skills/SignalCollector.js.map +1 -0
- package/dist/lib/service/skills/SkillAdvisor.d.ts +64 -0
- package/dist/lib/service/skills/SkillAdvisor.d.ts.map +1 -0
- package/dist/lib/service/skills/SkillAdvisor.js +336 -0
- package/dist/lib/service/skills/SkillAdvisor.js.map +1 -0
- package/dist/lib/service/skills/SkillHooks.d.ts +41 -0
- package/dist/lib/service/skills/SkillHooks.d.ts.map +1 -0
- package/dist/lib/service/skills/SkillHooks.js +130 -0
- package/dist/lib/service/skills/SkillHooks.js.map +1 -0
- package/dist/lib/service/snippet/SnippetFactory.d.ts +120 -0
- package/dist/lib/service/snippet/SnippetFactory.d.ts.map +1 -0
- package/dist/lib/service/snippet/SnippetFactory.js +169 -0
- package/dist/lib/service/snippet/SnippetFactory.js.map +1 -0
- package/dist/lib/service/snippet/SnippetInstaller.d.ts +100 -0
- package/dist/lib/service/snippet/SnippetInstaller.d.ts.map +1 -0
- package/dist/lib/service/snippet/SnippetInstaller.js +291 -0
- package/dist/lib/service/snippet/SnippetInstaller.js.map +1 -0
- package/dist/lib/service/snippet/codecs/SnippetCodec.d.ts +61 -0
- package/dist/lib/service/snippet/codecs/SnippetCodec.d.ts.map +1 -0
- package/dist/lib/service/snippet/codecs/SnippetCodec.js +52 -0
- package/dist/lib/service/snippet/codecs/SnippetCodec.js.map +1 -0
- package/dist/lib/service/snippet/codecs/VSCodeCodec.d.ts +32 -0
- package/dist/lib/service/snippet/codecs/VSCodeCodec.d.ts.map +1 -0
- package/dist/lib/service/snippet/codecs/VSCodeCodec.js +89 -0
- package/dist/lib/service/snippet/codecs/VSCodeCodec.js.map +1 -0
- package/dist/lib/service/task/TaskGraphService.d.ts +269 -0
- package/dist/lib/service/task/TaskGraphService.d.ts.map +1 -0
- package/dist/lib/service/task/TaskGraphService.js +603 -0
- package/dist/lib/service/task/TaskGraphService.js.map +1 -0
- package/dist/lib/service/task/TaskKnowledgeBridge.d.ts +53 -0
- package/dist/lib/service/task/TaskKnowledgeBridge.d.ts.map +1 -0
- package/dist/lib/service/task/TaskKnowledgeBridge.js +92 -0
- package/dist/lib/service/task/TaskKnowledgeBridge.js.map +1 -0
- package/dist/lib/service/task/TaskReadyEngine.d.ts +93 -0
- package/dist/lib/service/task/TaskReadyEngine.d.ts.map +1 -0
- package/dist/lib/service/task/TaskReadyEngine.js +124 -0
- package/dist/lib/service/task/TaskReadyEngine.js.map +1 -0
- package/dist/lib/service/wiki/WikiGenerator.d.ts +407 -0
- package/dist/lib/service/wiki/WikiGenerator.d.ts.map +1 -0
- package/dist/lib/service/wiki/WikiGenerator.js +912 -0
- package/dist/lib/service/wiki/WikiGenerator.js.map +1 -0
- package/dist/lib/service/wiki/WikiRenderers.d.ts +219 -0
- package/dist/lib/service/wiki/WikiRenderers.d.ts.map +1 -0
- package/dist/lib/service/wiki/WikiRenderers.js +1627 -0
- package/dist/lib/service/wiki/WikiRenderers.js.map +1 -0
- package/dist/lib/service/wiki/WikiUtils.d.ts +164 -0
- package/dist/lib/service/wiki/WikiUtils.d.ts.map +1 -0
- package/dist/lib/service/wiki/WikiUtils.js +971 -0
- package/dist/lib/service/wiki/WikiUtils.js.map +1 -0
- package/dist/lib/shared/BootstrapEventEmitter.d.ts +59 -0
- package/dist/lib/shared/BootstrapEventEmitter.d.ts.map +1 -0
- package/dist/lib/shared/BootstrapEventEmitter.js +140 -0
- package/dist/lib/shared/BootstrapEventEmitter.js.map +1 -0
- package/dist/lib/shared/DimensionCopyRegistry.d.ts +76 -0
- package/dist/lib/shared/DimensionCopyRegistry.d.ts.map +1 -0
- package/dist/lib/shared/DimensionCopyRegistry.js +402 -0
- package/dist/lib/shared/DimensionCopyRegistry.js.map +1 -0
- package/dist/lib/shared/FieldSpec.d.ts +169 -0
- package/dist/lib/shared/FieldSpec.d.ts.map +1 -0
- package/dist/lib/shared/FieldSpec.js +348 -0
- package/dist/lib/shared/FieldSpec.js.map +1 -0
- package/dist/lib/shared/LanguageService.d.ts +203 -0
- package/dist/lib/shared/LanguageService.d.ts.map +1 -0
- package/dist/lib/shared/LanguageService.js +687 -0
- package/dist/lib/shared/LanguageService.js.map +1 -0
- package/dist/lib/shared/PathGuard.d.ts +105 -0
- package/dist/lib/shared/PathGuard.d.ts.map +1 -0
- package/dist/lib/shared/PathGuard.js +312 -0
- package/dist/lib/shared/PathGuard.js.map +1 -0
- package/dist/lib/shared/RecipeReadinessChecker.d.ts +37 -0
- package/dist/lib/shared/RecipeReadinessChecker.d.ts.map +1 -0
- package/dist/lib/shared/RecipeReadinessChecker.js +68 -0
- package/dist/lib/shared/RecipeReadinessChecker.js.map +1 -0
- package/dist/lib/shared/StyleGuide.d.ts +25 -0
- package/dist/lib/shared/StyleGuide.d.ts.map +1 -0
- package/dist/lib/shared/StyleGuide.js +110 -0
- package/dist/lib/shared/StyleGuide.js.map +1 -0
- package/dist/lib/shared/UnifiedValidator.d.ts +57 -0
- package/dist/lib/shared/UnifiedValidator.d.ts.map +1 -0
- package/dist/lib/shared/UnifiedValidator.js +315 -0
- package/dist/lib/shared/UnifiedValidator.js.map +1 -0
- package/dist/lib/shared/concurrency.d.ts +34 -0
- package/dist/lib/shared/concurrency.d.ts.map +1 -0
- package/dist/lib/shared/concurrency.js +34 -0
- package/dist/lib/shared/concurrency.js.map +1 -0
- package/dist/lib/shared/constants.d.ts +208 -0
- package/dist/lib/shared/constants.d.ts.map +1 -0
- package/dist/lib/shared/constants.js +138 -0
- package/dist/lib/shared/constants.js.map +1 -0
- package/dist/lib/shared/errors/BaseError.d.ts +60 -0
- package/dist/lib/shared/errors/BaseError.d.ts.map +1 -0
- package/dist/lib/shared/errors/BaseError.js +93 -0
- package/dist/lib/shared/errors/BaseError.js.map +1 -0
- package/dist/lib/shared/errors/index.d.ts +6 -0
- package/dist/lib/shared/errors/index.d.ts.map +1 -0
- package/dist/lib/shared/errors/index.js +6 -0
- package/dist/lib/shared/errors/index.js.map +1 -0
- package/dist/lib/shared/isOwnDevRepo.d.ts +21 -0
- package/dist/lib/shared/isOwnDevRepo.d.ts.map +1 -0
- package/dist/lib/shared/isOwnDevRepo.js +53 -0
- package/dist/lib/shared/isOwnDevRepo.js.map +1 -0
- package/dist/lib/shared/package-root.d.ts +13 -0
- package/dist/lib/shared/package-root.d.ts.map +1 -0
- package/dist/lib/shared/package-root.js +60 -0
- package/dist/lib/shared/package-root.js.map +1 -0
- package/dist/lib/shared/schemas/common.d.ts +66 -0
- package/dist/lib/shared/schemas/common.d.ts.map +1 -0
- package/dist/lib/shared/schemas/common.js +58 -0
- package/dist/lib/shared/schemas/common.js.map +1 -0
- package/dist/lib/shared/schemas/config.d.ts +145 -0
- package/dist/lib/shared/schemas/config.d.ts.map +1 -0
- package/dist/lib/shared/schemas/config.js +151 -0
- package/dist/lib/shared/schemas/config.js.map +1 -0
- package/dist/lib/shared/schemas/http-requests.d.ts +345 -0
- package/dist/lib/shared/schemas/http-requests.d.ts.map +1 -0
- package/dist/lib/shared/schemas/http-requests.js +348 -0
- package/dist/lib/shared/schemas/http-requests.js.map +1 -0
- package/dist/lib/shared/schemas/index.d.ts +10 -0
- package/dist/lib/shared/schemas/index.d.ts.map +1 -0
- package/dist/lib/shared/schemas/index.js +10 -0
- package/dist/lib/shared/schemas/index.js.map +1 -0
- package/dist/lib/shared/schemas/mcp-tools.d.ts +344 -0
- package/dist/lib/shared/schemas/mcp-tools.d.ts.map +1 -0
- package/dist/lib/shared/schemas/mcp-tools.js +327 -0
- package/dist/lib/shared/schemas/mcp-tools.js.map +1 -0
- package/dist/lib/shared/shutdown.d.ts +63 -0
- package/dist/lib/shared/shutdown.d.ts.map +1 -0
- package/dist/lib/shared/shutdown.js +111 -0
- package/dist/lib/shared/shutdown.js.map +1 -0
- package/dist/lib/shared/similarity.d.ts +53 -0
- package/dist/lib/shared/similarity.d.ts.map +1 -0
- package/dist/lib/shared/similarity.js +111 -0
- package/dist/lib/shared/similarity.js.map +1 -0
- package/dist/lib/shared/token-utils.d.ts +30 -0
- package/dist/lib/shared/token-utils.d.ts.map +1 -0
- package/dist/lib/shared/token-utils.js +50 -0
- package/dist/lib/shared/token-utils.js.map +1 -0
- package/dist/lib/shared/utils/common.d.ts +45 -0
- package/dist/lib/shared/utils/common.d.ts.map +1 -0
- package/dist/lib/shared/utils/common.js +70 -0
- package/dist/lib/shared/utils/common.js.map +1 -0
- package/dist/scripts/build-native-ui.d.ts +6 -0
- package/dist/scripts/build-native-ui.d.ts.map +1 -0
- package/dist/scripts/build-native-ui.js +68 -0
- package/dist/scripts/build-native-ui.js.map +1 -0
- package/dist/scripts/diagnose-mcp.d.ts +10 -0
- package/dist/scripts/diagnose-mcp.d.ts.map +1 -0
- package/dist/scripts/diagnose-mcp.js +79 -0
- package/dist/scripts/diagnose-mcp.js.map +1 -0
- package/dist/scripts/init-snippets.d.ts +31 -0
- package/dist/scripts/init-snippets.d.ts.map +1 -0
- package/dist/scripts/init-snippets.js +299 -0
- package/dist/scripts/init-snippets.js.map +1 -0
- package/dist/scripts/install-cursor-skill.d.ts +14 -0
- package/dist/scripts/install-cursor-skill.d.ts.map +1 -0
- package/dist/scripts/install-cursor-skill.js +364 -0
- package/dist/scripts/install-cursor-skill.js.map +1 -0
- package/dist/scripts/install-full.d.ts +8 -0
- package/dist/scripts/install-full.d.ts.map +1 -0
- package/dist/scripts/install-full.js +42 -0
- package/dist/scripts/install-full.js.map +1 -0
- package/dist/scripts/install-vscode-copilot.d.ts +24 -0
- package/dist/scripts/install-vscode-copilot.d.ts.map +1 -0
- package/dist/scripts/install-vscode-copilot.js +277 -0
- package/dist/scripts/install-vscode-copilot.js.map +1 -0
- package/dist/scripts/release.d.ts +8 -0
- package/dist/scripts/release.d.ts.map +1 -0
- package/dist/scripts/release.js +364 -0
- package/dist/scripts/release.js.map +1 -0
- package/dist/scripts/setup-mcp-config.d.ts +10 -0
- package/dist/scripts/setup-mcp-config.d.ts.map +1 -0
- package/dist/scripts/setup-mcp-config.js +120 -0
- package/dist/scripts/setup-mcp-config.js.map +1 -0
- package/dist/scripts/verify-context-api.d.ts +8 -0
- package/dist/scripts/verify-context-api.d.ts.map +1 -0
- package/dist/scripts/verify-context-api.js +55 -0
- package/dist/scripts/verify-context-api.js.map +1 -0
- package/package.json +107 -46
- package/resources/native-ui/screenshot.swift +2 -2
- package/scripts/postbuild.mjs +32 -0
- package/scripts/postinstall-safe.js +7 -13
- package/bin/api-server.js +0 -108
- package/bin/cli.js +0 -1263
- package/bin/mcp-server.js +0 -62
- package/config/knowledge-base.config.js +0 -173
- package/dashboard/dist/assets/icons-pSac4wYO.js +0 -531
- package/dashboard/dist/assets/index-BTAsOZv2.js +0 -128
- package/dashboard/dist/assets/index-C_72Ct98.css +0 -1
- package/lib/bootstrap.js +0 -228
- package/lib/cli/AiScanService.js +0 -280
- package/lib/cli/CliLogger.js +0 -78
- package/lib/cli/KnowledgeSyncService.js +0 -384
- package/lib/cli/SetupService.js +0 -559
- package/lib/cli/UpgradeService.js +0 -96
- package/lib/cli/deploy/FileDeployer.js +0 -562
- package/lib/cli/deploy/FileManifest.js +0 -272
- package/lib/core/AstAnalyzer.js +0 -878
- package/lib/core/analysis/CallEdgeResolver.js +0 -402
- package/lib/core/analysis/CallGraphAnalyzer.js +0 -367
- package/lib/core/analysis/CallSiteExtractor.js +0 -629
- package/lib/core/analysis/DataFlowInferrer.js +0 -57
- package/lib/core/analysis/ImportPathResolver.js +0 -189
- package/lib/core/analysis/ImportRecord.js +0 -105
- package/lib/core/analysis/SymbolTableBuilder.js +0 -211
- package/lib/core/ast/ProjectGraph.js +0 -828
- package/lib/core/ast/ensure-grammars.js +0 -129
- package/lib/core/ast/index.js +0 -167
- package/lib/core/ast/lang-dart.js +0 -1010
- package/lib/core/ast/lang-go.js +0 -714
- package/lib/core/ast/lang-java.js +0 -635
- package/lib/core/ast/lang-javascript.js +0 -268
- package/lib/core/ast/lang-kotlin.js +0 -748
- package/lib/core/ast/lang-objc.js +0 -384
- package/lib/core/ast/lang-python.js +0 -396
- package/lib/core/ast/lang-rust.js +0 -997
- package/lib/core/ast/lang-swift.js +0 -512
- package/lib/core/ast/lang-typescript.js +0 -786
- package/lib/core/ast/parser-init.js +0 -86
- package/lib/core/capability/CapabilityProbe.js +0 -258
- package/lib/core/constitution/Constitution.js +0 -132
- package/lib/core/constitution/ConstitutionValidator.js +0 -196
- package/lib/core/discovery/DartDiscoverer.js +0 -529
- package/lib/core/discovery/DiscovererRegistry.js +0 -83
- package/lib/core/discovery/GenericDiscoverer.js +0 -202
- package/lib/core/discovery/GoDiscoverer.js +0 -562
- package/lib/core/discovery/JvmDiscoverer.js +0 -507
- package/lib/core/discovery/NodeDiscoverer.js +0 -465
- package/lib/core/discovery/ProjectDiscoverer.js +0 -93
- package/lib/core/discovery/PythonDiscoverer.js +0 -348
- package/lib/core/discovery/RustDiscoverer.js +0 -541
- package/lib/core/discovery/index.js +0 -56
- package/lib/core/enhancement/EnhancementPack.js +0 -82
- package/lib/core/enhancement/EnhancementRegistry.js +0 -47
- package/lib/core/enhancement/android-enhancement.js +0 -104
- package/lib/core/enhancement/django-enhancement.js +0 -245
- package/lib/core/enhancement/fastapi-enhancement.js +0 -219
- package/lib/core/enhancement/go-grpc-enhancement.js +0 -159
- package/lib/core/enhancement/go-web-enhancement.js +0 -206
- package/lib/core/enhancement/index.js +0 -70
- package/lib/core/enhancement/langchain-enhancement.js +0 -236
- package/lib/core/enhancement/ml-enhancement.js +0 -271
- package/lib/core/enhancement/nextjs-enhancement.js +0 -232
- package/lib/core/enhancement/node-server-enhancement.js +0 -267
- package/lib/core/enhancement/react-enhancement.js +0 -254
- package/lib/core/enhancement/rust-tokio-enhancement.js +0 -237
- package/lib/core/enhancement/rust-web-enhancement.js +0 -264
- package/lib/core/enhancement/spring-enhancement.js +0 -116
- package/lib/core/enhancement/vue-enhancement.js +0 -245
- package/lib/core/gateway/Gateway.js +0 -273
- package/lib/core/gateway/GatewayActionRegistry.js +0 -236
- package/lib/core/permission/PermissionManager.js +0 -252
- package/lib/domain/index.js +0 -29
- package/lib/domain/knowledge/KnowledgeEntry.js +0 -312
- package/lib/domain/knowledge/KnowledgeRepository.js +0 -122
- package/lib/domain/knowledge/Lifecycle.js +0 -101
- package/lib/domain/knowledge/index.js +0 -24
- package/lib/domain/knowledge/values/Constraints.js +0 -138
- package/lib/domain/knowledge/values/Content.js +0 -77
- package/lib/domain/knowledge/values/Quality.js +0 -94
- package/lib/domain/knowledge/values/Reasoning.js +0 -78
- package/lib/domain/knowledge/values/Relations.js +0 -159
- package/lib/domain/knowledge/values/Stats.js +0 -78
- package/lib/domain/knowledge/values/index.js +0 -10
- package/lib/domain/snippet/Snippet.js +0 -107
- package/lib/domain/task/Task.js +0 -244
- package/lib/domain/task/TaskDependency.js +0 -49
- package/lib/domain/task/TaskIdGenerator.js +0 -83
- package/lib/domain/task/index.js +0 -6
- package/lib/external/ai/AiFactory.js +0 -251
- package/lib/external/ai/AiProvider.js +0 -823
- package/lib/external/ai/providers/ClaudeProvider.js +0 -308
- package/lib/external/ai/providers/GoogleGeminiProvider.js +0 -464
- package/lib/external/ai/providers/MockProvider.js +0 -64
- package/lib/external/ai/providers/OpenAiProvider.js +0 -308
- package/lib/external/mcp/McpServer.js +0 -475
- package/lib/external/mcp/autoApproveInjector.js +0 -155
- package/lib/external/mcp/envelope.js +0 -35
- package/lib/external/mcp/errorHandler.js +0 -118
- package/lib/external/mcp/handlers/LanguageExtensions.js +0 -582
- package/lib/external/mcp/handlers/TargetClassifier.js +0 -74
- package/lib/external/mcp/handlers/bootstrap/BootstrapSession.js +0 -252
- package/lib/external/mcp/handlers/bootstrap/ExternalSubmissionTracker.js +0 -397
- package/lib/external/mcp/handlers/bootstrap/MissionBriefingBuilder.js +0 -855
- package/lib/external/mcp/handlers/bootstrap/base-dimensions.js +0 -250
- package/lib/external/mcp/handlers/bootstrap/pipeline/BootstrapSnapshot.js +0 -618
- package/lib/external/mcp/handlers/bootstrap/pipeline/IncrementalBootstrap.js +0 -212
- package/lib/external/mcp/handlers/bootstrap/pipeline/checkpoint.js +0 -96
- package/lib/external/mcp/handlers/bootstrap/pipeline/dimension-configs.js +0 -181
- package/lib/external/mcp/handlers/bootstrap/pipeline/dimension-context.js +0 -227
- package/lib/external/mcp/handlers/bootstrap/pipeline/noAiFallback.js +0 -776
- package/lib/external/mcp/handlers/bootstrap/pipeline/orchestrator.js +0 -1408
- package/lib/external/mcp/handlers/bootstrap/pipeline/tier-scheduler.js +0 -217
- package/lib/external/mcp/handlers/bootstrap/refine.js +0 -365
- package/lib/external/mcp/handlers/bootstrap/shared/bootstrap-phases.js +0 -774
- package/lib/external/mcp/handlers/bootstrap/shared/dimension-sop.js +0 -709
- package/lib/external/mcp/handlers/bootstrap/shared/dimension-text.js +0 -230
- package/lib/external/mcp/handlers/bootstrap/shared/skill-generator.js +0 -268
- package/lib/external/mcp/handlers/bootstrap/skills.js +0 -110
- package/lib/external/mcp/handlers/bootstrap-external.js +0 -183
- package/lib/external/mcp/handlers/bootstrap-internal.js +0 -420
- package/lib/external/mcp/handlers/browse.js +0 -313
- package/lib/external/mcp/handlers/candidate.js +0 -241
- package/lib/external/mcp/handlers/consolidated.js +0 -325
- package/lib/external/mcp/handlers/dimension-complete-external.js +0 -472
- package/lib/external/mcp/handlers/guard.js +0 -610
- package/lib/external/mcp/handlers/knowledge.js +0 -381
- package/lib/external/mcp/handlers/search.js +0 -291
- package/lib/external/mcp/handlers/skill.js +0 -719
- package/lib/external/mcp/handlers/structure.js +0 -622
- package/lib/external/mcp/handlers/system.js +0 -269
- package/lib/external/mcp/handlers/task.js +0 -629
- package/lib/external/mcp/handlers/wiki-external.js +0 -593
- package/lib/external/mcp/tools.js +0 -759
- package/lib/http/HttpServer.js +0 -488
- package/lib/http/api-spec.js +0 -192
- package/lib/http/middleware/RateLimiter.js +0 -69
- package/lib/http/middleware/errorHandler.js +0 -96
- package/lib/http/middleware/gatewayMiddleware.js +0 -61
- package/lib/http/middleware/requestLogger.js +0 -73
- package/lib/http/middleware/roleResolver.js +0 -121
- package/lib/http/routes/ai.js +0 -890
- package/lib/http/routes/auth.js +0 -161
- package/lib/http/routes/candidates.js +0 -812
- package/lib/http/routes/commands.js +0 -343
- package/lib/http/routes/extract.js +0 -199
- package/lib/http/routes/guard.js +0 -283
- package/lib/http/routes/guardRules.js +0 -405
- package/lib/http/routes/health.js +0 -35
- package/lib/http/routes/knowledge.js +0 -305
- package/lib/http/routes/modules.js +0 -584
- package/lib/http/routes/monitoring.js +0 -329
- package/lib/http/routes/recipes.js +0 -178
- package/lib/http/routes/remote.js +0 -1017
- package/lib/http/routes/search.js +0 -452
- package/lib/http/routes/skills.js +0 -248
- package/lib/http/routes/snippets.js +0 -66
- package/lib/http/routes/task.js +0 -418
- package/lib/http/routes/violations.js +0 -94
- package/lib/http/routes/wiki.js +0 -371
- package/lib/http/utils/routeHelpers.js +0 -63
- package/lib/http/utils/sse-sessions.js +0 -124
- package/lib/http/utils/sse.js +0 -138
- package/lib/infrastructure/audit/AuditLogger.js +0 -123
- package/lib/infrastructure/audit/AuditStore.js +0 -219
- package/lib/infrastructure/cache/CacheService.js +0 -151
- package/lib/infrastructure/cache/GraphCache.js +0 -147
- package/lib/infrastructure/cache/UnifiedCacheAdapter.js +0 -115
- package/lib/infrastructure/config/ConfigLoader.js +0 -114
- package/lib/infrastructure/config/Defaults.js +0 -92
- package/lib/infrastructure/config/Paths.js +0 -167
- package/lib/infrastructure/config/TriggerSymbol.js +0 -76
- package/lib/infrastructure/database/DatabaseConnection.js +0 -137
- package/lib/infrastructure/database/migrations/001_initial_schema.js +0 -314
- package/lib/infrastructure/database/migrations/002_add_tasks.js +0 -88
- package/lib/infrastructure/database/migrations/003_add_remote_commands.js +0 -27
- package/lib/infrastructure/event/EventBus.js +0 -83
- package/lib/infrastructure/external/ClipboardManager.js +0 -152
- package/lib/infrastructure/external/NativeUi.js +0 -304
- package/lib/infrastructure/external/OpenBrowser.js +0 -135
- package/lib/infrastructure/logging/Logger.js +0 -184
- package/lib/infrastructure/monitoring/ErrorTracker.js +0 -341
- package/lib/infrastructure/monitoring/PerformanceMonitor.js +0 -281
- package/lib/infrastructure/paths/HeaderResolver.js +0 -115
- package/lib/infrastructure/paths/PathFinder.js +0 -133
- package/lib/infrastructure/plugin/PluginManager.js +0 -139
- package/lib/infrastructure/realtime/RealtimeService.js +0 -179
- package/lib/infrastructure/vector/Chunker.js +0 -177
- package/lib/infrastructure/vector/IndexingPipeline.js +0 -209
- package/lib/infrastructure/vector/JsonVectorAdapter.js +0 -279
- package/lib/infrastructure/vector/VectorStore.js +0 -94
- package/lib/injection/ServiceContainer.js +0 -1063
- package/lib/platform/ScreenCaptureService.js +0 -177
- package/lib/platform/ios/index.js +0 -58
- package/lib/platform/ios/routes/spm.js +0 -440
- package/lib/platform/ios/snippet/PlaceholderConverter.js +0 -59
- package/lib/platform/ios/snippet/XcodeCodec.js +0 -114
- package/lib/platform/ios/spm/DependencyGraph.js +0 -234
- package/lib/platform/ios/spm/PackageSwiftParser.js +0 -267
- package/lib/platform/ios/spm/PolicyEngine.js +0 -91
- package/lib/platform/ios/spm/SpmDiscoverer.js +0 -228
- package/lib/platform/ios/spm/SpmHelper.js +0 -813
- package/lib/platform/ios/xcode/SaveEventFilter.js +0 -165
- package/lib/platform/ios/xcode/XcodeAutomation.js +0 -350
- package/lib/platform/ios/xcode/XcodeImportResolver.js +0 -434
- package/lib/platform/ios/xcode/XcodeIntegration.js +0 -680
- package/lib/platform/ios/xcode/XcodeWriteUtils.js +0 -225
- package/lib/repository/base/BaseRepository.js +0 -256
- package/lib/repository/knowledge/KnowledgeRepository.impl.js +0 -355
- package/lib/repository/task/TaskRepository.impl.js +0 -400
- package/lib/repository/token/TokenUsageStore.js +0 -164
- package/lib/service/agent/AgentEventBus.js +0 -207
- package/lib/service/agent/AgentFactory.js +0 -490
- package/lib/service/agent/AgentMessage.js +0 -240
- package/lib/service/agent/AgentRouter.js +0 -228
- package/lib/service/agent/AgentRuntime.js +0 -1016
- package/lib/service/agent/AgentState.js +0 -217
- package/lib/service/agent/ConversationStore.js +0 -420
- package/lib/service/agent/IntentClassifier.js +0 -331
- package/lib/service/agent/LarkTransport.js +0 -389
- package/lib/service/agent/capabilities.js +0 -408
- package/lib/service/agent/context/ContextWindow.js +0 -674
- package/lib/service/agent/context/ExplorationTracker.js +0 -1317
- package/lib/service/agent/core/ChatAgentPrompts.js +0 -159
- package/lib/service/agent/core/LoopContext.js +0 -170
- package/lib/service/agent/core/MessageAdapter.js +0 -223
- package/lib/service/agent/core/ToolExecutionPipeline.js +0 -376
- package/lib/service/agent/domain/ChatAgentTasks.js +0 -218
- package/lib/service/agent/domain/EpisodicConsolidator.js +0 -367
- package/lib/service/agent/domain/EvidenceCollector.js +0 -502
- package/lib/service/agent/domain/insight-analyst.js +0 -245
- package/lib/service/agent/domain/insight-gate.js +0 -474
- package/lib/service/agent/domain/insight-producer.js +0 -267
- package/lib/service/agent/domain/scan-prompts.js +0 -105
- package/lib/service/agent/forced-summary.js +0 -266
- package/lib/service/agent/index.js +0 -91
- package/lib/service/agent/memory/ActiveContext.js +0 -912
- package/lib/service/agent/memory/MemoryCoordinator.js +0 -662
- package/lib/service/agent/memory/PersistentMemory.js +0 -1165
- package/lib/service/agent/memory/SessionStore.js +0 -897
- package/lib/service/agent/memory/index.js +0 -13
- package/lib/service/agent/policies.js +0 -442
- package/lib/service/agent/presets.js +0 -303
- package/lib/service/agent/strategies.js +0 -717
- package/lib/service/agent/tools/ToolRegistry.js +0 -215
- package/lib/service/agent/tools/_shared.js +0 -61
- package/lib/service/agent/tools/ai-analysis.js +0 -75
- package/lib/service/agent/tools/ast-graph.js +0 -879
- package/lib/service/agent/tools/composite.js +0 -567
- package/lib/service/agent/tools/guard.js +0 -145
- package/lib/service/agent/tools/index.js +0 -250
- package/lib/service/agent/tools/infrastructure.js +0 -232
- package/lib/service/agent/tools/knowledge-graph.js +0 -112
- package/lib/service/agent/tools/lifecycle.js +0 -488
- package/lib/service/agent/tools/project-access.js +0 -919
- package/lib/service/agent/tools/query.js +0 -264
- package/lib/service/agent/tools/scan-recipe.js +0 -189
- package/lib/service/agent/tools/system-interaction.js +0 -476
- package/lib/service/automation/ActionPipeline.js +0 -63
- package/lib/service/automation/AutomationOrchestrator.js +0 -76
- package/lib/service/automation/ContextCollector.js +0 -37
- package/lib/service/automation/DirectiveDetector.js +0 -142
- package/lib/service/automation/FileWatcher.js +0 -430
- package/lib/service/automation/TriggerResolver.js +0 -71
- package/lib/service/automation/handlers/AlinkHandler.js +0 -81
- package/lib/service/automation/handlers/CreateHandler.js +0 -196
- package/lib/service/automation/handlers/DraftHandler.js +0 -77
- package/lib/service/automation/handlers/GuardHandler.js +0 -239
- package/lib/service/automation/handlers/HeaderHandler.js +0 -51
- package/lib/service/automation/handlers/SearchHandler.js +0 -305
- package/lib/service/bootstrap/BootstrapTaskManager.js +0 -442
- package/lib/service/candidate/CandidateAggregator.js +0 -52
- package/lib/service/candidate/SimilarityService.js +0 -100
- package/lib/service/context/RecipeExtractor.js +0 -344
- package/lib/service/cursor/AgentInstructionsGenerator.js +0 -469
- package/lib/service/cursor/CursorDeliveryPipeline.js +0 -745
- package/lib/service/cursor/FileProtection.js +0 -119
- package/lib/service/cursor/KnowledgeCompressor.js +0 -189
- package/lib/service/cursor/RulesGenerator.js +0 -174
- package/lib/service/cursor/SkillsSyncer.js +0 -320
- package/lib/service/cursor/TokenBudget.js +0 -41
- package/lib/service/cursor/TopicClassifier.js +0 -191
- package/lib/service/guard/ComplianceReporter.js +0 -364
- package/lib/service/guard/ExclusionManager.js +0 -280
- package/lib/service/guard/GuardCheckEngine.js +0 -1063
- package/lib/service/guard/GuardCodeChecks.js +0 -391
- package/lib/service/guard/GuardCrossFileChecks.js +0 -326
- package/lib/service/guard/GuardFeedbackLoop.js +0 -152
- package/lib/service/guard/GuardPatternUtils.js +0 -187
- package/lib/service/guard/GuardService.js +0 -323
- package/lib/service/guard/RuleLearner.js +0 -324
- package/lib/service/guard/SourceFileCollector.js +0 -116
- package/lib/service/guard/ViolationsStore.js +0 -236
- package/lib/service/knowledge/CodeEntityGraph.js +0 -1177
- package/lib/service/knowledge/ConfidenceRouter.js +0 -161
- package/lib/service/knowledge/KnowledgeFileWriter.js +0 -725
- package/lib/service/knowledge/KnowledgeGraphService.js +0 -264
- package/lib/service/knowledge/KnowledgeService.js +0 -932
- package/lib/service/module/ModuleService.js +0 -1054
- package/lib/service/quality/FeedbackCollector.js +0 -146
- package/lib/service/quality/QualityScorer.js +0 -203
- package/lib/service/recipe/RecipeCandidateValidator.js +0 -211
- package/lib/service/recipe/RecipeParser.js +0 -309
- package/lib/service/search/CoarseRanker.js +0 -111
- package/lib/service/search/CrossEncoderReranker.js +0 -174
- package/lib/service/search/InvertedIndex.js +0 -92
- package/lib/service/search/MultiSignalRanker.js +0 -227
- package/lib/service/search/RetrievalFunnel.js +0 -134
- package/lib/service/search/SearchEngine.js +0 -811
- package/lib/service/skills/EventAggregator.js +0 -204
- package/lib/service/skills/SignalCollector.js +0 -640
- package/lib/service/skills/SkillAdvisor.js +0 -363
- package/lib/service/skills/SkillHooks.js +0 -136
- package/lib/service/snippet/SnippetFactory.js +0 -192
- package/lib/service/snippet/SnippetInstaller.js +0 -329
- package/lib/service/snippet/codecs/SnippetCodec.js +0 -67
- package/lib/service/snippet/codecs/VSCodeCodec.js +0 -102
- package/lib/service/task/TaskGraphService.js +0 -650
- package/lib/service/task/TaskKnowledgeBridge.js +0 -86
- package/lib/service/task/TaskReadyEngine.js +0 -127
- package/lib/service/wiki/WikiGenerator.js +0 -1038
- package/lib/service/wiki/WikiRenderers.js +0 -1903
- package/lib/service/wiki/WikiUtils.js +0 -1052
- package/lib/shared/BootstrapEventEmitter.js +0 -123
- package/lib/shared/DimensionCopyRegistry.js +0 -472
- package/lib/shared/FieldSpec.js +0 -359
- package/lib/shared/LanguageService.js +0 -757
- package/lib/shared/PathGuard.js +0 -326
- package/lib/shared/RecipeReadinessChecker.js +0 -78
- package/lib/shared/StyleGuide.js +0 -107
- package/lib/shared/UnifiedValidator.js +0 -355
- package/lib/shared/constants.js +0 -161
- package/lib/shared/errors/BaseError.js +0 -94
- package/lib/shared/errors/index.js +0 -14
- package/lib/shared/similarity.js +0 -118
- package/lib/shared/token-utils.js +0 -50
- package/lib/shared/utils/common.js +0 -76
- package/scripts/bench-real-projects.mjs +0 -256
- package/scripts/build-native-ui.js +0 -73
- package/scripts/clear-old-vector-index.js +0 -47
- package/scripts/clear-vector-cache.js +0 -49
- package/scripts/collect-test-project-stats.mjs +0 -160
- package/scripts/diagnose-mcp.js +0 -83
- package/scripts/ensure-parse-package.js +0 -46
- package/scripts/generate-recipe-drafts.js +0 -179
- package/scripts/init-db.js +0 -30
- package/scripts/init-snippets.js +0 -324
- package/scripts/init-vector-db.js +0 -277
- package/scripts/install-cursor-skill.js +0 -393
- package/scripts/install-full.js +0 -45
- package/scripts/install-vscode-copilot.js +0 -333
- package/scripts/migrate-md-to-knowledge.mjs +0 -355
- package/scripts/recipe-audit.js +0 -253
- package/scripts/release.js +0 -411
- package/scripts/setup-mcp-config.js +0 -135
- package/scripts/verify-context-api.js +0 -61
|
@@ -1,1903 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WikiRenderers.js — Wiki 文档渲染函数
|
|
3
|
-
*
|
|
4
|
-
* 从 WikiGenerator.js 中提取的 Markdown 渲染器和 AI Prompt 构建函数。
|
|
5
|
-
* 所有函数均为无状态纯函数(不依赖 class 实例)。
|
|
6
|
-
*
|
|
7
|
-
* @module WikiRenderers
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import path from 'node:path';
|
|
11
|
-
import { LanguageService } from '../../shared/LanguageService.js';
|
|
12
|
-
import {
|
|
13
|
-
getInheritanceRoots,
|
|
14
|
-
getLangTerms,
|
|
15
|
-
getModuleSourceFiles,
|
|
16
|
-
inferModulePurpose,
|
|
17
|
-
mermaidId,
|
|
18
|
-
slug,
|
|
19
|
-
} from './WikiUtils.js';
|
|
20
|
-
|
|
21
|
-
// Re-export BUILD_SYSTEM_MARKERS for renderGettingStarted internals
|
|
22
|
-
// NOTE: BUILD_SYSTEM_MARKERS is accessed via LanguageService directly where needed
|
|
23
|
-
|
|
24
|
-
// ═══ AI Prompt 构建 ════════════════════════════════════════
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* 为特定主题构建 AI 撰写 prompt (V3 AI-first 核心)
|
|
28
|
-
*
|
|
29
|
-
* 关键区别: 不是润色骨架,而是提供丰富数据让 AI 写完整文章
|
|
30
|
-
*
|
|
31
|
-
* @param {object} topic
|
|
32
|
-
* @param {object} data - { projectInfo, astInfo, moduleInfo, knowledgeInfo }
|
|
33
|
-
* @param {boolean} isZh
|
|
34
|
-
* @param {object|null} codeEntityGraph
|
|
35
|
-
* @returns {string}
|
|
36
|
-
*/
|
|
37
|
-
export function buildArticlePrompt(topic, data, isZh, codeEntityGraph) {
|
|
38
|
-
const { projectInfo, astInfo, moduleInfo, knowledgeInfo } = data;
|
|
39
|
-
const parts = [];
|
|
40
|
-
const langTerms = getLangTerms(projectInfo.primaryLanguage || 'unknown');
|
|
41
|
-
const tl = isZh ? langTerms.typeLabel.zh : langTerms.typeLabel.en;
|
|
42
|
-
const il = isZh ? langTerms.interfaceLabel.zh : langTerms.interfaceLabel.en;
|
|
43
|
-
|
|
44
|
-
// 公共项目上下文
|
|
45
|
-
parts.push(`# 项目: ${projectInfo.name}`);
|
|
46
|
-
parts.push(
|
|
47
|
-
`源文件数: ${projectInfo.sourceFiles.length}, 模块: ${moduleInfo.targets.length}, 活跃知识条目: ${knowledgeInfo.recipes.length}`
|
|
48
|
-
);
|
|
49
|
-
if (projectInfo.languages) {
|
|
50
|
-
parts.push(
|
|
51
|
-
`语言分布: ${Object.entries(projectInfo.languages)
|
|
52
|
-
.sort((a, b) => b[1] - a[1])
|
|
53
|
-
.map(([l, c]) => `${l}(${c})`)
|
|
54
|
-
.join(', ')}`
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
parts.push('');
|
|
58
|
-
|
|
59
|
-
switch (topic.type) {
|
|
60
|
-
case 'overview': {
|
|
61
|
-
parts.push('## 任务: 撰写项目概述文档');
|
|
62
|
-
parts.push('');
|
|
63
|
-
|
|
64
|
-
// 项目类型
|
|
65
|
-
const buildTypes = (projectInfo.buildSystems || []).map((b) => b.buildTool);
|
|
66
|
-
if (projectInfo.hasPackageSwift && !buildTypes.some((t) => t.includes('SPM'))) {
|
|
67
|
-
buildTypes.push('SPM');
|
|
68
|
-
}
|
|
69
|
-
if (projectInfo.hasPodfile && !buildTypes.includes('CocoaPods')) {
|
|
70
|
-
buildTypes.push('CocoaPods');
|
|
71
|
-
}
|
|
72
|
-
if (projectInfo.hasXcodeproj) {
|
|
73
|
-
buildTypes.push('Xcode Project');
|
|
74
|
-
}
|
|
75
|
-
if (buildTypes.length > 0) {
|
|
76
|
-
parts.push(`构建系统: ${buildTypes.join(' + ')}`);
|
|
77
|
-
}
|
|
78
|
-
parts.push('');
|
|
79
|
-
|
|
80
|
-
// 模块结构
|
|
81
|
-
if (moduleInfo.targets.length > 0) {
|
|
82
|
-
parts.push('### 模块列表');
|
|
83
|
-
for (const t of moduleInfo.targets) {
|
|
84
|
-
const files = getModuleSourceFiles(t, projectInfo);
|
|
85
|
-
const cls = astInfo.classNamesByModule?.[t.name]?.length || 0;
|
|
86
|
-
const deps = (t.dependencies || t.info?.dependencies || []).map((d) =>
|
|
87
|
-
typeof d === 'string' ? d : d.name
|
|
88
|
-
);
|
|
89
|
-
parts.push(
|
|
90
|
-
`- ${t.name} (${t.type || 'target'}): ${files.length} 文件, ${cls} 个类型${deps.length > 0 ? `, 依赖: ${deps.join(', ')}` : ''}`
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
parts.push('');
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// AST 概况
|
|
97
|
-
if (astInfo.overview) {
|
|
98
|
-
parts.push('### 代码规模');
|
|
99
|
-
parts.push(
|
|
100
|
-
`${tl}: ${astInfo.overview.totalClasses || 0}, ${il}: ${astInfo.overview.totalProtocols || 0}, 方法: ${astInfo.overview.totalMethods || 0}`
|
|
101
|
-
);
|
|
102
|
-
parts.push('');
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// 可用的其他文档(用于导航链接)
|
|
106
|
-
const otherTopics = (topic._allTopics || []).filter((t) => t.type !== 'overview');
|
|
107
|
-
if (otherTopics.length > 0) {
|
|
108
|
-
parts.push('### 需要包含的导航链接');
|
|
109
|
-
for (const t of otherTopics) {
|
|
110
|
-
parts.push(`- [${t.title}](${t.path})`);
|
|
111
|
-
}
|
|
112
|
-
parts.push('');
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
parts.push('要求: 撰写完整的项目概述文档。');
|
|
116
|
-
parts.push(
|
|
117
|
-
'包含: 项目简介(解释项目做什么)、模块总览(表格形式)、技术栈分析、核心数据指标、文档导航索引。'
|
|
118
|
-
);
|
|
119
|
-
parts.push('不要只列数据 — 要解释项目的定位、各模块的职责和协作关系。');
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
case 'architecture': {
|
|
124
|
-
parts.push('## 任务: 撰写架构分析文档');
|
|
125
|
-
parts.push('');
|
|
126
|
-
|
|
127
|
-
if (moduleInfo.targets.length > 0) {
|
|
128
|
-
parts.push('### 模块及依赖关系');
|
|
129
|
-
for (const t of moduleInfo.targets) {
|
|
130
|
-
const deps = (t.dependencies || t.info?.dependencies || []).map((d) =>
|
|
131
|
-
typeof d === 'string' ? d : d.name
|
|
132
|
-
);
|
|
133
|
-
parts.push(
|
|
134
|
-
`- ${t.name} (${t.type || 'target'})${deps.length > 0 ? ` → 依赖: ${deps.join(', ')}` : ''}`
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
parts.push('');
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (astInfo.overview?.topLevelModules?.length > 0) {
|
|
141
|
-
parts.push(`### 顶层模块: ${astInfo.overview.topLevelModules.join(', ')}`);
|
|
142
|
-
const cpm = astInfo.overview.classesPerModule || {};
|
|
143
|
-
for (const mod of astInfo.overview.topLevelModules) {
|
|
144
|
-
parts.push(` ${mod}: ${cpm[mod] || 0} 个类`);
|
|
145
|
-
}
|
|
146
|
-
parts.push('');
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (astInfo.overview?.entryPoints?.length > 0) {
|
|
150
|
-
parts.push(`### 入口点: ${astInfo.overview.entryPoints.join(', ')}`);
|
|
151
|
-
parts.push('');
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const roots = getInheritanceRoots(codeEntityGraph);
|
|
155
|
-
if (roots.length > 0) {
|
|
156
|
-
parts.push('### 核心继承关系');
|
|
157
|
-
for (const r of roots.slice(0, 10)) {
|
|
158
|
-
parts.push(`- ${r.name} → ${(r.children || []).slice(0, 5).join(', ')}`);
|
|
159
|
-
}
|
|
160
|
-
parts.push('');
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
parts.push('要求: 撰写架构分析文档。');
|
|
164
|
-
parts.push(
|
|
165
|
-
'包含: 模块依赖图(使用 Mermaid graph TD 语法)、分层架构分析(解释每层的职责)、模块间协作关系、架构设计决策阐述。'
|
|
166
|
-
);
|
|
167
|
-
parts.push('用 Mermaid 绘制依赖关系图和继承层次图。分析为什么采用这种架构。');
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
case 'module': {
|
|
172
|
-
const md = topic._moduleData;
|
|
173
|
-
const target = md.target;
|
|
174
|
-
const moduleFiles = md.moduleFiles;
|
|
175
|
-
const moduleClasses = astInfo.classNamesByModule?.[target.name] || [];
|
|
176
|
-
const moduleProtocols = astInfo.protocolNamesByModule?.[target.name] || [];
|
|
177
|
-
const deps = target.dependencies || target.info?.dependencies || [];
|
|
178
|
-
|
|
179
|
-
parts.push(`## 任务: 撰写 "${target.name}" 模块的深度文档`);
|
|
180
|
-
parts.push('');
|
|
181
|
-
parts.push('### 模块基本信息');
|
|
182
|
-
parts.push(`- 类型: ${target.type || 'target'}`);
|
|
183
|
-
const tPath = target.path || target.info?.path;
|
|
184
|
-
if (tPath) {
|
|
185
|
-
parts.push(`- 路径: ${tPath}`);
|
|
186
|
-
}
|
|
187
|
-
if (target.packageName) {
|
|
188
|
-
parts.push(`- 所属包: ${target.packageName}`);
|
|
189
|
-
}
|
|
190
|
-
parts.push(`- 源文件: ${moduleFiles.length} 个`);
|
|
191
|
-
parts.push(`- ${tl}: ${moduleClasses.length} 个`);
|
|
192
|
-
parts.push(`- ${il}: ${moduleProtocols.length} 个`);
|
|
193
|
-
parts.push('');
|
|
194
|
-
|
|
195
|
-
if (deps.length > 0) {
|
|
196
|
-
parts.push(`### 依赖: ${deps.map((d) => (typeof d === 'string' ? d : d.name)).join(', ')}`);
|
|
197
|
-
parts.push('');
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
if (moduleClasses.length > 0) {
|
|
201
|
-
parts.push(`### 类型列表: ${moduleClasses.slice(0, 30).join(', ')}`);
|
|
202
|
-
parts.push('');
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
if (moduleProtocols.length > 0) {
|
|
206
|
-
parts.push(`### ${il}列表: ${moduleProtocols.slice(0, 20).join(', ')}`);
|
|
207
|
-
parts.push('');
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// 关键源文件名(帮助 AI 推断模块功能)
|
|
211
|
-
if (moduleFiles.length > 0) {
|
|
212
|
-
const keyFiles = moduleFiles.slice(0, 25).map((f) => path.basename(f));
|
|
213
|
-
parts.push(`### 关键源文件: ${keyFiles.join(', ')}`);
|
|
214
|
-
parts.push('');
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// 相关 recipes
|
|
218
|
-
const related = knowledgeInfo.recipes.filter((r) => {
|
|
219
|
-
const json = r.toJSON ? r.toJSON() : r;
|
|
220
|
-
return (
|
|
221
|
-
json.moduleName === target.name ||
|
|
222
|
-
json.tags?.includes(target.name) ||
|
|
223
|
-
json.title?.includes(target.name)
|
|
224
|
-
);
|
|
225
|
-
});
|
|
226
|
-
if (related.length > 0) {
|
|
227
|
-
parts.push(`### 相关知识条目 (${related.length})`);
|
|
228
|
-
for (const r of related.slice(0, 10)) {
|
|
229
|
-
const json = r.toJSON ? r.toJSON() : r;
|
|
230
|
-
parts.push(`- ${json.title}: ${json.description || ''}`);
|
|
231
|
-
if (json.reasoning?.whyStandard) {
|
|
232
|
-
parts.push(` 为什么: ${json.reasoning.whyStandard}`);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
parts.push('');
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
parts.push('要求: 撰写模块深度分析文档。');
|
|
239
|
-
parts.push(
|
|
240
|
-
'包含: 模块职责说明(从文件名和类名推断功能意图)、核心类型分析(不是简单罗列而是解释每个类的角色)、依赖关系分析、设计模式识别。'
|
|
241
|
-
);
|
|
242
|
-
parts.push('如果能推断出数据流或协作关系,请用 Mermaid 图表展示。');
|
|
243
|
-
break;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
case 'getting-started': {
|
|
247
|
-
parts.push('## 任务: 撰写快速上手指南');
|
|
248
|
-
parts.push('');
|
|
249
|
-
|
|
250
|
-
// 列出检测到的构建系统
|
|
251
|
-
const bs = projectInfo.buildSystems || [];
|
|
252
|
-
if (bs.length > 0) {
|
|
253
|
-
parts.push(`构建系统: ${bs.map((b) => b.buildTool).join(', ')}`);
|
|
254
|
-
} else {
|
|
255
|
-
// 兼容旧数据
|
|
256
|
-
if (projectInfo.hasPackageSwift) {
|
|
257
|
-
parts.push('构建系统: Swift Package Manager');
|
|
258
|
-
}
|
|
259
|
-
if (projectInfo.hasPodfile) {
|
|
260
|
-
parts.push('构建系统: CocoaPods');
|
|
261
|
-
}
|
|
262
|
-
if (projectInfo.hasXcodeproj) {
|
|
263
|
-
parts.push('构建系统: Xcode Project');
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
parts.push('');
|
|
267
|
-
|
|
268
|
-
if (moduleInfo.targets.length > 0) {
|
|
269
|
-
const mainTargets = moduleInfo.targets.filter((t) => t.type !== 'test');
|
|
270
|
-
const testTargets = moduleInfo.targets.filter((t) => t.type === 'test');
|
|
271
|
-
if (mainTargets.length > 0) {
|
|
272
|
-
parts.push(`主要 Target: ${mainTargets.map((t) => t.name).join(', ')}`);
|
|
273
|
-
}
|
|
274
|
-
if (testTargets.length > 0) {
|
|
275
|
-
parts.push(`测试 Target: ${testTargets.map((t) => t.name).join(', ')}`);
|
|
276
|
-
}
|
|
277
|
-
parts.push('');
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
if (astInfo.overview?.entryPoints?.length > 0) {
|
|
281
|
-
parts.push(`入口点: ${astInfo.overview.entryPoints.join(', ')}`);
|
|
282
|
-
parts.push('');
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
parts.push('要求: 撰写开发者快速上手指南。');
|
|
286
|
-
parts.push(
|
|
287
|
-
'包含: 环境要求、项目获取、依赖安装、构建步骤(具体命令)、运行测试、项目目录结构说明。'
|
|
288
|
-
);
|
|
289
|
-
parts.push('语句清晰,步骤明确,适合新人阅读。');
|
|
290
|
-
break;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
case 'patterns': {
|
|
294
|
-
parts.push('## 任务: 撰写代码模式与最佳实践文档');
|
|
295
|
-
parts.push('');
|
|
296
|
-
|
|
297
|
-
const groups = {};
|
|
298
|
-
for (const r of knowledgeInfo.recipes) {
|
|
299
|
-
const json = r.toJSON ? r.toJSON() : r;
|
|
300
|
-
const cat = json.category || 'Other';
|
|
301
|
-
if (!groups[cat]) {
|
|
302
|
-
groups[cat] = [];
|
|
303
|
-
}
|
|
304
|
-
groups[cat].push(json);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
for (const [cat, items] of Object.entries(groups).sort()) {
|
|
308
|
-
parts.push(`### ${cat} (${items.length} 条)`);
|
|
309
|
-
for (const item of items.slice(0, 8)) {
|
|
310
|
-
parts.push(`- ${item.title}: ${item.description || 'N/A'}`);
|
|
311
|
-
if (item.doClause) {
|
|
312
|
-
parts.push(` 应当: ${item.doClause}`);
|
|
313
|
-
}
|
|
314
|
-
if (item.dontClause) {
|
|
315
|
-
parts.push(` 避免: ${item.dontClause}`);
|
|
316
|
-
}
|
|
317
|
-
if (item.content?.pattern) {
|
|
318
|
-
parts.push(` 代码片段: ${item.content.pattern.slice(0, 200)}`);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
parts.push('');
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
parts.push('要求: 撰写代码模式文档。对每个分类进行总结分析,解释模式的意义和应用场景。');
|
|
325
|
-
parts.push(
|
|
326
|
-
'不要只列出条目 — 为每个分类写一段总结,解释该类模式的整体意图。附带代码示例(从数据中取)。'
|
|
327
|
-
);
|
|
328
|
-
break;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
case 'pattern-category': {
|
|
332
|
-
const pd = topic._patternData;
|
|
333
|
-
parts.push(`## 任务: 撰写 "${pd.category}" 分类的代码模式文档`);
|
|
334
|
-
parts.push('');
|
|
335
|
-
|
|
336
|
-
for (const item of pd.recipes) {
|
|
337
|
-
parts.push(`### ${item.title}`);
|
|
338
|
-
if (item.description) {
|
|
339
|
-
parts.push(`描述: ${item.description}`);
|
|
340
|
-
}
|
|
341
|
-
if (item.doClause) {
|
|
342
|
-
parts.push(`应当: ${item.doClause}`);
|
|
343
|
-
}
|
|
344
|
-
if (item.dontClause) {
|
|
345
|
-
parts.push(`避免: ${item.dontClause}`);
|
|
346
|
-
}
|
|
347
|
-
if (item.reasoning?.whyStandard) {
|
|
348
|
-
parts.push(`原因: ${item.reasoning.whyStandard}`);
|
|
349
|
-
}
|
|
350
|
-
if (item.content?.pattern) {
|
|
351
|
-
parts.push('代码:');
|
|
352
|
-
parts.push('```');
|
|
353
|
-
parts.push(item.content.pattern.slice(0, 500));
|
|
354
|
-
parts.push('```');
|
|
355
|
-
}
|
|
356
|
-
parts.push('');
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
parts.push('要求: 撰写该分类的详细代码模式文档。');
|
|
360
|
-
parts.push(
|
|
361
|
-
'先写一段总结性概述,然后对每个模式做分析,解释为什么要遵循,给出正确和错误的对比示例。'
|
|
362
|
-
);
|
|
363
|
-
break;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
case 'reference': {
|
|
367
|
-
parts.push(`## 任务: 撰写${il}参考文档`);
|
|
368
|
-
parts.push('');
|
|
369
|
-
|
|
370
|
-
const protoByModule = astInfo.protocolNamesByModule || {};
|
|
371
|
-
for (const [mod, protos] of Object.entries(protoByModule).sort()) {
|
|
372
|
-
if (protos.length > 0) {
|
|
373
|
-
parts.push(`### ${mod} 模块: ${protos.join(', ')}`);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
parts.push('');
|
|
377
|
-
parts.push(`总计: ${astInfo.protocols.length} 个${il}, ${astInfo.classes.length} 个${tl}`);
|
|
378
|
-
parts.push('');
|
|
379
|
-
parts.push(
|
|
380
|
-
`要求: 撰写${il}参考文档。按模块分组,分析每个${il}的用途和意义,描述${il}之间的关系和设计意图。`
|
|
381
|
-
);
|
|
382
|
-
break;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
case 'folder-overview': {
|
|
386
|
-
const profiles = topic._folderProfiles || [];
|
|
387
|
-
parts.push('## 任务: 撰写项目文件夹结构分析文档');
|
|
388
|
-
parts.push('');
|
|
389
|
-
parts.push('注意: 本项目的代码实体(类/函数/协议等)无法通过 AST 自动提取,');
|
|
390
|
-
parts.push('因此以「文件夹画像」方式进行结构分析。');
|
|
391
|
-
parts.push('');
|
|
392
|
-
parts.push(`### 发现 ${profiles.length} 个重要文件夹`);
|
|
393
|
-
parts.push('');
|
|
394
|
-
for (const fp of profiles) {
|
|
395
|
-
parts.push(`#### ${fp.relPath}`);
|
|
396
|
-
parts.push(`- 源文件: ${fp.fileCount} 个, 总大小: ${(fp.totalSize / 1024).toFixed(1)}KB`);
|
|
397
|
-
parts.push(
|
|
398
|
-
`- 语言分布: ${Object.entries(fp.langBreakdown)
|
|
399
|
-
.map(([l, c]) => `${l}(${c})`)
|
|
400
|
-
.join(', ')}`
|
|
401
|
-
);
|
|
402
|
-
if (fp.entryPoints.length > 0) {
|
|
403
|
-
parts.push(`- 入口文件: ${fp.entryPoints.join(', ')}`);
|
|
404
|
-
}
|
|
405
|
-
if (fp.namingPatterns.length > 0) {
|
|
406
|
-
parts.push(`- 命名约定: ${fp.namingPatterns.join(', ')}`);
|
|
407
|
-
}
|
|
408
|
-
if (fp.imports.length > 0) {
|
|
409
|
-
parts.push(`- 依赖引用: ${fp.imports.join(', ')}`);
|
|
410
|
-
}
|
|
411
|
-
if (fp.purpose) {
|
|
412
|
-
parts.push(`- 推断功能: ${fp.purpose.zh || fp.purpose.en || '-'}`);
|
|
413
|
-
}
|
|
414
|
-
if (fp.readme) {
|
|
415
|
-
parts.push(`- README 摘要: ${fp.readme.slice(0, 200)}`);
|
|
416
|
-
}
|
|
417
|
-
if (fp.headerComments.length > 0) {
|
|
418
|
-
parts.push(`- 代码注释: ${fp.headerComments.join('; ')}`);
|
|
419
|
-
}
|
|
420
|
-
parts.push('');
|
|
421
|
-
}
|
|
422
|
-
parts.push('要求: 撰写项目结构分析文档。');
|
|
423
|
-
parts.push('重点分析:');
|
|
424
|
-
parts.push('1. 项目整体架构分层 — 从文件夹结构推断项目架构(MVC/分层/微服务等)');
|
|
425
|
-
parts.push('2. 各文件夹的职责与协作关系 — 从文件命名和 import 关系推断');
|
|
426
|
-
parts.push('3. 用 Mermaid graph TD 画出文件夹之间的依赖关系图');
|
|
427
|
-
parts.push('4. 从命名约定分析团队编码规范');
|
|
428
|
-
parts.push('5. 对照文件夹的文件分布特征,评估项目的工程化程度');
|
|
429
|
-
break;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
case 'folder-profile': {
|
|
433
|
-
const fp = topic._folderProfile;
|
|
434
|
-
parts.push(`## 任务: 撰写 "${fp.name}" 目录的深度分析文档`);
|
|
435
|
-
parts.push('');
|
|
436
|
-
parts.push('注意: 本项目的代码实体无法通过 AST 提取,以下分析基于文件夹画像。');
|
|
437
|
-
parts.push('');
|
|
438
|
-
parts.push('### 目录信息');
|
|
439
|
-
parts.push(`- 路径: ${fp.relPath}`);
|
|
440
|
-
parts.push(`- 源文件: ${fp.fileCount} 个`);
|
|
441
|
-
parts.push(`- 总大小: ${(fp.totalSize / 1024).toFixed(1)}KB`);
|
|
442
|
-
parts.push(
|
|
443
|
-
`- 语言分布: ${Object.entries(fp.langBreakdown)
|
|
444
|
-
.map(([l, c]) => `${l}(${c})`)
|
|
445
|
-
.join(', ')}`
|
|
446
|
-
);
|
|
447
|
-
parts.push('');
|
|
448
|
-
|
|
449
|
-
if (fp.entryPoints.length > 0) {
|
|
450
|
-
parts.push(`### 入口文件: ${fp.entryPoints.join(', ')}`);
|
|
451
|
-
parts.push('');
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
if (fp.readme) {
|
|
455
|
-
parts.push('### 目录 README');
|
|
456
|
-
parts.push(fp.readme.slice(0, 500));
|
|
457
|
-
parts.push('');
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
if (fp.fileNames.length > 0) {
|
|
461
|
-
parts.push(`### 文件列表 (${fp.fileNames.length} 个)`);
|
|
462
|
-
parts.push(fp.fileNames.slice(0, 40).join(', '));
|
|
463
|
-
parts.push('');
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
if (fp.namingPatterns.length > 0) {
|
|
467
|
-
parts.push(`### 命名约定: ${fp.namingPatterns.join(', ')}`);
|
|
468
|
-
parts.push('');
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
if (fp.imports.length > 0) {
|
|
472
|
-
parts.push(`### 依赖引用: ${fp.imports.join(', ')}`);
|
|
473
|
-
parts.push('');
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
if (fp.headerComments.length > 0) {
|
|
477
|
-
parts.push('### 关键文件注释');
|
|
478
|
-
for (const hc of fp.headerComments) {
|
|
479
|
-
parts.push(`- ${hc}`);
|
|
480
|
-
}
|
|
481
|
-
parts.push('');
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
parts.push('要求: 撰写该目录的深度分析文档。');
|
|
485
|
-
parts.push('包含: 目录职责推断(从文件名和注释推断)、文件组织分析、命名规范评估、');
|
|
486
|
-
parts.push('依赖关系分析(从 import 推断)、关键文件说明。');
|
|
487
|
-
parts.push('从文件命名模式推断出这个目录承担的功能角色和设计意图。');
|
|
488
|
-
break;
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
return parts.join('\n');
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* 构建非 AI 降级的丰富模板内容
|
|
497
|
-
* 即使没有 AI,也要产出有意义的内容 (不是只有列表罗列)
|
|
498
|
-
*
|
|
499
|
-
* @param {object} topic
|
|
500
|
-
* @param {object} data - { projectInfo, astInfo, moduleInfo, knowledgeInfo }
|
|
501
|
-
* @param {boolean} isZh
|
|
502
|
-
* @param {object|null} codeEntityGraph
|
|
503
|
-
* @returns {string}
|
|
504
|
-
*/
|
|
505
|
-
export function buildFallbackArticle(topic, data, isZh, codeEntityGraph) {
|
|
506
|
-
const { projectInfo, astInfo, moduleInfo, knowledgeInfo } = data;
|
|
507
|
-
|
|
508
|
-
switch (topic.type) {
|
|
509
|
-
case 'overview':
|
|
510
|
-
return renderIndex(projectInfo, astInfo, moduleInfo, knowledgeInfo, isZh, topic._allTopics);
|
|
511
|
-
case 'architecture':
|
|
512
|
-
return renderArchitecture(projectInfo, astInfo, moduleInfo, isZh, codeEntityGraph);
|
|
513
|
-
case 'getting-started':
|
|
514
|
-
return renderGettingStarted(projectInfo, moduleInfo, astInfo, isZh);
|
|
515
|
-
case 'module':
|
|
516
|
-
return renderModule(topic._moduleData.target, astInfo, knowledgeInfo, isZh, projectInfo);
|
|
517
|
-
case 'patterns':
|
|
518
|
-
return renderPatterns(knowledgeInfo, isZh);
|
|
519
|
-
case 'pattern-category':
|
|
520
|
-
return renderPatternCategory(topic._patternData, isZh);
|
|
521
|
-
case 'reference':
|
|
522
|
-
return renderProtocolReference(astInfo, isZh, projectInfo);
|
|
523
|
-
case 'folder-overview':
|
|
524
|
-
return renderFolderOverview(topic._folderProfiles, projectInfo, isZh);
|
|
525
|
-
case 'folder-profile':
|
|
526
|
-
return renderFolderProfile(topic._folderProfile, projectInfo, isZh);
|
|
527
|
-
default:
|
|
528
|
-
return '';
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
// ═══ Markdown 渲染器 ═══════════════════════════════════════
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* 渲染项目概述页 (index.md)
|
|
536
|
-
*/
|
|
537
|
-
export function renderIndex(project, ast, modules, knowledge, isZh, allTopics) {
|
|
538
|
-
const title = isZh ? '项目概述' : 'Project Overview';
|
|
539
|
-
const langTerms = getLangTerms(project.primaryLanguage || 'unknown');
|
|
540
|
-
const tl = isZh ? langTerms.typeLabel.zh : langTerms.typeLabel.en;
|
|
541
|
-
const il = isZh ? langTerms.interfaceLabel.zh : langTerms.interfaceLabel.en;
|
|
542
|
-
|
|
543
|
-
const lines = [
|
|
544
|
-
`# ${project.name} — ${title}`,
|
|
545
|
-
'',
|
|
546
|
-
`> ${isZh ? '本文档由 AutoSnippet Repo Wiki 自动生成' : 'Auto-generated by AutoSnippet Repo Wiki'}`,
|
|
547
|
-
`> ${isZh ? '生成时间' : 'Generated at'}: ${new Date().toISOString()}`,
|
|
548
|
-
'',
|
|
549
|
-
];
|
|
550
|
-
|
|
551
|
-
// ── 项目简介 ──
|
|
552
|
-
lines.push(`## ${isZh ? '简介' : 'Introduction'}`);
|
|
553
|
-
lines.push('');
|
|
554
|
-
|
|
555
|
-
// 从 buildSystems 或 legacy 字段推断项目类型标签
|
|
556
|
-
const types = [];
|
|
557
|
-
if (project.buildSystems?.length > 0) {
|
|
558
|
-
for (const bs of project.buildSystems) {
|
|
559
|
-
types.push(bs.buildTool);
|
|
560
|
-
}
|
|
561
|
-
} else {
|
|
562
|
-
if (project.hasPackageSwift) {
|
|
563
|
-
types.push('SPM');
|
|
564
|
-
}
|
|
565
|
-
if (project.hasPodfile) {
|
|
566
|
-
types.push('CocoaPods');
|
|
567
|
-
}
|
|
568
|
-
if (project.hasXcodeproj) {
|
|
569
|
-
types.push('Xcode Project');
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
const projectTypeLabel =
|
|
573
|
-
types.join(' + ') ||
|
|
574
|
-
(project.primaryLanguage ? LanguageService.displayName(project.primaryLanguage) : 'Software');
|
|
575
|
-
|
|
576
|
-
const overview = ast.overview || {};
|
|
577
|
-
const mainTargets = modules.targets.filter((t) => t.type !== 'test');
|
|
578
|
-
const testTargets = modules.targets.filter((t) => t.type === 'test');
|
|
579
|
-
|
|
580
|
-
if (isZh) {
|
|
581
|
-
lines.push(
|
|
582
|
-
`**${project.name}** 是一个 ${projectTypeLabel} 项目,` +
|
|
583
|
-
`包含 ${project.sourceFiles.length} 个源文件` +
|
|
584
|
-
(overview.totalClasses ? `、${overview.totalClasses} 个${tl}` : '') +
|
|
585
|
-
(overview.totalProtocols ? `、${overview.totalProtocols} 个${il}` : '') +
|
|
586
|
-
`。`
|
|
587
|
-
);
|
|
588
|
-
if (mainTargets.length > 0) {
|
|
589
|
-
lines.push(
|
|
590
|
-
`项目由 ${mainTargets.length} 个功能模块组成` +
|
|
591
|
-
(testTargets.length > 0 ? `,配备 ${testTargets.length} 个测试模块` : '') +
|
|
592
|
-
`。`
|
|
593
|
-
);
|
|
594
|
-
}
|
|
595
|
-
} else {
|
|
596
|
-
lines.push(
|
|
597
|
-
`**${project.name}** is a ${projectTypeLabel} project ` +
|
|
598
|
-
`containing ${project.sourceFiles.length} source files` +
|
|
599
|
-
(overview.totalClasses ? `, ${overview.totalClasses} ${tl}` : '') +
|
|
600
|
-
(overview.totalProtocols ? `, ${overview.totalProtocols} ${il}` : '') +
|
|
601
|
-
`.`
|
|
602
|
-
);
|
|
603
|
-
if (mainTargets.length > 0) {
|
|
604
|
-
lines.push(
|
|
605
|
-
`The project consists of ${mainTargets.length} functional modules` +
|
|
606
|
-
(testTargets.length > 0 ? ` with ${testTargets.length} test modules` : '') +
|
|
607
|
-
`.`
|
|
608
|
-
);
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
lines.push('');
|
|
612
|
-
|
|
613
|
-
// ── 模块总览 ──
|
|
614
|
-
if (modules.targets.length > 0) {
|
|
615
|
-
lines.push(`## ${isZh ? '模块总览' : 'Module Overview'}`);
|
|
616
|
-
lines.push('');
|
|
617
|
-
lines.push(
|
|
618
|
-
`| ${isZh ? '模块' : 'Module'} | ${isZh ? '类型' : 'Type'} | ${isZh ? '源文件' : 'Files'} | ${tl} | ${il} |`
|
|
619
|
-
);
|
|
620
|
-
lines.push('|--------|------|--------|--------|----------|');
|
|
621
|
-
for (const t of modules.targets) {
|
|
622
|
-
const moduleFiles = getModuleSourceFiles(t, project);
|
|
623
|
-
const classCount = ast.classNamesByModule?.[t.name]?.length || 0;
|
|
624
|
-
const protoCount = ast.protocolNamesByModule?.[t.name]?.length || 0;
|
|
625
|
-
const hasDoc = allTopics?.some(
|
|
626
|
-
(tp) => tp.type === 'module' && tp._moduleData?.target.name === t.name
|
|
627
|
-
);
|
|
628
|
-
const nameCol = hasDoc ? `[${t.name}](modules/${slug(t.name)}.md)` : t.name;
|
|
629
|
-
lines.push(
|
|
630
|
-
`| ${nameCol} | ${t.type || 'target'} | ${moduleFiles.length || '-'} | ${classCount || '-'} | ${protoCount || '-'} |`
|
|
631
|
-
);
|
|
632
|
-
}
|
|
633
|
-
lines.push('');
|
|
634
|
-
} else if (project.sourceFilesByModule && Object.keys(project.sourceFilesByModule).length >= 2) {
|
|
635
|
-
// 无 moduleService targets → 使用 sourceFilesByModule 推断的模块
|
|
636
|
-
const sfm = project.sourceFilesByModule;
|
|
637
|
-
const sorted = Object.entries(sfm).sort((a, b) => b[1].length - a[1].length);
|
|
638
|
-
lines.push(`## ${isZh ? '模块总览' : 'Module Overview'}`);
|
|
639
|
-
lines.push('');
|
|
640
|
-
lines.push(
|
|
641
|
-
isZh
|
|
642
|
-
? `项目代码按目录结构可划分为 ${sorted.length} 个模块:`
|
|
643
|
-
: `The project code is organized into ${sorted.length} modules:`
|
|
644
|
-
);
|
|
645
|
-
lines.push('');
|
|
646
|
-
lines.push(
|
|
647
|
-
`| ${isZh ? '模块' : 'Module'} | ${isZh ? '源文件' : 'Files'} | ${isZh ? '说明' : 'Description'} |`
|
|
648
|
-
);
|
|
649
|
-
lines.push('|--------|--------|------|');
|
|
650
|
-
for (const [modName, modFiles] of sorted.slice(0, 15)) {
|
|
651
|
-
const hasDoc = allTopics?.some((tp) => tp.type === 'module' && tp.title === modName);
|
|
652
|
-
const nameCol = hasDoc ? `[${modName}](modules/${slug(modName)}.md)` : modName;
|
|
653
|
-
const purpose = inferModulePurpose(modName, [], [], modFiles);
|
|
654
|
-
const desc = purpose ? (isZh ? purpose.zh : purpose.en) : '-';
|
|
655
|
-
lines.push(`| ${nameCol} | ${modFiles.length} | ${desc} |`);
|
|
656
|
-
}
|
|
657
|
-
lines.push('');
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
// ── 技术栈 ──
|
|
661
|
-
lines.push(`## ${isZh ? '技术栈' : 'Tech Stack'}`);
|
|
662
|
-
lines.push('');
|
|
663
|
-
if (project.languages && Object.keys(project.languages).length > 0) {
|
|
664
|
-
lines.push(
|
|
665
|
-
`| ${isZh ? '语言' : 'Language'} | ${isZh ? '文件数' : 'Files'} | ${isZh ? '占比' : 'Share'} |`
|
|
666
|
-
);
|
|
667
|
-
lines.push('|--------|-------|------|');
|
|
668
|
-
const total = Object.values(project.languages).reduce((a, b) => a + b, 0);
|
|
669
|
-
for (const [lang, count] of Object.entries(project.languages).sort((a, b) => b[1] - a[1])) {
|
|
670
|
-
const pct = total > 0 ? ((count / total) * 100).toFixed(1) : 0;
|
|
671
|
-
lines.push(`| ${lang} | ${count} | ${pct}% |`);
|
|
672
|
-
}
|
|
673
|
-
lines.push('');
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
// ── 核心数据 ──
|
|
677
|
-
lines.push(`## ${isZh ? '核心数据' : 'Key Metrics'}`);
|
|
678
|
-
lines.push('');
|
|
679
|
-
lines.push(`| ${isZh ? '指标' : 'Metric'} | ${isZh ? '数量' : 'Count'} |`);
|
|
680
|
-
lines.push('|--------|-------|');
|
|
681
|
-
lines.push(`| ${isZh ? '源文件数' : 'Source Files'} | ${project.sourceFiles.length} |`);
|
|
682
|
-
if (overview.totalClasses) {
|
|
683
|
-
lines.push(`| ${tl} | ${overview.totalClasses} |`);
|
|
684
|
-
}
|
|
685
|
-
if (overview.totalProtocols) {
|
|
686
|
-
lines.push(`| ${il} | ${overview.totalProtocols} |`);
|
|
687
|
-
}
|
|
688
|
-
if (overview.totalMethods) {
|
|
689
|
-
lines.push(`| ${isZh ? '方法总数' : 'Methods'} | ${overview.totalMethods} |`);
|
|
690
|
-
}
|
|
691
|
-
if (modules.targets.length > 0) {
|
|
692
|
-
lines.push(`| ${isZh ? '模块数' : 'Modules'} | ${modules.targets.length} |`);
|
|
693
|
-
}
|
|
694
|
-
if (knowledge.recipes.length > 0) {
|
|
695
|
-
lines.push(`| ${isZh ? '知识库条目' : 'KB Recipes'} | ${knowledge.recipes.length} |`);
|
|
696
|
-
}
|
|
697
|
-
lines.push('');
|
|
698
|
-
|
|
699
|
-
// ── 文档导航 (动态,基于实际生成的主题) ──
|
|
700
|
-
const navTopics = (allTopics || []).filter((t) => t.type !== 'overview');
|
|
701
|
-
if (navTopics.length > 0) {
|
|
702
|
-
lines.push('---');
|
|
703
|
-
lines.push('');
|
|
704
|
-
lines.push(`## ${isZh ? '📖 文档导航' : '📖 Documentation'}`);
|
|
705
|
-
lines.push('');
|
|
706
|
-
for (const t of navTopics) {
|
|
707
|
-
lines.push(`- [${t.title}](${t.path})`);
|
|
708
|
-
}
|
|
709
|
-
lines.push('');
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
return lines.join('\n');
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* 渲染架构总览文档 (architecture.md)
|
|
717
|
-
*
|
|
718
|
-
* @param {object} project
|
|
719
|
-
* @param {object} ast
|
|
720
|
-
* @param {object} modules
|
|
721
|
-
* @param {boolean} isZh
|
|
722
|
-
* @param {object|null} codeEntityGraph
|
|
723
|
-
*/
|
|
724
|
-
export function renderArchitecture(project, ast, modules, isZh, codeEntityGraph) {
|
|
725
|
-
const lines = [
|
|
726
|
-
`# ${isZh ? '架构总览' : 'Architecture Overview'}`,
|
|
727
|
-
'',
|
|
728
|
-
`> ${isZh ? '本文档由 AutoSnippet Repo Wiki 自动生成' : 'Auto-generated by AutoSnippet Repo Wiki'}`,
|
|
729
|
-
'',
|
|
730
|
-
];
|
|
731
|
-
|
|
732
|
-
// 依赖图 (Mermaid)
|
|
733
|
-
if (modules.targets.length > 0) {
|
|
734
|
-
lines.push(`## ${isZh ? '模块依赖图' : 'Module Dependency Graph'}`);
|
|
735
|
-
lines.push('');
|
|
736
|
-
lines.push('```mermaid');
|
|
737
|
-
lines.push('graph TD');
|
|
738
|
-
|
|
739
|
-
// 渲染 target 节点和依赖边
|
|
740
|
-
const rendered = new Set();
|
|
741
|
-
for (const target of modules.targets) {
|
|
742
|
-
const sid = mermaidId(target.name);
|
|
743
|
-
if (!rendered.has(sid)) {
|
|
744
|
-
const shape =
|
|
745
|
-
target.type === 'test' ? `${sid}[["${target.name} (Test)"]]` : `${sid}["${target.name}"]`;
|
|
746
|
-
lines.push(` ${shape}`);
|
|
747
|
-
rendered.add(sid);
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
// 如果有依赖图数据,渲染边
|
|
752
|
-
if (modules.depGraph) {
|
|
753
|
-
const edges = modules.depGraph.edges || [];
|
|
754
|
-
for (const edge of Array.isArray(edges) ? edges : []) {
|
|
755
|
-
if (edge.from && edge.to) {
|
|
756
|
-
const fromId = mermaidId(edge.from.split('::').pop() || edge.from);
|
|
757
|
-
const toId = mermaidId(edge.to.split('::').pop() || edge.to);
|
|
758
|
-
lines.push(` ${fromId} --> ${toId}`);
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
lines.push('```');
|
|
764
|
-
lines.push('');
|
|
765
|
-
} else if (project.sourceFilesByModule && Object.keys(project.sourceFilesByModule).length >= 2) {
|
|
766
|
-
// 无 moduleService → 从 sourceFilesByModule 推断模块结构图
|
|
767
|
-
const sfm = project.sourceFilesByModule;
|
|
768
|
-
// 只显示有实质内容的模块(>= 2 个文件),避免单文件噪声
|
|
769
|
-
const sorted = Object.entries(sfm)
|
|
770
|
-
.filter(([, files]) => files.length >= 2)
|
|
771
|
-
.sort((a, b) => b[1].length - a[1].length);
|
|
772
|
-
const topModules = sorted.slice(0, 15);
|
|
773
|
-
|
|
774
|
-
lines.push(`## ${isZh ? '模块结构图' : 'Module Structure'}`);
|
|
775
|
-
lines.push('');
|
|
776
|
-
lines.push('```mermaid');
|
|
777
|
-
lines.push('graph TD');
|
|
778
|
-
lines.push(` Root["${project.name}"]`);
|
|
779
|
-
for (const [modName] of topModules) {
|
|
780
|
-
const sid = mermaidId(modName);
|
|
781
|
-
lines.push(` ${sid}["${modName}"]`);
|
|
782
|
-
lines.push(` Root --> ${sid}`);
|
|
783
|
-
}
|
|
784
|
-
lines.push('```');
|
|
785
|
-
lines.push('');
|
|
786
|
-
|
|
787
|
-
// 模块详情表
|
|
788
|
-
lines.push(`## ${isZh ? '模块详情' : 'Module Details'}`);
|
|
789
|
-
lines.push('');
|
|
790
|
-
lines.push(
|
|
791
|
-
`| ${isZh ? '模块' : 'Module'} | ${isZh ? '源文件数' : 'Files'} | ${isZh ? '说明' : 'Description'} |`
|
|
792
|
-
);
|
|
793
|
-
lines.push('|--------|-------|------|');
|
|
794
|
-
for (const [modName, modFiles] of topModules) {
|
|
795
|
-
const purpose = inferModulePurpose(modName, [], [], modFiles);
|
|
796
|
-
const desc = purpose ? (isZh ? purpose.zh : purpose.en) : '-';
|
|
797
|
-
lines.push(`| ${modName} | ${modFiles.length} | ${desc} |`);
|
|
798
|
-
}
|
|
799
|
-
lines.push('');
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
// 分层架构
|
|
803
|
-
if (ast.overview) {
|
|
804
|
-
const modules = ast.overview.topLevelModules || [];
|
|
805
|
-
if (modules.length > 0) {
|
|
806
|
-
lines.push(`## ${isZh ? '顶层模块' : 'Top-Level Modules'}`);
|
|
807
|
-
lines.push('');
|
|
808
|
-
lines.push(`| ${isZh ? '模块' : 'Module'} | ${isZh ? '类数量' : 'Classes'} |`);
|
|
809
|
-
lines.push('|--------|---------|');
|
|
810
|
-
const cpm = ast.overview.classesPerModule || {};
|
|
811
|
-
for (const mod of modules) {
|
|
812
|
-
lines.push(`| ${mod} | ${cpm[mod] || 0} |`);
|
|
813
|
-
}
|
|
814
|
-
lines.push('');
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
// 入口点
|
|
818
|
-
if (ast.overview.entryPoints?.length > 0) {
|
|
819
|
-
lines.push(`## ${isZh ? '入口点' : 'Entry Points'}`);
|
|
820
|
-
lines.push('');
|
|
821
|
-
for (const ep of ast.overview.entryPoints) {
|
|
822
|
-
lines.push(`- \`${ep}\``);
|
|
823
|
-
}
|
|
824
|
-
lines.push('');
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
// 继承层次 (from CodeEntityGraph)
|
|
829
|
-
if (codeEntityGraph) {
|
|
830
|
-
try {
|
|
831
|
-
const topClasses = getInheritanceRoots(codeEntityGraph);
|
|
832
|
-
if (topClasses.length > 0) {
|
|
833
|
-
lines.push(`## ${isZh ? '核心继承层次' : 'Key Inheritance Hierarchy'}`);
|
|
834
|
-
lines.push('');
|
|
835
|
-
lines.push('```mermaid');
|
|
836
|
-
lines.push('classDiagram');
|
|
837
|
-
for (const root of topClasses.slice(0, 20)) {
|
|
838
|
-
lines.push(` class ${mermaidId(root.name)}`);
|
|
839
|
-
for (const child of root.children || []) {
|
|
840
|
-
lines.push(` ${mermaidId(root.name)} <|-- ${mermaidId(child)}`);
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
lines.push('```');
|
|
844
|
-
lines.push('');
|
|
845
|
-
}
|
|
846
|
-
} catch {
|
|
847
|
-
/* non-critical */
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](index.md)`);
|
|
852
|
-
lines.push('');
|
|
853
|
-
return lines.join('\n');
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
/**
|
|
857
|
-
* 渲染模块详情文档 (modules/{name}.md)
|
|
858
|
-
*/
|
|
859
|
-
export function renderModule(target, ast, knowledge, isZh, projectInfo) {
|
|
860
|
-
const langTerms = getLangTerms(projectInfo?.primaryLanguage || 'unknown');
|
|
861
|
-
const tl = isZh ? langTerms.typeLabel.zh : langTerms.typeLabel.en;
|
|
862
|
-
const il = isZh ? langTerms.interfaceLabel.zh : langTerms.interfaceLabel.en;
|
|
863
|
-
const lines = [
|
|
864
|
-
`# ${target.name}`,
|
|
865
|
-
'',
|
|
866
|
-
`> ${isZh ? '模块文档 — 由 AutoSnippet Repo Wiki 自动生成' : 'Module doc — Auto-generated by AutoSnippet Repo Wiki'}`,
|
|
867
|
-
'',
|
|
868
|
-
];
|
|
869
|
-
|
|
870
|
-
// 收集模块数据
|
|
871
|
-
const moduleFiles = projectInfo ? getModuleSourceFiles(target, projectInfo) : [];
|
|
872
|
-
const moduleClasses = ast.classNamesByModule?.[target.name] || [];
|
|
873
|
-
const moduleProtocols = ast.protocolNamesByModule?.[target.name] || [];
|
|
874
|
-
const deps = target.dependencies || target.info?.dependencies || [];
|
|
875
|
-
|
|
876
|
-
// ── 模块概述 ──
|
|
877
|
-
lines.push(`## ${isZh ? '概述' : 'Overview'}`);
|
|
878
|
-
lines.push('');
|
|
879
|
-
|
|
880
|
-
// 推断模块功能 (基于名称和内容)
|
|
881
|
-
const purpose = inferModulePurpose(target.name, moduleClasses, moduleProtocols, moduleFiles);
|
|
882
|
-
if (purpose) {
|
|
883
|
-
lines.push(
|
|
884
|
-
isZh
|
|
885
|
-
? `**${target.name}** ${purpose.zh},包含 ${moduleFiles.length} 个源文件、${moduleClasses.length} 个${tl}${moduleProtocols.length > 0 ? `、${moduleProtocols.length} 个${il}` : ''}。`
|
|
886
|
-
: `**${target.name}** ${purpose.en}, containing ${moduleFiles.length} source files, ${moduleClasses.length} ${tl}${moduleProtocols.length > 0 ? `, ${moduleProtocols.length} ${il}` : ''}.`
|
|
887
|
-
);
|
|
888
|
-
} else {
|
|
889
|
-
lines.push(
|
|
890
|
-
isZh
|
|
891
|
-
? `**${target.name}** 是项目中的一个 ${target.type || 'target'} 模块,包含 ${moduleFiles.length} 个源文件、${moduleClasses.length} 个${tl}。`
|
|
892
|
-
: `**${target.name}** is a ${target.type || 'target'} module in the project, containing ${moduleFiles.length} source files and ${moduleClasses.length} ${tl}.`
|
|
893
|
-
);
|
|
894
|
-
}
|
|
895
|
-
lines.push('');
|
|
896
|
-
|
|
897
|
-
// ── 模块信息表 ──
|
|
898
|
-
lines.push(`| ${isZh ? '属性' : 'Property'} | ${isZh ? '值' : 'Value'} |`);
|
|
899
|
-
lines.push('|--------|------|');
|
|
900
|
-
lines.push(`| ${isZh ? '类型' : 'Type'} | ${target.type || 'target'} |`);
|
|
901
|
-
if (target.packageName) {
|
|
902
|
-
lines.push(`| ${isZh ? '所属包' : 'Package'} | ${target.packageName} |`);
|
|
903
|
-
}
|
|
904
|
-
if (target.path || target.info?.path) {
|
|
905
|
-
lines.push(`| ${isZh ? '路径' : 'Path'} | \`${target.path || target.info.path}\` |`);
|
|
906
|
-
}
|
|
907
|
-
if (moduleFiles.length > 0) {
|
|
908
|
-
lines.push(`| ${isZh ? '源文件数' : 'Source Files'} | ${moduleFiles.length} |`);
|
|
909
|
-
}
|
|
910
|
-
if (moduleClasses.length > 0) {
|
|
911
|
-
lines.push(`| ${tl} | ${moduleClasses.length} |`);
|
|
912
|
-
}
|
|
913
|
-
if (moduleProtocols.length > 0) {
|
|
914
|
-
lines.push(`| ${il} | ${moduleProtocols.length} |`);
|
|
915
|
-
}
|
|
916
|
-
if (deps.length > 0) {
|
|
917
|
-
lines.push(`| ${isZh ? '依赖数' : 'Dependencies'} | ${deps.length} |`);
|
|
918
|
-
}
|
|
919
|
-
lines.push('');
|
|
920
|
-
|
|
921
|
-
// ── 依赖 ──
|
|
922
|
-
if (deps.length > 0) {
|
|
923
|
-
lines.push(`## ${isZh ? '依赖关系' : 'Dependencies'}`);
|
|
924
|
-
lines.push('');
|
|
925
|
-
lines.push(
|
|
926
|
-
isZh
|
|
927
|
-
? `${target.name} 依赖以下 ${deps.length} 个模块:`
|
|
928
|
-
: `${target.name} depends on ${deps.length} module(s):`
|
|
929
|
-
);
|
|
930
|
-
lines.push('');
|
|
931
|
-
for (const dep of deps) {
|
|
932
|
-
const depName = typeof dep === 'string' ? dep : dep.name || String(dep);
|
|
933
|
-
lines.push(`- \`${depName}\``);
|
|
934
|
-
}
|
|
935
|
-
lines.push('');
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
// ── 核心类型分析 ──
|
|
939
|
-
if (moduleClasses.length > 0 || moduleProtocols.length > 0) {
|
|
940
|
-
lines.push(`## ${isZh ? '核心类型' : 'Core Types'}`);
|
|
941
|
-
lines.push('');
|
|
942
|
-
|
|
943
|
-
if (moduleProtocols.length > 0) {
|
|
944
|
-
lines.push(`### ${il} (${moduleProtocols.length})`);
|
|
945
|
-
lines.push('');
|
|
946
|
-
lines.push(
|
|
947
|
-
isZh
|
|
948
|
-
? `${target.name} 定义了 ${moduleProtocols.length} 个${il},用于规范模块的接口边界:`
|
|
949
|
-
: `${target.name} defines ${moduleProtocols.length} ${il} establishing the module's interface contracts:`
|
|
950
|
-
);
|
|
951
|
-
lines.push('');
|
|
952
|
-
const sorted = [...moduleProtocols].sort();
|
|
953
|
-
for (const p of sorted.slice(0, 20)) {
|
|
954
|
-
lines.push(`- \`${p}\``);
|
|
955
|
-
}
|
|
956
|
-
if (sorted.length > 20) {
|
|
957
|
-
lines.push(
|
|
958
|
-
`- ... ${isZh ? `还有 ${sorted.length - 20} 个` : `and ${sorted.length - 20} more`}`
|
|
959
|
-
);
|
|
960
|
-
}
|
|
961
|
-
lines.push('');
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
if (moduleClasses.length > 0) {
|
|
965
|
-
lines.push(`### ${tl} (${moduleClasses.length})`);
|
|
966
|
-
lines.push('');
|
|
967
|
-
const sorted = [...moduleClasses].sort();
|
|
968
|
-
for (const c of sorted.slice(0, 30)) {
|
|
969
|
-
lines.push(`- \`${c}\``);
|
|
970
|
-
}
|
|
971
|
-
if (sorted.length > 30) {
|
|
972
|
-
lines.push(
|
|
973
|
-
`- ... ${isZh ? `还有 ${sorted.length - 30} 个` : `and ${sorted.length - 30} more`}`
|
|
974
|
-
);
|
|
975
|
-
}
|
|
976
|
-
lines.push('');
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
// ── 源文件分布 ──
|
|
981
|
-
if (moduleFiles.length > 0) {
|
|
982
|
-
lines.push(`## ${isZh ? '源文件分布' : 'Source File Distribution'}`);
|
|
983
|
-
lines.push('');
|
|
984
|
-
|
|
985
|
-
// 按语言统计
|
|
986
|
-
const langCount = {};
|
|
987
|
-
for (const f of moduleFiles) {
|
|
988
|
-
const ext = path.extname(f);
|
|
989
|
-
const lang = LanguageService.displayNameFromExt(ext);
|
|
990
|
-
langCount[lang] = (langCount[lang] || 0) + 1;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
lines.push(`| ${isZh ? '语言' : 'Language'} | ${isZh ? '文件数' : 'Files'} |`);
|
|
994
|
-
lines.push('|--------|-------|');
|
|
995
|
-
for (const [lang, count] of Object.entries(langCount).sort((a, b) => b - a)) {
|
|
996
|
-
lines.push(`| ${lang} | ${count} |`);
|
|
997
|
-
}
|
|
998
|
-
lines.push('');
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
// ── 该模块相关的 Recipes ──
|
|
1002
|
-
if (knowledge.recipes.length > 0) {
|
|
1003
|
-
const related = knowledge.recipes.filter((r) => {
|
|
1004
|
-
const json = r.toJSON ? r.toJSON() : r;
|
|
1005
|
-
return (
|
|
1006
|
-
json.moduleName === target.name ||
|
|
1007
|
-
json.tags?.includes(target.name) ||
|
|
1008
|
-
json.title?.includes(target.name)
|
|
1009
|
-
);
|
|
1010
|
-
});
|
|
1011
|
-
if (related.length > 0) {
|
|
1012
|
-
lines.push(`## ${isZh ? '相关知识条目' : 'Related Recipes'}`);
|
|
1013
|
-
lines.push('');
|
|
1014
|
-
lines.push(
|
|
1015
|
-
isZh
|
|
1016
|
-
? `团队知识库中有 ${related.length} 条与 ${target.name} 相关的条目:`
|
|
1017
|
-
: `The team knowledge base contains ${related.length} entries related to ${target.name}:`
|
|
1018
|
-
);
|
|
1019
|
-
lines.push('');
|
|
1020
|
-
for (const r of related) {
|
|
1021
|
-
const json = r.toJSON ? r.toJSON() : r;
|
|
1022
|
-
lines.push(`### ${json.title}`);
|
|
1023
|
-
lines.push('');
|
|
1024
|
-
if (json.description) {
|
|
1025
|
-
lines.push(json.description);
|
|
1026
|
-
}
|
|
1027
|
-
if (json.doClause) {
|
|
1028
|
-
lines.push(`\n**${isZh ? '✅ 应当' : '✅ Do'}**: ${json.doClause}`);
|
|
1029
|
-
}
|
|
1030
|
-
if (json.dontClause) {
|
|
1031
|
-
lines.push(`**${isZh ? '❌ 避免' : "❌ Don't"}**: ${json.dontClause}`);
|
|
1032
|
-
}
|
|
1033
|
-
lines.push('');
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](../index.md)`);
|
|
1039
|
-
lines.push('');
|
|
1040
|
-
return lines.join('\n');
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
/**
|
|
1044
|
-
* 渲染代码模式文档 (patterns.md)
|
|
1045
|
-
*/
|
|
1046
|
-
export function renderPatterns(knowledge, isZh) {
|
|
1047
|
-
const lines = [
|
|
1048
|
-
`# ${isZh ? '代码模式与最佳实践' : 'Code Patterns & Best Practices'}`,
|
|
1049
|
-
'',
|
|
1050
|
-
`> ${isZh ? '团队沉淀的代码模式与最佳实践(来自 AutoSnippet 知识库)' : 'Code patterns and best practices from AutoSnippet knowledge base'}`,
|
|
1051
|
-
'',
|
|
1052
|
-
];
|
|
1053
|
-
|
|
1054
|
-
// 按 category 分组
|
|
1055
|
-
const groups = {};
|
|
1056
|
-
for (const r of knowledge.recipes) {
|
|
1057
|
-
const json = r.toJSON ? r.toJSON() : r;
|
|
1058
|
-
const cat = json.category || 'Other';
|
|
1059
|
-
if (!groups[cat]) {
|
|
1060
|
-
groups[cat] = [];
|
|
1061
|
-
}
|
|
1062
|
-
groups[cat].push(json);
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
// 总结
|
|
1066
|
-
const totalRecipes = knowledge.recipes.length;
|
|
1067
|
-
const catCount = Object.keys(groups).length;
|
|
1068
|
-
lines.push(
|
|
1069
|
-
isZh
|
|
1070
|
-
? `本项目团队在 ${catCount} 个分类下共沉淀了 **${totalRecipes}** 条代码模式和最佳实践。以下按分类进行展示和分析。`
|
|
1071
|
-
: `The team has accumulated **${totalRecipes}** code patterns across ${catCount} categories. Below they are organized and analyzed by category.`
|
|
1072
|
-
);
|
|
1073
|
-
lines.push('');
|
|
1074
|
-
|
|
1075
|
-
for (const [cat, items] of Object.entries(groups).sort()) {
|
|
1076
|
-
lines.push(`## ${cat} (${items.length})`);
|
|
1077
|
-
lines.push('');
|
|
1078
|
-
|
|
1079
|
-
// 分类概述
|
|
1080
|
-
lines.push(
|
|
1081
|
-
isZh
|
|
1082
|
-
? `${cat} 分类包含 ${items.length} 条规则,覆盖了该领域的核心规范。`
|
|
1083
|
-
: `The ${cat} category contains ${items.length} rules covering core conventions in this area.`
|
|
1084
|
-
);
|
|
1085
|
-
lines.push('');
|
|
1086
|
-
|
|
1087
|
-
for (const item of items) {
|
|
1088
|
-
lines.push(`### ${item.title}`);
|
|
1089
|
-
lines.push('');
|
|
1090
|
-
if (item.description) {
|
|
1091
|
-
lines.push(item.description);
|
|
1092
|
-
lines.push('');
|
|
1093
|
-
}
|
|
1094
|
-
if (item.content?.pattern) {
|
|
1095
|
-
lines.push(`\`\`\`${item.language || 'text'}`);
|
|
1096
|
-
lines.push(item.content.pattern);
|
|
1097
|
-
lines.push('```');
|
|
1098
|
-
lines.push('');
|
|
1099
|
-
}
|
|
1100
|
-
if (item.doClause) {
|
|
1101
|
-
lines.push(`**${isZh ? '✅ 应当' : '✅ Do'}**: ${item.doClause}`);
|
|
1102
|
-
lines.push('');
|
|
1103
|
-
}
|
|
1104
|
-
if (item.dontClause) {
|
|
1105
|
-
lines.push(`**${isZh ? '❌ 避免' : "❌ Don't"}**: ${item.dontClause}`);
|
|
1106
|
-
lines.push('');
|
|
1107
|
-
}
|
|
1108
|
-
if (item.reasoning?.whyStandard) {
|
|
1109
|
-
lines.push(`> ${isZh ? '💡 原因' : '💡 Rationale'}: ${item.reasoning.whyStandard}`);
|
|
1110
|
-
lines.push('');
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](index.md)`);
|
|
1116
|
-
lines.push('');
|
|
1117
|
-
return lines.join('\n');
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
// ═══ V3 新增渲染器 ════════════════════════════════════════
|
|
1121
|
-
|
|
1122
|
-
/**
|
|
1123
|
-
* 快速上手指南 (非 AI 降级模板)
|
|
1124
|
-
*/
|
|
1125
|
-
export function renderGettingStarted(project, modules, ast, isZh) {
|
|
1126
|
-
const lines = [
|
|
1127
|
-
`# ${isZh ? '快速上手' : 'Getting Started'}`,
|
|
1128
|
-
'',
|
|
1129
|
-
`> ${isZh ? '本文档由 AutoSnippet Repo Wiki 自动生成' : 'Auto-generated by AutoSnippet Repo Wiki'}`,
|
|
1130
|
-
'',
|
|
1131
|
-
];
|
|
1132
|
-
|
|
1133
|
-
// 从 buildSystems 或 legacy 字段推断
|
|
1134
|
-
const bs = project.buildSystems || [];
|
|
1135
|
-
const ecoSet = new Set(bs.map((b) => b.eco));
|
|
1136
|
-
|
|
1137
|
-
// ── 环境要求 (按检测到的生态系统动态生成) ──
|
|
1138
|
-
lines.push(`## ${isZh ? '环境要求' : 'Prerequisites'}`);
|
|
1139
|
-
lines.push('');
|
|
1140
|
-
if (ecoSet.has('spm') || project.hasPackageSwift) {
|
|
1141
|
-
lines.push(isZh ? '- Swift 5.5+ (推荐 Swift 5.9+)' : '- Swift 5.5+ (Swift 5.9+ recommended)');
|
|
1142
|
-
lines.push(isZh ? '- Xcode 14+' : '- Xcode 14+');
|
|
1143
|
-
const hasCocoaPods = bs.some((b) => b.buildTool === 'CocoaPods');
|
|
1144
|
-
if (hasCocoaPods || project.hasPodfile) {
|
|
1145
|
-
lines.push(isZh ? '- CocoaPods 1.10+' : '- CocoaPods 1.10+');
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
if (project.hasXcodeproj) {
|
|
1149
|
-
lines.push(isZh ? '- Xcode (最新稳定版)' : '- Xcode (latest stable version)');
|
|
1150
|
-
// Xcode 项目额外环境提示
|
|
1151
|
-
if (!ecoSet.has('spm') && !project.hasPackageSwift && !project.hasPodfile) {
|
|
1152
|
-
lines.push(isZh ? '- macOS (建议最新版本)' : '- macOS (latest version recommended)');
|
|
1153
|
-
lines.push(
|
|
1154
|
-
isZh
|
|
1155
|
-
? '- Apple Developer Account (如需真机调试)'
|
|
1156
|
-
: '- Apple Developer Account (for device testing)'
|
|
1157
|
-
);
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
if (ecoSet.has('node')) {
|
|
1161
|
-
lines.push(isZh ? '- Node.js 18+ (推荐 20 LTS)' : '- Node.js 18+ (20 LTS recommended)');
|
|
1162
|
-
const hasYarn = bs.some((b) => b.buildTool === 'Yarn');
|
|
1163
|
-
const hasPnpm = bs.some((b) => b.buildTool === 'pnpm');
|
|
1164
|
-
lines.push(hasYarn ? '- Yarn' : hasPnpm ? '- pnpm' : '- npm');
|
|
1165
|
-
}
|
|
1166
|
-
if (ecoSet.has('python')) {
|
|
1167
|
-
lines.push(isZh ? '- Python 3.8+' : '- Python 3.8+');
|
|
1168
|
-
const hasPipenv = bs.some((b) => b.buildTool === 'Pipenv');
|
|
1169
|
-
const hasPoetry = bs.some((b) => b.buildTool === 'Poetry');
|
|
1170
|
-
if (hasPipenv) {
|
|
1171
|
-
lines.push('- Pipenv');
|
|
1172
|
-
} else if (hasPoetry) {
|
|
1173
|
-
lines.push('- Poetry');
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
if (ecoSet.has('go')) {
|
|
1177
|
-
lines.push(isZh ? '- Go 1.21+' : '- Go 1.21+');
|
|
1178
|
-
}
|
|
1179
|
-
if (ecoSet.has('rust')) {
|
|
1180
|
-
lines.push(isZh ? '- Rust (最新 stable)' : '- Rust (latest stable)');
|
|
1181
|
-
lines.push('- Cargo');
|
|
1182
|
-
}
|
|
1183
|
-
if (ecoSet.has('jvm')) {
|
|
1184
|
-
const hasGradle = bs.some((b) => b.buildTool?.startsWith('Gradle'));
|
|
1185
|
-
lines.push(isZh ? '- JDK 17+' : '- JDK 17+');
|
|
1186
|
-
lines.push(hasGradle ? '- Gradle' : '- Maven');
|
|
1187
|
-
}
|
|
1188
|
-
if (ecoSet.has('dart')) {
|
|
1189
|
-
lines.push(isZh ? '- Flutter / Dart SDK' : '- Flutter / Dart SDK');
|
|
1190
|
-
}
|
|
1191
|
-
if (ecoSet.has('dotnet')) {
|
|
1192
|
-
lines.push(isZh ? '- .NET 6+ SDK' : '- .NET 6+ SDK');
|
|
1193
|
-
}
|
|
1194
|
-
if (ecoSet.has('ruby')) {
|
|
1195
|
-
lines.push(isZh ? '- Ruby 3.0+' : '- Ruby 3.0+');
|
|
1196
|
-
lines.push('- Bundler');
|
|
1197
|
-
}
|
|
1198
|
-
lines.push('');
|
|
1199
|
-
|
|
1200
|
-
// ── 项目目录结构 ──
|
|
1201
|
-
lines.push(`## ${isZh ? '项目结构' : 'Project Structure'}`);
|
|
1202
|
-
lines.push('');
|
|
1203
|
-
lines.push('```');
|
|
1204
|
-
lines.push(`${project.name}/`);
|
|
1205
|
-
if (modules.targets.length > 0) {
|
|
1206
|
-
const mainTargets = modules.targets.filter((t) => t.type !== 'test');
|
|
1207
|
-
const testTargets = modules.targets.filter((t) => t.type === 'test');
|
|
1208
|
-
if (mainTargets.length > 0) {
|
|
1209
|
-
const srcDir = ecoSet.has('spm') || project.hasPackageSwift ? 'Sources' : 'src';
|
|
1210
|
-
lines.push(`├── ${srcDir}/`);
|
|
1211
|
-
for (let i = 0; i < mainTargets.length; i++) {
|
|
1212
|
-
const prefix =
|
|
1213
|
-
i === mainTargets.length - 1 && testTargets.length === 0 ? '│ └──' : '│ ├──';
|
|
1214
|
-
lines.push(`${prefix} ${mainTargets[i].name}/`);
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
if (testTargets.length > 0) {
|
|
1218
|
-
const testDir = ecoSet.has('spm') || project.hasPackageSwift ? 'Tests' : 'test';
|
|
1219
|
-
lines.push(`├── ${testDir}/`);
|
|
1220
|
-
for (let i = 0; i < testTargets.length; i++) {
|
|
1221
|
-
const prefix = i === testTargets.length - 1 ? '│ └──' : '│ ├──';
|
|
1222
|
-
lines.push(`${prefix} ${testTargets[i].name}/`);
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
// 显示构建配置文件
|
|
1227
|
-
for (const b of bs) {
|
|
1228
|
-
const marker = BUILD_SYSTEM_FILES[b.buildTool];
|
|
1229
|
-
if (marker) {
|
|
1230
|
-
lines.push(`├── ${marker}`);
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
// legacy 兜底
|
|
1234
|
-
if (bs.length === 0) {
|
|
1235
|
-
if (project.hasPackageSwift) {
|
|
1236
|
-
lines.push('├── Package.swift');
|
|
1237
|
-
}
|
|
1238
|
-
if (project.hasPodfile) {
|
|
1239
|
-
lines.push('├── Podfile');
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
lines.push('```');
|
|
1243
|
-
lines.push('');
|
|
1244
|
-
|
|
1245
|
-
// ── 构建步骤 (按检测到的生态系统动态生成) ──
|
|
1246
|
-
lines.push(`## ${isZh ? '构建与运行' : 'Build & Run'}`);
|
|
1247
|
-
lines.push('');
|
|
1248
|
-
|
|
1249
|
-
for (const b of bs) {
|
|
1250
|
-
_pushBuildSteps(lines, b, project.name, isZh);
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
// legacy 兜底 — 如果没有检测到 buildSystems
|
|
1254
|
-
if (bs.length === 0) {
|
|
1255
|
-
if (project.hasPackageSwift) {
|
|
1256
|
-
_pushBuildSteps(lines, { eco: 'spm', buildTool: 'SPM' }, project.name, isZh);
|
|
1257
|
-
}
|
|
1258
|
-
if (project.hasPodfile) {
|
|
1259
|
-
_pushBuildSteps(lines, { eco: 'spm', buildTool: 'CocoaPods' }, project.name, isZh);
|
|
1260
|
-
}
|
|
1261
|
-
// Xcode 项目兜底 (无 SPM / CocoaPods)
|
|
1262
|
-
if (!project.hasPackageSwift && !project.hasPodfile && project.hasXcodeproj) {
|
|
1263
|
-
_pushBuildSteps(lines, { eco: 'xcode', buildTool: 'Xcode' }, project.name, isZh);
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
// ── 源文件统计 (增强无 moduleService 场景) ──
|
|
1268
|
-
if (modules.targets.length === 0 && project.sourceFilesByModule) {
|
|
1269
|
-
const sfm = project.sourceFilesByModule;
|
|
1270
|
-
const modEntries = Object.entries(sfm).sort((a, b) => b[1].length - a[1].length);
|
|
1271
|
-
if (modEntries.length > 0) {
|
|
1272
|
-
lines.push(`## ${isZh ? '项目模块概览' : 'Module Overview'}`);
|
|
1273
|
-
lines.push('');
|
|
1274
|
-
lines.push(
|
|
1275
|
-
`| ${isZh ? '模块' : 'Module'} | ${isZh ? '源文件数' : 'Files'} | ${isZh ? '说明' : 'Description'} |`
|
|
1276
|
-
);
|
|
1277
|
-
lines.push('|--------|-------|------|');
|
|
1278
|
-
for (const [modName, modFiles] of modEntries.slice(0, 15)) {
|
|
1279
|
-
const purpose = inferModulePurpose(modName, [], [], modFiles);
|
|
1280
|
-
const desc = purpose ? (isZh ? purpose.zh : purpose.en) : '-';
|
|
1281
|
-
lines.push(`| ${modName} | ${modFiles.length} | ${desc} |`);
|
|
1282
|
-
}
|
|
1283
|
-
lines.push('');
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
// ── 模块说明 ──
|
|
1288
|
-
if (modules.targets.length > 0) {
|
|
1289
|
-
const mainTargets = modules.targets.filter((t) => t.type !== 'test');
|
|
1290
|
-
if (mainTargets.length > 0) {
|
|
1291
|
-
lines.push(`## ${isZh ? '核心模块' : 'Core Modules'}`);
|
|
1292
|
-
lines.push('');
|
|
1293
|
-
lines.push(
|
|
1294
|
-
`| ${isZh ? '模块' : 'Module'} | ${isZh ? '类型' : 'Type'} | ${isZh ? '类型数' : 'Types'} | ${isZh ? '说明' : 'Description'} |`
|
|
1295
|
-
);
|
|
1296
|
-
lines.push('|--------|------|--------|------|');
|
|
1297
|
-
for (const t of mainTargets) {
|
|
1298
|
-
const cls = (ast.classNamesByModule?.[t.name] || []).length;
|
|
1299
|
-
const purpose = inferModulePurpose(
|
|
1300
|
-
t.name,
|
|
1301
|
-
ast.classNamesByModule?.[t.name] || [],
|
|
1302
|
-
ast.protocolNamesByModule?.[t.name] || [],
|
|
1303
|
-
[]
|
|
1304
|
-
);
|
|
1305
|
-
const desc = purpose ? (isZh ? purpose.zh : purpose.en) : '-';
|
|
1306
|
-
lines.push(`| ${t.name} | ${t.type || 'library'} | ${cls} | ${desc} |`);
|
|
1307
|
-
}
|
|
1308
|
-
lines.push('');
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](index.md)`);
|
|
1313
|
-
lines.push('');
|
|
1314
|
-
return lines.join('\n');
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
/* 构建配置文件名映射 (用于目录树显示) — 从 LanguageService.buildSystemMarkers 动态派生 */
|
|
1318
|
-
const BUILD_SYSTEM_FILES = Object.fromEntries(
|
|
1319
|
-
LanguageService.buildSystemMarkers.map((m) => [m.buildTool, m.file])
|
|
1320
|
-
);
|
|
1321
|
-
|
|
1322
|
-
/**
|
|
1323
|
-
* 按生态系统输出构建步骤
|
|
1324
|
-
* @private
|
|
1325
|
-
*/
|
|
1326
|
-
function _pushBuildSteps(lines, buildSys, projectName, isZh) {
|
|
1327
|
-
const { eco, buildTool } = buildSys;
|
|
1328
|
-
|
|
1329
|
-
lines.push(`### ${isZh ? `使用 ${buildTool}` : `Using ${buildTool}`}`);
|
|
1330
|
-
lines.push('');
|
|
1331
|
-
lines.push('```bash');
|
|
1332
|
-
lines.push(isZh ? '# 获取项目' : '# Clone the project');
|
|
1333
|
-
lines.push(`git clone <repository-url>`);
|
|
1334
|
-
lines.push(`cd ${projectName}`);
|
|
1335
|
-
lines.push('');
|
|
1336
|
-
|
|
1337
|
-
switch (eco) {
|
|
1338
|
-
case 'spm':
|
|
1339
|
-
if (buildTool === 'CocoaPods') {
|
|
1340
|
-
lines.push('pod install');
|
|
1341
|
-
lines.push('open *.xcworkspace');
|
|
1342
|
-
} else {
|
|
1343
|
-
lines.push(isZh ? '# 解析依赖' : '# Resolve dependencies');
|
|
1344
|
-
lines.push('swift package resolve');
|
|
1345
|
-
lines.push('');
|
|
1346
|
-
lines.push(isZh ? '# 构建' : '# Build');
|
|
1347
|
-
lines.push('swift build');
|
|
1348
|
-
lines.push('');
|
|
1349
|
-
lines.push(isZh ? '# 运行测试' : '# Run tests');
|
|
1350
|
-
lines.push('swift test');
|
|
1351
|
-
}
|
|
1352
|
-
break;
|
|
1353
|
-
case 'node':
|
|
1354
|
-
if (buildTool === 'Yarn') {
|
|
1355
|
-
lines.push('yarn install');
|
|
1356
|
-
lines.push('yarn build');
|
|
1357
|
-
lines.push('yarn test');
|
|
1358
|
-
} else if (buildTool === 'pnpm') {
|
|
1359
|
-
lines.push('pnpm install');
|
|
1360
|
-
lines.push('pnpm build');
|
|
1361
|
-
lines.push('pnpm test');
|
|
1362
|
-
} else {
|
|
1363
|
-
lines.push('npm install');
|
|
1364
|
-
lines.push('npm run build');
|
|
1365
|
-
lines.push('npm test');
|
|
1366
|
-
}
|
|
1367
|
-
break;
|
|
1368
|
-
case 'python':
|
|
1369
|
-
if (buildTool === 'Poetry') {
|
|
1370
|
-
lines.push('poetry install');
|
|
1371
|
-
lines.push('poetry run pytest');
|
|
1372
|
-
} else if (buildTool === 'Pipenv') {
|
|
1373
|
-
lines.push('pipenv install');
|
|
1374
|
-
lines.push('pipenv run pytest');
|
|
1375
|
-
} else {
|
|
1376
|
-
lines.push('pip install -r requirements.txt');
|
|
1377
|
-
lines.push('pytest');
|
|
1378
|
-
}
|
|
1379
|
-
break;
|
|
1380
|
-
case 'go':
|
|
1381
|
-
lines.push('go mod download');
|
|
1382
|
-
lines.push('go build ./...');
|
|
1383
|
-
lines.push('go test ./...');
|
|
1384
|
-
break;
|
|
1385
|
-
case 'rust':
|
|
1386
|
-
lines.push('cargo build');
|
|
1387
|
-
lines.push('cargo test');
|
|
1388
|
-
break;
|
|
1389
|
-
case 'jvm':
|
|
1390
|
-
if (buildTool?.startsWith('Gradle')) {
|
|
1391
|
-
lines.push('./gradlew build');
|
|
1392
|
-
lines.push('./gradlew test');
|
|
1393
|
-
} else {
|
|
1394
|
-
lines.push('mvn install');
|
|
1395
|
-
lines.push('mvn test');
|
|
1396
|
-
}
|
|
1397
|
-
break;
|
|
1398
|
-
case 'dart':
|
|
1399
|
-
lines.push('flutter pub get');
|
|
1400
|
-
lines.push('flutter run');
|
|
1401
|
-
lines.push('flutter test');
|
|
1402
|
-
break;
|
|
1403
|
-
case 'dotnet':
|
|
1404
|
-
lines.push('dotnet restore');
|
|
1405
|
-
lines.push('dotnet build');
|
|
1406
|
-
lines.push('dotnet test');
|
|
1407
|
-
break;
|
|
1408
|
-
case 'ruby':
|
|
1409
|
-
lines.push('bundle install');
|
|
1410
|
-
break;
|
|
1411
|
-
case 'xcode':
|
|
1412
|
-
lines.push(isZh ? '# 使用 Xcode 打开项目' : '# Open with Xcode');
|
|
1413
|
-
lines.push(`open *.xcodeproj 2>/dev/null || open *.xcworkspace`);
|
|
1414
|
-
lines.push('');
|
|
1415
|
-
lines.push(isZh ? '# 或通过命令行构建' : '# Or build via command line');
|
|
1416
|
-
lines.push(`xcodebuild -project *.xcodeproj -scheme ${projectName} build`);
|
|
1417
|
-
break;
|
|
1418
|
-
default:
|
|
1419
|
-
lines.push(isZh ? '# 请查阅项目 README' : '# Please refer to the project README');
|
|
1420
|
-
break;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
lines.push('```');
|
|
1424
|
-
lines.push('');
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
/**
|
|
1428
|
-
* 按分类拆分的代码模式文档
|
|
1429
|
-
*/
|
|
1430
|
-
export function renderPatternCategory(patternData, isZh) {
|
|
1431
|
-
const { category, recipes } = patternData;
|
|
1432
|
-
const lines = [
|
|
1433
|
-
`# ${category}`,
|
|
1434
|
-
'',
|
|
1435
|
-
`> ${isZh ? `${category} 分类下的 ${recipes.length} 条代码模式(来自 AutoSnippet 知识库)` : `${recipes.length} code patterns in ${category} category (from AutoSnippet KB)`}`,
|
|
1436
|
-
'',
|
|
1437
|
-
];
|
|
1438
|
-
|
|
1439
|
-
// 分类概述
|
|
1440
|
-
lines.push(
|
|
1441
|
-
isZh
|
|
1442
|
-
? `本文档收录了 ${category} 分类下的 ${recipes.length} 条代码模式和规范,这些规则由团队在开发实践中总结沉淀。`
|
|
1443
|
-
: `This document covers ${recipes.length} code patterns and conventions in the ${category} category, distilled from team development practices.`
|
|
1444
|
-
);
|
|
1445
|
-
lines.push('');
|
|
1446
|
-
|
|
1447
|
-
for (const item of recipes) {
|
|
1448
|
-
lines.push(`## ${item.title}`);
|
|
1449
|
-
lines.push('');
|
|
1450
|
-
if (item.description) {
|
|
1451
|
-
lines.push(item.description);
|
|
1452
|
-
lines.push('');
|
|
1453
|
-
}
|
|
1454
|
-
if (item.doClause) {
|
|
1455
|
-
lines.push(`**${isZh ? '✅ 应当' : '✅ Do'}**: ${item.doClause}`);
|
|
1456
|
-
lines.push('');
|
|
1457
|
-
}
|
|
1458
|
-
if (item.dontClause) {
|
|
1459
|
-
lines.push(`**${isZh ? '❌ 避免' : "❌ Don't"}**: ${item.dontClause}`);
|
|
1460
|
-
lines.push('');
|
|
1461
|
-
}
|
|
1462
|
-
if (item.content?.pattern) {
|
|
1463
|
-
lines.push(`\`\`\`${item.language || 'text'}`);
|
|
1464
|
-
lines.push(item.content.pattern);
|
|
1465
|
-
lines.push('```');
|
|
1466
|
-
lines.push('');
|
|
1467
|
-
}
|
|
1468
|
-
if (item.reasoning?.whyStandard) {
|
|
1469
|
-
lines.push(`> ${isZh ? '💡 原因' : '💡 Rationale'}: ${item.reasoning.whyStandard}`);
|
|
1470
|
-
lines.push('');
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](../index.md)`);
|
|
1475
|
-
lines.push('');
|
|
1476
|
-
return lines.join('\n');
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* 协议参考文档
|
|
1481
|
-
*/
|
|
1482
|
-
export function renderProtocolReference(ast, isZh, projectInfo) {
|
|
1483
|
-
const langTerms = getLangTerms(projectInfo?.primaryLanguage || 'unknown');
|
|
1484
|
-
const il = isZh ? langTerms.interfaceLabel.zh : langTerms.interfaceLabel.en;
|
|
1485
|
-
|
|
1486
|
-
const lines = [
|
|
1487
|
-
`# ${isZh ? `${il}参考` : `${il} Reference`}`,
|
|
1488
|
-
'',
|
|
1489
|
-
`> ${isZh ? `项目中定义的 ${ast.protocols.length} 个${il}` : `${ast.protocols.length} ${il} defined in the project`}`,
|
|
1490
|
-
'',
|
|
1491
|
-
];
|
|
1492
|
-
|
|
1493
|
-
lines.push(
|
|
1494
|
-
isZh
|
|
1495
|
-
? `${il}定义了类型需要遵循的接口契约。本项目共定义了 ${ast.protocols.length} 个${il},以下按模块分组展示。`
|
|
1496
|
-
: `${il} define interface contracts that types must conform to. This project defines ${ast.protocols.length} ${il}, organized by module below.`
|
|
1497
|
-
);
|
|
1498
|
-
lines.push('');
|
|
1499
|
-
|
|
1500
|
-
// 按模块分组
|
|
1501
|
-
const protoByModule = ast.protocolNamesByModule || {};
|
|
1502
|
-
const grouped = new Set();
|
|
1503
|
-
|
|
1504
|
-
for (const [mod, protos] of Object.entries(protoByModule).sort()) {
|
|
1505
|
-
if (protos.length === 0) {
|
|
1506
|
-
continue;
|
|
1507
|
-
}
|
|
1508
|
-
lines.push(`## ${mod}`);
|
|
1509
|
-
lines.push('');
|
|
1510
|
-
lines.push(
|
|
1511
|
-
isZh
|
|
1512
|
-
? `${mod} 模块定义了 ${protos.length} 个${il}:`
|
|
1513
|
-
: `${mod} module defines ${protos.length} ${il}:`
|
|
1514
|
-
);
|
|
1515
|
-
lines.push('');
|
|
1516
|
-
for (const p of protos.sort()) {
|
|
1517
|
-
lines.push(`- \`${p}\``);
|
|
1518
|
-
grouped.add(p);
|
|
1519
|
-
}
|
|
1520
|
-
lines.push('');
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
// 未分组的接口类型
|
|
1524
|
-
const ungrouped = ast.protocols.filter((p) => !grouped.has(p));
|
|
1525
|
-
if (ungrouped.length > 0) {
|
|
1526
|
-
lines.push(`## ${isZh ? `其他${il}` : `Other ${il}`}`);
|
|
1527
|
-
lines.push('');
|
|
1528
|
-
for (const p of ungrouped.sort()) {
|
|
1529
|
-
lines.push(`- \`${p}\``);
|
|
1530
|
-
}
|
|
1531
|
-
lines.push('');
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](index.md)`);
|
|
1535
|
-
lines.push('');
|
|
1536
|
-
return lines.join('\n');
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
// ═══ Folder Profile 渲染器 (AST 不可用时的降级策略) ═══════
|
|
1540
|
-
|
|
1541
|
-
/**
|
|
1542
|
-
* 渲染文件夹结构总览 (folder-structure.md)
|
|
1543
|
-
*
|
|
1544
|
-
* @param {import('./WikiUtils.js').FolderProfile[]} profiles
|
|
1545
|
-
* @param {object} projectInfo
|
|
1546
|
-
* @param {boolean} isZh
|
|
1547
|
-
* @returns {string}
|
|
1548
|
-
*/
|
|
1549
|
-
export function renderFolderOverview(profiles, projectInfo, isZh) {
|
|
1550
|
-
const lines = [
|
|
1551
|
-
`# ${isZh ? '项目结构分析' : 'Project Structure Analysis'}`,
|
|
1552
|
-
'',
|
|
1553
|
-
`> ${isZh ? '本文档由 AutoSnippet Repo Wiki 自动生成(基于文件夹画像分析)' : 'Auto-generated by AutoSnippet Repo Wiki (folder profiling mode)'}`,
|
|
1554
|
-
'',
|
|
1555
|
-
];
|
|
1556
|
-
|
|
1557
|
-
// 说明为什么是文件夹分析模式
|
|
1558
|
-
lines.push(
|
|
1559
|
-
isZh
|
|
1560
|
-
? `> 💡 本项目的主要语言 (${LanguageService.displayName(projectInfo.primaryLanguage)}) 暂不支持深度 AST 解析,因此使用文件夹画像分析来代替。`
|
|
1561
|
-
: `> 💡 The project's primary language (${LanguageService.displayName(projectInfo.primaryLanguage)}) does not support deep AST analysis yet, so folder profiling is used instead.`
|
|
1562
|
-
);
|
|
1563
|
-
lines.push('');
|
|
1564
|
-
|
|
1565
|
-
// ── 结构鸟瞰 (Mermaid) ──
|
|
1566
|
-
lines.push(`## ${isZh ? '结构鸟瞰' : 'Structure Overview'}`);
|
|
1567
|
-
lines.push('');
|
|
1568
|
-
lines.push('```mermaid');
|
|
1569
|
-
lines.push('graph TD');
|
|
1570
|
-
lines.push(` Root["${projectInfo.name}"]`);
|
|
1571
|
-
|
|
1572
|
-
// 只显示深度 = 1 的顶层文件夹
|
|
1573
|
-
const topLevel = profiles.filter((fp) => fp.depth === 1);
|
|
1574
|
-
|
|
1575
|
-
for (const fp of topLevel) {
|
|
1576
|
-
const sid = mermaidId(fp.name);
|
|
1577
|
-
lines.push(` ${sid}["${fp.name} (${fp.fileCount})"]`);
|
|
1578
|
-
lines.push(` Root --> ${sid}`);
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
// 画 import 关系边
|
|
1582
|
-
const folderNames = new Set(profiles.map((fp) => fp.name));
|
|
1583
|
-
for (const fp of profiles) {
|
|
1584
|
-
const fromId = mermaidId(fp.name);
|
|
1585
|
-
for (const imp of fp.imports) {
|
|
1586
|
-
if (folderNames.has(imp) && imp !== fp.name) {
|
|
1587
|
-
lines.push(` ${fromId} -.-> ${mermaidId(imp)}`);
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
lines.push('```');
|
|
1593
|
-
lines.push('');
|
|
1594
|
-
|
|
1595
|
-
// ── 文件夹总览表 ──
|
|
1596
|
-
lines.push(`## ${isZh ? '文件夹总览' : 'Folder Overview'}`);
|
|
1597
|
-
lines.push('');
|
|
1598
|
-
lines.push(
|
|
1599
|
-
`| ${isZh ? '文件夹' : 'Folder'} | ${isZh ? '路径' : 'Path'} | ${isZh ? '文件数' : 'Files'} | ${isZh ? '大小' : 'Size'} | ${isZh ? '语言' : 'Languages'} | ${isZh ? '说明' : 'Description'} |`
|
|
1600
|
-
);
|
|
1601
|
-
lines.push('|--------|------|-------|------|------|------|');
|
|
1602
|
-
|
|
1603
|
-
for (const fp of profiles) {
|
|
1604
|
-
const hasDoc = fp.fileCount >= 5;
|
|
1605
|
-
const folderDocSlug = slug(fp.relPath.replaceAll('/', '-'));
|
|
1606
|
-
const nameCol = hasDoc ? `[${fp.relPath}](folders/${folderDocSlug}.md)` : fp.relPath;
|
|
1607
|
-
const sizeStr =
|
|
1608
|
-
fp.totalSize > 1024 * 1024
|
|
1609
|
-
? `${(fp.totalSize / 1024 / 1024).toFixed(1)}MB`
|
|
1610
|
-
: `${(fp.totalSize / 1024).toFixed(1)}KB`;
|
|
1611
|
-
const langs = Object.entries(fp.langBreakdown)
|
|
1612
|
-
.sort((a, b) => b[1] - a[1])
|
|
1613
|
-
.slice(0, 3)
|
|
1614
|
-
.map(([l]) => l)
|
|
1615
|
-
.join(', ');
|
|
1616
|
-
const desc = fp.purpose ? (isZh ? fp.purpose.zh : fp.purpose.en) : '-';
|
|
1617
|
-
lines.push(
|
|
1618
|
-
`| ${nameCol} | \`${fp.relPath}\` | ${fp.fileCount} | ${sizeStr} | ${langs} | ${desc} |`
|
|
1619
|
-
);
|
|
1620
|
-
}
|
|
1621
|
-
lines.push('');
|
|
1622
|
-
|
|
1623
|
-
// ── 命名约定总结 ──
|
|
1624
|
-
const allPatterns = {};
|
|
1625
|
-
for (const fp of profiles) {
|
|
1626
|
-
for (const p of fp.namingPatterns) {
|
|
1627
|
-
allPatterns[p] = (allPatterns[p] || 0) + 1;
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
const commonPatterns = Object.entries(allPatterns)
|
|
1631
|
-
.filter(([, c]) => c >= 2)
|
|
1632
|
-
.sort((a, b) => b[1] - a[1]);
|
|
1633
|
-
|
|
1634
|
-
if (commonPatterns.length > 0) {
|
|
1635
|
-
lines.push(`## ${isZh ? '命名约定' : 'Naming Conventions'}`);
|
|
1636
|
-
lines.push('');
|
|
1637
|
-
lines.push(
|
|
1638
|
-
isZh
|
|
1639
|
-
? '通过分析文件命名模式,检测到以下在多个文件夹中出现的约定:'
|
|
1640
|
-
: 'The following naming conventions were detected across multiple folders:'
|
|
1641
|
-
);
|
|
1642
|
-
lines.push('');
|
|
1643
|
-
for (const [pattern, count] of commonPatterns) {
|
|
1644
|
-
lines.push(
|
|
1645
|
-
`- **${pattern}** — ${isZh ? `出现在 ${count} 个文件夹` : `found in ${count} folders`}`
|
|
1646
|
-
);
|
|
1647
|
-
}
|
|
1648
|
-
lines.push('');
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
// ── 依赖关系 ──
|
|
1652
|
-
const allImports = [];
|
|
1653
|
-
for (const fp of profiles) {
|
|
1654
|
-
for (const imp of fp.imports) {
|
|
1655
|
-
if (folderNames.has(imp) && imp !== fp.name) {
|
|
1656
|
-
allImports.push({ from: fp.name, to: imp });
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
if (allImports.length > 0) {
|
|
1662
|
-
lines.push(`## ${isZh ? '文件夹间依赖' : 'Inter-Folder Dependencies'}`);
|
|
1663
|
-
lines.push('');
|
|
1664
|
-
lines.push(
|
|
1665
|
-
isZh
|
|
1666
|
-
? '通过分析 import/require 语句推断的文件夹间引用关系:'
|
|
1667
|
-
: 'Dependencies between folders inferred from import/require statements:'
|
|
1668
|
-
);
|
|
1669
|
-
lines.push('');
|
|
1670
|
-
for (const dep of allImports) {
|
|
1671
|
-
lines.push(`- \`${dep.from}\` → \`${dep.to}\``);
|
|
1672
|
-
}
|
|
1673
|
-
lines.push('');
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
lines.push(`[← ${isZh ? '返回概述' : 'Back to Overview'}](index.md)`);
|
|
1677
|
-
lines.push('');
|
|
1678
|
-
return lines.join('\n');
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
/**
|
|
1682
|
-
* 渲染单个文件夹的深度画像文档 (folders/{name}.md)
|
|
1683
|
-
*
|
|
1684
|
-
* @param {import('./WikiUtils.js').FolderProfile} fp
|
|
1685
|
-
* @param {object} projectInfo
|
|
1686
|
-
* @param {boolean} isZh
|
|
1687
|
-
* @returns {string}
|
|
1688
|
-
*/
|
|
1689
|
-
export function renderFolderProfile(fp, projectInfo, isZh) {
|
|
1690
|
-
const lines = [
|
|
1691
|
-
`# ${fp.name}`,
|
|
1692
|
-
'',
|
|
1693
|
-
`> ${isZh ? '文件夹画像文档 — 由 AutoSnippet Repo Wiki 自动生成' : 'Folder profile doc — Auto-generated by AutoSnippet Repo Wiki'}`,
|
|
1694
|
-
'',
|
|
1695
|
-
];
|
|
1696
|
-
|
|
1697
|
-
// ── 概述 ──
|
|
1698
|
-
lines.push(`## ${isZh ? '概述' : 'Overview'}`);
|
|
1699
|
-
lines.push('');
|
|
1700
|
-
|
|
1701
|
-
const purposeStr = fp.purpose
|
|
1702
|
-
? isZh
|
|
1703
|
-
? fp.purpose.zh
|
|
1704
|
-
: fp.purpose.en
|
|
1705
|
-
: isZh
|
|
1706
|
-
? '通过文件夹画像分析推断其功能'
|
|
1707
|
-
: 'functionality inferred from folder profiling';
|
|
1708
|
-
|
|
1709
|
-
if (isZh) {
|
|
1710
|
-
lines.push(
|
|
1711
|
-
`**${fp.name}** 位于 \`${fp.relPath}\`,${purposeStr}。` +
|
|
1712
|
-
`包含 ${fp.fileCount} 个源文件,总大小 ${(fp.totalSize / 1024).toFixed(1)}KB。`
|
|
1713
|
-
);
|
|
1714
|
-
} else {
|
|
1715
|
-
lines.push(
|
|
1716
|
-
`**${fp.name}** is located at \`${fp.relPath}\`, ${purposeStr}. ` +
|
|
1717
|
-
`Contains ${fp.fileCount} source files totaling ${(fp.totalSize / 1024).toFixed(1)}KB.`
|
|
1718
|
-
);
|
|
1719
|
-
}
|
|
1720
|
-
lines.push('');
|
|
1721
|
-
|
|
1722
|
-
// ── 信息表 ──
|
|
1723
|
-
lines.push(`| ${isZh ? '属性' : 'Property'} | ${isZh ? '值' : 'Value'} |`);
|
|
1724
|
-
lines.push('|--------|------|');
|
|
1725
|
-
lines.push(`| ${isZh ? '路径' : 'Path'} | \`${fp.relPath}\` |`);
|
|
1726
|
-
lines.push(`| ${isZh ? '源文件数' : 'Source Files'} | ${fp.fileCount} |`);
|
|
1727
|
-
const sizeStr =
|
|
1728
|
-
fp.totalSize > 1024 * 1024
|
|
1729
|
-
? `${(fp.totalSize / 1024 / 1024).toFixed(1)}MB`
|
|
1730
|
-
: `${(fp.totalSize / 1024).toFixed(1)}KB`;
|
|
1731
|
-
lines.push(`| ${isZh ? '总大小' : 'Total Size'} | ${sizeStr} |`);
|
|
1732
|
-
if (fp.entryPoints.length > 0) {
|
|
1733
|
-
lines.push(`| ${isZh ? '入口文件' : 'Entry Points'} | ${fp.entryPoints.join(', ')} |`);
|
|
1734
|
-
}
|
|
1735
|
-
lines.push('');
|
|
1736
|
-
|
|
1737
|
-
// ── README (如果有) ──
|
|
1738
|
-
if (fp.readme) {
|
|
1739
|
-
lines.push(`## ${isZh ? '目录说明' : 'Directory README'}`);
|
|
1740
|
-
lines.push('');
|
|
1741
|
-
lines.push(
|
|
1742
|
-
`> ${fp.readme
|
|
1743
|
-
.split('\n')
|
|
1744
|
-
.filter((l) => l.trim())
|
|
1745
|
-
.slice(0, 5)
|
|
1746
|
-
.join('\n> ')}`
|
|
1747
|
-
);
|
|
1748
|
-
lines.push('');
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
// ── 语言分布 ──
|
|
1752
|
-
lines.push(`## ${isZh ? '语言分布' : 'Language Distribution'}`);
|
|
1753
|
-
lines.push('');
|
|
1754
|
-
lines.push(
|
|
1755
|
-
`| ${isZh ? '语言' : 'Language'} | ${isZh ? '文件数' : 'Files'} | ${isZh ? '占比' : 'Share'} |`
|
|
1756
|
-
);
|
|
1757
|
-
lines.push('|--------|-------|------|');
|
|
1758
|
-
const total = Object.values(fp.langBreakdown).reduce((a, b) => a + b, 0);
|
|
1759
|
-
for (const [lang, count] of Object.entries(fp.langBreakdown).sort((a, b) => b[1] - a[1])) {
|
|
1760
|
-
const pct = total > 0 ? ((count / total) * 100).toFixed(0) : 0;
|
|
1761
|
-
lines.push(`| ${lang} | ${count} | ${pct}% |`);
|
|
1762
|
-
}
|
|
1763
|
-
lines.push('');
|
|
1764
|
-
|
|
1765
|
-
// ── 文件列表 (分类展示) ──
|
|
1766
|
-
lines.push(`## ${isZh ? '文件列表' : 'File Listing'}`);
|
|
1767
|
-
lines.push('');
|
|
1768
|
-
|
|
1769
|
-
// 按类别分: 入口文件 / 大文件 / 普通文件
|
|
1770
|
-
if (fp.entryPoints.length > 0) {
|
|
1771
|
-
lines.push(`### ${isZh ? '🎯 入口文件' : '🎯 Entry Points'}`);
|
|
1772
|
-
lines.push('');
|
|
1773
|
-
for (const ep of fp.entryPoints) {
|
|
1774
|
-
lines.push(`- \`${ep}\``);
|
|
1775
|
-
}
|
|
1776
|
-
lines.push('');
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
if (fp.keyFiles.length > 0) {
|
|
1780
|
-
lines.push(`### ${isZh ? '📌 关键文件' : '📌 Key Files'}`);
|
|
1781
|
-
lines.push('');
|
|
1782
|
-
lines.push(
|
|
1783
|
-
isZh
|
|
1784
|
-
? '以下文件体积最大或作为入口文件,可能包含核心逻辑:'
|
|
1785
|
-
: 'These files are the largest or serve as entry points, likely containing core logic:'
|
|
1786
|
-
);
|
|
1787
|
-
lines.push('');
|
|
1788
|
-
for (const kf of fp.keyFiles) {
|
|
1789
|
-
lines.push(`- \`${path.basename(kf)}\``);
|
|
1790
|
-
}
|
|
1791
|
-
lines.push('');
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
// 所有文件列表 (截断)
|
|
1795
|
-
const maxDisplay = 50;
|
|
1796
|
-
lines.push(`### ${isZh ? '全部文件' : 'All Files'} (${fp.fileNames.length})`);
|
|
1797
|
-
lines.push('');
|
|
1798
|
-
for (const fn of fp.fileNames.slice(0, maxDisplay)) {
|
|
1799
|
-
lines.push(`- \`${fn}\``);
|
|
1800
|
-
}
|
|
1801
|
-
if (fp.fileNames.length > maxDisplay) {
|
|
1802
|
-
lines.push(
|
|
1803
|
-
`- ... ${isZh ? `还有 ${fp.fileNames.length - maxDisplay} 个文件` : `and ${fp.fileNames.length - maxDisplay} more files`}`
|
|
1804
|
-
);
|
|
1805
|
-
}
|
|
1806
|
-
lines.push('');
|
|
1807
|
-
|
|
1808
|
-
// ── 命名约定 ──
|
|
1809
|
-
if (fp.namingPatterns.length > 0) {
|
|
1810
|
-
lines.push(`## ${isZh ? '命名约定' : 'Naming Conventions'}`);
|
|
1811
|
-
lines.push('');
|
|
1812
|
-
lines.push(
|
|
1813
|
-
isZh
|
|
1814
|
-
? '通过分析文件命名模式,检测到以下约定:'
|
|
1815
|
-
: 'Detected naming conventions from file name analysis:'
|
|
1816
|
-
);
|
|
1817
|
-
lines.push('');
|
|
1818
|
-
for (const p of fp.namingPatterns) {
|
|
1819
|
-
lines.push(`- **${p}**`);
|
|
1820
|
-
}
|
|
1821
|
-
lines.push('');
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
// ── 依赖关系 ──
|
|
1825
|
-
if (fp.imports.length > 0) {
|
|
1826
|
-
lines.push(`## ${isZh ? '依赖引用' : 'Dependencies'}`);
|
|
1827
|
-
lines.push('');
|
|
1828
|
-
lines.push(
|
|
1829
|
-
isZh
|
|
1830
|
-
? `通过分析 import/require 语句,\`${fp.name}\` 引用了以下模块/目录:`
|
|
1831
|
-
: `From import/require analysis, \`${fp.name}\` references the following modules/directories:`
|
|
1832
|
-
);
|
|
1833
|
-
lines.push('');
|
|
1834
|
-
for (const imp of fp.imports) {
|
|
1835
|
-
lines.push(`- \`${imp}\``);
|
|
1836
|
-
}
|
|
1837
|
-
lines.push('');
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
// ── 代码注释摘要 ──
|
|
1841
|
-
if (fp.headerComments.length > 0) {
|
|
1842
|
-
lines.push(`## ${isZh ? '代码注释摘要' : 'Code Comments Summary'}`);
|
|
1843
|
-
lines.push('');
|
|
1844
|
-
lines.push(
|
|
1845
|
-
isZh ? '从关键文件头部提取的注释信息:' : 'Comments extracted from key file headers:'
|
|
1846
|
-
);
|
|
1847
|
-
lines.push('');
|
|
1848
|
-
for (const hc of fp.headerComments) {
|
|
1849
|
-
lines.push(`- ${hc}`);
|
|
1850
|
-
}
|
|
1851
|
-
lines.push('');
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
lines.push(
|
|
1855
|
-
`[← ${isZh ? '返回结构分析' : 'Back to Structure Analysis'}](../folder-structure.md) | [← ${isZh ? '返回概述' : 'Back to Overview'}](../index.md)`
|
|
1856
|
-
);
|
|
1857
|
-
lines.push('');
|
|
1858
|
-
return lines.join('\n');
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
// ═══ V3 AI 系统 Prompt ═══════════════════════════════════
|
|
1862
|
-
|
|
1863
|
-
/**
|
|
1864
|
-
* 构建 AI 系统 Prompt (V3 — 撰写完整文章,非润色骨架)
|
|
1865
|
-
*/
|
|
1866
|
-
export function buildAiSystemPrompt(isZh) {
|
|
1867
|
-
if (isZh) {
|
|
1868
|
-
return [
|
|
1869
|
-
'你是 AutoSnippet Repo Wiki 文档撰写专家。',
|
|
1870
|
-
'',
|
|
1871
|
-
'任务: 基于代码分析数据,撰写高质量、有深度的项目文档。',
|
|
1872
|
-
'',
|
|
1873
|
-
'写作原则:',
|
|
1874
|
-
'1. 所有类名、文件名、数字必须来自提供的数据,严禁编造',
|
|
1875
|
-
'2. 不要简单罗列数据 — 要分析和解释,描述"为什么这样设计"、"模块的职责是什么"',
|
|
1876
|
-
'3. 从文件名和类名推断功能意图,给出有见地的分析',
|
|
1877
|
-
'4. 用自然语言连贯行文,包含过渡段落和总结性描述',
|
|
1878
|
-
'5. 合理使用 Mermaid 图表(graph TD / classDiagram)、表格、代码块来辅助说明',
|
|
1879
|
-
'6. 用中文撰写',
|
|
1880
|
-
'7. 输出纯 Markdown,不要包裹在代码块中',
|
|
1881
|
-
'8. 每篇文章以一级标题 (#) 开始,结构清晰',
|
|
1882
|
-
'9. 篇幅适中:300-2000 字(根据主题复杂度调整)',
|
|
1883
|
-
'10. 文末包含返回链接: [← 返回概述](index.md) 或 [← 返回概述](../index.md)',
|
|
1884
|
-
].join('\n');
|
|
1885
|
-
}
|
|
1886
|
-
return [
|
|
1887
|
-
'You are the AutoSnippet Repo Wiki documentation expert.',
|
|
1888
|
-
'',
|
|
1889
|
-
'Task: Write high-quality, insightful project documentation based on code analysis data.',
|
|
1890
|
-
'',
|
|
1891
|
-
'Writing principles:',
|
|
1892
|
-
'1. All class names, file names, and numbers must come from the provided data — never fabricate',
|
|
1893
|
-
'2. Do not simply list data — analyze and explain: describe design rationale, module responsibilities',
|
|
1894
|
-
'3. Infer functional intent from file names and class names, provide insightful analysis',
|
|
1895
|
-
'4. Write coherent prose with transition paragraphs and summaries',
|
|
1896
|
-
'5. Use Mermaid diagrams (graph TD / classDiagram), tables, and code blocks judiciously',
|
|
1897
|
-
'6. Write in English',
|
|
1898
|
-
'7. Output pure Markdown — do not wrap in code blocks',
|
|
1899
|
-
'8. Start each article with a level-1 heading (#), maintain clear structure',
|
|
1900
|
-
'9. Appropriate length: 300-2000 words (adjust by topic complexity)',
|
|
1901
|
-
'10. End with a back link: [← Back to Overview](index.md) or [← Back to Overview](../index.md)',
|
|
1902
|
-
].join('\n');
|
|
1903
|
-
}
|