feat: Grok Build (grok) agent support — detection, extensions, config scan - #125
Open
linhai0872 wants to merge 4 commits into
Open
feat: Grok Build (grok) agent support — detection, extensions, config scan#125linhai0872 wants to merge 4 commits into
linhai0872 wants to merge 4 commits into
Conversation
Native Skills, MCP, command hooks, plugins, and project scope, with personal MCP disable that never rewrites shared project files. Closes RealZST#124
Replace the homemade spark with the official grok.svg path, scan project .grok/plugins, keep SubagentEnd spec names unique, and only treat $GROK_HOME/hooks as global.
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.
Adds Grok Build (
grok) as the 13th supported agent. Closes #124.Source-backed against xai-org/grok-build
@ c2ad97f. Home is$GROK_HOMEverbatim when non-empty, otherwise~/.grok. Detection never creates the directory.What's included
Detection & layout
$GROK_HOME/~/.grok.grok.grok/skills,.grok/config.toml,.grok/hooks/,.grok/plugins/).agents/skillsis a shared read-only alias only — Codex/Gemini keep ownership.claude/.cursorcontents are not attributed to Grokauth.jsonandmcp_credentials.jsonare never scannedSkills / MCP / Hooks / Plugins
$GROK_HOME/skillsand project.grok/skills[mcp_servers.<name>]withheaders(not Codexhttp_headers);type = "sse"is SSE, otherwise URL is HTTPdisabled_mcp_servers(+ user entryenabledwhen present) and does not rewrite the shared project file. Enable clears the user list and unsticks a winning projectenabled = falseglobal/session-start:pre_tool_use[0].hooks[1])$GROK_HOME/disabled-hooksusing the real spec.name$GROK_HOME/hooksisglobal/; a project under a custom$GROK_HOMEstaysproject/SubagentEnduses upstream'ssubagent_stopdisplay token and shares one group-index sequence$GROK_HOME/plugins,installed-plugins, and project.grok/plugins; stable id{scope}/{hex8}/{name}; toggle via[plugins].enabled/[plugins].disabled(user + project lists merged, disabled wins); default disabled; delete removes the directory and both lists. Project plugin toggle writes the user lists onlyProject scope & configs
config.toml,pager.tomlonly$GROK_HOME/memoryplus project.grok/memory/*.md; nestedmemory/index/is not claimedFrontend & docs
AGENT_ORDER/ display name Grok Build, filter color, onboarding scatter, reduced-motion mascotgrok.svgmark (currentColor+--mascot-icon-color)Known limitation
HTTP hooks are outside HarnessKit's current
HookEntrycommand model. This PR only scans and toggles command hooks. HTTP handlers are skipped as entries but still counted in Grok's hook index so disable names stay correct.Verification
npm test: 307 passednpm run build: tsc + vite succeededcargo test --workspace: passed (after frontenddist/build, matching CI)cargo test -p hk-core --lib grok(25) andcargo test -p hk-core --test toggle_integration grok(5) passed$GROK_HOMEsmoke (grok1.0.5 +hk):hk status→1 detected (grok)hk list --agent grok→ skill / stdio+HTTP MCP / plugin / command hookhk disable/hk enableecho → userdisabled_mcp_serversround-trip;themeand unrelated MCPheaderskeptuser/<hex8>/demo-plugingrok mcp listandgrok inspectread the same home (stdioecho, HTTPlinear, command hook, demo skill). Auth files were not copied or printed.Screenshots