tiny-ts 系統架構

從 CLI 輸入、Agent Loop、模型推理到本機/MCP 工具與可恢復 Session

tiny-ts 系統架構 從 CLI 輸入、Agent Loop、模型推理到本機/MCP 工具與可恢復 Session 使用者/自動化 · Prompt、CLI flags、stdin · Architecture component 使用者/自動化 Prompt、CLI flags、stdin tiny-ts CLI · 參數、TUI、取消、JSON events · tiny-agent TypeScript Runtime · 入口 tiny-ts CLI 參數、TUI、取消、JSON events 入口 Agent Loop · 組態、模型回合、工具迴圈 · tiny-agent TypeScript Runtime · 核心 Agent Loop 組態、模型回合、工具迴圈 核心 Chat Completions API · OpenRouter/相容 endpoint · Architecture component Chat Completions API OpenRouter/相容 endpoint Tool Router · 定義、派送、事件格式化 · tiny-agent TypeScript Runtime Tool Router 定義、派送、事件格式化 內建工具與 Plugins · bash · read · write · edit · bg · tiny-agent TypeScript Runtime 內建工具與 Plugins bash · read · write · edit · bg MCP Adapter · tools/list · tools/call · bounds · tiny-agent TypeScript Runtime MCP Adapter tools/list · tools/call · bounds 可信 MCP Servers · Streamable HTTP · Architecture component 可信 MCP Servers Streamable HTTP MCP Catalog + Env · TINY_MCP_CONFIG · tokenEnv · Trusted deployment configuration MCP Catalog + Env TINY_MCP_CONFIG · tokenEnv SessionStore · Append-only JSONL facts · tiny-agent TypeScript Runtime SessionStore Append-only JSONL facts Session Reducer · 驗證並重建 transcript state · tiny-agent TypeScript Runtime Session Reducer 驗證並重建 transcript state Recovery Planner · 安全續跑與 synthetic results · tiny-agent TypeScript Runtime Recovery Planner 安全續跑與 synthetic results 模型回合 本機派送 遠端派送 Streamable HTTP append facts 重建狀態 中斷狀態 tiny-agent TypeScript Runtime Trusted deployment configuration Legend 使用者介面 核心執行元件 持久化狀態 信任邊界與設定 工具介面 外部服務