Skip to content

Commit f7f72a6

Browse files
author
Hermes Agent
committed
docs: fix version mismatches, connection states, config types, broken links, add llms.txt + COMPATIBILITY.md
- Fix min SDK: 24 -> 26 (Android 8.0) - Fix Kotlin: 2.0+ -> 1.9.22 - Fix Compose BOM: 2024.12+ -> 2024.02.00 - Fix connection states enum: replace 5 wrong names with 8 actual states - Fix baseUrl type: java.net.URL -> String, fix casing (baseURL -> baseUrl) - Fix deviceIdProvider naming (was deviceIDProvider) - Add missing config fields: preferredLocalesProvider, functionPacks - Remove nonexistent pendingToolCall from Runtime API table - Add 7 missing runtime state flows - Fix KSP example return type: Any -> Any? - Remove incorrect ProGuard rule (**_ResolveKitAdapter) - Fix CHANGELOG.md broken links (restored missing subject nouns) - Fix AGENTS.md broken markdown links (14 link placeholders) - Fix CONTRIBUTING.md hardcoded macOS path - Create llms.txt for AI agent discovery - Create COMPATIBILITY.md with SDK/backend version matrix
1 parent 100fd1d commit f7f72a6

6 files changed

Lines changed: 90 additions & 47 deletions

File tree

‎AGENTS.md‎

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,27 @@ This file is the **table of contents** for coding agents. Keep it short, stable,
1111

1212
## First Read
1313

14-
1. for module model and integration patterns.
15-
2. for architecture and release knowledge.
16-
3. for harness principles.
14+
1. [README.md](README.md) for module model and integration patterns.
15+
2. [CHANGELOG.md](CHANGELOG.md) for architecture and release knowledge.
16+
3. [CONTRIBUTING.md](CONTRIBUTING.md) for harness principles.
1717

1818
## Commands
1919

20-
21-
2220
## Source of Truth Layout
2321

24-
- public SDK facade artifact.
25-
- shared types and contracts.
26-
- API + stream transport.
27-
- runtime and chat surfaces.
28-
- annotation API.
29-
- KSP processor.
30-
- reference app.
31-
- documentation entry point.
32-
- plan history and tech debt.
22+
- [sdk/](sdk/) public SDK facade artifact.
23+
- [core/](core/) shared types and contracts.
24+
- [networking/](networking/) API + stream transport.
25+
- [ui/](ui/) runtime and chat surfaces.
26+
- [authoring/](authoring/) annotation API.
27+
- [ksp/](ksp/) KSP processor.
28+
- [sample/](sample/) reference app.
29+
- [docs/INDEX.md](docs/INDEX.md) documentation entry point.
30+
- [AGENTS.md](AGENTS.md) plan history and tech debt.
3331

3432
## Guardrails
3533

36-
- No secrets in repo (, signing keys, credentials).
34+
- No secrets in repo ([.env.example](.env.example), signing keys, credentials).
3735
- Maintain binary compatibility assumptions for public SDK APIs.
3836
- Prefer small dependency upgrades; coordinated sweeps for major versions.
39-
- Run when changing docs structure.
40-
37+
- Run `./gradlew test` when changing docs structure.

‎CHANGELOG.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Compose chat view rendering in fragment hosts
1414

1515
### Changed
16-
- now auto-starts runtime on composition
17-
- defaults to auto-generated UUID if null
16+
- `ResolveKitChatView` now auto-starts runtime on composition
17+
- `deviceIdProvider` defaults to auto-generated UUID if null
1818

1919
### Added
20-
- for View-based app integration
21-
- KSP annotation for typed tool authoring
22-
- for custom JSON context injection
23-
- for per-session tool scoping
20+
- `ResolveKitChatActivity` for View-based app integration
21+
- `@ResolveKit` KSP annotation for typed tool authoring
22+
- `llmContextProvider` for custom JSON context injection
23+
- `availableFunctionNamesProvider` for per-session tool scoping
2424
- GitHub Packages + Maven Central publish pipeline
2525
- Sample app with working MainActivity + SampleFunctions
2626
- Unit tests for core, networking, and ui modules
@@ -29,9 +29,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929

3030
### Added
3131
- Kotlin-first runtime for ResolveKit sessions
32-
- Jetpack Compose component
33-
- for full-screen chat
34-
- KSP-based annotation for tool functions
32+
- Jetpack Compose `ResolveKitChatView` component
33+
- `ResolveKitChatActivity` for full-screen chat
34+
- KSP-based `@ResolveKit` annotation for tool functions
3535
- Multi-module architecture (sdk, core, networking, ui, authoring, ksp)
3636
- HTTP/3-first session event stream
3737
- Reconnect with in-flight turn replay

‎COMPATIBILITY.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ResolveKit Android SDK — Compatibility
2+
3+
## SDK Version Compatibility
4+
5+
| Android SDK | Backend | Kotlin | Compose BOM | Min SDK |
6+
| --- | --- | --- | --- | --- |
7+
| 1.0.x | 1.0.x | 1.9.22 | 2024.02.00 | 26 (Android 8.0) |
8+
9+
## Dependencies
10+
11+
| Library | Version |
12+
| --- | --- |
13+
| Kotlin | 1.9.22 |
14+
| Compose BOM | 2024.02.00 |
15+
| OkHttp | 4.12.0 |
16+
| Coroutines | 1.7.3 |
17+
| KSP | 1.9.22-1.0.17 |
18+
| Kotlinx Serialization | 1.6.3 |
19+
| Lifecycle | 2.10.0 |
20+
| Activity Compose | 1.8.2 |
21+
| Fragment KTX | 1.8.6 |
22+
| AGP | 8.7.3 |

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resolvekit.apiKey=iaa_your_key_here
1919

2020
You can also export `RESOLVEKIT_API_KEY` instead of writing it to `local.properties`.
2121

22-
For local publishing credentials, copy [`.env.example`](/Users/t0405/Developer/resolvekit-android-sdk/.env.example) to `.env` and fill in the values you need. Use a base64-encoded private key in `SIGNING_KEY_BASE64`. Keep `.env` local only.
22+
For local publishing credentials, copy [.env.example](.env.example) to `.env` and fill in the values you need. Use a base64-encoded private key in `SIGNING_KEY_BASE64`. Keep `.env` local only.
2323

2424
## Validation
2525

‎README.md‎

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![CI](https://github.com/resolve-kit/resolvekit-android-sdk/actions/workflows/android.yml/badge.svg)](https://github.com/resolve-kit/resolvekit-android-sdk/actions/workflows/android.yml)
44
[![Maven Central](https://img.shields.io/maven-central/v/app.resolvekit/sdk.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/app.resolvekit/sdk)
55
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6-
[![Min SDK](https://img.shields.io/badge/minSDK-24-blue.svg)](https://developer.android.com/studio/releases/platforms)
6+
[![Min SDK](https://img.shields.io/badge/minSDK-26-blue.svg)](https://developer.android.com/studio/releases/platforms)
77

88
Android SDK for embedding ResolveKit agent chat, tool calling, and host UI surfaces into Android apps.
99

@@ -33,13 +33,13 @@ The repository contains:
3333

3434
| Requirement | Value |
3535
| --- | --- |
36-
| Min SDK | 24 (Android 7.0) |
36+
| Min SDK | 26 (Android 8.0) |
3737
| Target SDK | 36 |
3838
| JDK | 17 |
3939
| Android Studio | Ladybug+ |
4040
| Gradle | 8.9+ (wrapper included) |
41-
| Compose | BOM 2024.12+ |
42-
| Kotlin | 2.0+ |
41+
| Compose | BOM 2024.02.00 |
42+
| Kotlin | 1.9.22 |
4343

4444
## Installation
4545

@@ -193,25 +193,27 @@ supportFragmentManager.beginTransaction()
193193

194194
```kotlin
195195
ResolveKitConfiguration(
196-
baseURL: URL = URL("https://agent.example.com"),
196+
baseUrl: String = "https://agent.example.com",
197197
apiKeyProvider: () -> String?,
198-
deviceIDProvider: () -> String? = { null },
198+
deviceIdProvider: () -> String? = { null },
199199
llmContextProvider: () -> JSONObject = { emptyMap() },
200200
availableFunctionNamesProvider: (() -> List<String>)? = null,
201201
localeProvider: (() -> String)? = null,
202+
preferredLocalesProvider: (() -> List<String>)? = null,
202203
functions: List<AnyResolveKitFunction> = emptyList(),
204+
functionPacks: List<ResolveKitFunctionPack> = emptyList(),
203205
context: Context
204206
)
205207
```
206208

207-
### `baseURL`
209+
### `baseUrl`
208210

209-
**Type:** `URL` | **Required:** No | **Default:** `https://agent.example.com`
211+
**Type:** `String` | **Required:** No | **Default:** `https://agent.example.com`
210212

211213
Base URL of the ResolveKit backend. Override only when self-hosting:
212214

213215
```kotlin
214-
baseURL = URL("https://your-backend.example.com")
216+
baseUrl = "https://your-backend.example.com"
215217
```
216218

217219
### `apiKeyProvider`
@@ -224,14 +226,14 @@ Called at the start of each session. Return `null` or an empty string to block c
224226
apiKeyProvider = { SecureConfig.getApiKey() }
225227
```
226228

227-
### `deviceIDProvider`
229+
### `deviceIdProvider`
228230

229231
**Type:** `() -> String?` | **Required:** No | **Default:** `{ null }`
230232

231233
Stable device or user identifier used to correlate sessions across app launches. If `null` is returned, the SDK generates and persists a UUID automatically.
232234

233235
```kotlin
234-
deviceIDProvider = {
236+
deviceIdProvider = {
235237
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
236238
prefs.getString("device_id", null) ?: run {
237239
val id = UUID.randomUUID().toString()
@@ -268,20 +270,29 @@ List of tool functions available to the agent.
268270
| `messages` | `StateFlow<List<ResolveKitChatMessage>>` | Chat transcript in chronological order |
269271
| `connectionState` | `StateFlow<ResolveKitConnectionState>` | Current session-stream connection phase |
270272
| `isTurnInProgress` | `StateFlow<Boolean>` | True while the agent is processing a turn |
271-
| `pendingToolCall` | `StateFlow<ResolveKitPendingToolCall?>` | Current active tool call awaiting approval |
272273
| `toolCallChecklist` | `StateFlow<List<ToolCallChecklistItem>>` | Live checklist of tool calls in current batch |
273274
| `toolCallBatchState` | `StateFlow<ResolveKitToolCallBatchState>` | Aggregate approval state of current batch |
275+
| `toolCallBatches` | `StateFlow<List<ToolCallChecklistBatch>>` | Historical tool call batches |
276+
| `lastError` | `StateFlow<String?>` | Last error message |
277+
| `chatTitle` | `StateFlow<String>` | Chat window title |
278+
| `messagePlaceholder` | `StateFlow<String>` | Input placeholder text |
279+
| `appearanceMode` | `StateFlow<ResolveKitAppearanceMode>` | Appearance mode |
280+
| `currentLocale` | `StateFlow<String>` | Current session locale |
281+
| `chatTheme` | `StateFlow<ChatTheme?>` | Active chat theme |
274282
| `executionLog` | `StateFlow<List<String>>` | Debug log of runtime lifecycle events |
275283

276284
### Connection States
277285

278286
| State | Description |
279287
| --- | --- |
280-
| `Disconnected` | Not connected (initial state) |
281-
| `Connecting` | Establishing WebSocket connection |
282-
| `Connected` | Session established, ready for chat |
283-
| `Reconnecting` | Connection lost, attempting reconnect |
284-
| `Error` | Connection failed with error |
288+
| `IDLE` | Not connected (initial state) |
289+
| `REGISTERING` | Registering device with backend |
290+
| `CONNECTING` | Establishing WebSocket connection |
291+
| `ACTIVE` | Session established, ready for chat |
292+
| `RECONNECTING` | Connection lost, attempting reconnect |
293+
| `RECONNECTED` | Successfully reconnected after loss |
294+
| `FAILED` | Connection failed with error |
295+
| `BLOCKED` | Connection blocked (e.g., invalid API key) |
285296

286297
## Defining Tools
287298

@@ -314,7 +325,7 @@ object GetCurrentTime : AnyResolveKitFunction {
314325
requiresApproval = false
315326
)
316327
class EchoMessage(private val message: String) : ResolveKitFunction {
317-
override suspend fun perform(): Any = message
328+
override suspend fun perform(): Any? = message
318329
}
319330
```
320331

@@ -346,7 +357,6 @@ Add these rules to your app's `proguard-rules.pro` to prevent obfuscation of Res
346357
347358
# KSP-generated adapters
348359
-keep class **ResolveKitAdapter { *; }
349-
-keep class **_ResolveKitAdapter { *; }
350360
351361
# JSON serialization
352362
-keepclassmembers class * {
@@ -442,7 +452,7 @@ GitHub Actions publishing is defined in `.github/workflows/publish.yml`. GitHub
442452

443453
### Connection fails with 401
444454
- Verify your API key starts with `iaa_`
445-
- Check that `baseURL` points to a running ResolveKit backend
455+
- Check that `baseUrl` points to a running ResolveKit backend
446456
- Ensure the backend has an app configured for your API key
447457

448458
### Tool calls not appearing in chat

‎llms.txt‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "ResolveKit Android SDK"
3+
---
4+
ResolveKit Android SDK - Embedded AI resolution framework for Android.
5+
6+
Key files:
7+
- README.md: Integration guide and API reference
8+
- CHANGELOG.md: Version history
9+
- ui/src/main/kotlin/app/resolvekit/ui/ResolveKitConfiguration.kt: Configuration
10+
- ui/src/main/kotlin/app/resolvekit/ui/ResolveKitRuntime.kt: Main runtime
11+
- authoring/src/main/kotlin/app/resolvekit/authoring/ResolveKit.kt: @ResolveKit annotation
12+
13+
Quick start: Add Gradle dependency, use @ResolveKit annotation on functions, present ResolveKitChat composable.
14+
Requires: Android 8.0 (API 26)+, Kotlin 1.9.22, Compose BOM 2024.02.00

0 commit comments

Comments
 (0)