KetraTerm
API · v0.3.0All versions

fromSources

fun fromSources(sources: List<TerminalCompletionSourceEntry>, commandSpecs: List<TerminalCommandSpec> = TerminalCommandSpecs.defaults(), learningStore: TerminalCompletionLearningStore? = null, sourceFailureHandler: TerminalCompletionSourceFailureHandler = TerminalCompletionSourceFailureHandler.SYSTEM_LOGGER): TerminalCompletionEngine

Creates a deterministic merged engine from prioritized completion sources.

Provider-local ranks are fused by projected command outcome with bounded source priors, command-line context, and learned statistics.

Return

merged completion engine.

Parameters

sources

prioritized source registrations.

commandSpecs

immutable command catalog used to classify the active command-line position for ranking. Callers must not mutate this list while the engine is alive.

learningStore

optional shared in-memory learning store. The engine reads its immutable published snapshot and performs no host I/O.

sourceFailureHandler

diagnostic sink for isolated non-cancellation source failures.