Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(shell): allow read-only copies from internal state files
Xubin Ren5dc238c7efe5
diff --git a/nanobot/agent/tools/shell.py b/nanobot/agent/tools/shell.pyindex 729afa60b..aa8ca67b1 100644--- a/nanobot/agent/tools/shell.py+++ b/nanobot/agent/tools/shell.py@@ -66,7 +66,7 @@ class ExecTool(Tool):# direct writes corrupt the cursor format and crash /dream.r">>?\s*\S*(?:history\.jsonl|\.dream_cursor)", # > / >> redirectr"\btee\b[^|;&<>]*(?:history\.jsonl|\.dream_cursor)", # tee / tee -a- r"\b(?:cp|mv)\b[^|;&<>]*(?:history\.jsonl|\.dream_cursor)", # cp/mv target+ r"\b(?:cp|mv)\b(?:\s+[^\s|;&<>]+)+\s+\S*(?:history\.jsonl|\.dream_cursor)", # cp/mv targetr"\bdd\b[^|;&<>]*\bof=\S*(?:history\.jsonl|\.dream_cursor)", # dd of=r"\bsed\s+-i[^|;&<>]*(?:history\.jsonl|\.dream_cursor)", # sed -i]diff --git a/tests/tools/test_exec_security.py b/tests/tools/test_exec_security.pyindex 9f001aaff..20687dcbf 100644--- a/tests/tools/test_exec_security.py+++ b/tests/tools/test_exec_security.py@@ -104,6 +104,7 @@ def test_exec_blocks_writes_to_history_jsonl(command):"wc -l history.jsonl","tail -n 5 history.jsonl","grep foo history.jsonl",+ "cp history.jsonl /tmp/history.backup","ls memory/","echo history.jsonl",],