feat: wire L3 write path via Embedder into router
Introduces Embedder contract in core:inference with a NoopEmbedder default (zero vector) and wires both Embedder and L3MemoryStore into DefaultRouterFacade. Each ChatTurnEvent emission now embeds the turn content and writes a corresponding L3MemoryEntry, so cross-session memory is captured at the source of truth (the event emission point). InfrastructureModule defaults to NoopEmbedder + InMemoryL3MemoryStore so the system runs without an external embedding model or vector store wired. The TurboVec adapter stays unwired for now; switching to it is a configuration concern (Epic 12 config layer). Also gitignores apps/tui/logs/ (Kotlin TUI runtime logs, pre-Go rewrite).
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.correx.core.inference
|
||||
|
||||
/**
|
||||
* Interface for computing vector embeddings of text.
|
||||
* Implementations provide pre-computed vectors for similarity search and retrieval.
|
||||
*/
|
||||
interface Embedder {
|
||||
/**
|
||||
* Dimensionality of the returned embeddings.
|
||||
*/
|
||||
val dimension: Int
|
||||
|
||||
/**
|
||||
* Compute a vector embedding for the given text.
|
||||
*
|
||||
* @param text The text to embed.
|
||||
* @return A vector of [dimension] floats.
|
||||
*/
|
||||
suspend fun embed(text: String): FloatArray
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.correx.core.inference
|
||||
|
||||
/**
|
||||
* Returns a zero vector. Lets the L3 write path run without an embedding model wired.
|
||||
*/
|
||||
class NoopEmbedder(override val dimension: Int = 1536) : Embedder {
|
||||
override suspend fun embed(text: String): FloatArray = FloatArray(dimension)
|
||||
}
|
||||
Reference in New Issue
Block a user