feat(agents): add grok adapter#120
Conversation
31fdf0e to
da14c97
Compare
Greptile SummaryThis PR adds a Grok Build (xAI) agent adapter alongside registration in the adapter registry and a resolver test. Since Grok has a documented zero-config Claude Code compatibility layer, the implementation consciously delegates hook installation to
Confidence Score: 5/5Safe to merge; the change is an isolated new adapter with no effect on existing adapters or shared state. The grok adapter is entirely additive: it adds a new package, a single line to the registry, and one entry to the wiring test. The delegation to claudecode.Plugin.GetAgentHooks is safe because that method is stateless with respect to the Plugin struct. Session metadata keys are sourced from the exported ports.Metadata* constants, matching the same constants used in claudecode.SessionInfo, so there is no hidden string coupling. Binary resolution, permission-mode mapping, and restore logic follow the same patterns as the existing adapters. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "feat(agents): add grok adapter" | Re-trigger Greptile |
…wlist Introduces the shared platform that per-agent adapters plug into, wired for the three shipped harnesses (claude-code, codex, opencode): - adapters/agent/registry: single source of truth for shipped adapters (Constructors), consumed by the daemon to resolve a session's harness. - adapters/agent/activitydispatch + 'ao hooks' command: maps an agent's native hook callbacks onto AO activity states (active/idle/waiting/...). - claudecode/codex/opencode: emit SessionStart/UserPromptSubmit/Stop activity. - HTTP + OpenAPI: report session activity state. - db: single migration widening sessions.harness to all shipped harnesses, so adding an adapter needs no further migration. - domain: harness constants + --agent alias for 'ao spawn'. Adding a new agent is now one adapter package plus a line in Constructors(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Registers the grok harness (xAI Grok CLI). grok installs Claude Code-compatible hooks, so it reuses the claude-code activity deriver already in the platform. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
da14c97 to
ea78106
Compare
ea78106 to
7e9f081
Compare
Adds the grok harness (xAI Grok CLI), stacked on the agent platform (#119).
Constructors()registration + resolver test.🤖 Generated with Claude Code
Stack