-
Notifications
You must be signed in to change notification settings - Fork 2
Changed: Unify dependency versions across workspace #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5bb2cab
WIP: Improve README
Sewer56 f77dd34
Improved landing page clarity, wording, and self-containedness
Sewer56 c86b2a6
wip: getting started
Sewer56 f7a01de
Changed: Clarify getting started guide with multi-reviewer pass
Sewer56 0426d0b
Changed: Improve clarity, consistency, and structure of tools referen…
Sewer56 2fc7773
Changed: Improve agents.md documentation clarity, consistency, and sc…
Sewer56 8cbd1d2
Changed: Refocus agents.md as pure file format reference
Sewer56 e3790a1
Changed: Unify dependency versions across workspace
Sewer56 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: MkDocs Build and Deploy | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "docs/**" | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
| steps: | ||
| - name: Deploy MkDocs | ||
| uses: Reloaded-Project/devops-mkdocs@v1 | ||
| with: | ||
| requirements: ./docs/requirements.txt | ||
| publish-to-pages: ${{ github.event_name == 'push' }} | ||
| checkout-current-repo: true | ||
| docs-directory: docs | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,3 +7,4 @@ PROMPT-*.MD | |
| # Local Code Review | ||
| .vscode/local-reviews | ||
| src/.vscode/local-reviews | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,105 +1,162 @@ | ||
| <div align="center"> | ||
|
|
||
| # llm-coding-tools | ||
|
|
||
| [](https://github.com/Sewer56/llm-coding-tools/actions) | ||
| **Production-grade coding agent tools in Rust. <abbr title="~10 MiB PSS on release build, all providers enabled. • Code & read-only data: ~6.5 MiB • Heap (runtime state): ~2.5 MiB • Shared libraries (glibc, libm): ~2.3 MiB • Thread stacks: ~0.1 MiB (34 threads) Private ~2.5 MiB · RSS ~13 MiB.">~10 MiB</abbr>. No TUI. Embed it anywhere.** | ||
|
|
||
| Lightweight, heavily optimized coding tool implementations for LLM-powered | ||
| development agents. | ||
| [](https://github.com/Sewer56/llm-coding-tools/actions) [](https://crates.io/crates/llm-coding-tools-core) [](https://docs.rs/llm-coding-tools-core) [](./LICENSE) | ||
|
|
||
| Suitable for server use (<3 MiB), or as building blocks for your own TUI coding agent. | ||
| [Get Started](#quick-start) · [Documentation](https://sewer56.github.io/llm-coding-tools/) · [API Reference](https://docs.rs/llm-coding-tools-core) · [Examples](#examples) | ||
|
|
||
| ## About This Workspace | ||
| </div> | ||
|
|
||
| This workspace contains multiple Rust crates for integrating coding tools with | ||
| LLM agents: | ||
| --- | ||
|
|
||
| - **[llm-coding-tools-core](./src/llm-coding-tools-core/)**: | ||
| Framework-agnostic core operations and utilities | ||
| - **[llm-coding-tools-agents](./src/llm-coding-tools-agents/)**: | ||
| OpenCode agent markdown loader and typed catalogue | ||
| - **[llm-coding-tools-serdesai](./src/llm-coding-tools-serdesai/)**: | ||
| serdesAI framework-specific Tool implementations | ||
| - **[llm-coding-tools-bubblewrap](./src/llm-coding-tools-bubblewrap/)**: | ||
| Sandboxing for Bash tool on Linux based on `bwrap` tool | ||
| - **[llm-coding-tools-models-dev](./src/llm-coding-tools-models-dev/)**: | ||
| models.dev catalog sync with cached fallback and ETag refresh | ||
| ## Why this project? | ||
|
|
||
| ## Features | ||
| [OpenCode](https://opencode.ai) is a fun, fast-moving TUI coding agent - but it ships | ||
| breaking changes regularly. It's a TypeScript application that uses <abbr title="opencode v1.4.2 • serve: 392 MiB RSS • TUI: 679 MiB RSS">~400 MiB</abbr> of RAM | ||
| and runs as a separate process. | ||
|
|
||
| - **File Operations**: Read, write, edit files with line-numbered output | ||
| - **Search**: Glob pattern matching and regex content search | ||
| - **Shell**: Cross-platform command execution with timeout; with optional sandboxing on Linux. | ||
| - **Web**: URL fetching with HTML-to-markdown conversion | ||
| - **Path Security**: Choose between unrestricted or sandboxed file access | ||
| - **OpenCode Agents**: Support for OpenCode-style agents | ||
| - **Model Catalog Sync**: Download and cache the models.dev catalog for | ||
| provider/model lookups | ||
| - **Optimized System Prompt**: Built-in tool guidance stays compact. | ||
| Full tool set is ~2000 tokens; search-only drops to ~560 | ||
| What if you need the same agent tooling for a **server**? A **Discord bot**? | ||
| A **CI pipeline**? A **custom product**? | ||
|
|
||
| ## Feature Flags (llm-coding-tools-core) | ||
| **llm-coding-tools** takes the core agent tooling and ships it as a headless | ||
| Rust library. Same tool set, same agent format, same system prompts - at a | ||
| fraction of the resource cost. | ||
|
|
||
| - `tokio` (default): Async mode with tokio runtime | ||
| - `blocking`: Sync/blocking mode, mutually exclusive with `async` | ||
| - `linux-bubblewrap`: Sandboxing for `bash` tool via Linux `bwrap` tool | ||
| | | OpenCode | llm-coding-tools | | ||
| | ------------ | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | Language | TypeScript | Rust | | ||
| | Memory | <abbr title="opencode v1.4.2 • serve: 392 MiB RSS • TUI: 679 MiB RSS">~400 MiB</abbr> | <abbr title="~10 MiB PSS on release build, all providers enabled. • Code & read-only data: ~6.5 MiB • Heap (runtime state): ~2.5 MiB • Shared libraries (glibc, libm): ~2.3 MiB • Thread stacks: ~0.1 MiB (34 threads) Private ~2.5 MiB · RSS ~13 MiB.">~10 MiB</abbr> | | ||
| | Interface | TUI / Desktop / IDE | Library (headless) | | ||
| | Agent format | Markdown + YAML | Similar format | | ||
| | Embeddable | HTTP API | Rust crate | | ||
|
|
||
| ## Quick Start | ||
| ## Features | ||
|
|
||
| Pick the crate that matches your use case: | ||
| - **10 Built-in tools** - read, write, edit, glob, grep, bash, webfetch, todoread, todowrite, task | ||
| - **Agents similar to [OpenCode](https://opencode.ai)** - load agent markdown files with YAML frontmatter | ||
| - **Multi-agent delegation** - orchestrator pattern with depth-limited task chains | ||
| - **Linux sandboxing** - bubblewrap profiles for shell isolation (Public Bot + Trusted Maintenance) | ||
| - **Path security** - restrict file access with allowed directories and glob-based rules | ||
| - **Model catalog** - sync [models.dev](https://models.dev) with ETag caching (~3000 models, ~24 KiB cache) | ||
| - **Permissions** - default-deny with last-match-wins rules and wildcard patterns | ||
| - **Optimized system prompt** - auto-generated, ~2000 tokens full / ~560 search-only | ||
| - **Async + Sync** - every tool compiles as tokio async or blocking. Zero overhead. | ||
| - **Framework-agnostic core** - use the serdesAI integration or bring your own framework | ||
| - **15 LLM providers** - OpenAI, Anthropic, Google, Groq, Mistral, Ollama, Azure, Bedrock, and more | ||
| - **Semver-guaranteed API** - 6-platform CI matrix, 11 semver surfaces, clippy -D warnings | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ```toml | ||
| [dependencies] | ||
| llm-coding-tools-core = "0.2" # Framework-agnostic tool implementations | ||
| llm-coding-tools-agents = "0.1" # OpenCode agent markdown loader | ||
| llm-coding-tools-models-dev = "0.1" # models.dev catalog sync and cache | ||
| llm-coding-tools-serdesai = "0.2" # serdesAI integration | ||
| llm-coding-tools-bubblewrap = "0.1" # Linux Bubblewrap profile and wrapper helpers | ||
| llm-coding-tools-serdesai = "0.2" | ||
| ``` | ||
|
|
||
| For a runnable agent setup, start with `llm-coding-tools-serdesai` and the | ||
| examples below. | ||
| **1.** Create an agent file (markdown + YAML frontmatter similar to [OpenCode](https://opencode.ai)): | ||
|
|
||
| ```markdown | ||
| --- | ||
| name: coder | ||
| mode: all | ||
| description: A coding agent that can read, search, and edit files. | ||
| permission: | ||
| read: allow | ||
| write: allow | ||
| edit: allow | ||
| glob: allow | ||
| grep: allow | ||
| bash: allow | ||
| webfetch: allow | ||
| task: deny | ||
| --- | ||
|
|
||
| You are a coding assistant. Use the available tools to complete the user's task. | ||
| ``` | ||
|
|
||
| **2.** Load the catalog, build the agent, and run: | ||
|
|
||
| ```rust | ||
| use llm_coding_tools_agents::{AgentCatalog, AgentLoader, AgentRuntimeBuilder}; | ||
| use llm_coding_tools_core::CredentialResolver; | ||
| use llm_coding_tools_models_dev::ModelsDevCatalog; | ||
| use llm_coding_tools_serdesai::{AgentBuildContext, AgentDefaults}; | ||
| use std::{path::PathBuf, sync::Arc}; | ||
|
|
||
| #[tokio::main] | ||
| async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
| // Load agents from the "agents" directory. | ||
| let mut catalog = AgentCatalog::new(); | ||
| AgentLoader::new().add_directory(&mut catalog, "./agents")?; | ||
|
|
||
| // Supports any model from https://models.dev | ||
| let load_result = ModelsDevCatalog::load().await?; | ||
|
|
||
| let runtime = AgentRuntimeBuilder::new() | ||
| .catalog(catalog) // Default model if not specified by agent. | ||
| .defaults(AgentDefaults::with_model("synthetic/hf:MiniMaxAI/MiniMax-M2.5")) | ||
| .build()?; | ||
|
|
||
| let build_context = AgentBuildContext::new( | ||
| Arc::new(runtime), | ||
| Arc::new(load_result.catalog), | ||
| Arc::new(CredentialResolver::new()), | ||
| ); | ||
|
|
||
| let agent = build_context.build("coder")?; | ||
| let response = agent.run("Find all TODO comments in src/", ()).await?; | ||
| println!("{}", response.output()); | ||
| Ok(()) | ||
| } | ||
| ``` | ||
|
|
||
| ## Crate Map | ||
|
|
||
| | Crate | Version | Description | | ||
| | --------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------ | | ||
| | [**llm-coding-tools-core**](./src/llm-coding-tools-core/) | 0.2 | Framework-agnostic tool implementations, path resolvers, permissions, system prompt builder | | ||
| | [**llm-coding-tools-agents**](./src/llm-coding-tools-agents/) | 0.1 | agent markdown loader similar to [OpenCode](https://opencode.ai), typed catalog, runtime builder | | ||
| | [**llm-coding-tools-serdesai**](./src/llm-coding-tools-serdesai/) | 0.2 | SerdesAI framework integration, tool adapters, 15 provider bridges, task delegation | | ||
| | [**llm-coding-tools-bubblewrap**](./src/llm-coding-tools-bubblewrap/) | 0.1 | Linux bubblewrap sandbox profiles (Public Bot + Trusted Maintenance) | | ||
| | [**llm-coding-tools-models-dev**](./src/llm-coding-tools-models-dev/) | 0.1 | models.dev catalog sync with ETag caching and offline fallback | | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| # serdesAI framework - Basic agent setup | ||
| # Basic agent setup with all tools | ||
| cargo run --example serdesai-basic -p llm-coding-tools-serdesai | ||
|
|
||
| # serdesAI framework - Sandboxed file access | ||
| # Sandboxed file access (restricted to allowed directories) | ||
| cargo run --example serdesai-sandboxed -p llm-coding-tools-serdesai | ||
|
|
||
| # serdesAI framework - Agent catalog loading | ||
| # Sandboxed bash execution (Linux, requires bubblewrap) | ||
| cargo run --example serdesai-sandboxed-bash --features linux-bubblewrap -p llm-coding-tools-serdesai | ||
|
|
||
| # Agent catalog loading from markdown files | ||
| cargo run --example serdesai-agents -p llm-coding-tools-serdesai | ||
|
|
||
| # serdesAI framework - Task delegation | ||
| # Multi-agent task delegation (orchestrator + reader sub-agent) | ||
| cargo run --example serdesai-task -p llm-coding-tools-serdesai | ||
| ``` | ||
|
|
||
| ## Documentation | ||
|
|
||
| - **[Documentation Site](https://sewer56.github.io/llm-coding-tools/)** - guides, architecture, examples | ||
| - [llm-coding-tools-core README](./src/llm-coding-tools-core/README.md) | ||
| - [llm-coding-tools-agents README](./src/llm-coding-tools-agents/README.md) | ||
| - [llm-coding-tools-serdesai README](./src/llm-coding-tools-serdesai/README.md) | ||
| - [llm-coding-tools-bubblewrap README](./src/llm-coding-tools-bubblewrap/README.md) | ||
| - [llm-coding-tools-models-dev README](./src/llm-coding-tools-models-dev/README.md) | ||
| - [Sandbox profiles and operator checklist](./SANDBOX-PROFILES.md) | ||
| - [Developer Guidelines](./src/AGENTS.md) | ||
| - [API Reference (docs.rs)](https://docs.rs/llm-coding-tools-core) | ||
|
|
||
| ## Contributing | ||
|
|
||
| Contributions are welcome! Please ensure all tests pass and the code follows | ||
| our guidelines. | ||
|
|
||
| ## Deprecation Notice | ||
|
|
||
| **Rig framework support (`llm-coding-tools-rig`) has been removed** | ||
| (commit 17158db) due to library bugs that prevented examples from running | ||
| reliably. | ||
|
|
||
| You're welcome to submit a PR re-adding rig support if you're willing to | ||
| maintain it. Since I don't use rig personally, I'm not able to actively | ||
| maintain that integration. Alternatively, you can create your own crate | ||
| building on `llm-coding-tools-core` directly. | ||
|
|
||
| ## License | ||
|
|
||
| Licensed under [Apache 2.0](./LICENSE). |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # MkDocs build | ||
| site/ | ||
| venv/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| site_name: llm-coding-tools | ||
| site_url: https://sewer56.github.io/llm-coding-tools | ||
| docs_dir: src | ||
|
|
||
| repo_name: Sewer56/llm-coding-tools | ||
| repo_url: https://github.com/Sewer56/llm-coding-tools | ||
|
|
||
| extra: | ||
| social: | ||
| - icon: fontawesome/brands/github | ||
| link: https://github.com/Sewer56/llm-coding-tools | ||
| - icon: fontawesome/brands/discord | ||
| link: https://discord.gg/67rU5jhgDt | ||
|
|
||
| extra_css: | ||
| - vendor/Reloaded/Stylesheets/reloaded.css | ||
| - assets/landing.css | ||
|
|
||
| markdown_extensions: | ||
| - admonition | ||
| - tables | ||
| - abbr | ||
| - pymdownx.details | ||
| - pymdownx.highlight | ||
| - pymdownx.snippets | ||
| - pymdownx.superfences: | ||
| custom_fences: | ||
| - name: mermaid | ||
| class: mermaid | ||
| format: !!python/name:pymdownx.superfences.fence_code_format | ||
| - pymdownx.tasklist | ||
| - def_list | ||
| - meta | ||
| - md_in_html | ||
| - attr_list | ||
| - footnotes | ||
| - pymdownx.tabbed: | ||
| alternate_style: true | ||
| - pymdownx.emoji: | ||
| emoji_index: !!python/name:material.extensions.emoji.twemoji | ||
| emoji_generator: !!python/name:material.extensions.emoji.to_svg | ||
| - pymdownx.blocks.caption | ||
|
|
||
| theme: | ||
| name: material | ||
| palette: | ||
| scheme: reloaded3-slate | ||
| features: | ||
| - navigation.instant | ||
| - navigation.tracking | ||
| - navigation.sections | ||
| - navigation.expand | ||
| - content.tooltips | ||
| - content.code.copy | ||
|
|
||
| plugins: | ||
| - search | ||
| - minify: | ||
| minify_html: true | ||
| minify_js: true | ||
| minify_css: true | ||
| htmlmin_opts: | ||
| remove_comments: true | ||
| cache_safe: true | ||
|
|
||
| nav: | ||
| - Home: index.md | ||
| - Getting Started: getting-started.md | ||
| - Tools: tools.md | ||
| - Agents: agents.md | ||
| - Sandboxing: sandboxing.md | ||
| - Models Catalog: models-catalog.md | ||
| - Guides: | ||
| - Examples: guides/examples.md | ||
| - Feature Flags: guides/feature-flags.md | ||
| - Custom Framework: guides/custom-framework.md | ||
| - Architecture: architecture.md | ||
| - Comparison with OpenCode: comparison.md | ||
| - Migrating from OpenCode: migration.md |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| mkdocs-material | ||
| mkdocs-redirects | ||
| mkdocs-exclude-unused-files | ||
| mkdocs-exclude | ||
| mkdocs-minify-plugin |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Sewer56/llm-coding-tools
Length of output: 108
Pin the GitHub Action to a full commit SHA.
At Line 19, using a mutable tag (
@v1) increases supply-chain risk. Pin the action to the immutable commit SHA for this tag:Suggested patch
📝 Committable suggestion
🤖 Prompt for AI Agents