Skip to content

feat(grok): self-provision ~/.grok/config.toml for distributed installs#13

Open
daniel-farina wants to merge 1 commit into
masterfrom
feat/grok-provisioner
Open

feat(grok): self-provision ~/.grok/config.toml for distributed installs#13
daniel-farina wants to merge 1 commit into
masterfrom
feat/grok-provisioner

Conversation

@daniel-farina

Copy link
Copy Markdown
Owner

What

Makes Xplor self-configuring for distributed installs: on first run ProvisionGrok() ensures ~/.grok/config.toml exists and points at the bundled xplorer MCP server (the browser-control MCP the sidebar agent needs). Without it, a fresh machine with no ~/.grok has 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.
  • Hooked into PostBrowserStart (before the gateway starts) via apply_integration.py.
  • SdkDir() resolves the bundled sdk/ across layouts (Windows DIR_MODULE, mac Resources, linux exe_dir, dev checkout); per-OS python command (python on Windows, python3 elsewhere).
  • release_arch.sh / package_linux.sh / package.ps1 bundle sdk/*.py beside 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-integration experiment (dropped because Grok already has built-in X access). This provisioner is the one reusable piece.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants