Skip to content

feat: migrate data/projects dirs from orchestrator to agent-workspace#952

Merged
web3dev1337 merged 3 commits intomainfrom
fix/support-flat-repo-clones
Mar 20, 2026
Merged

feat: migrate data/projects dirs from orchestrator to agent-workspace#952
web3dev1337 merged 3 commits intomainfrom
fix/support-flat-repo-clones

Conversation

@web3dev1337
Copy link
Copy Markdown
Owner

Summary

  • Renames all data paths from ~/.orchestrator to ~/.agent-workspace across 26 server files
  • Moves project scan root from ~/GitHub to ~/.agent-workspace/projects/ — dedicated managed directory with zero ambiguity
  • Adds centralized getAgentWorkspaceDir() and getProjectsRoot() utilities in server/utils/pathUtils.js
  • Auto-migrates ~/.orchestrator~/.agent-workspace on first run (rename + symlink for backward compat)
  • Per-repo config files renamed to .agent-workspace-config.json with automatic .orchestrator-config.json fallback
  • Adds LEGACY_GITHUB_SCAN=1 env var to optionally also scan ~/GitHub for repos (off by default)
  • Both paths are configurable via AGENT_WORKSPACE_DIR and AGENT_WORKSPACE_PROJECTS_DIR env vars

Problem

The Windows NSIS installer error "Repository root is missing master/main directory: C:\Users\AB\GitHub\epic-survivors" was caused by scanning ~/GitHub where flat-cloned repos exist. By using a dedicated ~/.agent-workspace/projects/ directory, every managed repo follows the master/ worktree convention with zero edge cases.

Files changed (26)

All server-side services updated to use centralized path utilities instead of hardcoded ~/.orchestrator and ~/GitHub references.

Test plan

  • All 240 passing unit tests still pass (55 pre-existing failures from missing winston/node-pty in test runner)
  • node --check server/index.js passes
  • Syntax check on all 26 modified files
  • Manual test: start fresh (no ~/.agent-workspace) — directory auto-created
  • Manual test: existing ~/.orchestrator — auto-migrated to ~/.agent-workspace
  • Manual test: LEGACY_GITHUB_SCAN=1 — ~/GitHub repos appear with source: legacy-github

🤖 Generated with Claude Code

web3dev1337 and others added 3 commits March 20, 2026 13:54
- All 26 server files now use centralized getAgentWorkspaceDir() and
  getProjectsRoot() from server/utils/pathUtils.js instead of
  hardcoded ~/.orchestrator and ~/GitHub paths

- Projects root moved from ~/GitHub to ~/.agent-workspace/projects/
  (configurable via AGENT_WORKSPACE_PROJECTS_DIR env var)

- Data directory moved from ~/.orchestrator to ~/.agent-workspace
  (configurable via AGENT_WORKSPACE_DIR env var)

- Auto-migration: on first run, if ~/.orchestrator exists and
  ~/.agent-workspace doesn't, the directory is renamed automatically
  with a symlink left at the old path for backward compat

- Per-repo config files: .agent-workspace-config.json is the new name,
  with automatic fallback to .orchestrator-config.json for existing repos

- Legacy scan: set LEGACY_GITHUB_SCAN=1 to also scan ~/GitHub for repos
  (off by default; for users with existing ~/GitHub worktree setups)

- scan-repos, configDiscovery, greenfield, clone, and all data services
  updated to use the new centralized paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ename

- Renamed check IDs: orchestrator-home → agent-workspace-home
- Renamed repair action: ensure-orchestrator-home → ensure-agent-workspace-home
- Renamed repair action: ensure-github-root → ensure-projects-root
- Fixed githubRoot → projectsRoot reference in diagnostics return value
- Updated diagnostics test assertions to match new IDs and directory names
- Diagnostics functions respect homeDir param override for testing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@web3dev1337 web3dev1337 merged commit fd43970 into main Mar 20, 2026
5 checks passed
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.

1 participant