Skip to content

feat(daemon): add Grok Build CLI as a supported runtime#3322

Open
luczvd wants to merge 1 commit into
multica-ai:mainfrom
luczvd:feat/grok-runtime
Open

feat(daemon): add Grok Build CLI as a supported runtime#3322
luczvd wants to merge 1 commit into
multica-ai:mainfrom
luczvd:feat/grok-runtime

Conversation

@luczvd
Copy link
Copy Markdown

@luczvd luczvd commented May 26, 2026

Adds first-class support for the Grok Build CLI (grok agent stdio) to the Multica daemon.

Grok speaks the same ACP JSON-RPC protocol as Hermes, Kimi, and Kiro, so the implementation reuses the existing hermesClient transport.

Backend (server/pkg/agent)

  • grok.go: new backend that spawns grok agent stdio, drives the ACP lifecycle, and normalizes Grok tool names into snake_case.
  • agent.go: registers grokBackend in the factory and adds the launch header.
  • models.go: model discovery via discoverACPModels (same pattern as Kimi/Kiro).

Daemon detection (server/internal/daemon)

  • config.go: MULTICA_GROK_PATH / MULTICA_GROK_MODEL env probe + defaultAgentCommandNames.
  • execenv/context.go: .grok/skills/ as the project-level skills directory.
  • execenv/runtime_config.go: AGENTS.md injection for Grok.
  • local_skills.go: ~/.grok/skills as the user-level skills root.

Frontend

  • provider-logo.tsx: Grok case (uses generic Monitor icon until a dedicated logo is added).
  • step-welcome.tsx: adds grok to the ProviderName type.

Tests

All new code paths are covered by tests that mirror the Kimi/Kiro patterns:

  • Backend factory, launch header, tool name normalization
  • Model discovery without binary
  • Inline system prompt policy
  • User skills discovery (Windows-compatible)
  • Config injection neutrality across all platforms

Closes #2895

Adds first-class support for the Grok Build CLI (grok agent stdio) to
the Multica daemon. Grok speaks the same ACP JSON-RPC protocol as
Hermes, Kimi, and Kiro, so the implementation reuses the existing
hermesClient transport.

Changes:
- server/pkg/agent/grok.go: new Grok backend
- server/pkg/agent/agent.go: register grokBackend factory + launch header
- server/pkg/agent/models.go: model discovery via discoverACPModels
- server/internal/daemon/config.go: MULTICA_GROK_PATH probe + defaultAgentCommandNames
- server/internal/daemon/execenv/context.go: .grok/skills/ project skills dir
- server/internal/daemon/execenv/runtime_config.go: AGENTS.md injection for Grok
- server/internal/daemon/local_skills.go: ~/.grok/skills user-level skills root
- packages/views/runtimes/components/provider-logo.tsx: Grok logo placeholder
- packages/views/onboarding/steps/step-welcome.tsx: Grok provider type

Tests:
- server/pkg/agent/grok_test.go: tool name normalization
- server/pkg/agent/agent_test.go: backend factory coverage
- server/pkg/agent/models_test.go: model discovery without binary
- server/internal/daemon/daemon_test.go: inline prompt policy
- server/internal/daemon/local_skills_test.go: user skills discovery
- server/internal/daemon/execenv/execenv_test.go: config injection neutrality
- server/internal/daemon/execenv/reply_instructions_test.go: reply instructions
@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

@luczvd is attempting to deploy a commit to the IndexLabs Team on Vercel.

A member of the Team first needs to authorize it.

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.

Support Grok (xAI) as a runtime

1 participant