feat(memory): migrate EmbeddingProvider to KMP-compatible TextEmbeddingExecutor, add :memory-md-vector, and hybrid backend support
- Replaced `EmbeddingProvider` with cross-platform `TextEmbeddingExecutor` for native target compatibility. - Introduced `:memory-md-vector` module combining vector-cache and `.md` file-based memory systems (`hybrid` backend). - Updated `SiglipEmbeddingProvider` to use KMP `TextEmbeddingExtractor` and streamlined compatibility via `asExecutor`. - Added hybrid memory backend to `standalone`, supporting `.md` reconciliation with vector-cache for semantic
This commit is contained in:
@@ -57,6 +57,9 @@ kotlin {
|
||||
implementation(project(":memory-md"))
|
||||
if (!skipVectorMemory) {
|
||||
implementation(project(":memory-vector"))
|
||||
// Гибрид: .md (single source of truth) + ksqlite vector-кэш
|
||||
// (sqlite-vec vec0). Подключается при AGENTIK_MEMORY_BACKEND=hybrid.
|
||||
implementation(project(":memory-md-vector"))
|
||||
}
|
||||
|
||||
// SQLite-бэкенд (ksqlite JNI) — JVM-only по факту.
|
||||
@@ -166,3 +169,42 @@ val shadowJarTask = tasks.register<ShadowJar>("shadowJar") {
|
||||
|
||||
includeEmptyDirs = false
|
||||
}
|
||||
|
||||
// :standalone deploy
|
||||
//
|
||||
// `deployJar` собирает fatjar через shadowJar и копирует его на приватный
|
||||
// домашний хост (root@192.168.76.166). Репа приватная, IP захардкожен —
|
||||
// пользователь явно сказал "можно в наглую указать конкретно этот ip".
|
||||
// Если понадобится другой хост — переопредели через -PagentikDeployHost=...
|
||||
//
|
||||
// Конвенция имени файла: agentik-standalone-{version}-all.jar (как на хосте
|
||||
// уже лежат agentik-cli-0.1.0-all.jar / agentik-0.1.0-all.jar —
|
||||
// выровнено по стилю существующего деплоя).
|
||||
//
|
||||
// SSH — ключевой, пароль не спрашивает. Если упадёт — проверь
|
||||
// `ssh root@192.168.76.166 'echo OK'` вручную.
|
||||
val agentikDeployHost: String =
|
||||
(project.findProperty("agentikDeployHost") as? String) ?: "root@192.168.76.166"
|
||||
val agentikDeployPath: String =
|
||||
(project.findProperty("agentikDeployPath") as? String) ?: "~/agentik-standalone-${project.version}-all.jar"
|
||||
|
||||
tasks.register("deployJar") {
|
||||
group = "deployment"
|
||||
description = "Builds shadowJar and copies it to $agentikDeployHost:$agentikDeployPath"
|
||||
dependsOn(shadowJarTask)
|
||||
|
||||
doLast {
|
||||
val jar = shadowJarTask.get().outputs.files.singleFile
|
||||
val target = "$agentikDeployHost:$agentikDeployPath"
|
||||
println("→ scp $jar $target")
|
||||
val proc = ProcessBuilder("scp", jar.absolutePath, target)
|
||||
.redirectErrorStream(true)
|
||||
.start()
|
||||
proc.inputStream.bufferedReader().forEachLine { println("scp> $it") }
|
||||
val rc = proc.waitFor()
|
||||
if (rc != 0) {
|
||||
throw GradleException("scp failed (exit=$rc). Check ssh access to $agentikDeployHost.")
|
||||
}
|
||||
println("✓ deployed to $target")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user