@tonycasey/lisa 2.25.4 → 2.27.0
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/dist/lib/application/handlers/PromptSubmitHandler.d.ts.map +1 -1
- package/dist/lib/application/handlers/PromptSubmitHandler.js +2 -2
- package/dist/lib/application/handlers/PromptSubmitHandler.js.map +1 -1
- package/dist/lib/application/handlers/SessionStartHandler.d.ts +8 -24
- package/dist/lib/application/handlers/SessionStartHandler.d.ts.map +1 -1
- package/dist/lib/application/handlers/SessionStartHandler.js +43 -31
- package/dist/lib/application/handlers/SessionStartHandler.js.map +1 -1
- package/dist/lib/application/handlers/SessionStopHandler.d.ts.map +1 -1
- package/dist/lib/application/handlers/SessionStopHandler.js +2 -3
- package/dist/lib/application/handlers/SessionStopHandler.js.map +1 -1
- package/dist/lib/application/handlers/pr/PrPollHandler.d.ts +1 -2
- package/dist/lib/application/handlers/pr/PrPollHandler.d.ts.map +1 -1
- package/dist/lib/application/handlers/pr/PrPollHandler.js +3 -4
- package/dist/lib/application/handlers/pr/PrPollHandler.js.map +1 -1
- package/dist/lib/application/handlers/pr/PrRememberHandler.d.ts +1 -2
- package/dist/lib/application/handlers/pr/PrRememberHandler.d.ts.map +1 -1
- package/dist/lib/application/handlers/pr/PrRememberHandler.js +2 -3
- package/dist/lib/application/handlers/pr/PrRememberHandler.js.map +1 -1
- package/dist/lib/application/services/GitExtractorService.d.ts +22 -0
- package/dist/lib/application/services/GitExtractorService.d.ts.map +1 -0
- package/dist/lib/application/services/GitExtractorService.js +232 -0
- package/dist/lib/application/services/GitExtractorService.js.map +1 -0
- package/dist/lib/application/services/GitIndexingService.d.ts +25 -0
- package/dist/lib/application/services/GitIndexingService.d.ts.map +1 -0
- package/dist/lib/application/services/GitIndexingService.js +175 -0
- package/dist/lib/application/services/GitIndexingService.js.map +1 -0
- package/dist/lib/application/services/GitTriageService.d.ts +45 -0
- package/dist/lib/application/services/GitTriageService.d.ts.map +1 -0
- package/dist/lib/application/services/GitTriageService.js +360 -0
- package/dist/lib/application/services/GitTriageService.js.map +1 -0
- package/dist/lib/application/services/MemoryContextLoader.d.ts +7 -16
- package/dist/lib/application/services/MemoryContextLoader.d.ts.map +1 -1
- package/dist/lib/application/services/MemoryContextLoader.js +12 -75
- package/dist/lib/application/services/MemoryContextLoader.js.map +1 -1
- package/dist/lib/application/services/RepoProfileService.d.ts +37 -0
- package/dist/lib/application/services/RepoProfileService.d.ts.map +1 -0
- package/dist/lib/application/services/RepoProfileService.js +388 -0
- package/dist/lib/application/services/RepoProfileService.js.map +1 -0
- package/dist/lib/application/services/SessionContextFormatter.d.ts +11 -1
- package/dist/lib/application/services/SessionContextFormatter.d.ts.map +1 -1
- package/dist/lib/application/services/SessionContextFormatter.js +59 -3
- package/dist/lib/application/services/SessionContextFormatter.js.map +1 -1
- package/dist/lib/application/services/index.d.ts +2 -0
- package/dist/lib/application/services/index.d.ts.map +1 -1
- package/dist/lib/application/services/index.js +7 -1
- package/dist/lib/application/services/index.js.map +1 -1
- package/dist/lib/cli.d.ts +2 -2
- package/dist/lib/cli.d.ts.map +1 -1
- package/dist/lib/cli.js +4 -52
- package/dist/lib/cli.js.map +1 -1
- package/dist/lib/commands/doctor.d.ts +5 -12
- package/dist/lib/commands/doctor.d.ts.map +1 -1
- package/dist/lib/commands/doctor.js +60 -280
- package/dist/lib/commands/doctor.js.map +1 -1
- package/dist/lib/commands/index.d.ts +2 -3
- package/dist/lib/commands/index.d.ts.map +1 -1
- package/dist/lib/commands/index.js +2 -7
- package/dist/lib/commands/index.js.map +1 -1
- package/dist/lib/commands/init.d.ts +2 -8
- package/dist/lib/commands/init.d.ts.map +1 -1
- package/dist/lib/commands/init.js +13 -67
- package/dist/lib/commands/init.js.map +1 -1
- package/dist/lib/commands/knowledge.d.ts.map +1 -1
- package/dist/lib/commands/knowledge.js +1 -2
- package/dist/lib/commands/knowledge.js.map +1 -1
- package/dist/lib/commands/pr.d.ts.map +1 -1
- package/dist/lib/commands/pr.js +20 -21
- package/dist/lib/commands/pr.js.map +1 -1
- package/dist/lib/commands/shared/constants.d.ts +1 -15
- package/dist/lib/commands/shared/constants.d.ts.map +1 -1
- package/dist/lib/commands/shared/constants.js +2 -5
- package/dist/lib/commands/shared/constants.js.map +1 -1
- package/dist/lib/commands/shared/index.d.ts +1 -1
- package/dist/lib/commands/shared/index.d.ts.map +1 -1
- package/dist/lib/commands/shared/index.js +1 -3
- package/dist/lib/commands/shared/index.js.map +1 -1
- package/dist/lib/commands/skills.d.ts +1 -1
- package/dist/lib/commands/skills.js +5 -5
- package/dist/lib/commands/skills.js.map +1 -1
- package/dist/lib/domain/interfaces/ICommitEnricher.d.ts +81 -0
- package/dist/lib/domain/interfaces/ICommitEnricher.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ICommitEnricher.js +33 -0
- package/dist/lib/domain/interfaces/ICommitEnricher.js.map +1 -0
- package/dist/lib/domain/interfaces/IConsolidationService.d.ts +3 -2
- package/dist/lib/domain/interfaces/IConsolidationService.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/ICurationService.d.ts +3 -2
- package/dist/lib/domain/interfaces/ICurationService.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/IFileSystem.d.ts +28 -0
- package/dist/lib/domain/interfaces/IFileSystem.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IFileSystem.js +12 -0
- package/dist/lib/domain/interfaces/IFileSystem.js.map +1 -0
- package/dist/lib/domain/interfaces/IGitClient.d.ts +86 -0
- package/dist/lib/domain/interfaces/IGitClient.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/IGitExtractor.d.ts +160 -0
- package/dist/lib/domain/interfaces/IGitExtractor.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IGitExtractor.js +37 -0
- package/dist/lib/domain/interfaces/IGitExtractor.js.map +1 -0
- package/dist/lib/domain/interfaces/IGitIndexingService.d.ts +69 -0
- package/dist/lib/domain/interfaces/IGitIndexingService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IGitIndexingService.js +43 -0
- package/dist/lib/domain/interfaces/IGitIndexingService.js.map +1 -0
- package/dist/lib/domain/interfaces/IGitMemClient.d.ts +44 -0
- package/dist/lib/domain/interfaces/IGitMemClient.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IGitMemClient.js +9 -0
- package/dist/lib/domain/interfaces/IGitMemClient.js.map +1 -0
- package/dist/lib/domain/interfaces/IGitTriageService.d.ts +180 -0
- package/dist/lib/domain/interfaces/IGitTriageService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IGitTriageService.js +12 -0
- package/dist/lib/domain/interfaces/IGitTriageService.js.map +1 -0
- package/dist/lib/domain/interfaces/ILisaServices.d.ts +0 -9
- package/dist/lib/domain/interfaces/ILisaServices.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/IMemoryService.d.ts +14 -89
- package/dist/lib/domain/interfaces/IMemoryService.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/INlCurationService.d.ts +4 -4
- package/dist/lib/domain/interfaces/INlCurationService.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/IRecursionService.d.ts +3 -2
- package/dist/lib/domain/interfaces/IRecursionService.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/IRepoProfileService.d.ts +132 -0
- package/dist/lib/domain/interfaces/IRepoProfileService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IRepoProfileService.js +25 -0
- package/dist/lib/domain/interfaces/IRepoProfileService.js.map +1 -0
- package/dist/lib/domain/interfaces/ISummarizationService.d.ts +4 -3
- package/dist/lib/domain/interfaces/ISummarizationService.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/ITaskService.d.ts +11 -16
- package/dist/lib/domain/interfaces/ITaskService.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/dal/IMemoryRepository.d.ts +0 -1
- package/dist/lib/domain/interfaces/dal/IMemoryRepository.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/dal/IRepositoryRouter.d.ts +1 -1
- package/dist/lib/domain/interfaces/dal/IRepositoryRouter.js +2 -2
- package/dist/lib/domain/interfaces/dal/IRepositoryRouter.js.map +1 -1
- package/dist/lib/domain/interfaces/events/IMemoryEvent.d.ts +6 -4
- package/dist/lib/domain/interfaces/events/IMemoryEvent.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/events/IMemoryEvent.js +2 -4
- package/dist/lib/domain/interfaces/events/IMemoryEvent.js.map +1 -1
- package/dist/lib/domain/interfaces/index.d.ts +9 -3
- package/dist/lib/domain/interfaces/index.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/index.js +13 -1
- package/dist/lib/domain/interfaces/index.js.map +1 -1
- package/dist/lib/infrastructure/adapters/claude/session-start.d.ts +1 -0
- package/dist/lib/infrastructure/adapters/claude/session-start.d.ts.map +1 -1
- package/dist/lib/infrastructure/adapters/claude/session-start.js +18 -4
- package/dist/lib/infrastructure/adapters/claude/session-start.js.map +1 -1
- package/dist/lib/infrastructure/adapters/gitmem/GitMemAdapter.d.ts +22 -0
- package/dist/lib/infrastructure/adapters/gitmem/GitMemAdapter.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/gitmem/GitMemAdapter.js +88 -0
- package/dist/lib/infrastructure/adapters/gitmem/GitMemAdapter.js.map +1 -0
- package/dist/lib/infrastructure/adapters/gitmem/GitMemTaskAdapter.d.ts +19 -0
- package/dist/lib/infrastructure/adapters/gitmem/GitMemTaskAdapter.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/gitmem/GitMemTaskAdapter.js +109 -0
- package/dist/lib/infrastructure/adapters/gitmem/GitMemTaskAdapter.js.map +1 -0
- package/dist/lib/infrastructure/adapters/gitmem/index.d.ts +3 -0
- package/dist/lib/infrastructure/adapters/gitmem/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/gitmem/index.js +8 -0
- package/dist/lib/infrastructure/adapters/gitmem/index.js.map +1 -0
- package/dist/lib/infrastructure/dal/connections/index.d.ts +0 -4
- package/dist/lib/infrastructure/dal/connections/index.d.ts.map +1 -1
- package/dist/lib/infrastructure/dal/connections/index.js +2 -10
- package/dist/lib/infrastructure/dal/connections/index.js.map +1 -1
- package/dist/lib/infrastructure/dal/index.d.ts +4 -22
- package/dist/lib/infrastructure/dal/index.d.ts.map +1 -1
- package/dist/lib/infrastructure/dal/index.js +3 -37
- package/dist/lib/infrastructure/dal/index.js.map +1 -1
- package/dist/lib/infrastructure/dal/repositories/index.d.ts +1 -3
- package/dist/lib/infrastructure/dal/repositories/index.d.ts.map +1 -1
- package/dist/lib/infrastructure/dal/repositories/index.js +2 -12
- package/dist/lib/infrastructure/dal/repositories/index.js.map +1 -1
- package/dist/lib/infrastructure/dal/repositories/neo4j/index.d.ts +0 -2
- package/dist/lib/infrastructure/dal/repositories/neo4j/index.d.ts.map +1 -1
- package/dist/lib/infrastructure/dal/repositories/neo4j/index.js +2 -6
- package/dist/lib/infrastructure/dal/repositories/neo4j/index.js.map +1 -1
- package/dist/lib/infrastructure/di/ServiceFactory.d.ts +2 -9
- package/dist/lib/infrastructure/di/ServiceFactory.d.ts.map +1 -1
- package/dist/lib/infrastructure/di/bootstrap.d.ts +3 -1
- package/dist/lib/infrastructure/di/bootstrap.d.ts.map +1 -1
- package/dist/lib/infrastructure/di/bootstrap.js +29 -131
- package/dist/lib/infrastructure/di/bootstrap.js.map +1 -1
- package/dist/lib/infrastructure/di/tokens.d.ts +0 -20
- package/dist/lib/infrastructure/di/tokens.d.ts.map +1 -1
- package/dist/lib/infrastructure/di/tokens.js +0 -11
- package/dist/lib/infrastructure/di/tokens.js.map +1 -1
- package/dist/lib/infrastructure/git/GitClient.d.ts +11 -1
- package/dist/lib/infrastructure/git/GitClient.d.ts.map +1 -1
- package/dist/lib/infrastructure/git/GitClient.js +137 -0
- package/dist/lib/infrastructure/git/GitClient.js.map +1 -1
- package/dist/lib/infrastructure/git-mem/GitMemClient.d.ts +37 -0
- package/dist/lib/infrastructure/git-mem/GitMemClient.d.ts.map +1 -0
- package/dist/lib/infrastructure/git-mem/GitMemClient.js +151 -0
- package/dist/lib/infrastructure/git-mem/GitMemClient.js.map +1 -0
- package/dist/lib/infrastructure/git-mem/GitMemFactory.d.ts +36 -0
- package/dist/lib/infrastructure/git-mem/GitMemFactory.d.ts.map +1 -0
- package/dist/lib/infrastructure/git-mem/GitMemFactory.js +56 -0
- package/dist/lib/infrastructure/git-mem/GitMemFactory.js.map +1 -0
- package/dist/lib/infrastructure/git-mem/index.d.ts +7 -0
- package/dist/lib/infrastructure/git-mem/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/git-mem/index.js +13 -0
- package/dist/lib/infrastructure/git-mem/index.js.map +1 -0
- package/dist/lib/infrastructure/git-mem/types.d.ts +90 -0
- package/dist/lib/infrastructure/git-mem/types.d.ts.map +1 -0
- package/dist/lib/infrastructure/git-mem/types.js +9 -0
- package/dist/lib/infrastructure/git-mem/types.js.map +1 -0
- package/dist/lib/infrastructure/github/GitHubDataFetcher.d.ts +21 -0
- package/dist/lib/infrastructure/github/GitHubDataFetcher.d.ts.map +1 -0
- package/dist/lib/infrastructure/github/GitHubDataFetcher.js +111 -0
- package/dist/lib/infrastructure/github/GitHubDataFetcher.js.map +1 -0
- package/dist/lib/infrastructure/index.d.ts +0 -1
- package/dist/lib/infrastructure/index.d.ts.map +1 -1
- package/dist/lib/infrastructure/index.js +1 -3
- package/dist/lib/infrastructure/index.js.map +1 -1
- package/dist/lib/infrastructure/logging/Logger.d.ts +13 -1
- package/dist/lib/infrastructure/logging/Logger.d.ts.map +1 -1
- package/dist/lib/infrastructure/logging/Logger.js +25 -7
- package/dist/lib/infrastructure/logging/Logger.js.map +1 -1
- package/dist/lib/infrastructure/logging/factory.d.ts +5 -1
- package/dist/lib/infrastructure/logging/factory.d.ts.map +1 -1
- package/dist/lib/infrastructure/logging/factory.js +3 -0
- package/dist/lib/infrastructure/logging/factory.js.map +1 -1
- package/dist/lib/infrastructure/logging/index.d.ts +1 -1
- package/dist/lib/infrastructure/logging/index.d.ts.map +1 -1
- package/dist/lib/infrastructure/logging/index.js.map +1 -1
- package/dist/lib/infrastructure/services/CommitEnricher.d.ts +26 -0
- package/dist/lib/infrastructure/services/CommitEnricher.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/CommitEnricher.js +214 -0
- package/dist/lib/infrastructure/services/CommitEnricher.js.map +1 -0
- package/dist/lib/infrastructure/services/CurationService.d.ts.map +1 -1
- package/dist/lib/infrastructure/services/CurationService.js +4 -4
- package/dist/lib/infrastructure/services/CurationService.js.map +1 -1
- package/dist/lib/infrastructure/services/GitMemMemoryService.d.ts +24 -0
- package/dist/lib/infrastructure/services/GitMemMemoryService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/GitMemMemoryService.js +114 -0
- package/dist/lib/infrastructure/services/GitMemMemoryService.js.map +1 -0
- package/dist/lib/infrastructure/services/GitMemTaskService.d.ts +24 -0
- package/dist/lib/infrastructure/services/GitMemTaskService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/GitMemTaskService.js +142 -0
- package/dist/lib/infrastructure/services/GitMemTaskService.js.map +1 -0
- package/dist/lib/infrastructure/services/LlmGuard.d.ts.map +1 -1
- package/dist/lib/infrastructure/services/LlmGuard.js +44 -13
- package/dist/lib/infrastructure/services/LlmGuard.js.map +1 -1
- package/dist/lib/infrastructure/services/NlCurationService.d.ts.map +1 -1
- package/dist/lib/infrastructure/services/NlCurationService.js +12 -12
- package/dist/lib/infrastructure/services/NlCurationService.js.map +1 -1
- package/dist/lib/infrastructure/services/NodeFileSystem.d.ts +12 -0
- package/dist/lib/infrastructure/services/NodeFileSystem.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/NodeFileSystem.js +40 -0
- package/dist/lib/infrastructure/services/NodeFileSystem.js.map +1 -0
- package/dist/lib/infrastructure/services/RecursionService.d.ts +1 -1
- package/dist/lib/infrastructure/services/RecursionService.d.ts.map +1 -1
- package/dist/lib/infrastructure/services/RecursionService.js +8 -8
- package/dist/lib/infrastructure/services/RecursionService.js.map +1 -1
- package/dist/lib/infrastructure/services/SkillMemoryService.d.ts +26 -0
- package/dist/lib/infrastructure/services/SkillMemoryService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/SkillMemoryService.js +317 -0
- package/dist/lib/infrastructure/services/SkillMemoryService.js.map +1 -0
- package/dist/lib/infrastructure/services/SkillPromptService.d.ts +16 -0
- package/dist/lib/infrastructure/services/SkillPromptService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/SkillPromptService.js +53 -0
- package/dist/lib/infrastructure/services/SkillPromptService.js.map +1 -0
- package/dist/lib/infrastructure/services/SkillTaskService.d.ts +32 -0
- package/dist/lib/infrastructure/services/SkillTaskService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/SkillTaskService.js +214 -0
- package/dist/lib/infrastructure/services/SkillTaskService.js.map +1 -0
- package/dist/lib/infrastructure/services/SummarizationService.d.ts.map +1 -1
- package/dist/lib/infrastructure/services/SummarizationService.js +3 -5
- package/dist/lib/infrastructure/services/SummarizationService.js.map +1 -1
- package/dist/lib/infrastructure/services/index.d.ts +7 -4
- package/dist/lib/infrastructure/services/index.d.ts.map +1 -1
- package/dist/lib/infrastructure/services/index.js +31 -13
- package/dist/lib/infrastructure/services/index.js.map +1 -1
- package/dist/lib/infrastructure/services/patterns/HeuristicPatterns.d.ts +72 -0
- package/dist/lib/infrastructure/services/patterns/HeuristicPatterns.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/patterns/HeuristicPatterns.js +261 -0
- package/dist/lib/infrastructure/services/patterns/HeuristicPatterns.js.map +1 -0
- package/dist/lib/infrastructure/services/prompts/commit-extraction.d.ts +26 -0
- package/dist/lib/infrastructure/services/prompts/commit-extraction.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/prompts/commit-extraction.js +151 -0
- package/dist/lib/infrastructure/services/prompts/commit-extraction.js.map +1 -0
- package/dist/lib/{skills/shared/services/interfaces/IMemoryService.d.ts → infrastructure/services/skill-interfaces/ISkillMemoryService.d.ts} +38 -47
- package/dist/lib/infrastructure/services/skill-interfaces/ISkillMemoryService.d.ts.map +1 -0
- package/dist/lib/{domain/interfaces/IMcpClient.js → infrastructure/services/skill-interfaces/ISkillMemoryService.js} +1 -1
- package/dist/lib/infrastructure/services/skill-interfaces/ISkillMemoryService.js.map +1 -0
- package/dist/lib/infrastructure/services/skill-interfaces/ISkillPromptService.d.ts +48 -0
- package/dist/lib/infrastructure/services/skill-interfaces/ISkillPromptService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/skill-interfaces/ISkillPromptService.js +10 -0
- package/dist/lib/infrastructure/services/skill-interfaces/ISkillPromptService.js.map +1 -0
- package/dist/lib/{skills/shared/services/interfaces/ITaskService.d.ts → infrastructure/services/skill-interfaces/ISkillTaskService.d.ts} +29 -27
- package/dist/lib/infrastructure/services/skill-interfaces/ISkillTaskService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/skill-interfaces/ISkillTaskService.js +13 -0
- package/dist/lib/infrastructure/services/skill-interfaces/ISkillTaskService.js.map +1 -0
- package/dist/lib/infrastructure/services/skill-interfaces/index.d.ts +16 -0
- package/dist/lib/infrastructure/services/skill-interfaces/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/skill-interfaces/index.js +11 -0
- package/dist/lib/infrastructure/services/skill-interfaces/index.js.map +1 -0
- package/dist/lib/scanner/reviewer.js +2 -2
- package/dist/lib/scanner/reviewer.js.map +1 -1
- package/dist/lib/skills/github/bump-version.d.ts +14 -0
- package/dist/lib/skills/github/bump-version.d.ts.map +1 -0
- package/dist/lib/skills/{git → github}/bump-version.js +22 -1
- package/dist/lib/skills/github/bump-version.js.map +1 -0
- package/dist/lib/skills/github/github.d.ts +0 -1
- package/dist/lib/skills/github/github.d.ts.map +1 -1
- package/dist/lib/skills/github/github.js +15 -45
- package/dist/lib/skills/github/github.js.map +1 -1
- package/dist/lib/skills/memory/memory.js +5 -9
- package/dist/lib/skills/memory/memory.js.map +1 -1
- package/dist/lib/skills/prompt/prompt.d.ts +4 -1
- package/dist/lib/skills/prompt/prompt.d.ts.map +1 -1
- package/dist/lib/skills/prompt/prompt.js +10 -11
- package/dist/lib/skills/prompt/prompt.js.map +1 -1
- package/dist/lib/skills/{init-review → review}/ai-enrich.d.ts +3 -0
- package/dist/lib/skills/review/ai-enrich.d.ts.map +1 -0
- package/dist/lib/skills/{init-review → review}/ai-enrich.js +6 -6
- package/dist/lib/skills/review/ai-enrich.js.map +1 -0
- package/dist/lib/skills/review/init-review.d.ts.map +1 -0
- package/dist/lib/skills/review/init-review.js.map +1 -0
- package/dist/lib/skills/shared/clients/index.d.ts +4 -3
- package/dist/lib/skills/shared/clients/index.d.ts.map +1 -1
- package/dist/lib/skills/shared/clients/index.js +7 -10
- package/dist/lib/skills/shared/clients/index.js.map +1 -1
- package/dist/lib/skills/shared/clients/interfaces/index.d.ts +0 -3
- package/dist/lib/skills/shared/clients/interfaces/index.d.ts.map +1 -1
- package/dist/lib/skills/shared/clients/interfaces/index.js +0 -3
- package/dist/lib/skills/shared/clients/interfaces/index.js.map +1 -1
- package/dist/lib/skills/shared/index.d.ts +3 -2
- package/dist/lib/skills/shared/index.d.ts.map +1 -1
- package/dist/lib/skills/shared/index.js +3 -2
- package/dist/lib/skills/shared/index.js.map +1 -1
- package/dist/lib/skills/shared/services/GitHubSyncService.d.ts +4 -0
- package/dist/lib/skills/shared/services/GitHubSyncService.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/GitHubSyncService.js +7 -7
- package/dist/lib/skills/shared/services/GitHubSyncService.js.map +1 -1
- package/dist/lib/skills/shared/services/MemoryCliService.d.ts +0 -2
- package/dist/lib/skills/shared/services/MemoryCliService.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/MemoryCliService.js +11 -17
- package/dist/lib/skills/shared/services/MemoryCliService.js.map +1 -1
- package/dist/lib/skills/shared/services/StorageService.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/StorageService.js +6 -2
- package/dist/lib/skills/shared/services/StorageService.js.map +1 -1
- package/dist/lib/skills/shared/services/TaskCliService.d.ts +3 -3
- package/dist/lib/skills/shared/services/TaskCliService.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/TaskCliService.js +10 -14
- package/dist/lib/skills/shared/services/TaskCliService.js.map +1 -1
- package/dist/lib/skills/shared/services/index.d.ts +8 -4
- package/dist/lib/skills/shared/services/index.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/index.js +15 -10
- package/dist/lib/skills/shared/services/index.js.map +1 -1
- package/dist/lib/skills/shared/services/interfaces/index.d.ts +4 -2
- package/dist/lib/skills/shared/services/interfaces/index.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/interfaces/index.js +4 -2
- package/dist/lib/skills/shared/services/interfaces/index.js.map +1 -1
- package/dist/lib/skills/shared/utils/index.d.ts +0 -1
- package/dist/lib/skills/shared/utils/index.d.ts.map +1 -1
- package/dist/lib/skills/shared/utils/index.js +1 -9
- package/dist/lib/skills/shared/utils/index.js.map +1 -1
- package/dist/lib/skills/tasks/tasks.d.ts +9 -6
- package/dist/lib/skills/tasks/tasks.d.ts.map +1 -1
- package/dist/lib/skills/tasks/tasks.js +17 -17
- package/dist/lib/skills/tasks/tasks.js.map +1 -1
- package/dist/opencode/lisa.js +62391 -14984
- package/dist/package.json +5 -4
- package/dist/project/.lisa/.env.template +12 -9
- package/dist/project/.lisa/rules/shared/git-rules.md +13 -12
- package/dist/project/.lisa/skills/github/SKILL.md +121 -3
- package/dist/project/.lisa/skills/github/pr-description-template.txt +8 -0
- package/dist/project/.lisa/skills/pr/SKILL.md +1 -2
- package/dist/project/.lisa/skills/pr/pr-description-template.txt +8 -0
- package/dist/project/.lisa/skills/{init-review → review}/SKILL.md +9 -9
- package/package.json +5 -4
- package/dist/lib/commands/docker.d.ts +0 -20
- package/dist/lib/commands/docker.d.ts.map +0 -1
- package/dist/lib/commands/docker.js +0 -27
- package/dist/lib/commands/docker.js.map +0 -1
- package/dist/lib/domain/interfaces/IMcpClient.d.ts +0 -44
- package/dist/lib/domain/interfaces/IMcpClient.d.ts.map +0 -1
- package/dist/lib/domain/interfaces/IMcpClient.js.map +0 -1
- package/dist/lib/infrastructure/dal/RepositoryFactory.d.ts +0 -71
- package/dist/lib/infrastructure/dal/RepositoryFactory.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/RepositoryFactory.js +0 -134
- package/dist/lib/infrastructure/dal/RepositoryFactory.js.map +0 -1
- package/dist/lib/infrastructure/dal/connections/McpConnectionManager.d.ts +0 -56
- package/dist/lib/infrastructure/dal/connections/McpConnectionManager.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/connections/McpConnectionManager.js +0 -98
- package/dist/lib/infrastructure/dal/connections/McpConnectionManager.js.map +0 -1
- package/dist/lib/infrastructure/dal/connections/ZepConnectionManager.d.ts +0 -53
- package/dist/lib/infrastructure/dal/connections/ZepConnectionManager.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/connections/ZepConnectionManager.js +0 -168
- package/dist/lib/infrastructure/dal/connections/ZepConnectionManager.js.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.d.ts +0 -64
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.js +0 -145
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.js.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/mcp/McpTaskRepository.d.ts +0 -60
- package/dist/lib/infrastructure/dal/repositories/mcp/McpTaskRepository.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/mcp/McpTaskRepository.js +0 -186
- package/dist/lib/infrastructure/dal/repositories/mcp/McpTaskRepository.js.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/mcp/index.d.ts +0 -6
- package/dist/lib/infrastructure/dal/repositories/mcp/index.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/mcp/index.js +0 -11
- package/dist/lib/infrastructure/dal/repositories/mcp/index.js.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.d.ts +0 -69
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.js +0 -299
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.js.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jTaskRepository.d.ts +0 -49
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jTaskRepository.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jTaskRepository.js +0 -193
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jTaskRepository.js.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/zep/ZepMemoryRepository.d.ts +0 -55
- package/dist/lib/infrastructure/dal/repositories/zep/ZepMemoryRepository.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/zep/ZepMemoryRepository.js +0 -165
- package/dist/lib/infrastructure/dal/repositories/zep/ZepMemoryRepository.js.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/zep/ZepTaskRepository.d.ts +0 -58
- package/dist/lib/infrastructure/dal/repositories/zep/ZepTaskRepository.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/zep/ZepTaskRepository.js +0 -210
- package/dist/lib/infrastructure/dal/repositories/zep/ZepTaskRepository.js.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/zep/index.d.ts +0 -6
- package/dist/lib/infrastructure/dal/repositories/zep/index.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/repositories/zep/index.js +0 -11
- package/dist/lib/infrastructure/dal/repositories/zep/index.js.map +0 -1
- package/dist/lib/infrastructure/dal/routing/RepositoryRouter.d.ts +0 -73
- package/dist/lib/infrastructure/dal/routing/RepositoryRouter.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/routing/RepositoryRouter.js +0 -170
- package/dist/lib/infrastructure/dal/routing/RepositoryRouter.js.map +0 -1
- package/dist/lib/infrastructure/dal/routing/index.d.ts +0 -5
- package/dist/lib/infrastructure/dal/routing/index.d.ts.map +0 -1
- package/dist/lib/infrastructure/dal/routing/index.js +0 -10
- package/dist/lib/infrastructure/dal/routing/index.js.map +0 -1
- package/dist/lib/infrastructure/mcp/McpClient.d.ts +0 -71
- package/dist/lib/infrastructure/mcp/McpClient.d.ts.map +0 -1
- package/dist/lib/infrastructure/mcp/McpClient.js +0 -221
- package/dist/lib/infrastructure/mcp/McpClient.js.map +0 -1
- package/dist/lib/infrastructure/mcp/index.d.ts +0 -5
- package/dist/lib/infrastructure/mcp/index.d.ts.map +0 -1
- package/dist/lib/infrastructure/mcp/index.js +0 -9
- package/dist/lib/infrastructure/mcp/index.js.map +0 -1
- package/dist/lib/infrastructure/services/ConsolidationService.d.ts +0 -21
- package/dist/lib/infrastructure/services/ConsolidationService.d.ts.map +0 -1
- package/dist/lib/infrastructure/services/ConsolidationService.js +0 -134
- package/dist/lib/infrastructure/services/ConsolidationService.js.map +0 -1
- package/dist/lib/infrastructure/services/DeduplicationService.d.ts +0 -21
- package/dist/lib/infrastructure/services/DeduplicationService.d.ts.map +0 -1
- package/dist/lib/infrastructure/services/DeduplicationService.js +0 -111
- package/dist/lib/infrastructure/services/DeduplicationService.js.map +0 -1
- package/dist/lib/infrastructure/services/MemoryService.d.ts +0 -96
- package/dist/lib/infrastructure/services/MemoryService.d.ts.map +0 -1
- package/dist/lib/infrastructure/services/MemoryService.js +0 -486
- package/dist/lib/infrastructure/services/MemoryService.js.map +0 -1
- package/dist/lib/infrastructure/services/TaskService.d.ts +0 -38
- package/dist/lib/infrastructure/services/TaskService.d.ts.map +0 -1
- package/dist/lib/infrastructure/services/TaskService.js +0 -227
- package/dist/lib/infrastructure/services/TaskService.js.map +0 -1
- package/dist/lib/skills/common/group-id.d.ts +0 -49
- package/dist/lib/skills/common/group-id.d.ts.map +0 -1
- package/dist/lib/skills/common/group-id.js +0 -194
- package/dist/lib/skills/common/group-id.js.map +0 -1
- package/dist/lib/skills/git/bump-version.d.ts +0 -9
- package/dist/lib/skills/git/bump-version.d.ts.map +0 -1
- package/dist/lib/skills/git/bump-version.js.map +0 -1
- package/dist/lib/skills/init-review/ai-enrich.d.ts.map +0 -1
- package/dist/lib/skills/init-review/ai-enrich.js.map +0 -1
- package/dist/lib/skills/init-review/init-review.d.ts.map +0 -1
- package/dist/lib/skills/init-review/init-review.js.map +0 -1
- package/dist/lib/skills/shared/clients/McpClient.d.ts +0 -26
- package/dist/lib/skills/shared/clients/McpClient.d.ts.map +0 -1
- package/dist/lib/skills/shared/clients/McpClient.js +0 -162
- package/dist/lib/skills/shared/clients/McpClient.js.map +0 -1
- package/dist/lib/skills/shared/clients/Neo4jClient.d.ts +0 -15
- package/dist/lib/skills/shared/clients/Neo4jClient.d.ts.map +0 -1
- package/dist/lib/skills/shared/clients/Neo4jClient.js +0 -139
- package/dist/lib/skills/shared/clients/Neo4jClient.js.map +0 -1
- package/dist/lib/skills/shared/clients/ZepClient.d.ts +0 -14
- package/dist/lib/skills/shared/clients/ZepClient.d.ts.map +0 -1
- package/dist/lib/skills/shared/clients/ZepClient.js +0 -238
- package/dist/lib/skills/shared/clients/ZepClient.js.map +0 -1
- package/dist/lib/skills/shared/clients/interfaces/IMcpClient.d.ts +0 -56
- package/dist/lib/skills/shared/clients/interfaces/IMcpClient.d.ts.map +0 -1
- package/dist/lib/skills/shared/clients/interfaces/IMcpClient.js +0 -3
- package/dist/lib/skills/shared/clients/interfaces/IMcpClient.js.map +0 -1
- package/dist/lib/skills/shared/clients/interfaces/INeo4jClient.d.ts +0 -59
- package/dist/lib/skills/shared/clients/interfaces/INeo4jClient.d.ts.map +0 -1
- package/dist/lib/skills/shared/clients/interfaces/INeo4jClient.js +0 -3
- package/dist/lib/skills/shared/clients/interfaces/INeo4jClient.js.map +0 -1
- package/dist/lib/skills/shared/clients/interfaces/IZepClient.d.ts +0 -152
- package/dist/lib/skills/shared/clients/interfaces/IZepClient.d.ts.map +0 -1
- package/dist/lib/skills/shared/clients/interfaces/IZepClient.js +0 -3
- package/dist/lib/skills/shared/clients/interfaces/IZepClient.js.map +0 -1
- package/dist/lib/skills/shared/group-id.d.ts +0 -2
- package/dist/lib/skills/shared/group-id.d.ts.map +0 -1
- package/dist/lib/skills/shared/group-id.js +0 -18
- package/dist/lib/skills/shared/group-id.js.map +0 -1
- package/dist/lib/skills/shared/services/MemoryService.d.ts +0 -24
- package/dist/lib/skills/shared/services/MemoryService.d.ts.map +0 -1
- package/dist/lib/skills/shared/services/MemoryService.js +0 -574
- package/dist/lib/skills/shared/services/MemoryService.js.map +0 -1
- package/dist/lib/skills/shared/services/PromptService.d.ts +0 -28
- package/dist/lib/skills/shared/services/PromptService.d.ts.map +0 -1
- package/dist/lib/skills/shared/services/PromptService.js +0 -53
- package/dist/lib/skills/shared/services/PromptService.js.map +0 -1
- package/dist/lib/skills/shared/services/TaskService.d.ts +0 -24
- package/dist/lib/skills/shared/services/TaskService.d.ts.map +0 -1
- package/dist/lib/skills/shared/services/TaskService.js +0 -388
- package/dist/lib/skills/shared/services/TaskService.js.map +0 -1
- package/dist/lib/skills/shared/services/interfaces/IMemoryService.d.ts.map +0 -1
- package/dist/lib/skills/shared/services/interfaces/IMemoryService.js +0 -3
- package/dist/lib/skills/shared/services/interfaces/IMemoryService.js.map +0 -1
- package/dist/lib/skills/shared/services/interfaces/ITaskService.d.ts.map +0 -1
- package/dist/lib/skills/shared/services/interfaces/ITaskService.js +0 -7
- package/dist/lib/skills/shared/services/interfaces/ITaskService.js.map +0 -1
- package/dist/lib/skills/shared/utils/group-id.d.ts +0 -64
- package/dist/lib/skills/shared/utils/group-id.d.ts.map +0 -1
- package/dist/lib/skills/shared/utils/group-id.js +0 -176
- package/dist/lib/skills/shared/utils/group-id.js.map +0 -1
- package/dist/project/.lisa/docker/docker-compose.graphiti.yml +0 -45
- package/dist/project/.lisa/skills/git/SKILL.md +0 -171
- /package/dist/lib/skills/{init-review → review}/init-review.d.ts +0 -0
- /package/dist/lib/skills/{init-review → review}/init-review.js +0 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Git Extractor Service
|
|
4
|
+
*
|
|
5
|
+
* Heuristic-based extraction of structured facts from GitHub PR data.
|
|
6
|
+
* Fetches PR descriptions, review comments, and linked issues, then
|
|
7
|
+
* applies pattern matching to extract decision, gotcha, and convention facts.
|
|
8
|
+
*
|
|
9
|
+
* Complements the LLM-based CommitEnricher with fast, no-cost extraction.
|
|
10
|
+
*
|
|
11
|
+
* Part of LISA-9: Phase 3 Git-Powered Memory Extraction.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.createGitExtractorService = createGitExtractorService;
|
|
15
|
+
const HeuristicPatterns_1 = require("../../infrastructure/services/patterns/HeuristicPatterns");
|
|
16
|
+
/** Default maximum PRs to process in one call. */
|
|
17
|
+
const DEFAULT_MAX_PRS = 10;
|
|
18
|
+
/** Confidence level ordering for filtering. */
|
|
19
|
+
const CONFIDENCE_ORDER = {
|
|
20
|
+
verified: 4,
|
|
21
|
+
high: 3,
|
|
22
|
+
medium: 2,
|
|
23
|
+
low: 1,
|
|
24
|
+
uncertain: 0,
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Create a Git extractor service.
|
|
28
|
+
*
|
|
29
|
+
* @param dataFetcher - GitHub data fetcher for PR/issue data
|
|
30
|
+
* @param logger - Optional logger
|
|
31
|
+
* @returns A Git extractor service
|
|
32
|
+
*/
|
|
33
|
+
function createGitExtractorService(dataFetcher, logger) {
|
|
34
|
+
return {
|
|
35
|
+
async extractFromPRs(prNumbers, repo, options = {}) {
|
|
36
|
+
const maxPRs = options.maxPRs ?? DEFAULT_MAX_PRS;
|
|
37
|
+
const skipPRs = new Set(options.skipPRs ?? []);
|
|
38
|
+
const extractTypes = options.extractTypes;
|
|
39
|
+
const minConfidence = options.minConfidence ?? 'low';
|
|
40
|
+
const minConfidenceLevel = CONFIDENCE_ORDER[minConfidence];
|
|
41
|
+
// Filter and limit PRs to process
|
|
42
|
+
const toProcess = prNumbers
|
|
43
|
+
.filter(n => !skipPRs.has(n))
|
|
44
|
+
.slice(0, maxPRs);
|
|
45
|
+
if (toProcess.length === 0) {
|
|
46
|
+
return {
|
|
47
|
+
facts: [],
|
|
48
|
+
prsProcessed: 0,
|
|
49
|
+
prsSkipped: prNumbers.length,
|
|
50
|
+
patternsMatched: 0,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
logger?.debug('Starting PR extraction', {
|
|
54
|
+
repo,
|
|
55
|
+
prCount: toProcess.length,
|
|
56
|
+
extractTypes,
|
|
57
|
+
});
|
|
58
|
+
const allFacts = [];
|
|
59
|
+
let prsProcessed = 0;
|
|
60
|
+
let prsSkipped = prNumbers.length - toProcess.length;
|
|
61
|
+
let patternsMatched = 0;
|
|
62
|
+
// Process each PR
|
|
63
|
+
for (const prNumber of toProcess) {
|
|
64
|
+
try {
|
|
65
|
+
const pr = await dataFetcher.fetchPR(repo, prNumber);
|
|
66
|
+
if (!pr) {
|
|
67
|
+
prsSkipped++;
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
prsProcessed++;
|
|
71
|
+
// Extract from PR description
|
|
72
|
+
const descFacts = extractFromText(pr.body, 'pr-description', prNumber, undefined, extractTypes);
|
|
73
|
+
allFacts.push(...descFacts);
|
|
74
|
+
patternsMatched += descFacts.length;
|
|
75
|
+
// Extract from review comments
|
|
76
|
+
for (const comment of pr.reviewComments) {
|
|
77
|
+
const commentFacts = extractFromText(comment.body, 'review-comment', prNumber, undefined, extractTypes);
|
|
78
|
+
// Boost confidence for resolved review threads (indicates accepted feedback)
|
|
79
|
+
if (comment.isResolved) {
|
|
80
|
+
for (const fact of commentFacts) {
|
|
81
|
+
if (fact.type === 'gotcha' || fact.type === 'convention') {
|
|
82
|
+
// Resolved feedback is more likely to be valuable
|
|
83
|
+
fact.confidence = boostConfidence(fact.confidence);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// Add file path as tag if available
|
|
88
|
+
if (comment.path) {
|
|
89
|
+
for (const fact of commentFacts) {
|
|
90
|
+
fact.tags.push(comment.path);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
allFacts.push(...commentFacts);
|
|
94
|
+
patternsMatched += commentFacts.length;
|
|
95
|
+
}
|
|
96
|
+
// Extract from linked issues
|
|
97
|
+
for (const issue of pr.linkedIssues) {
|
|
98
|
+
if (issue.body) {
|
|
99
|
+
const issueFacts = extractFromText(issue.body, 'issue-body', prNumber, issue.number, extractTypes);
|
|
100
|
+
allFacts.push(...issueFacts);
|
|
101
|
+
patternsMatched += issueFacts.length;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
logger?.debug('Extracted facts from PR', {
|
|
105
|
+
prNumber,
|
|
106
|
+
factCount: allFacts.length,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
logger?.warn('Failed to process PR', {
|
|
111
|
+
repo,
|
|
112
|
+
prNumber,
|
|
113
|
+
error: error.message,
|
|
114
|
+
});
|
|
115
|
+
prsSkipped++;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// Filter by minimum confidence
|
|
119
|
+
const filteredFacts = allFacts.filter(f => CONFIDENCE_ORDER[f.confidence] >= minConfidenceLevel);
|
|
120
|
+
// Deduplicate by similar text
|
|
121
|
+
const uniqueFacts = deduplicateFacts(filteredFacts);
|
|
122
|
+
logger?.info('PR extraction complete', {
|
|
123
|
+
repo,
|
|
124
|
+
prsProcessed,
|
|
125
|
+
prsSkipped,
|
|
126
|
+
patternsMatched,
|
|
127
|
+
factsExtracted: uniqueFacts.length,
|
|
128
|
+
});
|
|
129
|
+
return {
|
|
130
|
+
facts: uniqueFacts,
|
|
131
|
+
prsProcessed,
|
|
132
|
+
prsSkipped,
|
|
133
|
+
patternsMatched,
|
|
134
|
+
};
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Extract facts from text using heuristic patterns.
|
|
140
|
+
*/
|
|
141
|
+
function extractFromText(text, source, prNumber, issueNumber, filterTypes) {
|
|
142
|
+
if (!text || text.trim().length === 0) {
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
const matches = filterTypes
|
|
146
|
+
? filterTypes.flatMap(type => (0, HeuristicPatterns_1.extractByFactType)(text, type))
|
|
147
|
+
: (0, HeuristicPatterns_1.extractPatternMatches)(text);
|
|
148
|
+
return matches.map(match => ({
|
|
149
|
+
text: cleanExtractedText(match.text),
|
|
150
|
+
type: match.factType,
|
|
151
|
+
source,
|
|
152
|
+
confidence: match.confidence,
|
|
153
|
+
tags: extractTags(match.text),
|
|
154
|
+
prNumber,
|
|
155
|
+
issueNumber,
|
|
156
|
+
matchedPattern: match.patternName,
|
|
157
|
+
}));
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Clean extracted text for storage.
|
|
161
|
+
*/
|
|
162
|
+
function cleanExtractedText(text) {
|
|
163
|
+
return text
|
|
164
|
+
.replace(/\s+/g, ' ') // Normalize whitespace
|
|
165
|
+
.replace(/^\s*[-*]\s*/, '') // Remove leading bullet points
|
|
166
|
+
.trim();
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Extract potential tags from text (file paths, technologies).
|
|
170
|
+
*/
|
|
171
|
+
function extractTags(text) {
|
|
172
|
+
const tags = [];
|
|
173
|
+
// Extract file paths
|
|
174
|
+
const pathPattern = /(?:^|\s)([\w/-]+\.[a-z]{1,4})(?:\s|$|[,:])/gi;
|
|
175
|
+
let match;
|
|
176
|
+
while ((match = pathPattern.exec(text)) !== null) {
|
|
177
|
+
if (match[1] && !match[1].includes('://')) {
|
|
178
|
+
tags.push(match[1]);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// Extract technology names (common ones)
|
|
182
|
+
const techPatterns = [
|
|
183
|
+
/\b(typescript|javascript|react|node|graphql|rest)\b/gi,
|
|
184
|
+
/\b(postgres|mongodb|redis|neo4j)\b/gi,
|
|
185
|
+
/\b(docker|kubernetes|aws|gcp)\b/gi,
|
|
186
|
+
];
|
|
187
|
+
for (const pattern of techPatterns) {
|
|
188
|
+
while ((match = pattern.exec(text)) !== null) {
|
|
189
|
+
if (match[1]) {
|
|
190
|
+
tags.push(match[1].toLowerCase());
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return [...new Set(tags)]; // Dedupe
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Boost confidence level by one step.
|
|
198
|
+
*/
|
|
199
|
+
function boostConfidence(confidence) {
|
|
200
|
+
switch (confidence) {
|
|
201
|
+
case 'low':
|
|
202
|
+
return 'medium';
|
|
203
|
+
case 'medium':
|
|
204
|
+
return 'high';
|
|
205
|
+
default:
|
|
206
|
+
return confidence;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Deduplicate facts by similar text.
|
|
211
|
+
* Converts mutable facts to readonly interface.
|
|
212
|
+
*/
|
|
213
|
+
function deduplicateFacts(facts) {
|
|
214
|
+
const seen = new Map();
|
|
215
|
+
for (const fact of facts) {
|
|
216
|
+
// Normalize text for comparison
|
|
217
|
+
const normalized = fact.text.toLowerCase().replace(/\s+/g, ' ').trim();
|
|
218
|
+
// Check for exact or near-duplicate
|
|
219
|
+
const existing = seen.get(normalized);
|
|
220
|
+
if (existing) {
|
|
221
|
+
// Keep the one with higher confidence
|
|
222
|
+
if (CONFIDENCE_ORDER[fact.confidence] > CONFIDENCE_ORDER[existing.confidence]) {
|
|
223
|
+
seen.set(normalized, fact);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
seen.set(normalized, fact);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return Array.from(seen.values());
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=GitExtractorService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitExtractorService.js","sourceRoot":"","sources":["../../../../src/lib/application/services/GitExtractorService.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAqDH,8DAoJC;AA5LD,gGAGkE;AAElE,kDAAkD;AAClD,MAAM,eAAe,GAAG,EAAE,CAAC;AAkB3B,+CAA+C;AAC/C,MAAM,gBAAgB,GAAoC;IACxD,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;IACN,SAAS,EAAE,CAAC;CACb,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,yBAAyB,CACvC,WAA+B,EAC/B,MAAgB;IAEhB,OAAO;QACL,KAAK,CAAC,cAAc,CAClB,SAA4B,EAC5B,IAAY,EACZ,UAAuC,EAAE;YAEzC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,eAAe,CAAC;YACjD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;YAC/C,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;YAC1C,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,KAAK,CAAC;YACrD,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,aAAa,CAAC,CAAC;YAE3D,kCAAkC;YAClC,MAAM,SAAS,GAAG,SAAS;iBACxB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;iBAC5B,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;YAEpB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC3B,OAAO;oBACL,KAAK,EAAE,EAAE;oBACT,YA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AACH,SAAS,eAAe,CAAC,UAA2B;IAClD,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,KAAK;YACR,OAAO,QAAQ,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC;QAChB;YACE,OAAO,UAAU,CAAC;IACtB,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CAAC,KAA8B;IACtD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAiC,CAAC;IAEtD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,gCAAgC;QAChC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAEvE,oCAAoC;QACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,QAAQ,EAAE,CAAC;YACb,sCAAsC;YACtC,IAAI,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,gBAAgB,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC9E,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Indexing Service
|
|
3
|
+
*
|
|
4
|
+
* Saves extracted git facts to memory with appropriate quality tags,
|
|
5
|
+
* lifecycle metadata, and deduplication.
|
|
6
|
+
*
|
|
7
|
+
* Quality defaults:
|
|
8
|
+
* - source: code-analysis
|
|
9
|
+
* - confidence: from IHeuristicFact (typically medium)
|
|
10
|
+
* - lifecycle: project
|
|
11
|
+
*
|
|
12
|
+
* Part of LISA-10: Phase 4 Indexing.
|
|
13
|
+
*/
|
|
14
|
+
import type { IGitIndexingService } from '../../domain/interfaces/IGitIndexingService';
|
|
15
|
+
import type { IMemoryService } from '../../domain/interfaces/IMemoryService';
|
|
16
|
+
import type { ILogger } from '../../domain/interfaces/ILogger';
|
|
17
|
+
/**
|
|
18
|
+
* Create a Git indexing service.
|
|
19
|
+
*
|
|
20
|
+
* @param memory - Memory service for saving facts
|
|
21
|
+
* @param logger - Optional logger
|
|
22
|
+
* @returns A Git indexing service
|
|
23
|
+
*/
|
|
24
|
+
export declare function createGitIndexingService(memory: IMemoryService, logger?: ILogger): IGitIndexingService;
|
|
25
|
+
//# sourceMappingURL=GitIndexingService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitIndexingService.d.ts","sourceRoot":"","sources":["../../../../src/lib/application/services/GitIndexingService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,mBAAmB,EAIpB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AA6E/D;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,cAAc,EACtB,MAAM,CAAC,EAAE,OAAO,GACf,mBAAmB,CA4GrB"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Git Indexing Service
|
|
4
|
+
*
|
|
5
|
+
* Saves extracted git facts to memory with appropriate quality tags,
|
|
6
|
+
* lifecycle metadata, and deduplication.
|
|
7
|
+
*
|
|
8
|
+
* Quality defaults:
|
|
9
|
+
* - source: code-analysis
|
|
10
|
+
* - confidence: from IHeuristicFact (typically medium)
|
|
11
|
+
* - lifecycle: project
|
|
12
|
+
*
|
|
13
|
+
* Part of LISA-10: Phase 4 Indexing.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.createGitIndexingService = createGitIndexingService;
|
|
17
|
+
const IGitIndexingService_1 = require("../../domain/interfaces/IGitIndexingService");
|
|
18
|
+
const IMemoryQuality_1 = require("../../domain/interfaces/types/IMemoryQuality");
|
|
19
|
+
/** Default similarity threshold for deduplication. */
|
|
20
|
+
const DEFAULT_SIMILARITY_THRESHOLD = 0.85;
|
|
21
|
+
/**
|
|
22
|
+
* Simple string similarity using Jaccard index on word tokens.
|
|
23
|
+
* Returns a value between 0 (no similarity) and 1 (identical).
|
|
24
|
+
*/
|
|
25
|
+
function calculateSimilarity(a, b) {
|
|
26
|
+
const tokenize = (s) => new Set(s.toLowerCase().split(/\s+/).filter(Boolean));
|
|
27
|
+
const setA = tokenize(a);
|
|
28
|
+
const setB = tokenize(b);
|
|
29
|
+
if (setA.size === 0 && setB.size === 0)
|
|
30
|
+
return 1;
|
|
31
|
+
if (setA.size === 0 || setB.size === 0)
|
|
32
|
+
return 0;
|
|
33
|
+
let intersection = 0;
|
|
34
|
+
for (const word of setA) {
|
|
35
|
+
if (setB.has(word))
|
|
36
|
+
intersection++;
|
|
37
|
+
}
|
|
38
|
+
const union = setA.size + setB.size - intersection;
|
|
39
|
+
return union === 0 ? 0 : intersection / union;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Build tags for a fact following LISA-10 quality defaults.
|
|
43
|
+
*/
|
|
44
|
+
function buildTags(fact, memoryType) {
|
|
45
|
+
const tags = [
|
|
46
|
+
// Quality tags
|
|
47
|
+
(0, IMemoryQuality_1.resolveSourceTag)('code-analysis'),
|
|
48
|
+
`confidence:${fact.confidence}`,
|
|
49
|
+
'lifecycle:project',
|
|
50
|
+
// Extraction metadata (type:heuristic-extraction needed for checkExtractedPRs dedupe)
|
|
51
|
+
'type:heuristic-extraction',
|
|
52
|
+
`factType:${fact.type}`,
|
|
53
|
+
`factSource:${fact.source}`,
|
|
54
|
+
'extractionMethod:heuristic',
|
|
55
|
+
];
|
|
56
|
+
// Memory type tag (if mapped)
|
|
57
|
+
if (memoryType) {
|
|
58
|
+
tags.push(`memoryType:${memoryType}`);
|
|
59
|
+
}
|
|
60
|
+
// Linking tags
|
|
61
|
+
if (fact.prNumber !== undefined) {
|
|
62
|
+
tags.push(`pr:${fact.prNumber}`);
|
|
63
|
+
}
|
|
64
|
+
if (fact.issueNumber !== undefined) {
|
|
65
|
+
tags.push(`issue:${fact.issueNumber}`);
|
|
66
|
+
}
|
|
67
|
+
if (fact.commitSha) {
|
|
68
|
+
tags.push(`commit:${fact.commitSha}`);
|
|
69
|
+
}
|
|
70
|
+
if (fact.matchedPattern) {
|
|
71
|
+
tags.push(`pattern:${fact.matchedPattern}`);
|
|
72
|
+
}
|
|
73
|
+
// Original tags from extraction (prefixed to avoid collisions)
|
|
74
|
+
for (const tag of fact.tags) {
|
|
75
|
+
tags.push(`tag:${tag}`);
|
|
76
|
+
}
|
|
77
|
+
return tags;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Create a Git indexing service.
|
|
81
|
+
*
|
|
82
|
+
* @param memory - Memory service for saving facts
|
|
83
|
+
* @param logger - Optional logger
|
|
84
|
+
* @returns A Git indexing service
|
|
85
|
+
*/
|
|
86
|
+
function createGitIndexingService(memory, logger) {
|
|
87
|
+
return {
|
|
88
|
+
async indexFacts(facts, options = {}) {
|
|
89
|
+
const { conventionalType, skipDeduplication = false, similarityThreshold = DEFAULT_SIMILARITY_THRESHOLD, } = options;
|
|
90
|
+
// Map conventional type to memory type
|
|
91
|
+
const memoryType = conventionalType
|
|
92
|
+
? IGitIndexingService_1.COMMIT_TYPE_TO_MEMORY_TYPE[conventionalType]
|
|
93
|
+
: null;
|
|
94
|
+
// Check if this commit type should be skipped entirely
|
|
95
|
+
if (conventionalType && memoryType === null) {
|
|
96
|
+
logger?.debug('Skipping indexing for commit type', { conventionalType });
|
|
97
|
+
return {
|
|
98
|
+
indexed: 0,
|
|
99
|
+
skipped: facts.length,
|
|
100
|
+
duplicates: 0,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
let indexed = 0;
|
|
104
|
+
let skipped = 0;
|
|
105
|
+
let duplicates = 0;
|
|
106
|
+
// Load existing facts for deduplication
|
|
107
|
+
let existingFacts = [];
|
|
108
|
+
if (!skipDeduplication && facts.length > 0) {
|
|
109
|
+
try {
|
|
110
|
+
// Search for existing facts with similar metadata
|
|
111
|
+
existingFacts = await memory.searchFacts('source:code-analysis extractionMethod:heuristic', 100);
|
|
112
|
+
logger?.debug('Loaded existing facts for deduplication', {
|
|
113
|
+
count: existingFacts.length,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
// Continue without deduplication if search fails
|
|
118
|
+
logger?.warn('Failed to load existing facts for deduplication', {
|
|
119
|
+
error: error.message,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// Index each fact
|
|
124
|
+
for (const fact of facts) {
|
|
125
|
+
// Check for duplicates
|
|
126
|
+
if (!skipDeduplication && existingFacts.length > 0) {
|
|
127
|
+
const isDuplicate = existingFacts.some(existing => {
|
|
128
|
+
const existingText = existing.fact || existing.text || '';
|
|
129
|
+
return calculateSimilarity(existingText, fact.text) >= similarityThreshold;
|
|
130
|
+
});
|
|
131
|
+
if (isDuplicate) {
|
|
132
|
+
logger?.debug('Skipping duplicate fact', {
|
|
133
|
+
text: fact.text.substring(0, 50) + '...',
|
|
134
|
+
});
|
|
135
|
+
duplicates++;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// Build tags
|
|
140
|
+
const tags = buildTags(fact, memoryType);
|
|
141
|
+
// Save to memory with lifecycle metadata
|
|
142
|
+
try {
|
|
143
|
+
await memory.addFactWithLifecycle(fact.text, {
|
|
144
|
+
lifecycle: 'project',
|
|
145
|
+
tags,
|
|
146
|
+
});
|
|
147
|
+
indexed++;
|
|
148
|
+
// Add to existing facts to prevent duplicates within this batch
|
|
149
|
+
existingFacts.push({ fact: fact.text });
|
|
150
|
+
logger?.debug('Indexed fact', {
|
|
151
|
+
type: fact.type,
|
|
152
|
+
memoryType,
|
|
153
|
+
prNumber: fact.prNumber,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
logger?.warn('Failed to index fact', {
|
|
158
|
+
error: error.message,
|
|
159
|
+
text: fact.text.substring(0, 50) + '...',
|
|
160
|
+
});
|
|
161
|
+
skipped++;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
logger?.info('Git indexing complete', {
|
|
165
|
+
indexed,
|
|
166
|
+
skipped,
|
|
167
|
+
duplicates,
|
|
168
|
+
conventionalType,
|
|
169
|
+
memoryType,
|
|
170
|
+
});
|
|
171
|
+
return { indexed, skipped, duplicates };
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=GitIndexingService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitIndexingService.js","sourceRoot":"","sources":["../../../../src/lib/application/services/GitIndexingService.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AA8FH,4DA+GC;AAlMD,qFAAyF;AACzF,iFAAgF;AAEhF,sDAAsD;AACtD,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAE1C;;;GAGG;AACH,SAAS,mBAAmB,CAAC,CAAS,EAAE,CAAS;IAC/C,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAe,EAAE,CAC1C,IAAI,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAExD,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACzB,M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,CAAC;gBACH,CAAC;gBAED,aAAa;gBACb,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;gBAEzC,yCAAyC;gBACzC,IAAI,CAAC;oBACH,MAAM,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE;wBAC3C,SAAS,EAAE,SAAS;wBACpB,IAAI;qBACL,CAAC,CAAC;oBACH,OAAO,EAAE,CAAC;oBAEV,gEAAgE;oBAChE,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;oBAExC,MAAM,EAAE,KAAK,CAAC,cAAc,EAAE;wBAC5B,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,UAAU;wBACV,QAAQ,EAAE,IAAI,CAAC,QAAQ;qBACxB,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,EAAE,IAAI,CAAC,sBAAsB,EAAE;wBACnC,KAAK,EAAG,KAAe,CAAC,OAAO;wBAC/B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK;qBACzC,CAAC,CAAC;oBACH,OAAO,EAAE,CAAC;gBACZ,CAAC;YACH,CAAC;YAED,MAAM,EAAE,IAAI,CAAC,uBAAuB,EAAE;gBACpC,OAAO;gBACP,OAAO;gBACP,UAAU;gBACV,gBAAgB;gBAChB,UAAU;aACX,CAAC,CAAC;YAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;QAC1C,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitTriageService
|
|
3
|
+
*
|
|
4
|
+
* Application service that scans git history and scores commits
|
|
5
|
+
* for "interestingness" to identify which commits warrant API enrichment.
|
|
6
|
+
*
|
|
7
|
+
* Part of the Git-Powered Memory feature (LISA-7).
|
|
8
|
+
*/
|
|
9
|
+
import type { IGitClient } from '../../domain/interfaces/IGitClient';
|
|
10
|
+
import type { IGitTriageService, IGitCommitData, IGitCommitStats, IScoredCommit, ITriageResult, ITriageOptions } from '../../domain/interfaces/IGitTriageService';
|
|
11
|
+
export declare class GitTriageService implements IGitTriageService {
|
|
12
|
+
private readonly git;
|
|
13
|
+
constructor(git: IGitClient);
|
|
14
|
+
triage(options?: ITriageOptions): Promise<ITriageResult>;
|
|
15
|
+
scoreCommit(commit: IGitCommitData, stats: IGitCommitStats | null, tagShas: ReadonlySet<string>, isTagAdjacent?: boolean): IScoredCommit;
|
|
16
|
+
/**
|
|
17
|
+
* Parse raw git log commit into domain type.
|
|
18
|
+
*/
|
|
19
|
+
private parseCommit;
|
|
20
|
+
/**
|
|
21
|
+
* Parse raw stat entries into domain type.
|
|
22
|
+
*/
|
|
23
|
+
private parseStats;
|
|
24
|
+
/**
|
|
25
|
+
* Detect interest signals for a commit.
|
|
26
|
+
*/
|
|
27
|
+
private detectSignals;
|
|
28
|
+
/**
|
|
29
|
+
* Calculate interest score from signals.
|
|
30
|
+
*/
|
|
31
|
+
private calculateScore;
|
|
32
|
+
/**
|
|
33
|
+
* Get default "since" date (3 months ago).
|
|
34
|
+
*/
|
|
35
|
+
private getDefaultSince;
|
|
36
|
+
/**
|
|
37
|
+
* Check if a tag name looks like a version tag.
|
|
38
|
+
*/
|
|
39
|
+
private isVersionTag;
|
|
40
|
+
/**
|
|
41
|
+
* Create an empty result (for repos with no commits in range).
|
|
42
|
+
*/
|
|
43
|
+
private emptyResult;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=GitTriageService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitTriageService.d.ts","sourceRoot":"","sources":["../../../../src/lib/application/services/GitTriageService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAsC,MAAM,oCAAoC,CAAC;AACzG,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EAEf,aAAa,EACb,aAAa,EACb,cAAc,EAGf,MAAM,2CAA2C,CAAC;AAiFnD,qBAAa,gBAAiB,YAAW,iBAAiB;IAC5C,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,UAAU;IAEtC,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAyI9D,WAAW,CACT,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,eAAe,GAAG,IAAI,EAC7B,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAC5B,aAAa,CAAC,EAAE,OAAO,GACtB,aAAa;IAehB;;OAEG;IACH,OAAO,CAAC,WAAW;IAoBnB;;OAEG;IACH,OAAO,CAAC,UAAU;IAmClB;;OAEG;IACH,OAAO,CAAC,aAAa;IA8CrB;;OAEG;IACH,OAAO,CAAC,cAAc;IAetB;;OAEG;IACH,OAAO,CAAC,eAAe;IAMvB;;OAEG;IACH,OAAO,CAAC,YAAY;IAIpB;;OAEG;IACH,OAAO,CAAC,WAAW;CAapB"}
|