How debugdwrld/grok-bot-0.18-reconstructed works
Grok Bot 0.18 Reconstructed is a source-oriented reconstruction of a macOS desktop agent app. A user configures a provider in the renderer, sends a conversation turn, and the desktop runtime routes it through the coordinator and host for inference and tool execution; results return as conversation activity. Other product branches include account/session handling, MCP/plugins, computer sandbox control, local-tool approvals, automations, and review. README documents the runtime boundaries and provider/local-Docker options; sampled excerpts show selected routing, sending, and MCP behavior, not every subsystem’s wiring.
Main entry points: host Host runtime · inference-router.ts Routed turns · main-edge.ts Electron main · inference-service.ts Inference service
Components 22
Desktop runtime
- Renderer UI
frontend/src/main.tsx - Desktop RPC
frontend/src/recovered/contracts/main-rpc.ts - Electron main
source/electron-main/main-edge.ts - Account and auth
source/electron-main/account - Coordinator
source/electron-main/coordinator/production-root-provider.ts
Conversation runtime
- Host runtime
source/host - Turn submission
source/host/extensions/transcript/send-pipeline.ts - Conversation summaries
source/packages/agent-summarization/pipeline.ts
Inference routing
- Routed turns
source/node-agent-coordinator/inference-router.ts - Inference service
source/host/extensions/inference/inference-service.ts - Provider choices
source/shared/inference-router.ts - Local CLI auth
source/shared/node/inference-router-local.ts - Router usage model
source/shared/inference-router.ts
Tools and plugins
- Desktop MCP manager
source/electron-main/mcp/desktop-mcp-manager.ts - Host MCP manager
source/shared/node/mcp/mcp-manager.ts - Tool approvals
source/host/extensions/local-tool-permission/local-tool-permission-controller.ts
Agent capabilities
- Computer sandbox
source/electron-main/box - Box store sync
source/host/extensions/box-store-sync/box-store-pack-pipeline.ts - Auto review
source/host/extensions/auto-review/auto-review-service.ts - Automations
frontend/src/recovered/features/automations/routines
Other components
- User
- Inference providers
Connections 21
- User → Renderer UI: uses
- Renderer UI → Desktop RPC: invokes RPC
- Desktop RPC → Electron main: dispatches
- Electron main → Coordinator: owns runtime
- Electron main → Account and auth: manages auth
- Coordinator → Host runtime: connects
- Host runtime → Turn submission: accepts turns
- Routed turns → Inference service: runs provider
- Inference service → Provider choices: reads choices
- Inference service → Inference providers: calls
- Routed turns → Inference providers: runs routed requests
- Routed turns → Host MCP manager: dispatches MCP
- Desktop MCP manager → Host MCP manager: manages MCP
- Host runtime → Tool approvals: requests approval
- Electron main → Computer sandbox: manages box
- Computer sandbox → Box store sync: syncs store
- Host runtime → Auto review: handles review
- Host runtime → Conversation summaries: summarizes turns
- Renderer UI → Automations: presents routines
- Routed turns → Router usage model: tracks usage
- Local CLI auth → Inference service: checks local auth