a3581abf84
Major additions: * :proto (KMP submodule) — in-house stateful protocol replacing AG-UI. Agent owns conversation transcript; Conversation.events(after) is a live, replay-free stream; backfill via Conversation.getMessages(after, offset, limit). Each Event carries an Instant date for client-side resume tracking. Sealed hierarchies (Content/Message/Event/AgentEvent) annotated @Serializable with snake_case @SerialName JSON discriminators so the wire format is decoupled from Kotlin class names. * :server (JVM, Ktor 3.1.3) — REST+SSE facade for Agent. Public entry: Route.agentikAgent(agent, path = "/agentik"). Endpoints: create/list/get/patch/delete conversations, POST messages (202), POST interrupt, GET messages, GET conversation events (SSE), GET agent events (SSE), GET /health. Custom Instant serializer for kotlin.time.Instant registered contextually on agentikJson (ISO-8601, ignoreUnknownKeys=true, explicitNulls=false). * :client (JVM, Ktor HTTP Client + CIO) — mirror of :server returning a pw.binom.agentik.proto.Agent backed by HTTP calls. Custom SSE parser since ktor-client-sse is not on the 3.1.3 client classpath. * standalone — EchoProtoAgent (in-memory Agent for :proto), EchoAgent (existing AG-UI echo), both mounted on the same Netty embedded server on port 8080 (/agui and /agentik); A2A stays on its own CIO engine on 8081. EchoProtoAgent smoke-tested end-to-end against :server: all 11 endpoints, including live SSE delivery of StartResponse/AppendText/End event triplets and Agent-level Created/Deleted events. Design notes pinned in: * agentik/IRC-QUESTIONS.md — closed 13-item checklist for the upcoming :irc-server transport (channel = conversation, CTCP for structural events, draft/chathistory for backfill, ImageStore side-channel, etc). * docs/ARCHITECTURE.md — overall layout snapshot.
47 lines
1.6 KiB
Kotlin
47 lines
1.6 KiB
Kotlin
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(21)
|
|
|
|
jvm {
|
|
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
|
binaries {
|
|
executable {
|
|
mainClass.set("pw.binom.agentik.standalone.MainKt")
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
// AG-UI: протокол (события, RunAgentInput, Agent) — KMP, jvm + native
|
|
implementation(libs.agui.api)
|
|
// proto: наш in-house протокол (KMP)
|
|
implementation(project(":proto"))
|
|
}
|
|
jvmMain.dependencies {
|
|
// AG-UI: Ktor-хелперы маршрута + движок Netty (JVM)
|
|
implementation(libs.agui.server)
|
|
implementation(libs.ktor.server.core)
|
|
implementation(libs.ktor.server.sse)
|
|
implementation(libs.ktor.server.netty)
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
// A2A (pw.binom.a2a): shared — протокол, server + client — JVM
|
|
implementation(libs.a2a.shared)
|
|
implementation(libs.a2a.server)
|
|
implementation(libs.a2a.client)
|
|
implementation(libs.ktor.client.core)
|
|
implementation(libs.ktor.client.cio)
|
|
// server: Ktor-фасад нашего :proto (JVM)
|
|
implementation(project(":server"))
|
|
}
|
|
commonTest.dependencies {
|
|
implementation(kotlin("test"))
|
|
}
|
|
}
|
|
} |