Commit Graph

11 Commits

Author SHA1 Message Date
34cacf55d2 feat: replace strcpy/strcat with memcpy and add null-termination across multiple source files
Replace unsafe string concatenation patterns using strcpy/strcat with explicit memcpy calls and proper null-termination in bash_repair.c, context_manager.c, context_summarizer.c, and db.c. Add missing null-pointer checks for strdup results in bash_executor.c. Introduce atomic_int for spinner_running flag in http_client.c. Add consecutive_tool_error_iterations field to agent struct and refactor agent heartbeat/token tracking to use messages_get_db instead of db_open. Remove r_config_get_max_tokens declaration from r_config.h. Add json_repair.c to Makefile build sources and include db.h in messages.h with new messages_get_db function declaration.
2026-04-03 08:42:43 +00:00
9bd9595145 feat: add spawn_tracker header with depth/total limits and validation interface 2026-02-15 18:15:15 +00:00
83b3eec68b feat: add snapshot database tables, live snapshot recording, and vi/emacs editing mode toggles 2026-02-14 07:07:05 +00:00
37e7aa4833 feat: add refusal detection and soldier persona to agent system prompt 2026-02-14 04:32:20 +00:00
28b8f44147 feat: add spawn tracker and deepsearch tool with configurable depth limits
Implement spawn_tracker module to enforce recursive agent spawning limits via R_MAX_SPAWN_DEPTH and R_MAX_TOTAL_SPAWNS environment variables, replacing the previous max_subagents parameter in tool_agent.c. Add tool_deepsearch.c implementing an iterative multi-query research algorithm with configurable system message, and register the new source files in Makefile build targets.
2026-02-10 20:20:19 +00:00
6574db64e1 fix: add null check for avatar pointer before dereference in user profile loader 2026-02-10 03:29:48 +00:00
dccd79c05a feat: add markdown module header and async bash execution result structs
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.
2026-01-29 05:54:10 +00:00
8215d7012d feat: add agent subagent support, bash timeout, context manager improvements, and benchmark script
- 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
2026-01-29 05:01:05 +00:00
20d92682b2 feat: add bash_repair, context_manager, json_repair, python_repair, and r_diff modules with Makefile integration 2026-01-28 23:38:21 +00:00
216627e777 feat: add context overflow detection and automatic history shrinking in agent 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.
2026-01-28 19:15:02 +00:00
7f799e8fa5 chore: remove AppRun, compose.yml, collect_so_files.sh and database.db; add include headers and refactor Makefile with src directory structure 2026-01-28 18:34:39 +00:00