Skip to content

fix(paths): clarify managed paths and avoid global install side effects - #431

Closed
juemuel wants to merge 9 commits into
Panniantong:mainfrom
juemuel:feature/path-management
Closed

fix(paths): clarify managed paths and avoid global install side effects#431
juemuel wants to merge 9 commits into
Panniantong:mainfrom
juemuel:feature/path-management

Conversation

@juemuel

@juemuel juemuel commented Jun 25, 2026

Copy link
Copy Markdown

Summary

Fixes #402.

  • Centralize Agent Reach-owned data under AGENT_REACH_HOME / ~/.agent-reach.
  • Add agent-reach paths and --json output to distinguish Agent Reach-managed paths, agent-platform registration paths, and upstream-managed tools.
  • Make default install/dry-run non-mutating for system/global installs; require --system for those operations.
  • Improve Windows install hints and uninstall cleanup for empty skill registration parent directories.

Test Plan

  • AGENT_REACH_HOME=<workspace temp> python -m pytest tests/ -v
    • 186 passed, 8 skipped
  • git diff --check upstream/main...HEAD
  • Manual smoke checks:
    • python -m agent_reach.cli paths
    • python -m agent_reach.cli paths --json
    • python -m agent_reach.cli install --dry-run
    • python -m agent_reach.cli install --dry-run --system
    • isolated AGENT_REACH_HOME dry-run creates no files

juemuel added 9 commits June 22, 2026 01:59
- [P1] Guard tools_dir().mkdir() behind 'not dry_run' so --dry-run
  creates zero files. Route default dry-run through safe-mode check
  output instead of install-language output.
- [P1] _uninstall_skill() now returns bool; _cmd_uninstall uses it
  instead of unconditionally setting removed_any=True.
- [P2] format_report() accepts optional config_path; all callers
  (_cmd_install, _cmd_doctor, AgentReach.doctor_report) pass the
  active Config instance path so the permission check inspects the
  actual config file, not a separately-resolved default.
Previously Config() called _ensure_dir() unconditionally at the top of
_cmd_install, creating <AGENT_REACH_HOME>/ before the dry_run guard.
Now Config is lazily initialised only when the code path actually needs
to write (proxy save or channel testing), keeping --dry-run and
--system --dry-run entirely side-effect-free.
@Panniantong

Copy link
Copy Markdown
Owner

感谢指出 managed path 和全局安装副作用。merged #575#577 已统一 HOME-first 私有路径、默认只读安装和显式 --system 授权,因此关闭此旧实现。

@Panniantong Panniantong closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

建议: 安装目录散落 $HOME 根目录,考虑统一父目录管理

2 participants