Skip to content

fix: resolve CI build failures — wrong Koog version + dead JitPack deps#3

Merged
Flynn013 merged 18 commits into
developfrom
claude/build-clu-android-ide-pem2N
May 18, 2026
Merged

fix: resolve CI build failures — wrong Koog version + dead JitPack deps#3
Flynn013 merged 18 commits into
developfrom
claude/build-clu-android-ide-pem2N

Conversation

@Flynn013
Copy link
Copy Markdown
Owner

Three root causes identified and fixed:

  1. Wrong Koog version: libs.versions.toml pinned koog="0.8.0" but the root gradle.properties declares version=1.0.0-preview. ai.koog:koog-agents:0.8.0 does not exist on Maven Central, causing every dependency resolution to fail. Fixed: koog = "1.0.0-preview"

  2. Unresolvable JitPack dependencies: three deps declared but never imported anywhere in the source — removed from both libs.versions.toml and build.gradle.kts:

    • com.github.pavelc4:Rin:main-SNAPSHOT (SNAPSHOT from unknown user, highly unreliable)
    • com.github.vvsdevs.RemoteCompose:*:0.0.5 (coordinates don't resolve on JitPack)
    • com.github.connectbot:termlib:1.0.1 (zero imports; RemoteComposePane is pure Compose)
  3. No local-publish safety net: on forks or pre-release branches Maven Central may not yet have the artifact. Added koog-publish job that runs :koog-agents:publishToMavenLocal (--no-daemon -x test, soft failure via ||echo) and caches ~/.m2/repository/ai/koog via actions/cache/save@v4. The three build jobs (lint, unit-tests, assemble-debug) now depend on koog-publish and restore from that cache before running their Gradle steps.

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL

Describe what this PR changes and why.

BREAKING:
*

DEPRECATED:
*

closes

Three root causes identified and fixed:

1. Wrong Koog version: libs.versions.toml pinned koog="0.8.0" but the root
   gradle.properties declares version=1.0.0-preview. ai.koog:koog-agents:0.8.0
   does not exist on Maven Central, causing every dependency resolution to fail.
   Fixed: koog = "1.0.0-preview"

2. Unresolvable JitPack dependencies: three deps declared but never imported
   anywhere in the source — removed from both libs.versions.toml and build.gradle.kts:
   - com.github.pavelc4:Rin:main-SNAPSHOT (SNAPSHOT from unknown user, highly unreliable)
   - com.github.vvsdevs.RemoteCompose:*:0.0.5 (coordinates don't resolve on JitPack)
   - com.github.connectbot:termlib:1.0.1 (zero imports; RemoteComposePane is pure Compose)

3. No local-publish safety net: on forks or pre-release branches Maven Central
   may not yet have the artifact. Added koog-publish job that runs
   :koog-agents:publishToMavenLocal (--no-daemon -x test, soft failure via ||echo)
   and caches ~/.m2/repository/ai/koog via actions/cache/save@v4. The three build
   jobs (lint, unit-tests, assemble-debug) now depend on koog-publish and restore
   from that cache before running their Gradle steps.

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
Copilot AI review requested due to automatic review settings May 17, 2026 00:17
Copy link
Copy Markdown
Owner Author

@Flynn013 Flynn013 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

claude added 9 commits May 17, 2026 00:33
Root cause of the lint + unit-tests failures: Koog's API was rewritten
between 0.8.0 and 1.0.0-preview. The old AIAgent(promptExecutor, toolRegistry,
config) constructor and the Tool<Args, Result>() zero-arg constructor no
longer exist. AIAgent is now abstract (built via AIAgent.builder()) and
Tool's constructor requires TypeToken + ToolDescriptor. Every Koog-using
file in clu-android fails to compile, which is why both jobs produced no
reports — they died before lint/test runners could write output.

The architecture spec (the recent NativeExecutionTools refactor) already
designates LangChain4j @tool as the tool-calling layer, with Koog as a
legacy second path. Removing Koog entirely is the correct fix:

- Delete CluAgent.kt + BuildTool/GitTool/ReadLogcatTool/ShellTool.kt
  (and their tests) — all five used the old Koog API
- Remove implementation(libs.koog.agents) from app/build.gradle.kts
- Remove koog version + koog-agents entries from libs.versions.toml
- Remove the koog-publish job and its cache restore steps from the
  workflow — no longer needed
- Tighten build-result gate: previously it only failed on "failure",
  now it also fails on "skipped"/"cancelled" (would have caught this
  category of upstream-failure-with-silent-downstream-skip)
- Update two KDoc strings that referenced the deleted ReadLogcatTool

NativeExecutionTools.kt (LangChain4j @tool layer) remains the single
tool-calling interface, exactly as the architecture spec required.

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
…eprecation

- Add resolutionStrategy in pluginManagement to map 'io.objectbox' plugin ID to
  the actual Maven artifact (io.objectbox:objectbox-gradle-plugin) since ObjectBox
  does not publish Gradle plugin marker artifacts to the Plugin Portal or MavenCentral
- Remove deprecated kotlinOptions block (ERROR-level in KGP 2.3); jvmToolchain(17)
  already sets the JVM target
- Remove unused io.objectbox.android imports from RagIndexTest
- MainActivity.kt: add missing import for ai.clu.shell.ShellSessionManager
  (used via ShellSessionManager.getExecutor() but not imported)
- EditorPane.kt: qualify all EditorColorScheme Java static constants with the
  class name (e.g. EditorColorScheme.KEYWORD) — Java inherited statics are
  not in scope in Kotlin subclasses without explicit qualification
- EditorPane.kt: remove EditorColorScheme.TYPE_NAME which does not exist in
  sora-editor 0.23.4 (would cause Unresolved reference at compile time even
  inside the defensive applyColorSafe wrapper)
- NativeExecutionToolsTest: add missing import io.mockk.any — any() was used
  as a MockK matcher in coEvery blocks but was not imported, causing
  Unresolved reference at compile time
- PackageManagerTest: same missing import; also fix three test stubs that
  mocked execute() but PackageManager.isInstalled/install delegate through
  executeWithEnv() — switched to coEvery { executeWithEnv(any(), any()) }
  so MockK intercepts at the right call site
- LangChain4j 0.37.0 does not exist; the 0.x series jumps from 0.36.2
  directly to 1.0.0 → downgrade to 0.36.2 (same @Tool/@p annotation API)
- org.gradle:gradle-tooling-api 8.12 is only published at Gradle's own
  releases repo (repo.gradle.org/gradle/libs-releases), not on Maven
  Central → add that repo to dependencyResolutionManagement
- ObjectBox JVM unit tests throw UnsatisfiedLinkError on Linux CI because
  the Android native library can't load in a plain JVM → add
  io.objectbox:objectbox-linux test dependency (official ObjectBox fix)
- Revert jvmToolchain(21) / VERSION_21 temp patch back to 17 (CI uses JDK 17)

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
…tions

Add isReturnDefaultValues=true so Android APIs return sensible defaults
in JVM unit tests instead of throwing RuntimeException("Stub!"). Needed
because NativeExecutionToolsTest triggers LogcatReader.instance which
lazily calls android.os.Process.myPid() through the companion object.

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
- Add com.google.android.material:material:1.12.0 so themes.xml can resolve
  Theme.Material3.DayNight.NoActionBar (provided by view-based Material
  Components, not Compose material3)
- Fix ShellSession.kt: Shell.Job.to() requires MutableList parameters, not
  lambdas; replace with CallbackList<String> anonymous objects (libsu 6.0.0)
- Downgrade Shizuku 13.1.5 → 12.2.0: Shizuku.newProcess() was made private in
  API 13; it remains public in 12.x which is what the deployer relies on

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
ObjectBox requires default.json to be committed — it tracks entity IDs and
schema evolution across builds. Without it, the plugin regenerates IDs on
every clean build, breaking schema migration.

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
The remote filesystem module was renamed from :io to :nio in libsu 6.0.0.
Resolving com.github.topjohnwu.libsu:io:6.0.0 from JitPack fails because
the artifact doesn't exist, breaking dependency resolution before compilation.
No source code uses the nio APIs so this is a pure catalog fix.

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
@Flynn013 Flynn013 force-pushed the claude/build-clu-android-ide-pem2N branch from 935283e to b59cc64 Compare May 17, 2026 08:24
claude added 8 commits May 17, 2026 08:25
- RamDisk: move sizeGb before shellExecute so K2 trailing-lambda works
- NativeExecutionTools: use toString("UTF-8") (API 1) not toString(Charset) (API 33)
- GitClient: use explicit setGitDir() to avoid JGit reading outer repo's GIT_DIR;
  add setSign(false) to prevent UnsupportedSigningFormatException from gpg.format=ssh
- Tests: replace deprecated createTempDir() with Files.createTempDirectory()
- Tests: replace individual mockk imports with wildcard to avoid K2 name conflict with kotlin.Any
- RagIndex tests: remove .name() call that conflicts with .directory() in ObjectBox builder
- ShellErrorBoundaryTest: disambiguate Throwable(null) to Throwable(null as String?)

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
…d outputs

Ignores ObjectBox JNI .so files extracted during unit tests and the
app-level build/ directory.

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
…Debug

Both org.eclipse.jgit and org.eclipse.jgit.http.apache bundle
OSGI-INF/l10n/plugin.properties, causing a DuplicateRelativeFileException
during mergeDebugJavaResource. Excluding OSGI-INF/** from packaged resources
resolves the conflict and allows the debug APK to assemble successfully.

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
Main screen is now a Chat Session view with a CLU splash when empty,
chat bubbles (user right / agent left), and a monospace input row.

A hamburger button in the top-right TopAppBar opens a ModalNavigationDrawer
with four selectable module cards (Chat, Editor, Terminal, Live Preview),
each showing an icon, name, and description. The selected card is
highlighted with a cyan border.

Editor, Terminal, and Live Preview are now full-screen modules reached
via the drawer rather than side-by-side panes.

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
Design system:
- Hyper Dark palette: true black (#000000) background, #0D0D12/#15151D/#1C1C26
  surface layers, white (#FFFFFF) as the primary accent
- FlynnCyan kept as alias for editor/terminal chrome only
- Material 3 darkColorScheme updated — primary=white, all Hd* slots filled

Navigation:
- ModalNavigationDrawer with expandable SESSION and SETTINGS sections
- White left-bar indicator + HdSelBg background on active item
- Expand/collapse chevron with AnimatedVisibility slide animation
- Back stack in MainLayout; ArrowBack appears for sub-screens
- Hamburger always visible top-right

Screens added:
- SESSION → Chat (existing, updated theme)
  └ Session History — resume/delete past sessions
  └ New Session — clearSession() + navigate to Chat
- FILES — file browser with breadcrumb, icons, long-press context menu, create dialog
- CODEX — RAG index stats, search, file list with chunk counts
- PROJECTS — 2-column card grid, full create/edit/delete, opens project session
- PLATFORM — build status banner, Debug/Release selector, build + deploy buttons
- SETTINGS hub — 4 navigation tiles
  ├ Configure Provider — Ollama/OpenAI/Anthropic/OpenRouter chips, URL/key fields
  ├ Agent Profile — CRUD for agent recipes with system prompt editor
  ├ Logs — Logcat viewer with level/tag filters and auto-scroll
  └ Extensions — MCP server and OAuth connection manager

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
…nsions

Lint fix:
- Replace backStack.removeLast() (resolves to java.util.List#removeLast, API 35)
  with backStack.removeAt(backStack.lastIndex) — safe from API 1

Anthropic OAuth (ExtensionsScreen):
- Pre-defined provider cards for Anthropic, GitHub, Google (no generic 'Add OAuth')
- Anthropic card is first-class: 'AI PROVIDER' badge, highlighted when connected
- Connect dialog offers TWO paths for Anthropic:
  1. 'Open claude.ai in browser' button — launches Intent.ACTION_VIEW to the
     Anthropic OAuth authorize URL (TODO: register clu://oauth/callback deep link
     in AndroidManifest + implement OAuthCallbackActivity for token exchange)
  2. Direct API key entry — masked field, show/hide toggle, sk-ant- prefix hint,
     device-only storage note; 'Save Key' confirms and marks provider connected
- GitHub and Google: browser OAuth only (Intent.ACTION_VIEW to their auth URLs)
- Disconnect clears credentials and resets to disconnected state

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
…odels

- Add SettingsRepository (DataStore) for persistent LLM provider config
- Add LlmClient with Ktor: OpenAI-compatible impl (Ollama/OpenAI/OpenRouter)
  and Anthropic Messages API impl with tool-use support
- Add AgentTool + CluTools: 8 real tools (shell, read/write file, list dir,
  gradle build, deploy APK, git commit, memory search)
- Add AgentEngine: iterative tool-call loop (max 8 iterations) with
  AgentEvent stream (Response, ToolStarted, ToolDone, Error)
- Upgrade ChatViewModel → AndroidViewModel wired to AgentEngine; tool events
  shown inline as collapsible chat bubbles
- Add PlatformViewModel: Build/Deploy/Clean wired to AndroidBuildRunner +
  ShizukuDeployer with real streaming log output
- Add FilesViewModel: real java.io.File directory listing with navigate,
  create, rename, delete; starts at external storage
- Add CodexViewModel: live count + text search via RagIndex.searchByText()
- Add ProviderConfigViewModel: load/save/test-connection with live
  ConnectionStatus feedback
- Update RagIndex: add searchByText() full-text fallback + initInstance()
  singleton; init called from CluApplication
- Wire DataStore dependency in libs.versions.toml + build.gradle.kts

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
Anthropic OAuth ("Sign in with Claude.ai"):
- ProviderConfigScreen shows OAuth card for Anthropic provider with
  "Sign in with Claude.ai" button, live status (IDLE/WAITING/EXCHANGING/
  CONNECTED/FAILED), and Disconnect option
- OAuthCallbackActivity handles clu://oauth/callback deep link; extracts
  authorization code and broadcasts to ProviderConfigViewModel
- ProviderConfigViewModel.startAnthropicOAuth() opens browser to
  claude.ai/oauth/authorize; exchangeOAuthCode() POSTs to
  claude.ai/oauth/token and stores Bearer token in SettingsRepository
- AnthropicLlmClient now sends Authorization: Bearer for OAuth tokens vs
  x-api-key for raw API keys (isOAuthToken flag in ProviderConfig)
- SettingsRepository persists isOAuthToken + saveOAuthToken() helper
- Manifest registers OAuthCallbackActivity with clu:// scheme intent filter
- Note: requires CLU to be registered as an Anthropic OAuth client;
  replace ANTHROPIC_CLIENT_ID constant once approved

get_device_context tool (9th tool):
- Returns Android version, device model, all storage paths (filesDir,
  external storage, APK output dir, RAM disk paths), free space, JVM
  headroom, and usage tips
- Injected into system prompt so LLM knows to call it for path resolution

https://claude.ai/code/session_01LMsWRrhnnF4uPD4tP5G8pL
@Flynn013 Flynn013 merged commit d99a640 into develop May 18, 2026
26 checks passed
@Flynn013 Flynn013 deleted the claude/build-clu-android-ide-pem2N branch May 18, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants