KetraTerm
API · v0.2.2All versions

TerminalCompletionLearningCoordinator

constructor(learningStore: TerminalCompletionLearningStore, coroutineScope: CoroutineScope, persistencePath: Path, persistenceEnabled: Boolean, onPersistenceLoadFailure: (Throwable) -> Unit)

Creates a lifecycle-bound learning owner for one fixed persistence path.

Parameters

learningStore

bounded in-memory learning used immediately by completion ranking.

coroutineScope

caller-owned lifecycle scope for the persistence worker.

persistencePath

fixed snapshot path owned by the product.

persistenceEnabled

whether the snapshot may initially be read and written.

onPersistenceLoadFailure

invoked once when an existing file is rejected or cannot be read. Exceptions thrown by this diagnostic callback are ignored.