diff --git a/CLAUDE.md b/CLAUDE.md index 072f665..a58471c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,8 +1,8 @@ -# CLAUDE.md - RustBot Development Guide +# CLAUDE.md - RustFox Development Guide ## Project Overview -RustBot is a Telegram AI assistant written in Rust. It connects to Telegram as a bot, uses OpenRouter LLM for inference (default model: `qwen/qwen3-235b-a22b`), provides built-in sandboxed tools (file I/O, command execution), and supports MCP (Model Context Protocol) servers for extensible tool integration. It implements an agentic loop that iterates tool calls until a final text response is produced (max 10 iterations). +RustFox is a Telegram AI assistant written in Rust. It connects to Telegram as a bot, uses OpenRouter LLM for inference (default model: `qwen/qwen3-235b-a22b`), provides built-in sandboxed tools (file I/O, command execution), and supports MCP (Model Context Protocol) servers for extensible tool integration. It implements an agentic loop that iterates tool calls until a final text response is produced (max 10 iterations). ## Build & Run @@ -74,7 +74,7 @@ src/ - **Edition**: 2021 - **Async runtime**: Tokio with `full` features - **Error handling**: `anyhow::Result` throughout, with `.context()` / `.with_context()` for error messages -- **Logging**: `tracing` crate with `tracing-subscriber` (env filter: `RUST_LOG`, default `info,rustbot=debug`) +- **Logging**: `tracing` crate with `tracing-subscriber` (env filter: `RUST_LOG`, default `info,rustfox=debug`) - **Serialization**: `serde` derive macros with `#[serde(skip_serializing_if = "Option::is_none")]` for optional fields - **Shared state**: `Arc` passed via teloxide's dependency injection (`dptree::deps!`) - **Concurrency**: `tokio::sync::Mutex` for per-user conversation map (not `std::sync::Mutex`) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc792dc..9cb8072 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,10 +1,10 @@ -# Contributing to RustBot +# Contributing to RustFox Thanks for your interest in contributing. This project is open source under the [MIT License](LICENSE). ## How to contribute -- **Bugs or feature requests:** Open an [issue](https://github.com/chinkan/RustBot/issues). +- **Bugs or feature requests:** Open an [issue](https://github.com/chinkan/RustFox/issues). - **Code or docs:** Open a pull request. We’re happy to review and merge improvements. ## Pull requests @@ -16,4 +16,4 @@ Thanks for your interest in contributing. This project is open source under the ## Documentation and README -- When adding **screenshots or GIFs** to the README (or other docs), use **descriptive `alt` text** for the image. For example: `![RustBot Telegram chat showing tool use](screenshot.png)`. This helps accessibility and search discoverability. +- When adding **screenshots or GIFs** to the README (or other docs), use **descriptive `alt` text** for the image. For example: `![RustFox Telegram chat showing tool use](screenshot.png)`. This helps accessibility and search discoverability. diff --git a/Cargo.toml b/Cargo.toml index cb86df0..b9beb7f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rustbot" +name = "rustfox" version = "0.1.0" edition = "2021" diff --git a/README.md b/README.md index 91a8811..1a1f0f1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ -# RustBot — Telegram AI Assistant +

+ RustFox Logo +

-[![CI](https://github.com/chinkan/RustBot/actions/workflows/ci.yml/badge.svg)](https://github.com/chinkan/RustBot/actions) +# RustFox — Telegram AI Assistant + +[![CI](https://github.com/chinkan/RustFox/actions/workflows/ci.yml/badge.svg)](https://github.com/chinkan/RustFox/actions) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Buy Me a Coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-%E2%98%95-yellow)](https://buymeacoffee.com/chinkan.ai) @@ -50,9 +54,9 @@ The wizard will ask for your: ### 3. Run ```bash -cargo run --bin rustbot +cargo run --bin rustfox # or with a custom config path: -cargo run --bin rustbot -- /path/to/config.toml +cargo run --bin rustfox -- /path/to/config.toml ``` ## Configuration @@ -68,7 +72,7 @@ See [`config.example.toml`](config.example.toml) for all options. | `openrouter.api_key` | OpenRouter API key | | `openrouter.model` | LLM model ID (default: `moonshotai/kimi-k2.5`) | | `sandbox.allowed_directory` | Directory for file/command operations | -| `memory.database_path` | SQLite DB path (default: `rustbot.db`) | +| `memory.database_path` | SQLite DB path (default: `rustfox.db`) | | `embedding` (optional) | Vector search API config (default model: `qwen/qwen3-embedding-8b`) | | `skills.directory` | Folder of bot skill files (default: `skills/`) | | `mcp_servers` | List of MCP servers to connect | @@ -76,7 +80,7 @@ See [`config.example.toml`](config.example.toml) for all options. ### MCP Server Configuration -RustBot supports the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) — an open standard for connecting AI assistants to external tools and data sources. Any MCP-compatible server can be plugged in via `config.toml`. +RustFox supports the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) — an open standard for connecting AI assistants to external tools and data sources. Any MCP-compatible server can be plugged in via `config.toml`. #### Prerequisites @@ -217,7 +221,7 @@ This project is open source under the [MIT License](LICENSE). Contributions are ## Support -If you find RustBot useful, consider supporting the project: +If you find RustFox useful, consider supporting the project: [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-%E2%98%95-yellow?style=for-the-badge&logo=buy-me-a-coffee)](https://buymeacoffee.com/chinkan.ai) diff --git a/assets/logo.jpeg b/assets/logo.jpeg new file mode 100644 index 0000000..b470f22 Binary files /dev/null and b/assets/logo.jpeg differ diff --git a/config.example.toml b/config.example.toml index 881368f..3aebb9e 100644 --- a/config.example.toml +++ b/config.example.toml @@ -1,4 +1,4 @@ -# RustBot Configuration +# RustFox Configuration [telegram] # Get your bot token from @BotFather on Telegram @@ -25,12 +25,12 @@ Be concise and helpful.""" [sandbox] # The directory where file operations and command execution are allowed # The bot cannot access files outside this directory -allowed_directory = "/tmp/rustbot-sandbox" +allowed_directory = "/tmp/rustfox-sandbox" [memory] # Path to the SQLite database file for persistent memory # Stores conversations, knowledge base, and vector embeddings -database_path = "rustbot.db" +database_path = "rustfox.db" [skills] # Directory containing skill markdown files @@ -66,7 +66,7 @@ directory = "skills" # [[mcp_servers]] # name = "filesystem" # command = "npx" -# args = ["-y", "@modelcontextprotocol/server-filesystem", "/tmp/rustbot-sandbox"] +# args = ["-y", "@modelcontextprotocol/server-filesystem", "/tmp/rustfox-sandbox"] # Example: Web search MCP server with environment variables # [[mcp_servers]] diff --git a/docs/plans/2026-02-16-ai-agent-framework.md b/docs/plans/2026-02-16-ai-agent-framework.md index 05b3844..e07b16b 100644 --- a/docs/plans/2026-02-16-ai-agent-framework.md +++ b/docs/plans/2026-02-16-ai-agent-framework.md @@ -2,7 +2,7 @@ > **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. -**Goal:** Transform RustBot from a Telegram-only AI chatbot into a modular AI agent framework with persistent memory, markdown-based skills, multi-platform support, and proactive background task scheduling. +**Goal:** Transform RustFox from a Telegram-only AI chatbot into a modular AI agent framework with persistent memory, markdown-based skills, multi-platform support, and proactive background task scheduling. **Architecture:** Modular monolith with Cargo feature flags. Core agent logic extracted from `bot.rs` into a platform-agnostic `agent` module. Platform adapters (Telegram first, Discord-ready) implement a `Platform` trait. SQLite with FTS5 provides persistent conversations, knowledge base, and learning. Skills are natural-language markdown files loaded at runtime. Tokio-cron-scheduler handles background tasks. @@ -543,7 +543,7 @@ pub struct MemoryConfig { } fn default_db_path() -> PathBuf { - PathBuf::from("rustbot.db") + PathBuf::from("rustfox.db") } ``` @@ -569,7 +569,7 @@ fn default_memory_config() -> MemoryConfig { ```toml [memory] # Path to the SQLite database file for persistent memory -database_path = "rustbot.db" +database_path = "rustfox.db" ``` **Step 3: Verify it compiles** @@ -2012,7 +2012,7 @@ async fn main() -> Result<()> { tracing_subscriber::registry() .with( tracing_subscriber::EnvFilter::try_from_default_env() - .unwrap_or_else(|_| "info,rustbot=debug".into()), + .unwrap_or_else(|_| "info,rustfox=debug".into()), ) .with(tracing_subscriber::fmt::layer()) .init(); diff --git a/docs/plans/2026-02-17-scheduling-tool-design.md b/docs/plans/2026-02-17-scheduling-tool-design.md index 80fbf05..d7ef2a1 100644 --- a/docs/plans/2026-02-17-scheduling-tool-design.md +++ b/docs/plans/2026-02-17-scheduling-tool-design.md @@ -1572,7 +1572,7 @@ git commit -m "chore: cargo fmt and clippy fixes" ## Task 11: Push branch ```bash -git push -u origin claude/rustbot-scheduling-tool-nLhrR +git push -u origin claude/rustfox-scheduling-tool-nLhrR ``` --- diff --git a/docs/plans/2026-02-18-update-agent-skills-format.md b/docs/plans/2026-02-18-update-agent-skills-format.md index bf8089c..041f998 100644 --- a/docs/plans/2026-02-18-update-agent-skills-format.md +++ b/docs/plans/2026-02-18-update-agent-skills-format.md @@ -4,7 +4,7 @@ **Goal:** Update **two** skill directories to fully conform to Anthropic's official Claude agent skills specification: -1. **`skills/`** — RustBot's own bot skills (loaded into the Telegram bot's LLM system prompt by `src/skills/loader.rs`). Currently uses flat `.md` files → convert to `skill-name/SKILL.md` folder format. +1. **`skills/`** — RustFox's own bot skills (loaded into the Telegram bot's LLM system prompt by `src/skills/loader.rs`). Currently uses flat `.md` files → convert to `skill-name/SKILL.md` folder format. 2. **`.claude/skills/`** — Claude Code development skills (used by Claude when working on this project). Already uses folder format but has minor compliance issues to fix. **Tech Stack:** Plain markdown, YAML frontmatter, Rust (no code changes needed — loader already supports folder format), Git @@ -33,9 +33,9 @@ description: Use when... # max 1024 chars; no XML tags; triggering conditions o --- -## Part A: RustBot Bot Skills (`skills/`) +## Part A: RustFox Bot Skills (`skills/`) -### How RustBot Skills Work +### How RustFox Skills Work `src/skills/loader.rs` loads skills from the directory configured in `config.toml` (`[skills] directory = "skills"`). `src/skills/mod.rs` builds a context string from them, injected into the LLM system prompt as: @@ -48,7 +48,7 @@ The loader **already supports both formats**: - `skills/my-skill.md` — flat file (current, to be replaced) - `skills/my-skill/SKILL.md` — folder format (target) -RustBot skills also support an optional `tags` field in frontmatter (RustBot extension, not in Claude spec). +RustFox skills also support an optional `tags` field in frontmatter (RustFox extension, not in Claude spec). ### Current State Audit @@ -198,7 +198,7 @@ git commit -m "docs: update CLAUDE.md to document folder-based skills format" ## Part B: Claude Code Skills (`.claude/skills/`) -These are used by Claude Code when developing RustBot, not by the bot itself. +These are used by Claude Code when developing RustFox, not by the bot itself. ### Current State Audit @@ -325,7 +325,7 @@ Add a `hooks` section to `.claude/settings.json`: | Format check | `cargo fmt --check` / `prettier --check .` | | Multiple checks | Chain with `&&` | -## Example: RustBot +## Example: RustFox ```json { diff --git a/docs/plans/2026-02-19-readme-update-models-and-features-plan.md b/docs/plans/2026-02-19-readme-update-models-and-features-plan.md index 091d506..dc53892 100644 --- a/docs/plans/2026-02-19-readme-update-models-and-features-plan.md +++ b/docs/plans/2026-02-19-readme-update-models-and-features-plan.md @@ -176,7 +176,7 @@ Write the complete new README with these sections (in order): Full content: ```markdown -# RustBot — Telegram AI Assistant +# RustFox — Telegram AI Assistant [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Buy Me a Coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-☕-yellow)](https://buymeacoffee.com/chinkan.ai) @@ -240,7 +240,7 @@ See [`config.example.toml`](config.example.toml) for all options. | `openrouter.api_key` | OpenRouter API key | | `openrouter.model` | LLM model ID (default: `moonshotai/kimi-k2.5`) | | `sandbox.allowed_directory` | Directory for file/command operations | -| `memory.database_path` | SQLite DB path (default: `rustbot.db`) | +| `memory.database_path` | SQLite DB path (default: `rustfox.db`) | | `embedding` (optional) | Vector search API config (default model: `qwen/qwen3-embedding-8b`) | | `skills.directory` | Folder of bot skill files (default: `skills/`) | | `mcp_servers` | List of MCP servers to connect | @@ -337,7 +337,7 @@ Feel free to: ## Support -If you find RustBot useful, consider supporting the project: +If you find RustFox useful, consider supporting the project: [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-☕-yellow?style=for-the-badge&logo=buy-me-a-coffee)](https://buymeacoffee.com/chinkan.ai) diff --git a/docs/plans/2026-02-20-setup-load-existing-config-design.md b/docs/plans/2026-02-20-setup-load-existing-config-design.md index 9428395..b52a7e1 100644 --- a/docs/plans/2026-02-20-setup-load-existing-config-design.md +++ b/docs/plans/2026-02-20-setup-load-existing-config-design.md @@ -75,7 +75,7 @@ Store `config_path` (already present). The handler reads from the same path. ### `save_config` print fix -Update the success `println!` to say `cargo run --bin rustbot` (already done in prior commit but `setup.rs` still has the old string — fix here). +Update the success `println!` to say `cargo run --bin rustfox` (already done in prior commit but `setup.rs` still has the old string — fix here). ## Frontend Design (`setup/index.html`) diff --git a/docs/plans/2026-02-20-setup-load-existing-config.md b/docs/plans/2026-02-20-setup-load-existing-config.md index 5259fec..f4ac590 100644 --- a/docs/plans/2026-02-20-setup-load-existing-config.md +++ b/docs/plans/2026-02-20-setup-load-existing-config.md @@ -347,7 +347,7 @@ println!(" Run the bot with: cargo run\n"); ``` to: ```rust -println!(" Run the bot with: cargo run --bin rustbot\n"); +println!(" Run the bot with: cargo run --bin rustfox\n"); ``` ### Step 4: Verify @@ -417,8 +417,8 @@ const state = { max_tokens: '4096', system_prompt: 'You are a helpful AI assistant ...', location: '', - sandbox_dir: '/tmp/rustbot-sandbox', - db_path: 'rustbot.db', + sandbox_dir: '/tmp/rustfox-sandbox', + db_path: 'rustfox.db', mcp_selections: {}, custom_mcp_servers: [], // NEW _loaded: false, // NEW — true when existing config was found @@ -497,7 +497,7 @@ In the step-1 template inside `buildSteps()`, add the banner div right before th **Before:** ```js c.innerHTML += `
-

Welcome to RustBot

+

Welcome to RustFox

Your personal AI assistant on Telegram, powered by OpenRouter LLMs and extensible via MCP tools.

This wizard creates your config.toml in about 2 minutes. @@ -509,7 +509,7 @@ In the step-1 template inside `buildSteps()`, add the banner div right before th **After:** ```js c.innerHTML += `

-

Welcome to RustBot

+

Welcome to RustFox

Your personal AI assistant on Telegram, powered by OpenRouter LLMs and extensible via MCP tools.

This wizard creates your config.toml in about 2 minutes. @@ -594,9 +594,9 @@ function esc(s) { ### Step 3: Pre-fill step 4 (Sandbox & Memory) ```js - + ... - + ``` ### Step 4: Pre-check catalog MCP checkboxes diff --git a/docs/plans/2026-02-20-setup-wizard-web-ui.md b/docs/plans/2026-02-20-setup-wizard-web-ui.md index 385980e..9483eee 100644 --- a/docs/plans/2026-02-20-setup-wizard-web-ui.md +++ b/docs/plans/2026-02-20-setup-wizard-web-ui.md @@ -73,7 +73,7 @@ if [[ "${1:-}" == "--cli" ]]; then exit 0 fi -echo "Starting RustBot setup wizard at http://localhost:$PORT" +echo "Starting RustFox setup wizard at http://localhost:$PORT" echo "Press Ctrl+C to exit." python3 "$SCRIPT_DIR/setup/server.py" "$PORT" "$SCRIPT_DIR" & @@ -97,7 +97,7 @@ chmod +x setup.sh ```python #!/usr/bin/env python3 -"""Minimal HTTP server for RustBot setup wizard.""" +"""Minimal HTTP server for RustFox setup wizard.""" import http.server import json import os @@ -191,7 +191,7 @@ This task creates the skeleton: header, step container, navigation buttons, CSS. -RustBot Setup +RustFox Setup