fed7f7ab71
Model the AG-UI protocol as an in-process API of Java-style interfaces and classes, mirroring the official AG-UI Java SDK, and build it as a Kotlin Multiplatform library with two Ktor transport modules. Modules: - api: BaseEvent sealed hierarchy (all AG-UI event types), messages, state, tool, context, RunAgentInput/Parameters, Agent/AgentSubscriber/ EventDispatcher, AguiJson (kotlinx.serialization, "type" discriminator), plus a SerializersModule registering every event subtype polymorphically. - client: HttpAgent over Ktor SSE (POST RunAgentInput -> stream BaseEvent), implementing the Agent interface. - server: Application.agui()/Route.aguiAgent() exposing an Agent behind a POST + SSE endpoint via SSEServerContent, plus a runnable sample. Tests: api serialization round-trips, client SSE decode against a real test-host server, server endpoint integration.
30 lines
895 B
Kotlin
30 lines
895 B
Kotlin
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(21)
|
|
jvm()
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
api(project(":api"))
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.ktor.server.core)
|
|
implementation(libs.ktor.server.sse)
|
|
}
|
|
jvmMain.dependencies {
|
|
implementation(libs.ktor.server.netty)
|
|
}
|
|
jvmTest.dependencies {
|
|
implementation(kotlin("test"))
|
|
implementation(libs.kotlinx.coroutines.test)
|
|
implementation(libs.ktor.server.test.host)
|
|
implementation(libs.ktor.client.core)
|
|
implementation(libs.ktor.client.cio)
|
|
implementation(project(":client"))
|
|
}
|
|
}
|
|
} |