diff --git a/bin/gstack-install-registry.sh b/bin/gstack-install-registry.sh index 5f1ba1495..0fe5e9e91 100644 --- a/bin/gstack-install-registry.sh +++ b/bin/gstack-install-registry.sh @@ -33,11 +33,13 @@ # (#3084): print the commands that move it out first and return 0. A symlinked # ~/.claude/skills/gstack that points at SRC becomes the checkout itself. # Kiro writes its runtime files into ROOT in place, which would link the -# checkout into itself, so it counts too. Claude installs in place from the -# checkout, and a ROOT that is a symlink is replaced as a link: those return 1. +# checkout into itself, so it counts too. Claude and the harness hosts +# (OpenClaw, Hermes: gstack-harness copies skills that call the checkout) run +# in place from the checkout, and a ROOT that is a symlink is replaced as a +# link: those return 1. gstack_install_move_hint() { local src="$1" host="$2" root="$3" claude_link="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/gstack" - [ "$host" = claude ] && return 1 + case "$host" in claude|openclaw|hermes) return 1 ;; esac [ -L "$root" ] && return 1 command -v gstack_path_within >/dev/null 2>&1 && gstack_path_within "$src" "$root" || return 1 if [ -L "$claude_link" ] && gstack_path_same "$claude_link" "$src"; then diff --git a/test/harness-register.test.ts b/test/harness-register.test.ts index 116c5a4a7..0b3c59115 100644 --- a/test/harness-register.test.ts +++ b/test/harness-register.test.ts @@ -232,6 +232,9 @@ describe.skipIf(process.platform === 'win32')('setup and uninstall with harnesse expect(r.stdout.trim().split('\n').at(-1)).toBe('gstack ready (' + host + ')'); const again = runSetup(f, path.join(src, 'setup'), ['--host', host]); expect(again.stdout + again.stderr).toMatch(new RegExp('\\b' + host + '\\s+experimental\\s+global\\s+unchanged')); + const status = runSetup(f, path.join(src, 'setup'), ['--status']); + expect(status.stdout).toMatch(new RegExp('\\b' + host + '\\s+experimental\\s+global\\s+current')); + expect(status.stdout).not.toContain('move it first'); const un = spawnSync('bash', [path.join(src, 'bin/gstack-uninstall'), '--force'], { cwd: f.home, env: { ...f.env, PATH: '/usr/bin:/bin' }, encoding: 'utf8', timeout: 60_000 }); expect(un.status, un.stdout + un.stderr).toBe(0); expect(files(path.join(f.home, dest)).filter(p => !p.startsWith('.'))).toEqual([]);