Agent-Reach/docs/update.md
Pnant b4d189b536
fix: enforce workspace isolation to prevent agent pollution (#57) (#72)
Problem: After installing Agent Reach, agents may clone repos, create
files, or write output into the workspace directory, gradually polluting
the user's project. Over time this degrades the agent experience.

Fix:
- SKILL.md: add Workspace Rules section — never create files in workspace
- install.md: add Directory Rules table, explicit boundary about workspace
- install.md: all git clone commands now target ~/.agent-reach/tools/
- update.md: add workspace warning
- cli.py: install creates ~/.agent-reach/tools/ directory

All agent-facing docs now enforce: /tmp for temp, ~/.agent-reach/ for
persistent data, workspace stays untouched.

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
2026-03-04 18:40:31 +08:00

69 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Agent Reach — Update Guide
## For Humans
Copy this to your AI Agent:
```
帮我更新 Agent Reachhttps://raw.githubusercontent.com/Panniantong/agent-reach/main/docs/update.md
```
---
## For AI Agents
### ⚠️ Workspace Rules
**Never create files, clone repos, or run commands in the agent workspace.** Use `/tmp/` for temporary work and `~/.agent-reach/` for persistent data.
### Goal
Update Agent Reach to the latest version, then verify everything still works.
### Step 1: Check current version
```bash
agent-reach check-update
```
If it says "已是最新版本", you're done — tell the user.
### Step 2: Update
```bash
pip install --upgrade https://github.com/Panniantong/agent-reach/archive/main.zip
```
### Step 3: Verify
```bash
agent-reach version
agent-reach doctor
```
Report the new version and channel status to the user. If any channel changed status (was ✅ now ❌), investigate and fix.
### Step 4: Update SKILL.md (if installed)
If the user has the Agent Reach skill installed, update it too:
```bash
agent-reach install --skill-only
```
If the `--skill-only` flag is not available, manually copy the latest SKILL.md:
```bash
python3 -c "
import importlib.resources, shutil, os
skill = importlib.resources.files('agent_reach').joinpath('skill', 'SKILL.md').read_text()
for d in [os.path.expanduser('~/.openclaw/skills/agent-reach'),
os.path.expanduser('~/.claude/skills/agent-reach')]:
if os.path.isdir(d):
with open(os.path.join(d, 'SKILL.md'), 'w') as f:
f.write(skill)
print(f'✅ Updated: {d}')
"
```
Done. Tell the user what version they're now on and how many channels are available.