/gsd:set-profile crashed with `command not found: gsd-sdk` when gsd-sdk was not on PATH. The command invoked `gsd-sdk query` directly in a `!` backtick with no guard, so a missing binary produced an opaque shell error with exit 127. Add a `command -v gsd-sdk` pre-flight that prints the install/update hint and exits 1 when absent, mirroring the #2334 fix on /gsd-quick. The auto-install in #2386 still runs at install time; this guard is the defensive layer for users whose npm global bin is off-PATH (install.js warns but does not fail in that case). Closes #2439
13 lines
595 B
Markdown
13 lines
595 B
Markdown
---
|
|
name: gsd:set-profile
|
|
description: Switch model profile for GSD agents (quality/balanced/budget/inherit)
|
|
argument-hint: <profile (quality|balanced|budget|inherit)>
|
|
model: haiku
|
|
allowed-tools:
|
|
- Bash
|
|
---
|
|
|
|
Show the following output to the user verbatim, with no extra commentary:
|
|
|
|
!`if ! command -v gsd-sdk >/dev/null 2>&1; then printf '⚠ gsd-sdk not found in PATH — /gsd:set-profile requires it.\n\nInstall the GSD SDK:\n npm install -g @gsd-build/sdk\n\nOr update GSD to get the latest packages:\n /gsd-update\n'; exit 1; fi; gsd-sdk query config-set-model-profile $ARGUMENTS --raw`
|