picoclaw/pkg/tools
yuxuan-7814 89085d9edf fix: resolve relative paths correctly in exec tool safety guard
Previously, relative paths in shell commands were resolved using the process's current working directory instead of the command's intended working directory. This caused legitimate relative paths (e.g., skills/file.md) to be evaluated as absolute paths from the process root, triggering false-positive safety blocks.

The guardCommand method now correctly distinguishes absolute and relative paths:
- Absolute paths are used as-is (cleaned)
- Relative paths are joined with the command's cwd before validation

This ensures relative paths are resolved relative to the intended working directory.

Closes #2749
2026-05-08 15:57:18 +08:00
..
fs refactor(tools): reorganize tool packages and facades 2026-04-17 13:44:31 +08:00
hardware fix(providers,tools): address linter issues after reorg 2026-04-17 14:16:18 +08:00
integration fix(tools): improve web search provider fallback (#2629) 2026-04-23 15:39:16 +08:00
shared fix(tools): centralize shared LLM note constants 2026-04-17 14:31:43 +08:00
cron.go Merge pull request #2474 from srcrs/fix-cron-independent-sessions 2026-04-16 23:52:29 +08:00
cron_test.go Merge pull request #2474 from srcrs/fix-cron-independent-sessions 2026-04-16 23:52:29 +08:00
facade_compat_test.go refactor(tools): reorganize tool packages and facades 2026-04-17 13:44:31 +08:00
fs_facade.go fix(providers,tools): address linter issues after reorg 2026-04-17 14:16:18 +08:00
fs_registry_compat_test.go refactor(tools): reorganize tool packages and facades 2026-04-17 13:44:31 +08:00
hardware_facade.go refactor(tools): reorganize tool packages and facades 2026-04-17 13:44:31 +08:00
identifier_compat.go refactor(tools): reorganize tool packages and facades 2026-04-17 13:44:31 +08:00
integration_facade.go fix(tools): improve web search provider fallback (#2629) 2026-04-23 15:39:16 +08:00
load_image_compat_test.go refactor(tools): reorganize tool packages and facades 2026-04-17 13:44:31 +08:00
normalization.go fix(tool): route binary outputs through the media pipeline. 2026-03-22 12:05:28 +01:00
path_compat.go refactor(tools): reorganize tool packages and facades 2026-04-17 13:44:31 +08:00
registry.go unify all panic event to panic log file (#2250) 2026-04-01 23:26:49 +08:00
registry_test.go feat(tools): add reaction tool and reply-aware message sends (#2156) 2026-03-30 16:31:34 +08:00
result_test.go fix(tool): route binary outputs through the media pipeline. 2026-03-22 12:05:28 +01:00
search_tool.go feat(mcp): tool search tools (#1243) 2026-03-09 18:21:49 +01:00
search_tools_test.go feat(mcp): tool search tools (#1243) 2026-03-09 18:21:49 +01:00
session.go refactor(tools): reorganize tool packages and facades 2026-04-17 13:44:31 +08:00
session_process_unix.go feat(tools): add exec tool enhancement with background execution and PTY support (#1752) 2026-03-25 21:02:49 +08:00
session_process_windows.go feat(tools): add exec tool enhancement with background execution and PTY support (#1752) 2026-03-25 21:02:49 +08:00
session_test.go feat(tools): add exec tool enhancement with background execution and PTY support (#1752) 2026-03-25 21:02:49 +08:00
shared_facade.go fix(tools): centralize shared LLM note constants 2026-04-17 14:31:43 +08:00
shell.go fix: resolve relative paths correctly in exec tool safety guard 2026-05-08 15:57:18 +08:00
shell_process_unix.go fix(exec): terminate process tree on timeout 2026-02-18 02:01:29 +08:00
shell_process_windows.go fix(exec): terminate process tree on timeout 2026-02-18 02:01:29 +08:00
shell_test.go feat(tools): add exec tool enhancement with background execution and PTY support (#1752) 2026-03-25 21:02:49 +08:00
shell_timeout_unix_test.go feat(tools): add exec tool enhancement with background execution and PTY support (#1752) 2026-03-25 21:02:49 +08:00
spawn.go refactor: improve code readability and consistency across multiple files 2026-03-21 17:12:45 +08:00
spawn_status.go feat(tools): add SpawnStatusTool for reporting subagent statuses (#1540) 2026-03-17 14:41:43 +08:00
spawn_status_test.go feat(tools): add SpawnStatusTool for reporting subagent statuses (#1540) 2026-03-17 14:41:43 +08:00
spawn_test.go fix(tools): prevent nil pointer dereference in spawn tools 2026-03-19 13:51:11 +08:00
subagent.go feat: add load_image tool for local file vision (#2116) 2026-04-01 21:32:10 +08:00
subagent_tool_test.go fix(tools): prevent nil pointer dereference in spawn tools 2026-03-19 13:51:11 +08:00
sysproc_unix.go feat(tools): add exec tool enhancement with background execution and PTY support (#1752) 2026-03-25 21:02:49 +08:00
sysproc_windows.go feat(tools): add exec tool enhancement with background execution and PTY support (#1752) 2026-03-25 21:02:49 +08:00
toolloop.go feat: add load_image tool for local file vision (#2116) 2026-04-01 21:32:10 +08:00
validate.go feat(tools): add tool argument schema validation before execution (#1877) 2026-03-24 18:35:56 +08:00
validate_test.go feat(tools): add tool argument schema validation before execution (#1877) 2026-03-24 18:35:56 +08:00