Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
cf4bed1
Added: Initial core tools, infrastructure, and error handling
Sewer56 Dec 27, 2025
c1ed25f
Optimize truncate_line with byte-length fast path
Sewer56 Dec 27, 2025
fcbbb64
Add const generic to ReadTool for optional line number prefixes
Sewer56 Dec 27, 2025
e717dca
Improve: Optimize the read tool perf a little.
Sewer56 Dec 27, 2025
88badba
Refactor: Move glob::Pattern import to module level
Sewer56 Dec 27, 2025
6119481
Refactor: Replace ripgrep binary with grep crate library
Sewer56 Dec 27, 2025
02bcbea
Enhance GrepTool with line numbers, content, and performance optimiza…
Sewer56 Dec 27, 2025
19cec94
Optimize ReadTool buffer sizes with shared ESTIMATED_CHARS_PER_LINE c…
Sewer56 Dec 27, 2025
fb74367
Changed: Preallocate some extra stuff in read.rs
Sewer56 Dec 27, 2025
88c4273
Optimize ReadTool with zero-copy line reading via fill_buf()/consume()
Sewer56 Dec 27, 2025
a05e9f4
Changed: Max output size in Bash to be 30kB
Sewer56 Dec 28, 2025
2e93a73
Replace HTML tag stripping with markdown conversion in WebFetchTool
Sewer56 Dec 28, 2025
839128e
Changed: Format rust.yml
Sewer56 Dec 28, 2025
2829586
Add Windows and macOS to CI test matrix
Sewer56 Dec 28, 2025
f3d5a8b
Rework: Split into 'Core' and 'Rig' crates with Absolute/Relative res…
Sewer56 Dec 28, 2025
7cec8fe
Changed: Add intra-doc links to type references in module documentation
Sewer56 Dec 31, 2025
e2daf9f
Removed: Codex submodule
Sewer56 Jan 5, 2026
3aac58b
Changed: Misc cleanup
Sewer56 Jan 5, 2026
e383cf9
Refactor: Use maybe_async to unify sync/async implementations
Sewer56 Jan 5, 2026
f702032
Add blocking support to webfetch module
Sewer56 Jan 5, 2026
fadc6cc
Refactor: Restructure feature hierarchy with tokio → async → base
Sewer56 Jan 5, 2026
a5154bd
Added: Context module with tool guidance strings for LLM integration
Sewer56 Jan 5, 2026
0ba2701
Added: Basic example demonstrating Rig tool integration
Sewer56 Jan 5, 2026
f1160c9
Added: Comprehensive documentation for features and quick start
Sewer56 Jan 5, 2026
8922d1c
Added: PreambleBuilder and ToolContext trait for tool-agnostic preamb…
Sewer56 Jan 5, 2026
ecae1ac
Removed: Unused README file
Sewer56 Jan 5, 2026
245846d
Improved: Documentation and examples for better library usage clarity
Sewer56 Jan 5, 2026
fdf8255
Renamed: Repository and crates from rig-coding-tools to llm-coding-tools
Sewer56 Jan 5, 2026
c88e347
Updated: Descriptions to highlight lightweight, high-performance impl…
Sewer56 Jan 5, 2026
ffd7dcc
Change: Run cargo fmt
Sewer56 Jan 5, 2026
94e3c9a
Fixed: Pull request template.
Sewer56 Jan 5, 2026
f60dd3e
Fixed: VSCode tasks to watch correct crate directories
Sewer56 Jan 5, 2026
03a83f5
Fix: Mismatched XML closing tag in task.txt example_agent_descriptions
Sewer56 Jan 5, 2026
e07fb89
Fix: Cross-platform support for absolute path tests on Windows
Sewer56 Jan 5, 2026
8bcc8a7
Fixed: Invalid claim of requiring to read before writing
Sewer56 Jan 5, 2026
23302cb
Fix: Use ToolError::Validation for limit validation in grep tools
Sewer56 Jan 5, 2026
3c079b2
Fix: Stream response body to prevent memory exhaustion in webfetch
Sewer56 Jan 5, 2026
2264c62
Expand AGENTS.md with detailed performance guidelines
Sewer56 Jan 5, 2026
22501de
Fix: Normalize Windows path separators in glob output
Sewer56 Jan 5, 2026
3e7e8f9
Fix: Remove unreachable symlink check in grep operation
Sewer56 Jan 5, 2026
fa635b6
Fixed: absolute.rs line endings
Sewer56 Jan 5, 2026
0526a68
Refactor: Use check_size helper in webfetch impl modules
Sewer56 Jan 5, 2026
27f1d8f
Fix: Use floor_char_boundary to prevent UTF-8 panic in grep truncation
Sewer56 Jan 5, 2026
a02aa53
Fixed: Description intro/blurb in AGENTS.MD
Sewer56 Jan 8, 2026
976eb7a
Fixed: markdown nested list indentation in AGENTS.md
Sewer56 Jan 8, 2026
41f71fb
Changed: upgrade reqwest from 0.12 to 0.13.1
Sewer56 Jan 8, 2026
c58d28d
Changed: upgrade dependencies to latest versions
Sewer56 Jan 8, 2026
8c0975d
Fixed: markdown nested list indentation in llm-coding-tools-core READ…
Sewer56 Jan 8, 2026
354930e
Changed: PathResolver trait contract to return absolute path (may or …
Sewer56 Jan 8, 2026
7e2314b
Security: Document that bash tool bypasses AllowedPathResolver restri…
Sewer56 Jan 8, 2026
b0b9613
Fixed: UTF-8 panic in basic example string truncation
Sewer56 Jan 8, 2026
29f6d4c
Changed: simplify README examples by using default constructors
Sewer56 Jan 8, 2026
15848c0
Fixed: enforce absolute path validation for workdir in execute_command
Sewer56 Jan 8, 2026
e25496d
Added: PreambleBuilder compile-time environment section and placehold…
Sewer56 Jan 8, 2026
bd62092
Updated: Comprehensive Claude Code-quality guidance for all 14 tool c…
Sewer56 Jan 8, 2026
d2ab798
Changed: refresh README quick start
Sewer56 Jan 14, 2026
341d074
Added: document PreambleBuilder output examples
Sewer56 Jan 14, 2026
4bdc85c
Added: verify glob results are mtime sorted
Sewer56 Jan 14, 2026
b183803
Changed: avoid zeroed buffer in blocking webfetch
Sewer56 Jan 14, 2026
ced9557
Changed: annotate grep search flow and inline helper
Sewer56 Jan 14, 2026
3f3a6cb
Changed: clarify preamble usage and read flow comments
Sewer56 Jan 14, 2026
374b7d0
Changed: make preamble examples compile
Sewer56 Jan 14, 2026
475bbae
Format: cargo.toml files
Sewer56 Jan 14, 2026
397a9a4
Changed: align globbing with ripgrep deps
Sewer56 Jan 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ body:
- type: input
id: version
attributes:
label: "rig-coding-tools version"
description: The version of rig-coding-tools you're using
label: "llm-coding-tools version"
description: The version of llm-coding-tools you're using
placeholder: e.g. 0.1.0
validations:
required: true
Expand Down
3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

<!--
Please, make sure:
- you have read the contributing guidelines:
https://github.com/Sewer56/rig-coding-tools/blob/main/docs/CONTRIBUTING.md
- you have read the contributing guidelines https://reloaded-project.github.io/reloaded-templates-rust/manual/#contributing
-->
69 changes: 47 additions & 22 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ name: Rust

on:
push:
branches: [ main ]
branches: [main]
tags:
- '*'
- "*"
pull_request:
branches: [ main ]
branches: [main]
workflow_dispatch:



jobs:
build-and-test:
strategy:
Expand All @@ -19,20 +17,37 @@ jobs:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
use-cross: false
- os: windows-latest
target: x86_64-pc-windows-msvc
use-cross: false
- os: macos-latest
target: aarch64-apple-darwin
use-cross: false

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v6

- name: Run Tests and Upload Coverage
- name: Run Tests (async mode) and Upload Coverage
uses: Reloaded-Project/devops-rust-test-and-coverage@v1
with:
rust-project-path: ./src
upload-coverage: true
codecov-token: ${{ secrets.CODECOV_TOKEN }}
target: ${{ matrix.target }}
use-cross: ${{ matrix.use-cross }}

- name: Run Tests (blocking mode) and Upload Coverage
uses: Reloaded-Project/devops-rust-test-and-coverage@v1
with:
rust-project-path: ./src
upload-coverage: true
codecov-token: ${{ secrets.CODECOV_TOKEN }}
target: ${{ matrix.target }}
use-cross: ${{ matrix.use-cross }}
cargo-test-args: "-p llm-coding-tools-core --no-default-features --features blocking"

# Note: The GitHub Runner Images will contain an up to date Rust Stable Toolchain
# thus as per recommendation of cargo-semver-checks, we're using stable here.
#
Expand All @@ -42,29 +57,37 @@ jobs:
working-directory: src
shell: bash
run: |
SEARCH_RESULT=$(cargo search "^rig-coding-tools$" --limit 1)
# Note: binstall is available after devops-rust-test-and-coverage@v1 call
cargo +stable binstall --no-confirm cargo-semver-checks --force
rustup +stable target add ${{ matrix.target }}

if echo "$SEARCH_RESULT" | grep -q "^rig-coding-tools "; then
# Run semver checks on stable, because nightly sometimes gets borked in cargo-semver-checks.
rustup +stable target add ${{ matrix.target }}
# Note: binstall is available after devops-rust-test-and-coverage@v1 call
cargo +stable binstall --no-confirm cargo-semver-checks --force
cargo +stable semver-checks --target ${{ matrix.target }}
else
echo "No previous version found on crates.io. Skipping semver checks."
fi
for CRATE in "llm-coding-tools-core" "llm-coding-tools-rig"; do
SEARCH_RESULT=$(cargo search "^${CRATE}$" --limit 1)
if echo "$SEARCH_RESULT" | grep -q "^${CRATE} "; then
echo "Running semver checks for ${CRATE}..."
cargo +stable semver-checks -p "${CRATE}" --target ${{ matrix.target }}
else
echo "No previous version of ${CRATE} found on crates.io. Skipping semver checks."
fi
done

- name: Check documentation is valid
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/')
working-directory: src
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --workspace --all-features --document-private-items --target ${{ matrix.target }}
# Note: Can't use --all-features at workspace level because tokio/blocking are mutually exclusive
run: |
cargo doc -p llm-coding-tools-core --features tokio --document-private-items --target ${{ matrix.target }}
cargo doc -p llm-coding-tools-rig --document-private-items --target ${{ matrix.target }}

- name: Run linter
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/')
working-directory: src
run: cargo clippy --workspace --all-features --target ${{ matrix.target }} -- -D warnings
# Note: Can't use --all-features at workspace level because tokio/blocking are mutually exclusive
run: |
cargo clippy -p llm-coding-tools-core --features tokio --target ${{ matrix.target }} -- -D warnings
cargo clippy -p llm-coding-tools-rig --target ${{ matrix.target }} -- -D warnings

- name: Run formatter check
uses: actions-rust-lang/rustfmt@v1
Expand All @@ -85,12 +108,14 @@ jobs:
uses: Reloaded-Project/devops-publish-action@v3
with:
rust-crates-io-token: ${{ secrets.CRATES_IO_TOKEN }}
rust-cargo-project-paths: src/rig-coding-tools
rust-cargo-project-paths: |
src/llm-coding-tools-core
src/llm-coding-tools-rig
compression-tool: 7z
artifact-groups-file: .github/artifact-groups.yml
changelog-enabled: 'true'
changelog-enabled: "true"
changelog-template: .github/changelog.hbs
changelog-is-release: ${{ startsWith(github.ref, 'refs/tags/') }}
changelog-release-tag: ${{ github.ref_name }}
changelog-override-starting-version: 'true'
changelog-hide-credit: 'true'
changelog-override-starting-version: "true"
changelog-hide-credit: "true"
115 changes: 63 additions & 52 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,83 +1,94 @@
# rig-coding-tools
# llm-coding-tools

## Additional Setup Required!!
[![Crates.io - llm-coding-tools-core](https://img.shields.io/crates/v/llm-coding-tools-core.svg)](https://crates.io/crates/llm-coding-tools-core)
[![Crates.io - llm-coding-tools-rig](https://img.shields.io/crates/v/llm-coding-tools-rig.svg)](https://crates.io/crates/llm-coding-tools-rig)
[![Docs.rs](https://docs.rs/llm-coding-tools-rig/badge.svg)](https://docs.rs/llm-coding-tools-rig)
[![CI](https://github.com/Sewer56/llm-coding-tools/actions/workflows/rust.yml/badge.svg)](https://github.com/Sewer56/llm-coding-tools/actions)

<!-- DELETE THIS SECTION AFTER COMPLETING SETUP -->
Lightweight, high-performance coding tool implementations for LLM-powered development agents. Plug and play into your favourite frameworks like [Rig](https://github.com/0xPlaygrounds/rig).

Additional setup might be required.
Once you do the stuff under this text, delete this section.
## About This Workspace

### Code Coverage
To setup code coverage for this project:
This workspace contains multiple Rust crates for integrating coding tools with LLM agents:

1. Go to [Codecov][codecov], add your project.
2. Go to [Settings -> Secrets and variables -> Actions][gh-actions-secrets] in your repo and add a repository secret named `CODECOV_TOKEN`.
3. Do the same in [Settings -> Secrets and variables -> Dependabot][gh-actions-dependabot].
- **[llm-coding-tools-core](./src/llm-coding-tools-core/)**: Framework-agnostic core operations and utilities
- **[llm-coding-tools-rig](./src/llm-coding-tools-rig/)**: Rig framework-specific Tool implementations

The instructions on the Codecov page will provide the token to use.
## Features

- **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
- **Web**: URL fetching with HTML-to-markdown conversion
- **Task Delegation**: Sub-agent spawning for complex workflows
- **Path Security**: Choose between unrestricted or sandboxed file access
- **Context Strings**: Embedded LLM guidance for tool usage

### Setup API Key (crates.io)
## Feature Flags (llm-coding-tools-core)

You'll need to set up an API key to publish to `crates.io` on tag.

- Generate your API key in [crates.io (Account Settings -> API Tokens)][crates-io-key].
- Go to [Settings -> Secrets and variables -> Actions][gh-actions-secrets] in your repo and add environment secret named `CRATES_IO_TOKEN`.
- Paste your API key.




### Fill in README Documentation

This repository uses a two-level README structure:

| File | Purpose | What to Write |
|------|---------|---------------|
| `README.MD` (this file) | GitHub landing page | Project overview, quick start example, badges |
| [`src/rig-coding-tools/README.MD`](./src/rig-coding-tools/README.MD) | crates.io page | Detailed features, installation, comprehensive usage examples |

-----------------------

[![Crates.io](https://img.shields.io/crates/v/rig-coding-tools.svg)](https://crates.io/crates/rig-coding-tools)
[![Docs.rs](https://docs.rs/rig-coding-tools/badge.svg)](https://docs.rs/rig-coding-tools)
[![CI](https://github.com/Sewer56/rig-coding-tools/actions/workflows/rust.yml/badge.svg)](https://github.com/Sewer56/rig-coding-tools/actions)

Basic coding tools for rig based LLM agents
- `tokio` (default): Async mode with tokio runtime
- `blocking`: Sync/blocking mode, mutually exclusive with `async`

## Quick Start

Add to your `Cargo.toml`:

```toml
[dependencies]
rig-coding-tools = "0.1.0"
llm-coding-tools-rig = "0.1"
```

```rust
// TODO: Add a minimal example showing the most common use case
use llm_coding_tools_rig::absolute::{ReadTool, WriteTool, GlobTool};
use llm_coding_tools_rig::{BashTool, PreambleBuilder, TodoTools};
use rig::tool::ToolSet;

// Track tools and generate LLM guidance
let mut pb = PreambleBuilder::new();
let todos = TodoTools::new();

let toolset = ToolSet::builder()
.static_tool(pb.track(ReadTool::<true>::new()))
.static_tool(pb.track(WriteTool::new()))
.static_tool(pb.track(GlobTool::new()))
.static_tool(pb.track(BashTool::new()))
.static_tool(pb.track(todos.read))
.static_tool(pb.track(todos.write))
.build();

// Generate preamble for agent system prompt
let preamble = pb.build();

// Use with rig agent:
// let agent = client.agent("gpt-4o")
// .preamble(&preamble)
// .tools(toolset)
// .build();
```
See the [rig-coding-tools crate documentation](./src/rig-coding-tools/README.MD) for detailed usage.

## Crates
## Examples

- [rig-coding-tools](./src/rig-coding-tools/README.MD): Core library <!-- TODO: Update description -->
```bash
# Basic toolset setup
cargo run --example basic -p llm-coding-tools-rig

## Developer Manual
# Complete agent configuration (recommended starting point)
cargo run --example full_agent -p llm-coding-tools-rig

For step-by-step development guidance, see the [Developer Manual](https://reloaded-project.github.io/reloaded-templates-rust/manual/).
# Sandboxed file access
cargo run --example sandboxed -p llm-coding-tools-rig
```

## Documentation

- [llm-coding-tools-core README](./src/llm-coding-tools-core/README.md)
- [llm-coding-tools-rig README](./src/llm-coding-tools-rig/README.md)
- [Developer Guidelines](./src/AGENTS.md)

## Contributing

We welcome contributions! See the [Contributing Guide](https://reloaded-project.github.io/reloaded-templates-rust/manual/#contributing) for details.
Contributions are welcome! Please ensure all tests pass and the code follows our guidelines.

## License

Licensed under [Apache 2.0](./LICENSE).

[codecov]: https://app.codecov.io
[gh-actions-secrets]: https://github.com/Sewer56/rig-coding-tools/settings/secrets/actions
[gh-actions-dependabot]: https://github.com/Sewer56/rig-coding-tools/settings/secrets/dependabot
[gh-pages]: https://github.com/Sewer56/rig-coding-tools/settings/pages
[crates-io-key]: https://crates.io/settings/tokens
[nuget-key]: https://www.nuget.org/account/apikeys
1 change: 0 additions & 1 deletion README.md

This file was deleted.

4 changes: 2 additions & 2 deletions src/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"label": "Auto Test on Save",
"type": "shell",
"command": "cargo install cargo-watch --quiet && cargo watch -x \"test\" -w rig-coding-tools/src",
"command": "cargo install cargo-watch --quiet && cargo watch -x \"test\" -w llm-coding-tools-core/src -w llm-coding-tools-rig/src",
"group": "test",
"presentation": {
"reveal": "always"
Expand All @@ -14,7 +14,7 @@
{
"label": "Auto Coverage on Save",
"type": "shell",
"command": "cargo install cargo-watch --quiet && cargo install cargo-tarpaulin --quiet && cargo watch -x \"tarpaulin --skip-clean --out Xml --out Html --engine llvm --target-dir target/coverage-build\" -w rig-coding-tools/src",
"command": "cargo install cargo-watch --quiet && cargo install cargo-tarpaulin --quiet && cargo watch -x \"tarpaulin --skip-clean --out Xml --out Html --engine llvm --target-dir target/coverage-build\" -w llm-coding-tools-core/src -w llm-coding-tools-rig/src",
"group": "test",
"presentation": {
"reveal": "always"
Expand Down
Loading
Loading