Skip to content

Latest commit

 

History

History
300 lines (269 loc) · 23.3 KB

release.md

File metadata and controls

300 lines (269 loc) · 23.3 KB

Release Notes for the local-coding-assistant

Version 1.3.0 (unreleased)

Highlights

  • Upgraded to Embabel 1.5.2 and Spring Boot 4.1.1.
  • Added long-term memory to remember and recall relevant facts across sessions, with project and global scopes. Facts and embedding vectors are stored locally in ~/.lca/memory-index/ using Jackson 3, which also handles application JSON parsing. Disable recall and remembering with lca.memory.enabled=false.
  • Switched the default local models from Qwen3.6 to Qwen3.8.
  • Added /benchmark to measure raw Ollama inference speed.
  • Commands chosen by natural-language routing can no longer turn off confirmations or other safeguards.

Models & setup

  • New default models, replacing qwen3.6:35b-a3b, qwen3.6-128k and qwen3.6-review:
    • qwen3.8-192k for chat and code generation (192K context, built from qwen3.8:27b).
    • qwen3.8-review for reviews (128K context, built from qwen3.8:27b).
    • gpt-oss-64k as the fallback model (64K context, built from gpt-oss:20b), unchanged.
  • The first launch after upgrading downloads qwen3.8:27b and builds the new custom models. The old Qwen3.6 models are not removed; delete them with ollama rm if you no longer need them.
  • The Qwen3.8 custom models set num_batch 2048 and num_gpu 99 for full GPU offload.
  • Model names, context sizes and recipes now live in one place, src/main/bin/lca. models.sh reads them from there, and the launcher passes them to the application as LCA_CHAT_MODEL, LCA_FALLBACK_MODEL, LCA_REVIEW_MODEL, LCA_EMBEDDING_MODEL and LCA_DEFAULT_CONTEXT_WINDOW. Runs that bypass the launcher (./run.sh, IDE) use the fallback values in application.properties.
  • Custom models are now rebuilt when their base model, context size or parameters change, not only when the base model changes. Existing custom models are therefore rebuilt once after upgrading. models.sh --force rebuilds them unconditionally, and a failed rebuild keeps the existing model.
  • Ollama must be running with nomic-embed-text:latest pulled before starting the CLI, batch mode or GUI. This existing startup requirement is now documented explicitly, including when memory is disabled.
  • The lca and lcaGui launchers now install the required embedding model. Existing users should download the updated lca launcher and re-run lca (or lca gui), or run ollama pull nomic-embed-text:latest manually before starting the upgraded application.
  • Updated the ranking model property to embabel.agent.platform.ranking.llm.

Commands & REPL

  • Added /benchmark, which reports prompt-evaluation and generation tokens per second for a model. Options: --model, --prompt, --prompt-file, --max-tokens (default 200) and --session.
  • Recognised slash commands typed in the REPL now run directly instead of going through intent routing, which could misinterpret them.
  • /model, /context, /version, /stage, /revert, /commit-suggest, /applyBlocks and /git-push now work when typed in the REPL; previously they reported "Unknown command". /git-apply also works now; it was previously cut short to /git.
  • Explicit false and 0 values are now honoured instead of being reset to the default, for example /run --confirm false, /review --log-review false, /search --headless false and /context --padding 0.

Safety

  • Commands produced by natural-language routing, in both the REPL and the GUI, can no longer turn off confirmation, previews, --check or secret scanning, or force a push, whatever the routing model returns. Routed /revert only previews the restore.

Configuration

  • Removed the unused embabel-agent-starter-shell dependency and Spring Shell. The embedded web server remains disabled by default through an explicit spring.main.web-application-type=none.
  • assistant.llm.timeout-millis raised from 600000 to 720000 (12 minutes).
  • Review context budgets raised: assistant.llm.review-context-budget from 30000 to 100000 and assistant.llm.review-pr-context-budget from 80000 to 250000 characters.
  • New assistant.llm.benchmark-timeout-millis (default 180000) for /benchmark.

Demo (demo/openCodeMlx)

  • The default MLX model is now mlx-community/Qwen3.8-27B-4bit (previously mlx-community/Qwen3-Coder-30B-A3B-Instruct-8bit). Vision-language models are detected from their config.json and served with mlx_vlm.server; text-only models still use mlx_lm.server.
  • --trust-remote-code is only passed to mlx_vlm.server when MLX_VLM_TRUST_REMOTE_CODE=1 is set.
  • New optional settings: MLX_DRAFT_MODEL (speculative decoding, off by default), MLX_DOWNLOAD_INTERFACE (bind model downloads to a network interface) and MLX_VLM_MAX_KV_SIZE.
  • The demo/test_*.sh scripts now run as part of ./mvnw test.

Version 1.2.0, 2026-01-16

Highlights

  • Migrated from Spring Shell to custom JLine REPL for better control and natural language interaction.
  • Added Embabel 0.3.2 thinking/reasoning capabilities to chat and review commands.
  • Implemented tool call parsing for LLM-agnostic function calling (writeFile, replace, deleteFile, runCommand).
  • Enhanced /implement command with shell command execution and concise output format.
  • Added user input coloring (light green) for improved readability.

REPL & UX

  • Replaced Spring Shell with custom JLine-based REPL for tighter control over input handling and natural language processing.
  • Added syntax highlighting for user input (light green) to distinguish from assistant output.
  • Fixed /clear command to work with both slash and non-slash variants (/clear, /cls, clear, cls).
  • Improved multi-line input handling in command parser to support quoted strings with newlines.
  • Enhanced intent routing with smart multi-line handling and conversational context tracking for file references.
  • Improved conversational language handling for more natural interactions.

AI & Agent Improvements

  • Upgraded to Embabel 0.3.2 with thinking/reasoning support:
    • ChatAgent now supports --show-reasoning and --with-thinking flags to expose LLM reasoning chains.
    • ReviewAgent displays thinking output when using models with extended thinking capabilities.
    • Added ChatResponse wrapper to return both message and reasoning content.
  • Added tool call parser for LLM-agnostic function calling:
    • writeFile(path, content) - create or overwrite files.
    • replace(path, old, new) - modify existing files.
    • deleteFile(path) - delete files.
    • runCommand(command) - execute shell commands (chmod, mkdir, mv, cp, etc.).
  • Enhanced /implement command:
    • Made output more concise (removed verbose Plan/Implementation/Notes format).
    • Added shell command execution support via runCommand() tool.
    • Now responds with brief confirmations and tool execution results only.
  • Added auto-save feature for code blocks in /chat command.
  • Improved code search with case-insensitive option (-i flag) and better feedback.

Web Search Standardization

  • Added Embabel InternetResource and InternetResources domain object support.
  • WebSearchTool now provides:
    • searchAsInternetResources() - returns List.
    • searchAsWebSearchResults() - returns WebSearchResults wrapper.
    • Backward compatibility maintained with existing search() methods.

Bug Fixes

  • Fixed integration test failures caused by ChatResponse type mismatch in agent process execution.
  • Fixed /implement command to properly handle ChatResponse return type.
  • Fixed multi-line input breaking command parser when pasting error messages or prompts with newlines.
  • Fixed batch mode integration tests by implementing BatchModeRunner.
  • Fixed NPE in integration tests related to agent result type resolution.

Documentation & Tooling

  • Added comprehensive documentation for Embabel 0.3.2 features and implementation opportunities.
  • Updated AGENTS.md to be language-agnostic (supports any programming language).
  • Enhanced shell scripts (lca launcher) with better error handling and compatibility.
  • Improved test output formatting and readability.
  • Added presentation materials and expanded docs.

Dependencies

  • Upgraded to Embabel 0.3.2 (from 0.3.1).
  • Various dependency updates for improved stability and performance.

Breaking Changes

  • Removed @Action annotation from ChatAgent.respond() method - now only respondWithThinking() is the agent action.
  • /implement command output format changed from verbose Plan/Implementation/Notes to concise confirmation + results.

Lines of Code: 18857 total (11703 main, 7154 test)

Version 1.1.0, 2025-12-28

Highlights

  • Added natural‑language intent routing with /route, /intent-debug, and a first‑class /plan command.
  • New direct shell mode (/! with /sh alias) for streaming command output and session context capture.
  • Web search overhaul with HtmlUnit/Jsoup fetchers and session‑level configuration.

CLI & UX

  • /help now lists slash commands alphabetically and includes /config options.
  • /config expanded with intent, local-only, and web-search session settings.
  • Command‑not‑found suggestions (“did you mean …”).
  • Local‑only mode prompts to temporarily enable web search for the session.

Intent Routing & Planning

  • Intent router pipeline and models (allowlist, confidence, debug preview).
  • /plan produces structured, command‑oriented steps and supports REST usage.
  • Routing disabled for explicit /command input, with /route for preview.

Web Search

  • HtmlUnit + Jsoup fetchers with configurable fallback.
  • Session overrides for fetcher selection or disablement.
  • Improved search summarisation and tool output handling.

Shell & Execution

  • /! (“bash mode”) runs immediately with streamed output; results appended to session context.
  • /run kept for confirmed, logged execution with truncation controls.

REST API

  • Added /plan and /route endpoints to mirror CLI workflows.
  • Updated REST docs and examples.

Packaging & Tooling

  • New CLI launch script (src/main/bin/lca) - POSIX-compatible for bash, zsh, sh, dash, etc.
  • Additional documentation for commands, workflows, and intent routing.

Dependencies / Platform

  • Spring Boot 3.5.7 and Embabel 0.3.1 updates.
  • HtmlUnit and Jsoup added for web search support.

Version 1.0.0, 2025-12-23

  • Highlights: Added non-interactive batch mode, REST API parity, project-specific AGENTS.md guidance, a git-aware /tree command, and a full tutorial with examples.
  • Batch Mode: CLI -c/--batch-file execution with safer confirmations (--yes/--assume-yes), clearer diagnostics and exit handling, plus example batch files and a helper script in docs/examples/.
  • Security & Safety: .aiexclude enforcement across tools, command allow/deny policies, secret scanning for commit suggestions, optional SAST integration for reviews, stronger log sanitisation, and hardened REST/OIDC/rate limiting behaviour.
  • REST & CLI Parity: /api/cli endpoints mirror shell commands with improved validation and safer defaults; non-interactive git push confirmation control added.
  • Docs & Examples: New docs/tutorial.md, refreshed command/workflow docs, and a runnable sample project in examples/sample-project/.
  • Breaking/Behaviour Changes: A2A interoperability removed to reduce complexity.

Version 0.9.0, 2025-12-19

  • Fixed resolveModel NPE risk by guarding case-insensitive comparisons when the desired model is null.
  • Strengthened ModelRegistry caching concurrency: health caching now uses a single synchronized fetch/update to avoid redundant calls; listModels already double-checks with synchronized reads/writes.
  • Hardened ModelRegistry concurrency: cache reads/writes for models and health now use double-check locking to avoid redundant parallel fetches, reducing duplicate Ollama calls under contention.
  • Improved ModelRegistry resilience and performance:
    • Added null check for base URL, cache TTLs for models and health, and synchronized/volatile cache updates.
    • listModels now caches results with TTL, logs at info when serving stale cache after failures, and returns cached data only when available.
    • checkHealth caches health responses with a short TTL to reduce redundant calls.
    • Adjusted constructor signatures accordingly and updated usages.
    • Added targeted tests: ResolveModelSpec exercises resolveModel branches; ModelRegistrySpec now covers caching, failure fallbacks, and error handling.
  • Reduced duplicate health/model lookups: chat, review, and commitSuggest now reuse a single model list per call (calling health only when the list is empty).
  • Added a TTL cache to ModelRegistry model listings to avoid repeated Ollama requests; availability checks now use the cached list.
  • Added focused tests: ResolveModelSpec covers resolveModel edge cases; ModelRegistrySpec covers caching/error paths.
  • Tightened Ollama health checks to treat only 2xx as reachable, simplified health handling, and made model resolution case-insensitive while returning the actual matched casing. Fallback model config now treats empty values as “no fallback.” - Hardened model availability logic to avoid assuming availability when listings fail.
  • Added ModelRegistrySpec covering health, listing, and availability behavior; updated tests to align with new model/fallback handling.
  • Added Groovy JSON dependency for model listing.
  • Cleaned ModelRegistry test harness and ensured new behavior is covered.
  • Added runtime model controls: new model CLI command to list/set session models with fallback awareness, and health command to check Ollama connectivity. Chat/review/commit flows now verify Ollama health and auto-fallback to the configured smaller model when the requested/default model isn’t available, with user-visible notes.
  • Introduced ModelRegistry for Ollama health/model discovery, wired into session handling, and surfaced fallback model configuration (assistant.llm.fallback-model) plus JSON dependency.
  • Enhanced CommandRunner documentation/logic, strengthened truncation handling, and expanded tests for edge cases (empty command, logging failures, timeout cleanup). Added broader ShellCommands tests for model/health behaviors and adjusted SessionState for fallback support.
  • Added a groovy and ollama badge to the readme
  • Use explicit getMessage() method calls per code review feedback
  • Distinguish IOException sources in StreamCollector catch block
  • Clarified CommandRunner’s behavior and tightened robustness: added documentation about bash -lc usage and caller validation, made log-path/process creation overridable for tests, and corrected the StreamCollector error handling bug (now flags truncation properly).
  • Expanded CommandRunnerSpec coverage: checks truncation flag, empty-command validation, log-path failure handling, log header/footer content, and timeout cleanup via a fake process; updated imports accordingly.
  • Fixed constructor mismatch by threading the new CommandRunner stub through CodeSearchCommandSpec, importing the runner, and rebuilding the test setup
  • Command execution and diagnostics -
    • Provide a run command to execute project scripts/tests with captured logs and exit codes.
    • Allow the agent to request runs (with a confirmation gate) and feed summarized output back into the conversation. -
    • Add timeouts and output truncation to avoid runaway executions.
    • If the current directory is not a git repo - commands like status, diff, and commit-suggest should gracefully inform the user that git operations are unavailable.
    • Require Interactive Confirmation. The CLI should print the command: > Agent wants to run: 'rm -rf ./build'. Allow? [y/N/a]
  • GitTool now uses UTF-8 for git process I/O, caches repo existence with a lock to avoid repeated checks, and uses a dedicated runGitNoCheck helper to prevent recursion. Added a note about per-thread usage.
  • Added path traversal rejection tests and stageHunks error-path tests; extended stageFiles traversal coverage.
  • Adjusted dirty warning comment; updated tests accordingly.
  • Removed unnecessary import in GitToolSpec.
  • Refactored isGitRepo to use the git command through the shared helpers without recursion; added an opt-out flag for repo checks in runGitWithInput.
  • Clarified 1-based hunk indexing with a comment and made dirty/staged checks explicitly test for non-empty output.
  • Updated warning message to neutral wording and added rationale comment for direct stdout.
  • Neutralized dirty-state warning and generalized commit prompt to “current project.”
  • GitTool now tolerates missing roots by falling back to normalized paths, and validatePath always returns a normalized relative path (no traversal leak).
  • Test helper runGit now fails fast on non-zero exits.
  • Added ShellCommands tests for git status/diff/apply/push flows, including confirmation behavior.
  • Expanded GitToolSpec to cover multiple hunk staging, file staging, applyPatch check/cached, and push; tweaked expectations to avoid silent failures.
  • Hardened src/main/groovy/se/alipsa/lca/tools/GitTool.groovy: constructor now tolerates missing project roots by falling back to normalized absolute path; validatePath always returns a normalized relative path (even for non-existent files) to avoid traversal; isGitRepo callers still safe.
  • Updated src/main/groovy/se/alipsa/lca/shell/ShellCommands.groovy to reject non-1-based hunk indexes instead of silently ignoring them.
  • Expanded tests in src/test/groovy/se/alipsa/lca/tools/GitToolSpec.groovy: cover staging multiple/out-of-order hunks, staging files, applyPatch check/cached behaviors, and push to a local bare remote.
  • Ensured constructor overload compatibility remains intact via the GitTool resolver addition earlier.
  • Introduced src/main/groovy/se/alipsa/lca/tools/GitTool.groovy to wrap git status/diff/apply/stage/push with path safety and repo detection.
  • Extended src/main/groovy/se/alipsa/lca/shell/ShellCommands.groovy with /status, /diff, /git-apply, /stage, /commit-suggest, and /git-push, plus dirty-state warnings and guarded confirmations before applying patches or pushing.
  • Added Spock coverage for git wrappers and shell wiring in src/test/groovy/se/alipsa/lca/tools/GitToolSpec.groovy and src/test/groovy/se/alipsa/lca/shell/ShellCommandsSpec.groovy.
  • Fixed constructor mismatch by adding a GitTool-aware overload with backward compatibility, routed legacy constructor usage through it, and added a safe project-root resolver. Updated CodeSearchCommandSpec to compile via the restored signature.

Version 0.7.0 - Git-aware operations

  • 7.1 Add commands for status, diff, and apply that the agent can call or chain into prompts.
  • 7.2 Support staging selected hunks/files after an edit command (with confirmation).
  • 7.3 Include a commit-suggest helper that drafts commit messages from staged diffs.
  • 7.4 Add lightweight tests for git command wrappers (mocked repo).
  • 7.5 Add a "Safety Valve".
    • The agent should not be allowed to git push without explicit user confirmation (Y/n/a).
    • A "Dirty State" warning. If the user asks for a refactor but the git tree is dirty, warn them: "You have uncommitted changes. Consider committing before I apply patches."

Version 0.6.0 - Web search augmentation

  • 6.1 Enhance WebSearchTool with headless mode options, timeouts, result limits, and basic HTML sanitization/snippet trimming.
  • 6.2 Add a CLI/agent flag to enable/disable web search, plus offline fallback messaging.
  • 6.3 Cache recent queries for reuse in the same session; allow selecting search provider if available.
  • 6.4 Make web search outputs usable by the agent (structured snippets) and add tests for parsing/formatting.

Version 0.5.0 - Code search and context building

  • 5.1 Integrate ripgrep-like search (respect .gitignore) to gather snippets for prompts.
  • 5.2 Implement a context packer that deduplicates and truncates snippets to stay within token limits.
  • 5.3 Add a search command returning matches with surrounding lines, copy-to-context, and optional web search toggle.
  • 5.4 Unit-test context assembly and truncation.
  • 5.5 Create a Context Budget Manager to manage context limits effectively.
    • The Challenge: Context limits. qwen3.6:35b-a3b has a 256K window, but performance degrades as it gets closer to the limit.
    • Before sending the prompt, calculate the token count of: System Prompt + User Prompt + File A + File B. If it exceeds the limit, auto-summarize or drop the least relevant file before hitting the API.

Version 0.4.0 - Code review and suggestions, 2025-12-12

Code review and suggestions

  • 4.1 Add a review command that feeds selected files/diffs into the agent with severity-tagged output.
  • 4.2 Include file/line references and recommendations; allow staged-only or path-filtered reviews.
  • 4.3 Persist review summaries to a log file for later recall.
  • 4.4 Add tests for review formatting and inputs.
  • 4.5 Avoid unified diffs for generation. Instead, use Search and Replace Blocks.
    • The Challenge: LLMs are notoriously bad at line numbers. If the agent says "Replace line 40-45", and the file changed since the context was loaded, you corrupt the file. Instead, ask the model to output:
     <<<<SEARCH 
     > original code block 
     > ==== 
     > new code block
     >>>>
    
    • Your FileEditingTool locates the unique original code block string and replaces it. This is far more robust than line numbers for local models.
  • 4.6 Ensure the output is parsable.
    • If the agent outputs a review, try to parse it into an object (File, Line, Severity, Comment) so you can render it nicely in the CLI (e.g., using ANSI colors for High/Medium/Low severity).

Version 0.3.0 - Editing and patch application, Spring Shell CLI bridge, 2025-12-11

  • 2.1 [x] Add Spring Shell commands that wrap the agent (e.g., /chat, /review, /edit, /search) and stream responses.
  • 2.2 [x] Support multiline input, conversation/session state, and optional system prompt overrides.
  • 2.3 [x] Provide CLI flags for model/temperature/max tokens and persist last-used options per session.
  • 2.4 [x] Add smoke tests for command wiring and basic flows.
  • 2.5 [x] Implement a "slash command" for input. The Challenge: Pasting multiline code into a CLI is painful.
    • /paste: Enters a mode specifically for pasting large buffers without triggering execution on newlines.
    • /edit: Opens the user's default $EDITOR (vim/nano/code), lets them type the prompt there, and sends it to the agent upon save/close. This is infinitely better than typing prompts in the shell.
  • 3.1 [x] Extend FileEditingTool to support diff/patch application with backups and conflict detection.
  • 3.2 [x] Enable targeted edits (line ranges, symbols) and contextual prompts for the agent.
  • 3.3 [x] Add dry-run/confirm and revert options in the CLI.
  • 3.4 [x] Cover patch application logic with unit tests on sample files.

Version 0.1.0 - Initial Release, 2025-12-10

  • Created from the Embabel java template project and translated to groovy.
  • Setup basic structure for a local coding assistant using Embabel and Spring Boot.
  • Agent hardening and prompts
    • 1.1 [x] Refine se.alipsa.lca.agent.CodingAssistantAgent personas/prompts toward repo-aware coding assistance (beyond short snippets).
    • 1.2 [x] Ensure actions use injected Ai (controller currently passes null) and propagate model/temperature options from config.
    • 1.3 [x] Add guardrails for word counts and result formatting (code + review sections) with tests.
    • 1.4 [x] Document/validate parameters via properties (snippetWordCount, reviewWordCount, default model).
    • 1.5 [x] Fix the REST controller’s null Ai handling and update the REST tests to cover full flows.