Introduce `include/markdown.h` with retoor copyright header and add `r_process_result_t` struct plus `r_bash_execute_ext` / `r_process_result_free` declarations to `include/bash_executor.h` for advanced async process handling.
- Add agent_set_is_subagent and agent_set_tool_registry to agent API for subagent support
- Add timeout_seconds parameter to r_bash_execute to prevent hanging processes
- Refactor context_manager truncation logic with dynamic ratio-based truncation and total size calculation
- Add messages_to_json_string helper and r_config_get_max_tokens accessor
- Introduce tool_registry_get_specialized for type-filtered tool registries
- Add completion_phrases and passive_phrases detection to agent completion logic
- Suppress spinner in http_client when stderr is not a TTY
- Add comprehensive agent_benchmark.py with TestCase framework and logging
This commit deletes the complete implementation of the agent loop, authentication module, web browsing utilities, chat prompt builder, database helper, and HTTP client. All corresponding header files and test harnesses are also removed. The diff shows the deletion of 6 source files and 6 header files totaling over 1000 lines of code, including the agent state machine, API key resolution logic, curl-based HTTP functions, SQLite database initialization and CRUD operations, and the JSON chat prompt construction.
Implement pthread-based parallel execution in tool_registry_execute to run tool calls concurrently, replacing the previous sequential loop. Add tool_thread_args_t struct and tool_thread_func wrapper for thread-safe execution. Introduce MAX_PARALLEL_PROBES constant and probe_t struct in network_port_scan_execute to enable concurrent socket probing with non-blocking connect patterns, replacing the single-threaded sequential port scan loop.
Implement context manager integration that detects API errors indicating context length exceeded, then automatically shrinks message history and retries the request. Add new messages API functions (remove_range, get_object, replace_at) and a new R_ERROR_CONTEXT_TOO_LONG error code to support this functionality.
Add use_tools() helper that reads R_USE_TOOLS environment variable to
conditionally include tools descriptions in chat JSON output, defaulting
to true when unset or unrecognized.
Implement full AppImage packaging support including AppRun entry point, .desktop launcher, icon asset, and recursive shared library collection via collect_so_files.sh. The Makefile build target now generates a portable Linux executable by assembling the directory structure, copying the binary to AppImage/usr/bin/r, running the dependency collector, and invoking appimagetool to produce a self-contained AppImage binary. Also update .gitignore to exclude the AppImage build directory and add shell scripts to the ignore list.
The diff adds a tip about creating bash files for environment variables and symlinking them for easy access, along with new configuration sections for OpenAI (using gpt-4o-mini) and Grok (using grok-2 with strict mode disabled) API setups in the README documentation.
The fix changes the glob pattern from a literal dot to a wildcard asterisk when the target directory is ".", enabling recursive matching of files in subdirectories during the build process.
The change adds a conditional check in `tool_function_directory_rglob` that converts a target_dir of "." to "*", enabling the recursive glob to match files in nested subdirectories rather than only the current directory's immediate contents.
Replace hardcoded global API URL variables with getter functions that check the R_BASE_URL environment variable, falling back to the static defaults. Introduce a joinpath utility in utils.h to safely concatenate a base URL with a path segment, handling trailing slashes and leading path slashes. Remove conditional compilation blocks for RD and OLLAMA backends, consolidating all API URL logic into the new get_completions_api_url and get_models_api_url functions. Update all call sites in openai.h to use the new getter functions instead of direct global variable access.
- Remove the initial commit placeholder progress message from Makefile
- Add `!tools` command to REPL that prints available tools descriptions
- Include tools.h header and integrate tools_descriptions() function
- Switch default RD backend from DeepInfra/Llama to Anthropic/Claude models
- Update advanced_model and fast_model to claude-3-5-haiku-20241022
- Change completions_api_url to Anthropic API endpoint
- Enable verbose mode by default (is_verbose = true)
- Update README to reflect new Claude/Ollama focus and remove old download links
Introduce a new `file_version_history` table to the SQLite schema and implement the `db_store_file_version` function that reads a file's current content and inserts a version record before overwriting it. The `tool_function_write_file` now calls this backup function prior to opening the file for writing, ensuring every write operation creates a recoverable snapshot.