Spec: Grok CLI host adapter
Date: 2026-08-02 Host id: grokHost version (verified): Grok CLI 0.2.x (user-guide + local ~/.grok) Capability level (this PR): Partial adapter → Verified assets + sessions + HTML render path Non-goals: Grok marketplace packaging into public npm shell; Canvas mode; reading auth.json secrets; claiming full Quickstart until native install smoke is recorded.
Support slices
| Slice | Status | Owner |
|---|---|---|
| Shell / discovery | Partial — Skill path + optional thin docs; no .grok-plugin required for analysis | docs + skills/better-harness |
| Configured assets | Claimed | scripts/agent-customize/providers/grok.mjs |
| Session evidence | Claimed | scripts/session-analysis/platforms/grok.mjs |
| Evidence bundle / registries | Claimed | capability indexes + evidence-bundle |
| Output | Claimed — HTML visual | .grok/better-harness host root |
| Packaging (npm shell) | Unavailable this PR | — |
Native contract (verified)
| Item | Value |
|---|---|
| Home | GROK_HOME env, else ~/.grok |
| Config | $GROK_HOME/config.toml; project may also use <ws>/.grok/config.toml |
| Skills | $GROK_HOME/skills/, $GROK_HOME/bundled/skills/, ~/.agents/skills/, <ws>/.grok/skills/, <ws>/.agents/skills/ |
| Hooks | $GROK_HOME/hooks/*.json, project .grok/hooks when present |
| MCP | [mcp_servers.<name>] tables in user and project config.toml (enabled flag) |
| Plugins | Trusted user $GROK_HOME/plugins/, legacy $GROK_HOME/installed-plugins/, project <ws>/.grok/plugins/, plus [plugins].paths from config; physical roots are deduped by realpath while distinct roots keep distinct ids |