Skip to content

Commit c238aa5

Browse files
Skobeltsynclaude
andcommitted
feat(#1018): :agents-kt-ksp Gradle module skeleton + Maven Central publication
Stand up the KSP processor module as a sibling Gradle subproject. Empty SymbolProcessorProvider — consumers can wire it via the KSP plugin and ksp("ai.deep-code:agents-kt-ksp:VERSION") but it does no work yet. The validation pass (#1019) and schema codegen (#1020) plug into the processor's process() in subsequent issues. What landed: - settings.gradle.kts — include(":agents-kt-ksp") - agents-kt-ksp/build.gradle.kts — kotlin("jvm"), KSP API dependency (com.google.devtools.ksp:symbol-processing-api:2.3.7), runtime library as compileOnly so it never reaches consumer's runtime classpath, full Maven Central publication block mirroring root, signed with the same in-memory PGP key - AgentsKtSymbolProcessor — empty no-op skeleton with TODO comments for #1019 + #1020 attachment points - AgentsKtSymbolProcessorProvider — wraps the processor for KSP service discovery - META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider — service-loader file pointing at the provider - gradle/verification-metadata.xml regenerated with KSP API SHA-256s - agents-kt-ksp/gradle.lockfile generated for dependency locking Verified: - :agents-kt-ksp:build succeeds - :agents-kt-ksp:publishMavenCentralPublicationToMavenLocal produces signed jar + sources + javadoc + module + pom + .asc signatures - Root :build still succeeds — runtime artifact unchanged Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c95ee6d commit c238aa5

8 files changed

Lines changed: 248 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to Agents.KT are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Pre-1.0, minor bumps may add new public API; existing API surface is preserved.
44

5+
## [Unreleased]
6+
7+
### Added
8+
- **`:agents-kt-ksp` Gradle module** — new sibling artifact `ai.deep-code:agents-kt-ksp` published to Maven Central. Empty `SymbolProcessorProvider` skeleton; consumers can wire it via `ksp("ai.deep-code:agents-kt-ksp:VERSION")` but it does no work yet. Phase 2 of the KSP initiative (#1018). The validation pass (#1019) and schema-generation pass (#1020) plug into the processor in subsequent issues.
9+
- Multi-module Gradle setup: `settings.gradle.kts` includes `:agents-kt-ksp`; same Maven Central + Sonatype publishing wiring as the runtime artifact; same in-memory PGP signing.
10+
- Depends on `com.google.devtools.ksp:symbol-processing-api:2.3.7` (KSP2, decoupled from Kotlin compiler version).
11+
- Reads runtime annotations via `compileOnly(project(":"))` — never lands on the consumer's runtime classpath.
12+
513
## [0.2.2] — 2026-05-03
614

715
A feature-heavy patch release — REPL deployment, multi-agent JAR composition (Swarm), four new observability hooks, two new budget controls, classpath-resource prompt loading, and a slimmer README. Pre-1.0 patch bump — no breaking changes; all existing API surface preserved.

agents-kt-ksp/build.gradle.kts

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
plugins {
2+
kotlin("jvm")
3+
`maven-publish`
4+
signing
5+
}
6+
7+
group = "ai.deep-code"
8+
version = rootProject.version
9+
10+
repositories {
11+
mavenCentral()
12+
}
13+
14+
dependencyLocking {
15+
lockAllConfigurations()
16+
}
17+
18+
dependencies {
19+
// KSP processor API. KSP2 (2.x) is decoupled from the bundled Kotlin
20+
// compiler version, so the same KSP release works across a range of
21+
// Kotlin versions. See https://github.com/google/ksp.
22+
implementation("com.google.devtools.ksp:symbol-processing-api:2.3.7")
23+
24+
// Read annotations defined in the runtime library (e.g. @Generable).
25+
// compileOnly — never end up on the consumer's runtime classpath; the
26+
// consumer already has the runtime jar via their own implementation(...).
27+
compileOnly(project(":"))
28+
29+
testImplementation(kotlin("test"))
30+
}
31+
32+
kotlin {
33+
jvmToolchain(21)
34+
}
35+
36+
java {
37+
withSourcesJar()
38+
withJavadocJar()
39+
}
40+
41+
publishing {
42+
publications {
43+
create<MavenPublication>("mavenCentral") {
44+
from(components["java"])
45+
46+
artifactId = "agents-kt-ksp"
47+
48+
pom {
49+
name.set("Agents.KT KSP processor")
50+
description.set("Compile-time KSP processor for Agents.KT — validates @Generable shape and (in later releases) generates JSON Schema + lenient parser code.")
51+
url.set("https://github.com/Deep-CodeAI/Agents.KT")
52+
53+
licenses {
54+
license {
55+
name.set("MIT License")
56+
url.set("https://opensource.org/licenses/MIT")
57+
}
58+
}
59+
60+
developers {
61+
developer {
62+
id.set("kskobeltsyn")
63+
name.set("Konstantin Skobeltsyn")
64+
email.set("konstantin@deep-code.ai")
65+
}
66+
}
67+
68+
scm {
69+
url.set("https://github.com/Deep-CodeAI/Agents.KT")
70+
connection.set("scm:git:git://github.com/Deep-CodeAI/Agents.KT.git")
71+
developerConnection.set("scm:git:ssh://git@github.com/Deep-CodeAI/Agents.KT.git")
72+
}
73+
}
74+
}
75+
}
76+
77+
repositories {
78+
maven {
79+
name = "sonatype"
80+
url = uri("https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/")
81+
credentials {
82+
username = findProperty("sonatypeUsername") as String? ?: ""
83+
password = findProperty("sonatypePassword") as String? ?: ""
84+
}
85+
}
86+
}
87+
}
88+
89+
signing {
90+
val signingKey = findProperty("signing.key") as String?
91+
val signingPassword = findProperty("signing.password") as String?
92+
if (signingKey != null) {
93+
useInMemoryPgpKeys(signingKey, signingPassword ?: "")
94+
}
95+
sign(publishing.publications["mavenCentral"])
96+
}
97+
98+
tasks.withType<Sign>().configureEach {
99+
onlyIf { findProperty("signing.key") != null }
100+
}

agents-kt-ksp/gradle.lockfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This is a Gradle generated file for dependency locking.
2+
# Manual edits can break the build and are not advised.
3+
# This file is expected to be part of source control.
4+
com.google.devtools.ksp:symbol-processing-api:2.3.7=compileClasspath
5+
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.21=kotlinBuildToolsApiClasspath
6+
org.jetbrains.kotlin:kotlin-build-tools-compat:2.3.21=kotlinBuildToolsApiClasspath
7+
org.jetbrains.kotlin:kotlin-build-tools-cri-impl:2.3.21=kotlinBuildToolsApiClasspath
8+
org.jetbrains.kotlin:kotlin-build-tools-impl:2.3.21=kotlinBuildToolsApiClasspath
9+
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.3.21=kotlinBuildToolsApiClasspath
10+
org.jetbrains.kotlin:kotlin-compiler-runner:2.3.21=kotlinBuildToolsApiClasspath
11+
org.jetbrains.kotlin:kotlin-daemon-client:2.3.21=kotlinBuildToolsApiClasspath
12+
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.3.21=kotlinBuildToolsApiClasspath
13+
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath
14+
org.jetbrains.kotlin:kotlin-script-runtime:2.3.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain
15+
org.jetbrains.kotlin:kotlin-scripting-common:2.3.21=kotlinCompilerPluginClasspathMain
16+
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.3.21=kotlinCompilerPluginClasspathMain
17+
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.3.21=kotlinCompilerPluginClasspathMain
18+
org.jetbrains.kotlin:kotlin-scripting-jvm:2.3.21=kotlinCompilerPluginClasspathMain
19+
org.jetbrains.kotlin:kotlin-stdlib:2.3.21=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain
20+
org.jetbrains.kotlin:kotlin-tooling-core:2.3.21=kotlinBuildToolsApiClasspath
21+
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath
22+
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain
23+
empty=kotlinScriptDefExtensions
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package agents_engine.ksp
2+
3+
import com.google.devtools.ksp.processing.Resolver
4+
import com.google.devtools.ksp.processing.SymbolProcessor
5+
import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
6+
import com.google.devtools.ksp.symbol.KSAnnotated
7+
8+
/**
9+
* KSP processor entry point for Agents.KT (#1018, P2.1).
10+
*
11+
* Currently a no-op skeleton — exists so the `:agents-kt-ksp` artifact can be
12+
* published, applied via the KSP plugin in consumer projects, and exercised
13+
* end-to-end without doing any work yet. The validation pass (#1019) and
14+
* schema-generation pass (#1020) plug into [process] in subsequent issues.
15+
*/
16+
class AgentsKtSymbolProcessor(
17+
@Suppress("unused") private val env: SymbolProcessorEnvironment,
18+
) : SymbolProcessor {
19+
20+
override fun process(resolver: Resolver): List<KSAnnotated> {
21+
// #1019 will walk every @Generable class here and emit compile-time
22+
// validation errors via env.logger.error(...).
23+
// #1020 will then generate per-class *_GeneratedSchema.kt files using
24+
// env.codeGenerator.createNewFile(...).
25+
return emptyList()
26+
}
27+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package agents_engine.ksp
2+
3+
import com.google.devtools.ksp.processing.SymbolProcessor
4+
import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
5+
import com.google.devtools.ksp.processing.SymbolProcessorProvider
6+
7+
/**
8+
* Service-loader entry point. KSP picks this up via
9+
* `META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider`.
10+
*
11+
* Consumers apply the KSP plugin and add `ksp("ai.deep-code:agents-kt-ksp:0.3.0")`
12+
* to their dependencies; KSP discovers this provider at compile time and runs
13+
* [AgentsKtSymbolProcessor.process] over their source tree.
14+
*/
15+
class AgentsKtSymbolProcessorProvider : SymbolProcessorProvider {
16+
override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor =
17+
AgentsKtSymbolProcessor(environment)
18+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
agents_engine.ksp.AgentsKtSymbolProcessorProvider

gradle/verification-metadata.xml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
<sha256 value="8acb1f3b72a6f026916ac0735bad9aab0293d527edb7b365327def13a9367b7a" origin="Generated by Gradle"/>
3131
</artifact>
3232
</component>
33+
<component group="com.google.devtools.ksp" name="symbol-processing-api" version="2.3.7">
34+
<artifact name="symbol-processing-api-2.3.7.jar">
35+
<sha256 value="bc5c7eca84d8142504f28bb1892bb4d1979feffcdbd6061924ef895510480a02" origin="Generated by Gradle"/>
36+
</artifact>
37+
<artifact name="symbol-processing-api-2.3.7.module">
38+
<sha256 value="b38828a894dde24523470bad734d264546742de456a7f8128f670bdcd5952e25" origin="Generated by Gradle"/>
39+
</artifact>
40+
</component>
3341
<component group="com.google.errorprone" name="error_prone_annotations" version="2.27.0">
3442
<artifact name="error_prone_annotations-2.27.0.jar">
3543
<sha256 value="24c923372c58e35d0b9f16a028929bb9aedc77521867c274f2bd0735df5ba1f5" origin="Generated by Gradle"/>
@@ -74,6 +82,14 @@
7482
<sha256 value="d811cf9f118cc2cad130c9427ad55c174d4c0a6f1a00ac1ae1c9bcbec5c44b19" origin="Generated by Gradle"/>
7583
</artifact>
7684
</component>
85+
<component group="junit" name="junit" version="4.13.2">
86+
<artifact name="junit-4.13.2.jar">
87+
<sha256 value="8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3" origin="Generated by Gradle"/>
88+
</artifact>
89+
<artifact name="junit-4.13.2.pom">
90+
<sha256 value="569b6977ee4603c965c1c46c3058fa6e969291b0160eb6964dd092cd89eadd94" origin="Generated by Gradle"/>
91+
</artifact>
92+
</component>
7793
<component group="net.sf.jopt-simple" name="jopt-simple" version="4.9">
7894
<artifact name="jopt-simple-4.9.jar">
7995
<sha256 value="26c5856e954b5f864db76f13b86919b59c6eecf9fd930b96baa8884626baf2f5" origin="Generated by Gradle"/>
@@ -132,6 +148,14 @@
132148
<sha256 value="e08028131375b357d1d28734e9a4fb4216da84b240641cb3ef7e7c7d628223fc" origin="Generated by Gradle"/>
133149
</artifact>
134150
</component>
151+
<component group="org.bouncycastle" name="bcpg-jdk18on" version="1.80">
152+
<artifact name="bcpg-jdk18on-1.80.jar">
153+
<sha256 value="3799a0d53511b860780af43c44ae8e0519afabb263195af40174f46312cd58bd" origin="Generated by Gradle"/>
154+
</artifact>
155+
<artifact name="bcpg-jdk18on-1.80.pom">
156+
<sha256 value="07a246c2adafb628783a1ae84ac18d4df4025df06ae3634dfe9387ab94f9ea74" origin="Generated by Gradle"/>
157+
</artifact>
158+
</component>
135159
<component group="org.bouncycastle" name="bcpg-jdk18on" version="1.84">
136160
<artifact name="bcpg-jdk18on-1.84.jar">
137161
<sha256 value="c0e6303a0d7589040f400950ecee87a14b81312e84ed15e5390ebb0c4566ddab" origin="Generated by Gradle"/>
@@ -140,6 +164,14 @@
140164
<sha256 value="242b539c62307360866140fd6f728eb7b011a854ad45ff4367dc8352d3a19e30" origin="Generated by Gradle"/>
141165
</artifact>
142166
</component>
167+
<component group="org.bouncycastle" name="bcpkix-jdk18on" version="1.80">
168+
<artifact name="bcpkix-jdk18on-1.80.jar">
169+
<sha256 value="4f4ba6a92617ea19dc183f0fa5db492eee426fdde2a0a2d6c94777ffd1af6413" origin="Generated by Gradle"/>
170+
</artifact>
171+
<artifact name="bcpkix-jdk18on-1.80.pom">
172+
<sha256 value="a4a122113467b728e18f26fb0cfd57f0b1a0d7c4a53b86718ace70bf8b86ed47" origin="Generated by Gradle"/>
173+
</artifact>
174+
</component>
143175
<component group="org.bouncycastle" name="bcpkix-jdk18on" version="1.84">
144176
<artifact name="bcpkix-jdk18on-1.84.jar">
145177
<sha256 value="c87f16ed9e5ec61bc94151e9f3646ac44e50cd448121ce84367fa4b7ec7ec1bb" origin="Generated by Gradle"/>
@@ -148,6 +180,14 @@
148180
<sha256 value="c1281ed5eaf8f3e405557e7a5205cb6f3cdf753f84de9b1a815c75ebdeb9992a" origin="Generated by Gradle"/>
149181
</artifact>
150182
</component>
183+
<component group="org.bouncycastle" name="bcprov-jdk18on" version="1.80">
184+
<artifact name="bcprov-jdk18on-1.80.jar">
185+
<sha256 value="e8ad209f8c58d291a37ca9750e9e9fac60596956c983e49dd8282381dd8b3249" origin="Generated by Gradle"/>
186+
</artifact>
187+
<artifact name="bcprov-jdk18on-1.80.pom">
188+
<sha256 value="a0a75c76d91c421eea56d0f6062fb8f63edf7fac7ec724fd420ccdcad7181d43" origin="Generated by Gradle"/>
189+
</artifact>
190+
</component>
151191
<component group="org.bouncycastle" name="bcprov-jdk18on" version="1.84">
152192
<artifact name="bcprov-jdk18on-1.84.jar">
153193
<sha256 value="64d6c5a6121fcd927152dd182cbed39afe0fda641a970d9bcc0c9cb1858b2731" origin="Generated by Gradle"/>
@@ -156,6 +196,14 @@
156196
<sha256 value="ce7abb4a91ba5d2a73fdf17a3df4762e3605a0392cc7983ef2f1ae16cd384cc3" origin="Generated by Gradle"/>
157197
</artifact>
158198
</component>
199+
<component group="org.bouncycastle" name="bcutil-jdk18on" version="1.80">
200+
<artifact name="bcutil-jdk18on-1.80.jar">
201+
<sha256 value="22eca687f7955411f456af33e6ea8e68fc73cd80cb8b32aa5f7a8b1827d7c678" origin="Generated by Gradle"/>
202+
</artifact>
203+
<artifact name="bcutil-jdk18on-1.80.pom">
204+
<sha256 value="421a7de4bfeb9c5b38b1fc47c426a087d90878955d4107f5b7a82eb1d7b747b6" origin="Generated by Gradle"/>
205+
</artifact>
206+
</component>
159207
<component group="org.bouncycastle" name="bcutil-jdk18on" version="1.84">
160208
<artifact name="bcutil-jdk18on-1.84.jar">
161209
<sha256 value="b374e16963421fb9cfb01cc20d7ad8fd2f8b8188e3eef0ec0a8965e245f7619a" origin="Generated by Gradle"/>
@@ -164,6 +212,19 @@
164212
<sha256 value="0b0cb81a65ee1737d51286350a9e56489336b8f9908198febd0494243eea2978" origin="Generated by Gradle"/>
165213
</artifact>
166214
</component>
215+
<component group="org.hamcrest" name="hamcrest-core" version="1.3">
216+
<artifact name="hamcrest-core-1.3.jar">
217+
<sha256 value="66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9" origin="Generated by Gradle"/>
218+
</artifact>
219+
<artifact name="hamcrest-core-1.3.pom">
220+
<sha256 value="fde386a7905173a1b103de6ab820727584b50d0e32282e2797787c20a64ffa93" origin="Generated by Gradle"/>
221+
</artifact>
222+
</component>
223+
<component group="org.hamcrest" name="hamcrest-parent" version="1.3">
224+
<artifact name="hamcrest-parent-1.3.pom">
225+
<sha256 value="6d535f94efb663bdb682c9f27a50335394688009642ba7a9677504bc1be4129b" origin="Generated by Gradle"/>
226+
</artifact>
227+
</component>
167228
<component group="org.jetbrains" name="annotations" version="13.0">
168229
<artifact name="annotations-13.0.jar">
169230
<sha256 value="ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478" origin="Generated by Gradle"/>
@@ -446,6 +507,14 @@
446507
<sha256 value="d76413ad2af842264fca36c6780a8cc66500667d990366f254f75a87842a89bc" origin="Generated by Gradle"/>
447508
</artifact>
448509
</component>
510+
<component group="org.jetbrains.kotlin" name="kotlin-test-junit" version="2.3.21">
511+
<artifact name="kotlin-test-junit-2.3.21.jar">
512+
<sha256 value="554739f282eaca114882ad7effcd8523de2651eb6d65189624425110992ca4ce" origin="Generated by Gradle"/>
513+
</artifact>
514+
<artifact name="kotlin-test-junit-2.3.21.module">
515+
<sha256 value="7639fb8e0b9fc8bb8c219ffd2a9fc983c8e2653b30e4d2fa375cdbaac0036bfe" origin="Generated by Gradle"/>
516+
</artifact>
517+
</component>
449518
<component group="org.jetbrains.kotlin" name="kotlin-test-junit5" version="2.3.21">
450519
<artifact name="kotlin-test-junit5-2.3.21.jar">
451520
<sha256 value="24350f53fe1be3b7fe0e8fcd7e1b777eb0b8fa16af720617fe7e87d0a77c2797" origin="Generated by Gradle"/>

settings.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
rootProject.name = "agents-kt"
2+
3+
include(":agents-kt-ksp")

0 commit comments

Comments
 (0)