refactor: setup tooling uses config-driven host detection

- host-config-export.ts: new CLI that exposes host configs to bash
  (list, get, detect, validate, symlinks commands)
- bin/gstack-platform-detect: reads host configs instead of hardcoded
  binary/path mapping
- scripts/skill-check.ts: iterates host configs for skill validation
  and freshness checks instead of separate Codex/Factory blocks
- lib/worktree.ts: iterates host configs for directory copy instead
  of hardcoded .agents

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-04-03 16:32:53 -07:00
parent d82d2c5650
commit 9ac662f6d2
4 changed files with 188 additions and 110 deletions
+7 -4
View File
@@ -123,10 +123,13 @@ export class WorktreeManager {
// Create detached worktree at current HEAD
git(['worktree', 'add', '--detach', worktreePath, 'HEAD'], this.repoRoot);
// Copy gitignored build artifacts that tests need
const agentsSrc = path.join(this.repoRoot, '.agents');
if (fs.existsSync(agentsSrc)) {
copyDirSync(agentsSrc, path.join(worktreePath, '.agents'));
// Copy gitignored build artifacts that tests need (config-driven)
const { getExternalHosts } = require('../hosts/index');
for (const hostConfig of getExternalHosts()) {
const hostSrc = path.join(this.repoRoot, hostConfig.hostSubdir);
if (fs.existsSync(hostSrc)) {
copyDirSync(hostSrc, path.join(worktreePath, hostConfig.hostSubdir));
}
}
const browseDist = path.join(this.repoRoot, 'browse', 'dist');