2.0 KiB
2.0 KiB
2026-02-25 Session Notes
Ingest Pipeline Refactoring Kickoff
Nicholai initiated work on the nicholai/ingest-pipeline branch with a comprehensive refactoring plan for packages/core/src/ingest/ (5631 LOC, 14 files). The core problem: each extractor wraps its own Ollama HTTP client instead of using the daemon's LlmProvider interface, hardcoding ingest to Ollama and blocking Claude Code support.
Plan Overview
The refactoring has seven major components:
- Move
LlmProviderinterface frompackages/daemon/src/pipeline/provider.tstopackages/core/src/types.tsfor dependency isolation - Refactor extractors (
extractor.ts,chat-extractor.ts,entire-extractor.ts) to acceptLlmProviderinstead of Ollama config - Rename
ollama-client.ts→response-parser.tsafter deleting HTTP-specific code - Unify extractor configs by consolidating three identical config interfaces into a single
ExtractionOptionstype - Extract
findGit()utility from code/entire parsers into newgit-utils.ts - Extract chat utilities (time-gap batching, thread grouping constants) into new
chat-utils.tsfor slack/discord parsers - Update
ingestPath()entry point to acceptprovider: LlmProviderparameter
Key Architectural Decisions
- Factory implementations (
createOllamaProvider,createClaudeCodeProvider) remain in daemon; only the interface moves to core - Daemon's
llm.tssingleton stays in daemon - Domain-specific logic (prompts, parsing, message filtering) is intentionally NOT deduplicated
- Backwards compatibility via type aliases for old config interface names
- Circular dependency avoided by moving interface only, not implementations
Scope Boundaries
Will NOT change: prompt builders, parseExtractionResponse(), format-specific message filtering, threadToSection() rendering, sequential processing loops, index.ts orchestration, chunker/provenance/parser logic.
Verification plan includes typecheck, build ordering (core → daemon), full test suite, and biome linting.