fix(setup): wire --host cursor through bash dispatch and install path (closes #1358)#1526
Open
mvanhorn wants to merge 1 commit into
Open
fix(setup): wire --host cursor through bash dispatch and install path (closes #1358)#1526mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
Closes garrytan#1358. Adds the missing bash side of Cursor host support that hosts/cursor.ts and the README already advertised. Mirrors the opencode wiring pattern end-to-end so 'setup --host cursor' actually installs skills to ~/.cursor/skills/gstack-*/ as the README documents. Touches 4 sites in setup: - Lines 87, 100, 135: cursor added to --host expected/accept/error list - Lines 198-218: INSTALL_CURSOR variable + auto-detect ('command -v cursor') + dispatch branch - Phase 1e: gen .cursor/ skill docs via 'bun run gen:skill-docs --host cursor' - New create_cursor_runtime_root + link_cursor_skill_dirs helpers (opencode-shaped) - Phase 6d: install for Cursor (mkdir + create runtime root + link skill dirs) Plus CURSOR_SKILLS / CURSOR_GSTACK path vars at the top of setup. test/gen-skill-docs.test.ts: 389 pass / 0 fail. Two new cases pin the cursor path vars and the install section structure; existing --host arg-list assertions updated to include cursor. Reported by @hhlqsmy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
./setup --host cursornow works end-to-end. Skills install to~/.cursor/skills/gstack-*/as the README has advertised sincehosts/cursor.tsshipped. Pre-fix, the bash entrypoint had nocursorcase and exited withUnknown --host value: cursor.Why this matters
That's @hhlqsmy on #1358, tested on
v1.27.1.07b4738b. Bug confirmed against currentv1.39.1.0. The TypeScript host registry has cursor wired up inhosts/cursor.tsandhosts/index.ts; the bash glue that dispatches to per-host install logic was the missing piece.Changes
This PR mirrors the existing opencode wiring pattern across the setup script. Cursor is an IDE host that DOES install skills (unlike openclaw/hermes/gbrain which print informational messages and exit), so it follows the opencode/factory shape, not the openclaw shape.
Touches 4 sites in
setup:CURSOR_SKILLS="$HOME/.cursor/skills"andCURSOR_GSTACK="$CURSOR_SKILLS/gstack".cursoradded to the--hostexpected/accept/error list. The error message at line 135 already complained aboutcursornot being valid; that bug now goes the other way.command -v cursorpopulatesINSTALL_CURSOR=1. Theif [ "$HOST" = "cursor" ]branch added at line 220.bun run gen:skill-docs --host cursorregenerates.cursor/skills/when not already produced bybun run build.create_cursor_runtime_rootandlink_cursor_skill_dirshelpers, structurally identical to the opencode equivalents.INSTALL_CURSOR -eq 1block creates the~/.cursor/skillsdir, calls the runtime root creator, and links per-skill dirs.Testing
bun test test/gen-skill-docs.test.ts: 389 pass / 0 fail. Two new cases pin the cursor path vars and install section structure; the existing--hostarg-list assertions and auto-detect assertions are updated to include cursor.Note: PR #1326 (against related #1269 "setup for cursor is broken") is open and may overlap. If garrytan prefers that PR's approach, this one can close as superseded - I checked and #1326 is materially different (it touches different parts of setup), so this PR is additive rather than competing.
Fixes #1358.
AI was used for assistance.