picoclaw/pkg/tools
美電球 75270c4777
Fix 1886 media cleanup policy (#1887)
* fix(media): track cleanup ownership per path

Add explicit cleanup policy handling to MediaStore and count refs by path before deleting the underlying file. This prevents cleanup from removing shared files until the final ref is gone.

Refs #1886

* fix(tools): keep send_file refs forget-only

Mark send_file media registrations as forget-only so cleanup drops the ref without deleting the original workspace file.

Refs #1886

* fix(channels): declare managed media cleanup policy

Explicitly mark downloaded and managed channel media as delete-on-cleanup so media ownership is visible at each registration site.

Refs #1886
2026-03-23 12:13:59 +08:00
..
base.go fix: eliminate data races on shared tool instances (#1080) 2026-03-05 09:57:33 +08:00
cron.go feat(config): add exec controls and gate cron commands on exec settings (#1685) 2026-03-17 18:56:52 +08:00
cron_test.go fix(cron): update test to use OutboundChan instead of removed SubscribeOutbound 2026-03-18 01:37:07 +08:00
edit.go fix(tools): allow /dev/null redirection and add read/write sandbox split (#967) 2026-03-02 12:22:02 +08:00
edit_test.go fix(security): workspace sandbox avoid time-of-check/time-of-use (TOCTOU) races (#464) 2026-02-23 20:09:53 +11:00
filesystem.go feat(tool): overwrite flag in write_file (#1761) 2026-03-19 11:22:52 +08:00
filesystem_test.go feat(tool): overwrite flag in write_file (#1761) 2026-03-19 11:22:52 +08:00
i2c.go refactor: cleanup dead code and turn on dead code detection in CI (#515) 2026-02-24 21:52:25 +08:00
i2c_linux.go feat(linter): Fix govet linter 2026-02-20 22:35:16 +02:00
i2c_other.go feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
mcp_tool.go fix: improve MCP tool name collision safety and registry overwrite warning 2026-03-01 12:00:26 +08:00
mcp_tool_test.go chore: fix lint issues in mcp and agent packages 2026-03-01 08:53:13 +08:00
message.go fix: eliminate data races on shared tool instances (#1080) 2026-03-05 09:57:33 +08:00
message_test.go fix: eliminate data races on shared tool instances (#1080) 2026-03-05 09:57:33 +08:00
registry.go refactor: improve code readability and consistency across multiple files 2026-03-21 17:12:45 +08:00
registry_test.go fix(tools): propagate tool registry to subagents (#1711) 2026-03-19 00:17:16 +08:00
result.go feat(subturn): support stateful iteration for evaluator-optimizer pattern 2026-03-19 10:15:00 +08:00
result_test.go feat(fmt): Run formatters 2026-02-18 21:48:23 +02: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
send_file.go Fix 1886 media cleanup policy (#1887) 2026-03-23 12:13:59 +08:00
send_file_test.go Fix 1886 media cleanup policy (#1887) 2026-03-23 12:13:59 +08:00
shell.go Revert "feat(tools): add exec tool enhancement with background execution and …" 2026-03-22 00:39:47 +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 Revert "feat(tools): add exec tool enhancement with background execution and …" 2026-03-22 00:39:47 +08:00
shell_timeout_unix_test.go Revert "feat(tools): add exec tool enhancement with background execution and …" 2026-03-22 00:39:47 +08:00
skills_install.go refactor(pkg): move atomic file write to dedicated fileutil package 2026-02-24 23:57:13 +08:00
skills_install_test.go feat(fmt): Fix formatting 2026-02-20 20:03:11 +02:00
skills_search.go feat(fmt): Fix formatting 2026-02-20 20:03:11 +02:00
skills_search_test.go feat(fmt): Fix formatting 2026-02-20 20:03:11 +02: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
spi.go refactor: cleanup dead code and turn on dead code detection in CI (#515) 2026-02-24 21:52:25 +08:00
spi_linux.go feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
spi_other.go feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
subagent.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
subagent_tool_test.go fix(tools): prevent nil pointer dereference in spawn tools 2026-03-19 13:51:11 +08:00
toolloop.go feat: execute LLM tool calls in parallel for faster response (#1070) 2026-03-04 17:17:28 +08:00
types.go Revert "feat(tools): add exec tool enhancement with background execution and …" 2026-03-22 00:39:47 +08:00
web.go fix: restore missing assets and address Copilot review comments 2026-03-23 10:21:06 +08:00
web_test.go feat(tool): anti cloudflare challenge in web_fetch (#1762) 2026-03-19 17:01:45 +08:00