Gemini CLI · Harness 架构

基于固定提交 bef61195 的源码证据图

Gemini CLI · Harness 架构 基于固定提交 bef61195 的源码证据图 CLI / IDE · 入口与交互面 · Architecture component CLI / IDE 入口与交互面 Recursive Chat Loop · 主控制循环 · Architecture component Recursive Chat Loop 主控制循环 Legacy + Graph Context · Architecture component Legacy + Graph Context ContentGenerator · Architecture component ContentGenerator Turn Parser + Scheduler · Architecture component Turn Parser + Scheduler PolicyEngine + Sandbox · Architecture component PolicyEngine + Sandbox MCP / Extensions / Memory · Architecture component MCP / Extensions / Memory JSONL Checkpoint + OTEL · 事实与观测 · Architecture component JSONL Checkpoint + OTEL 事实与观测 AgentProtocol · Architecture component AgentProtocol Legend Frontend Backend Database Cloud Security External Message bus

主循环

  • • Recursive Chat Loop
  • • ContentGenerator
  • • Turn Parser + Scheduler

治理

  • • PolicyEngine + Sandbox
  • • 结论均绑定源码行号
  • • 快照 bef61195

长任务

  • • Legacy + Graph Context
  • • JSONL Checkpoint + OTEL
  • • AgentProtocol