Skip to content

Commit 1582969

Browse files
Skobeltsynclaude
andcommitted
release(#1695): v0.4.2 — clear BC dependabot false positives
Functionally identical to v0.4.1; consumer-visible POM is byte-for-byte the same (no BouncyCastle in runtimeClasspath, confirmed). The only change: make the existing BC 1.84 pin visible to Dependabot. Dependabot reads the submitted *requested* dependency graph, not the resolved graph, so our `force(...)` block was invisible to it — it kept alerting on 1.80-range CVEs that don't apply to our build (1.84 is patched per OSV + GHSA, and lockfile + verification-metadata both record 1.84 as resolved). Fix: declare the four BC artifacts explicitly at 1.84 via `compileOnly(...)` in build.gradle.kts. `compileOnly` doesn't ship to consumers (no transitive leak; runtimeClasspath stays clean), but gives Dependabot the explicit 1.84 nodes it reads from. Existing `configurations.all { force(...) }` block kept as belt-and-suspenders for any transitive request that bypasses compileClasspath. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f67dee9 commit 1582969

6 files changed

Lines changed: 77 additions & 112 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
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+
## [0.4.2] — 2026-05-12
6+
7+
### Security
8+
- **Make BouncyCastle 1.84 pin visible to Dependabot.** The existing `force(...)` block in `build.gradle.kts` already pins BC to 1.84 (the patched release per OSV + GHSA) and the lockfile + verification metadata confirm 1.84 is what resolves. However, Dependabot's submitted dependency graph reads *requested* versions, not resolved, and was still alerting on the 1.80-range CVEs that don't apply to our build. Declare BC 1.84 explicitly at the project level via `compileOnly(...)` so Dependabot sees the explicit 1.84 nodes. `compileOnly` does NOT ship to consumers and does NOT add to the runtime jar — `runtimeClasspath` stays free of BC, as before. No functional change for downstream users.
9+
510
## [0.4.1] — 2026-05-12
611

712
Dependency refresh on top of the v0.4.0 feature set. v0.4.0 was tagged on GitHub but never reached Maven Central; **0.4.1 is the first published release of the three-providers feature set**.

PUBLISHING.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ Escape newlines as `\n` for the property file.
5757
./gradlew publishMavenCentralPublicationToMavenLocal
5858
```
5959

60-
Artifacts land in `~/.m2/repository/ai/deep-code/agents-kt/0.4.1/`.
60+
Artifacts land in `~/.m2/repository/ai/deep-code/agents-kt/0.4.2/`.
6161

6262
### 2. Generate checksums and create bundle
6363

6464
```bash
65-
SRC=~/.m2/repository/ai/deep-code/agents-kt/0.4.1
66-
DEST=build/bundle/ai/deep-code/agents-kt/0.4.1
65+
SRC=~/.m2/repository/ai/deep-code/agents-kt/0.4.2
66+
DEST=build/bundle/ai/deep-code/agents-kt/0.4.2
6767
mkdir -p "$DEST"
6868

6969
for f in "$SRC"/agents-kt-*; do
@@ -78,17 +78,17 @@ done
7878

7979
```bash
8080
cd build/bundle
81-
zip -r ../agents-kt-0.4.1-bundle.zip ai/
81+
zip -r ../agents-kt-0.4.2-bundle.zip ai/
8282
```
8383

84-
The ZIP must contain the full path: `ai/deep-code/agents-kt/0.4.1/...`
84+
The ZIP must contain the full path: `ai/deep-code/agents-kt/0.4.2/...`
8585

8686
## Upload to Central Portal
8787

8888
1. Go to [central.sonatype.com](https://central.sonatype.com)**Deployments****Publish Component**
89-
2. **Deployment Name:** `ai.deep-code:agents-kt:0.4.1`
89+
2. **Deployment Name:** `ai.deep-code:agents-kt:0.4.2`
9090
3. **Description:** `Typed Kotlin DSL framework for AI agent systems`
91-
4. Upload `build/agents-kt-0.4.1-bundle.zip`
91+
4. Upload `build/agents-kt-0.4.2-bundle.zip`
9292
5. Wait for validation to pass
9393
6. Click **Publish**
9494

@@ -99,27 +99,27 @@ Propagation to Maven Central search takes 10-30 minutes after publishing.
9999
Each artifact needs: the file itself, `.asc` (GPG signature), `.md5`, and `.sha1`.
100100

101101
```
102-
ai/deep-code/agents-kt/0.4.1/
103-
agents-kt-0.4.1.jar
104-
agents-kt-0.4.1.jar.asc
105-
agents-kt-0.4.1.jar.md5
106-
agents-kt-0.4.1.jar.sha1
107-
agents-kt-0.4.1-sources.jar
108-
agents-kt-0.4.1-sources.jar.asc
109-
agents-kt-0.4.1-sources.jar.md5
110-
agents-kt-0.4.1-sources.jar.sha1
111-
agents-kt-0.4.1-javadoc.jar
112-
agents-kt-0.4.1-javadoc.jar.asc
113-
agents-kt-0.4.1-javadoc.jar.md5
114-
agents-kt-0.4.1-javadoc.jar.sha1
115-
agents-kt-0.4.1.pom
116-
agents-kt-0.4.1.pom.asc
117-
agents-kt-0.4.1.pom.md5
118-
agents-kt-0.4.1.pom.sha1
119-
agents-kt-0.4.1.module
120-
agents-kt-0.4.1.module.asc
121-
agents-kt-0.4.1.module.md5
122-
agents-kt-0.4.1.module.sha1
102+
ai/deep-code/agents-kt/0.4.2/
103+
agents-kt-0.4.2.jar
104+
agents-kt-0.4.2.jar.asc
105+
agents-kt-0.4.2.jar.md5
106+
agents-kt-0.4.2.jar.sha1
107+
agents-kt-0.4.2-sources.jar
108+
agents-kt-0.4.2-sources.jar.asc
109+
agents-kt-0.4.2-sources.jar.md5
110+
agents-kt-0.4.2-sources.jar.sha1
111+
agents-kt-0.4.2-javadoc.jar
112+
agents-kt-0.4.2-javadoc.jar.asc
113+
agents-kt-0.4.2-javadoc.jar.md5
114+
agents-kt-0.4.2-javadoc.jar.sha1
115+
agents-kt-0.4.2.pom
116+
agents-kt-0.4.2.pom.asc
117+
agents-kt-0.4.2.pom.md5
118+
agents-kt-0.4.2.pom.sha1
119+
agents-kt-0.4.2.module
120+
agents-kt-0.4.2.module.asc
121+
agents-kt-0.4.2.module.md5
122+
agents-kt-0.4.2.module.sha1
123123
```
124124

125125
## Version Bump

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Topical guides:
173173
```kotlin
174174
// build.gradle.kts
175175
dependencies {
176-
implementation("ai.deep-code:agents-kt:0.4.1")
176+
implementation("ai.deep-code:agents-kt:0.4.2")
177177
}
178178
```
179179

RELEASE_NOTES.md

Lines changed: 24 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,43 @@
1-
# Agents.KT v0.4.1 — Three Providers, Refreshed Deps
1+
# Agents.KT v0.4.2 — Three Providers + Clean Dependabot
22

33
**Release date:** 2026-05-12
44

5-
**0.4.1 is the first Maven Central release of the three-providers feature set.** v0.4.0 was tagged on GitHub but never published; if you grabbed the artifacts manually from the v0.4.0 tag, switch your dependency declaration to `0.4.1` to pick up the security refresh.
5+
Functionally identical to v0.4.1. The only change is making the BouncyCastle 1.84 pin visible to Dependabot so the four false-positive alerts on `main` clear.
66

7-
## What's new (same as the v0.4.0 surface)
7+
## What changed
88

9-
### Three model providers, one `ModelClient`
9+
### BouncyCastle 1.84 declared explicitly (build-only)
1010

11-
```kotlin
12-
// Local / cloud Ollama (since 0.1)
13-
model { ollama("qwen2.5:7b"); host = "localhost"; port = 11434 }
14-
15-
// Anthropic — new
16-
model { claude("claude-opus-4-7"); apiKey = System.getenv("ANTHROPIC_API_KEY") }
17-
18-
// OpenAI Chat Completions — new
19-
model { openai("gpt-4o"); apiKey = System.getenv("OPENAI_API_KEY") }
20-
```
21-
22-
`LlmMessage` / `LlmResponse` are provider-agnostic. Each adapter handles the provider's own conventions internally — Anthropic's structured `tool_use` / `tool_result` content blocks, OpenAI's stringified `function.arguments` and synthesized `tool_call_id`s, Ollama's flat shape with inline-JSON fallback. The agentic loop on top is unchanged.
23-
24-
Both new adapters share the same boundary contract `OllamaClient` established: top-level provider error envelopes surface as `LlmProviderException`, not garbled text masquerading as model output (`#702`).
25-
26-
### Fail-fast at REPL startup
11+
The existing `force(...)` block in `build.gradle.kts` already pins BC to 1.84 — confirmed patched by both OSV and GHSA. The lockfile and `gradle/verification-metadata.xml` both record 1.84 as the resolved version. But Dependabot reads the *requested* dependency graph submitted by `gradle/actions/dependency-submission`, not the *resolved* graph, so it kept alerting on the 1.80 vulnerabilities that don't apply.
2712

28-
`LiveShowBuilder.precheck: (() -> Unit)?` runs after argument parsing and before the banner / `--once` / REPL prompt. Throw to abort; the runner prints `error: <msg>` and returns exit code 2. No more mid-spinner `java.net.ConnectException` on the first turn.
13+
The fix: declare BC 1.84 explicitly via `compileOnly(...)` at the project level. `compileOnly` does NOT propagate to consumers — `runtimeClasspath` stays free of BC, same as 0.4.1. The only effect is that Dependabot now sees explicit 1.84 nodes in the graph.
2914

3015
```kotlin
31-
LiveRunner.serve(captain, args) {
32-
prompt = "fib> "
33-
precheck = OllamaPreflight(host = "localhost", port = 11434)::check
16+
dependencies {
17+
compileOnly("org.bouncycastle:bcprov-jdk18on:1.84")
18+
compileOnly("org.bouncycastle:bcpg-jdk18on:1.84")
19+
compileOnly("org.bouncycastle:bcpkix-jdk18on:1.84")
20+
compileOnly("org.bouncycastle:bcutil-jdk18on:1.84")
3421
}
3522
```
3623

37-
The precheck hook is generic — config validation, environment checks, even a database connection can run before the user types anything (`#1132`).
38-
39-
### Typed `@Generable` args, live, on every provider
40-
41-
`TypedArgsLiveIntegrationTest` covers the full round-trip — `@Generable` schema generation → provider envelope (Ollama `parameters`, Anthropic `input_schema`, OpenAI `parameters`) → wire serialization → response parse → `KClass.constructFromMap` → typed executor — against real models. Three tests, one per provider, each gated so a fresh clone without keys stays green (`#1675`).
42-
43-
### `apiKey` no longer leaks through `toString`
44-
45-
`ModelConfig.toString()` masks the API key as `apiKey=sk-ant…108chars` instead of dumping the body. `equals`/`hashCode` still consider apiKey (cache keying stays correct); masking is observation-only. `SECURITY.md` gained a "Handling LLM provider credentials" section with the `.secrets/` convention, file perms, the masking contract, and a "if a key is committed → rotate first" runbook (`#1665`).
46-
47-
## Fixed
48-
49-
### OllamaClient: assistant tool-call turns wire `content: null`
24+
Why we don't drop the `force(...)` block: it's still belt-and-suspenders for any transitive request that bypasses `compileClasspath`.
5025

51-
External bug report: every multi-turn agentic loop against Ollama Cloud `gpt-oss:120b-cloud` / `gpt-oss:20b-cloud` was hitting `500 Internal Server Error`. Root cause: assistant messages with `tool_calls` and no text were serialised as `content: ""`, but the OpenAI / Ollama chat-completions spec says `content` should be `null` (or omitted) when `tool_calls` is present.
26+
## Inherited from v0.4.1
5227

53-
The fix null-coerces only when **all three** hold: role is `assistant`, `tool_calls` is non-empty, and content is blank. Legitimate empty-string assistant turns (no tool_calls) keep their previous shape. Ollama-only patch; the other two adapters were already spec-compliant. Six regression cases cover the truth table from the bug report (`#1694`).
28+
(See `RELEASE_NOTES.md` in the v0.4.1 tag for the full notes; same content lands in 0.4.2 unchanged.)
5429

55-
## Security refresh (new in 0.4.1)
56-
57-
- `kotlinx-coroutines-core` and `kotlinx-coroutines-test` 1.10.2 → 1.11.0 (production + test).
58-
- Gradle wrapper 9.4.1 → 9.5.0 (build).
59-
- Lockfile and `gradle/verification-metadata.xml` regenerated.
60-
61-
Closes the four dependabot advisories on `main` and supersedes the open dependabot PRs.
62-
63-
## Binary compatibility
64-
65-
**Source-compatible** with 0.3.x — every new public API has defaults; existing code compiles unchanged.
66-
67-
**Wire-shape change for Ollama tool-call messages** (`#1694`) — assistant turns with `tool_calls` and no textual content now serialize as `content: null` on the wire instead of `content: ""`. Pure payload shaping; in-memory `LlmMessage` is unchanged. Local Ollama tolerated both shapes; Ollama Cloud's strict validators only accept the new form, so this is functionally a regression fix for cloud users.
68-
69-
## Migration
70-
71-
If you're on 0.3.x and only using Ollama, nothing to do. Bump the version, rebuild, ship.
72-
73-
If you want to try Claude or OpenAI:
74-
75-
```kotlin
76-
agent("coder") {
77-
model {
78-
claude("claude-opus-4-7") // or openai("gpt-4o")
79-
apiKey = System.getenv("ANTHROPIC_API_KEY")
80-
temperature = 0.0
81-
maxTokens = 4096 // required for both cloud providers
82-
}
83-
skills { /* unchanged */ }
84-
}
85-
```
30+
- Three model providers — Ollama, Claude, OpenAI (#1644, #1656)
31+
- LiveRunner precheck hook + `OllamaPreflight` (#1132)
32+
- Live typed-args integration tests across all three providers (#1675)
33+
- `ModelConfig.toString()` masks `apiKey` (#1665)
34+
- Ollama wire-shape fix: `content: null` on assistant tool-call turns (#1694)
35+
- Dependency refresh: `kotlinx-coroutines` 1.11.0, Gradle 9.5.0
8636

87-
Local development convention: keep keys in `<repo-root>/.secrets/anthropic-key` and `<repo-root>/.secrets/openai-key` (gitignored), `chmod 0600`. See `SECURITY.md` for the full handling guidance.
37+
## Migration from v0.4.1
8838

89-
## What's next (Phase 2)
39+
Nothing to do. Drop-in upgrade. `runtimeClasspath` is byte-for-byte identical.
9040

91-
- Streaming (`Flow<LlmResponseChunk>`) on every adapter — kills the dead-air spinner.
92-
- Prompt caching headers for Claude — `cache_control: ephemeral` on long system prompts and knowledge blocks.
93-
- KSP compile-time `@Generable` (replaces runtime reflection).
94-
- Google (Gemini) adapter — last on the multi-provider list.
95-
- `Tool<IN, OUT>` base hierarchy + `McpTool<IN, OUT>` subclass, unblocking `grants { }` typed permissions.
41+
## Migration from 0.3.x
9642

97-
Full roadmap: [`docs/roadmap.md`](docs/roadmap.md).
43+
Same as 0.4.1 — see [`RELEASE_NOTES.md`](https://github.com/Deep-CodeAI/Agents.KT/blob/v0.4.1/RELEASE_NOTES.md) at the v0.4.1 tag.

build.gradle.kts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group = "ai.deep-code"
9-
version = "0.4.1"
9+
version = "0.4.2"
1010

1111
repositories {
1212
mavenCentral()
@@ -37,6 +37,20 @@ dependencies {
3737
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0")
3838
testImplementation(kotlin("test"))
3939
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.11.0")
40+
41+
// #1695 — Dependabot's submitted dependency graph reads requested
42+
// versions, not resolved. The `force(...)` block above pins to 1.84 (a
43+
// patched release with no known CVEs per OSV + GHSA), but dependabot
44+
// still sees the Kotlin Gradle plugin's transitive request for 1.80 and
45+
// alerts on the 1.80-range vulnerabilities. Declaring 1.84 explicitly at
46+
// the project level — via `compileOnly`, which does NOT ship to
47+
// consumers and does NOT add to the runtime jar — gives dependabot an
48+
// explicit 1.84 node in the graph so it stops flagging the resolved-away
49+
// 1.80 vulnerabilities.
50+
compileOnly("org.bouncycastle:bcprov-jdk18on:1.84")
51+
compileOnly("org.bouncycastle:bcpg-jdk18on:1.84")
52+
compileOnly("org.bouncycastle:bcpkix-jdk18on:1.84")
53+
compileOnly("org.bouncycastle:bcutil-jdk18on:1.84")
4054
}
4155

4256
kotlin {

gradle.lockfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ org.antlr:stringtemplate:3.2.1=pitest
88
org.apache.commons:commons-lang3:3.18.0=pitest
99
org.apache.commons:commons-text:1.14.0=pitest
1010
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
11-
org.bouncycastle:bcpg-jdk18on:1.84=kotlinBouncyCastleConfiguration
12-
org.bouncycastle:bcpkix-jdk18on:1.84=kotlinBouncyCastleConfiguration
13-
org.bouncycastle:bcprov-jdk18on:1.84=kotlinBouncyCastleConfiguration
14-
org.bouncycastle:bcutil-jdk18on:1.84=kotlinBouncyCastleConfiguration
11+
org.bouncycastle:bcpg-jdk18on:1.84=compileClasspath,kotlinBouncyCastleConfiguration
12+
org.bouncycastle:bcpkix-jdk18on:1.84=compileClasspath,kotlinBouncyCastleConfiguration
13+
org.bouncycastle:bcprov-jdk18on:1.84=compileClasspath,kotlinBouncyCastleConfiguration
14+
org.bouncycastle:bcutil-jdk18on:1.84=compileClasspath,kotlinBouncyCastleConfiguration
1515
org.jetbrains.kotlin:abi-tools-api:2.3.21=kotlinInternalAbiValidation
1616
org.jetbrains.kotlin:abi-tools:2.3.21=kotlinInternalAbiValidation
1717
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath

0 commit comments

Comments
 (0)