ai-eva 架構圖

來源:.codeboarding/analysis.json(CodeBoarding sync)· 分支 main
方框 = 實際程式檔案,點一下開 GitHub。外框 = CodeBoarding 歸納的元件分組。箭頭 = 檔案之間的實際呼叫關係。
flowchart LR subgraph G0["Dispatch and Core Reasoning Engine"] direction TB F0["copilot.py
app/core"] F1["llm.py
app/core"] F2["search.py
app/core"] F3["dispatch.py
app"] F4["commands.py
app/nodes"] end subgraph G1["Chainlit Server and Authentication Runtime"] direction TB F5["_registry.py
app/apps"] F6["issuers.py
app/auth"] F7["main.py
app"] F8["registry.py
app/projects"] F9["sso.py
app/surfaces"] F10["runtime.py
app/tools"] end subgraph G2["LINE and Queue Channel Ingress"] direction TB F11["line.py
app/surfaces"] end subgraph G3["OpenCode Client and Voice Services"] direction TB F12["opencode.py
app/core"] F13["storage.py
app/core"] end subgraph G4["Frontend Custom UI Extension"] direction TB F14["custom.js
public"] end subgraph G5["其他檔案"] direction TB F15["registry.py
app/nodes"] F16["discord_voice.py
app/surfaces"] F17["line_opencode.py
app/surfaces"] F18["line_session.py
app/surfaces"] end F0 -->|"make_llm"| F1 F3 -->|"make_llm"| F1 F7 -->|"chainlit_commands"| F5 F7 -->|"Envelope +1"| F3 F7 -->|"enqueue_command +1"| F4 F7 -->|"ensure_nodes_table"| F15 F7 -->|"ensure_discord_voice_table"| F16 F7 -->|"ensure_line_opencode_table"| F17 F7 -->|"visible_tools"| F10 F11 -->|"enqueue_command"| F4 F18 -->|"converse"| F3 F18 -->|"chat"| F17 F9 -->|"ToolRuntime"| F10 click F0 href "https://github.com/towNingtek/ai-eva/blob/main/app/core/copilot.py#L145" "app/core/copilot.py" click F1 href "https://github.com/towNingtek/ai-eva/blob/main/app/core/llm.py#L16" "app/core/llm.py" click F2 href "https://github.com/towNingtek/ai-eva/blob/main/app/core/search.py#L77" "app/core/search.py" click F3 href "https://github.com/towNingtek/ai-eva/blob/main/app/dispatch.py#L132" "app/dispatch.py" click F4 href "https://github.com/towNingtek/ai-eva/blob/main/app/nodes/commands.py#L69" "app/nodes/commands.py" click F5 href "https://github.com/towNingtek/ai-eva/blob/main/app/apps/_registry.py#L115" "app/apps/_registry.py" click F6 href "https://github.com/towNingtek/ai-eva/blob/main/app/auth/issuers.py#L84" "app/auth/issuers.py" click F7 href "https://github.com/towNingtek/ai-eva/blob/main/app/main.py#L114" "app/main.py" click F8 href "https://github.com/towNingtek/ai-eva/blob/main/app/projects/registry.py#L127" "app/projects/registry.py" click F9 href "https://github.com/towNingtek/ai-eva/blob/main/app/surfaces/sso.py#L70" "app/surfaces/sso.py" click F10 href "https://github.com/towNingtek/ai-eva/blob/main/app/tools/runtime.py#L38" "app/tools/runtime.py" click F11 href "https://github.com/towNingtek/ai-eva/blob/main/app/surfaces/line.py#L253" "app/surfaces/line.py" click F12 href "https://github.com/towNingtek/ai-eva/blob/main/app/core/opencode.py#L123" "app/core/opencode.py" click F13 href "https://github.com/towNingtek/ai-eva/blob/main/app/core/storage.py#L18" "app/core/storage.py" click F14 href "https://github.com/towNingtek/ai-eva/blob/main/public/custom.js#L19" "public/custom.js" click F15 href "https://github.com/towNingtek/ai-eva/blob/main/app/nodes/registry.py" "app/nodes/registry.py" click F16 href "https://github.com/towNingtek/ai-eva/blob/main/app/surfaces/discord_voice.py" "app/surfaces/discord_voice.py" click F17 href "https://github.com/towNingtek/ai-eva/blob/main/app/surfaces/line_opencode.py" "app/surfaces/line_opencode.py" click F18 href "https://github.com/towNingtek/ai-eva/blob/main/app/surfaces/line_session.py" "app/surfaces/line_session.py"

元件分組

元件說明檔案
Dispatch and Core Reasoning EngineOrchestrates multi-surface conversational intent dispatching, LLM interactions, copilot executions, and external tool search services.app/core/copilot.py
app/core/llm.py
app/core/search.py
app/dispatch.py
app/nodes/commands.py
Chainlit Server and Authentication RuntimeManages Chainlit UI session lifecycles, SSO authentication token verification, and dynamic applet/node registry discovery.app/apps/_registry.py
app/auth/issuers.py
app/main.py
app/projects/registry.py
app/surfaces/sso.py
app/tools/runtime.py
LINE and Queue Channel IngressReceives inbound webhooks, audio transcriptions, and background queue events for LINE messaging platform integration.app/surfaces/line.py
OpenCode Client and Voice ServicesProvides OpenCode agent session management, persistent file storage interfaces, and Discord voice surface connectivity.app/core/opencode.py
app/core/storage.py
Frontend Custom UI ExtensionExecutes browser-side JavaScript to customize Chainlit web client behaviors and dynamic DOM interactions.public/custom.js
其他檔案分析有呼叫關係、但未被歸入上述元件的檔案。app/nodes/registry.py
app/surfaces/discord_voice.py
app/surfaces/line_opencode.py
app/surfaces/line_session.py

系統概述

The system operates as a multi-surface conversational AI platform designed around a hexagonal adapter architecture. Inbound requests arrive via messaging channels such as LINE webhooks and background message queues, through voice surfaces like Discord, or directly via the web frontend powered by Chainlit and custom UI scripts. Authentication and registry services authenticate user identity and resolve available application nodes before forwarding normalized envelopes to the core dispatch engine. The dispatch and reasoning core orchestrates downstream tool execution, search operations, OpenCode agent sessions, and LLM completions via LiteLLM to formulate and stream contextualized responses back to the originating channel surface.