Problem#
The <promise> signal protocol is deeply coupled to the core pipeline. Introducing a second LLM backend requires a provider abstraction to isolate these Claude-specific details.
Task / Link#
Closes #346 MT-2: LLMProvider abstraction — Phase 1 foundation for multi-tenant
Changes#
- Add
PhaseResulttype andLLMProviderinterface (src/llm/llm-provider.interface.ts) - Add
LLM_PROVIDERinjection token (Symbol('LLM_PROVIDER')) - Implement
ClaudeCLIProviderwrappingClaudeInvocationServicewithSignalResult→PhaseResultmapping (src/llm/claude/claude-cli.provider.ts) - Create
LLMModuleproviding and exportingLLM_PROVIDERtoken (src/llm/llm.module.ts) - Add unit tests covering all 7 signal mapping scenarios (
src/llm/claude/claude-cli.provider.spec.ts)
Notes#
partialandnonesignal types map toblocked:transient— matches existingtoSignalKind()behavior inPhaseRouterService- No existing files were modified; this is a purely additive change
Testing#
- 7 unit tests covering: complete, blocked:transient, blocked:persistent, blocked:conflict (with conflictMetadata), skip, none, and invoke-throws
npx tsc --noEmitpasses with zero errorsnpm run lintpasses with zero warnings