feat(grok): self-provision ~/.grok/config.toml for distributed installs#13
Open
daniel-farina wants to merge 1 commit into
Open
feat(grok): self-provision ~/.grok/config.toml for distributed installs#13daniel-farina wants to merge 1 commit into
daniel-farina wants to merge 1 commit into
Conversation
Xplor ships to machines that may have neither the grok CLI nor a ~/.grok/config.toml; without one the sidebar agent is broken. ProvisionGrok() (PostBrowserStart) writes a minimal config wired to the bundled xplorer MCP server if missing, else appends only the missing [mcp_servers.xplorer] block (never clobbers user edits). Per-OS python command; layout-robust SdkDir (DIR_MODULE / Resources / exe_dir / dev). release_arch.sh + package_linux.sh + package.ps1 bundle sdk/*.py beside the binary. Extracted clean (xplorer-only) from the abandoned X-MCP experiment.
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.
What
Makes Xplor self-configuring for distributed installs: on first run
ProvisionGrok()ensures~/.grok/config.tomlexists and points at the bundledxplorerMCP server (the browser-control MCP the sidebar agent needs). Without it, a fresh machine with no~/.grokhas a broken sidebar agent.How
agent_gateway/grok_provisioner.{cc,h}— writes a minimal config if missing, else appends only the missing[mcp_servers.xplorer]block (never clobbers user edits). Idempotent, cheap, safe every startup.PostBrowserStart(before the gateway starts) viaapply_integration.py.SdkDir()resolves the bundledsdk/across layouts (WindowsDIR_MODULE, macResources, linuxexe_dir, dev checkout); per-OS python command (pythonon Windows,python3elsewhere).release_arch.sh/package_linux.sh/package.ps1bundlesdk/*.pybeside the binary.Testing
Logic was macOS-tested in the originating experiment (fresh-machine sim: removed config → relaunched → recreated in ~4s pointing at the SDK; existing user config preserved). Needs a fresh build-test on this clean branch before merge — no Chromium build was run for this extraction.
Context
Extracted clean (xplorer-only) from the abandoned
feat/x-mcp-integrationexperiment (dropped because Grok already has built-in X access). This provisioner is the one reusable piece.