gstack/hosts/claude/hooks
Garry Tan d7ce124092
fix(hooks): shared spawn-bin helper — all three AskUserQuestion hooks were inert on Windows
The plan-tune hooks resolved bin scripts via new URL(import.meta.url).pathname
(which doubles the drive letter on Windows: /C:/C:/...) and spawnSync'd
extensionless bash scripts directly (unrunnable without a shell association)
— so question logging, preferences, and the error fallback all silently
no-op'd on Windows, and /plan-tune collected no data. A single spawn-bin.ts
helper now owns bin resolution (fileURLToPath) and win32 bash routing for
every hook, with static tripwires so a future hook can't reintroduce the
raw pattern. This is the one Windows-spawn idiom for hook code.

Fixes #2356.

Contributed by @rafassousa (PR #2504; supersedes PR #2399 by @chuchu2781).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 20:20:53 -07:00
..
auq-error-fallback-hook v1.57.2.0 feat: AskUserQuestion prose fallback when the tool fails at runtime (#1908) 2026-06-07 21:38:21 -07:00
auq-error-fallback-hook.ts fix(hooks): shared spawn-bin helper — all three AskUserQuestion hooks were inert on Windows 2026-08-14 20:20:53 -07:00
question-log-hook v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
question-log-hook.ts fix(hooks): shared spawn-bin helper — all three AskUserQuestion hooks were inert on Windows 2026-08-14 20:20:53 -07:00
question-preference-hook v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
question-preference-hook.ts fix(hooks): shared spawn-bin helper — all three AskUserQuestion hooks were inert on Windows 2026-08-14 20:20:53 -07:00
spawn-bin.ts fix(hooks): shared spawn-bin helper — all three AskUserQuestion hooks were inert on Windows 2026-08-14 20:20:53 -07:00