Add AROLM target: local LLM integration with tool calling (#199)#626
Open
Add AROLM target: local LLM integration with tool calling (#199)#626
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #199.
Summary
Adds a new `Sources/AROLM` Swift target that ships an `aro lm` subcommand — a local-LLM coding assistant for ARO with tool calling, per-directory context persistence, project retrieval, and an MCP bridge into the built-in `aro mcp` server.
What's in the box
Backends (auto-detected)
CLI surface
Built-in tools (all path-scoped to cwd)
`read_file`, `write_file`, `edit_file`, `list_dir`, `grep`, `run_shell` (approval-gated), `aro_check`, `aro_run`, `aro_test`, `aro_build`, `parse_aro`, `list_actions`, `list_proposals`, `read_proposal`, `search_project`.
Retrieval
In-process `ProjectIndexer` + flat cosine `VectorStore` persisted at `.context.index/`, with a deterministic `HashingEmbedder` that needs no ML backend. Exposed via the `search_project` tool and `/index`/`/search` slash commands.
MCP bridge
`MCPClientBridge` spawns configured MCP servers over stdio, performs the JSON-RPC handshake, translates `tools/list` descriptors into `LMToolDescriptor`s, and registers them alongside the built-ins. `aro mcp` is bridged by default; additional servers can be declared in `.context` under `mcp_servers:`.
Context
`.context` is a human-readable YAML document in the current working directory, atomically rewritten after every turn with `0600` perms. The default system prompt is injected on first use.
Model download
`ModelManager` streams files from Hugging Face into `~/.cache/aro/models/` on first use, respects `$HF_HOME` and `$HF_TOKEN`, and prompts the user before downloading.
Tests
9 new tests in `Tests/AROLMTests` covering the context store round-trip, tool dispatch, path-guard enforcement, embedder determinism, and vector-store search. All passing.
Docs
Test plan