docs(add):新增Project Caffeine项目仓库README示意图

Signed-off-by: gzkoala <guohao@gitconomy.org>
This commit is contained in:
gzkoala
2026-02-28 16:51:19 +08:00
parent 9e2ab3b95e
commit cc1aa6f65c
6 changed files with 1738 additions and 0 deletions

View File

@@ -0,0 +1,287 @@
<!--
================================================================================
图表名称:基于 MCP 的学术研究系统拓扑图 (Research MCP Server Topology)
文件命名figure01-mcp-system-topology.svg
用途:展示研报智能体 MCP 系统的核心组件交互拓扑包括用户层客户端、MCP 传输协议层、MCP Server 集群逻辑分工,以及与外部学术基础设施的数据流向。
版本v1.0.0
作者Gitconomy Research-郭晧
SPDX-License-Identifier: MIT & CC-BY-SA-4.0
创建日期2026-02-28
================================================================================
-->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 850" width="100%" height="100%">
<!-- Background: Solid White (强制兼容深色模式的白底) -->
<rect width="100%" height="100%" fill="#FFFFFF" />
<defs>
<!-- CSS 变量定义与语义色声明 -->
<style>
:root {
/* 核心语义色 */
--c-cloud-blue: #0099FF;
--c-cloud-blue-light: rgba(0, 153, 255, 0.1);
--c-local-green: #009900;
--c-local-green-light: rgba(0, 153, 0, 0.1);
--c-risk-amber: #FF991F;
--c-risk-amber-light: rgba(255, 153, 31, 0.1);
/* 中性与辅助色 */
--c-neutral-gray: #475569;
--c-neutral-gray-light: #E2E8F0;
/* 字体体系降级兼容 */
--font-sans: "Inter", "Noto Sans SC", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
--font-mono: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;
}
/* 全局文本类 */
.text-title { font-family: var(--font-sans); font-weight: bold; }
.text-sans { font-family: var(--font-sans); }
.text-mono { font-family: var(--font-mono); }
.text-legend { font-family: var(--font-mono); font-size: 11px; fill: var(--c-neutral-gray); }
/* 节点与容器类 */
.node-cloud { fill: var(--c-cloud-blue-light); stroke: var(--c-cloud-blue); stroke-width: 2px; }
.node-local { fill: var(--c-local-green-light); stroke: var(--c-local-green); stroke-width: 2px; }
.node-amber { fill: var(--c-risk-amber-light); stroke: var(--c-risk-amber); stroke-width: 2px; }
.box-local { fill: transparent; stroke: var(--c-local-green); stroke-width: 2px; }
.box-cloud { fill: transparent; stroke: var(--c-cloud-blue); stroke-width: 2px; stroke-dasharray: 4 4; }
/* 连线类 */
.line-sync { stroke: var(--c-local-green); stroke-width: 2px; fill: none; }
.line-async { stroke: var(--c-risk-amber); stroke-width: 2px; stroke-dasharray: 4 2; fill: none; }
.line-neutral { stroke: var(--c-neutral-gray); stroke-width: 2px; stroke-dasharray: 2 2; fill: none; }
</style>
<!-- 连线箭头定义 -->
<marker id="arrow-sync" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<path d="M0,0 L0,6 L9,3 z" fill="var(--c-local-green)" />
</marker>
<marker id="arrow-async" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<path d="M0,0 L0,6 L9,3 z" fill="var(--c-risk-amber)" />
</marker>
<marker id="arrow-async-rev" markerWidth="10" markerHeight="10" refX="1" refY="3" orient="auto">
<path d="M9,0 L9,6 L0,3 z" fill="var(--c-risk-amber)" />
</marker>
<marker id="arrow-sync-rev" markerWidth="10" markerHeight="10" refX="1" refY="3" orient="auto">
<path d="M9,0 L9,6 L0,3 z" fill="var(--c-local-green)" />
</marker>
</defs>
<!-- ========================================================================= -->
<!-- 1. 标题模块 (Title Block) -->
<!-- ========================================================================= -->
<g id="title-block" transform="translate(640, 50)">
<!-- 图表编号 -->
<text y="-30" text-anchor="middle" class="text-mono" font-size="12" fill="var(--c-neutral-gray)" letter-spacing="1">FIG-MCP-01</text>
<!-- 主标题 -->
<text y="0" text-anchor="middle" class="text-title" font-size="24" fill="#000000">Project Caffeine 研报智能体 MCP 系统拓扑图</text>
<!-- 面包屑导航 -->
<text y="25" text-anchor="middle" class="text-mono" font-size="14" fill="var(--c-neutral-gray)">架构图 &gt; 智能体 MCP &gt; 系统拓扑</text>
<!-- 上下文指示线 (使用主色调代表架构主体) -->
<rect x="-30" y="40" width="60" height="3" fill="var(--c-local-green)" />
</g>
<!-- ========================================================================= -->
<!-- 2. 背景与物理区域隔离边界 (Cloud-Local Segregation) -->
<!-- ========================================================================= -->
<g id="boundaries" transform="translate(0, 140)">
<!-- 用户与客户端区域 (Left: Local) -->
<rect x="30" y="0" width="280" height="520" rx="8" class="box-local" />
<text x="45" y="25" class="text-title" font-size="14" fill="var(--c-local-green)">用户层 (本地运行环境)</text>
<!-- MCP Server 集群区域 (Center: Local/Container) -->
<rect x="420" y="0" width="340" height="520" rx="8" class="box-local" />
<text x="435" y="25" class="text-title" font-size="14" fill="var(--c-local-green)">MCP 服务端集群 (核心执行区)</text>
<!-- 外部基础设施区域 (Right: Cloud) -->
<rect x="850" y="0" width="400" height="330" rx="8" class="box-cloud" />
<text x="865" y="25" class="text-title" font-size="14" fill="var(--c-cloud-blue)">外部学术基础设施 (公有云)</text>
<!-- 本地知识库区域 (Right Bottom: Local Storage) -->
<rect x="850" y="360" width="400" height="160" rx="8" class="box-local" />
<text x="865" y="385" class="text-title" font-size="14" fill="var(--c-local-green)">本地知识库</text>
</g>
<!-- ========================================================================= -->
<!-- 3. 网络通信与 MCP 协议层 (Network & Protocol Bridge) -->
<!-- ========================================================================= -->
<g id="protocol-layer" transform="translate(0, 140)">
<!-- 协议通道背景 -->
<rect x="310" y="160" width="110" height="200" fill="var(--c-neutral-gray-light)" rx="4" opacity="0.4" />
<!-- StdIO Protocol Line -->
<path d="M 310,210 L 420,210" class="line-sync" marker-end="url(#arrow-sync)" marker-start="url(#arrow-sync-rev)" />
<text x="365" y="195" text-anchor="middle" class="text-mono" font-size="12" font-weight="bold" fill="var(--c-local-green)">stdio</text>
<text x="365" y="225" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-neutral-gray)">JSON-RPC 2.0</text>
<!-- SSE Protocol Line -->
<path d="M 310,310 L 420,310" class="line-async" marker-end="url(#arrow-async)" marker-start="url(#arrow-async-rev)" />
<text x="365" y="295" text-anchor="middle" class="text-mono" font-size="12" font-weight="bold" fill="var(--c-risk-amber)">SSE / HTTP</text>
<text x="365" y="325" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-neutral-gray)">JSON-RPC 2.0</text>
<!-- 协议层标签 -->
<text x="365" y="380" text-anchor="middle" class="text-title" font-size="12" fill="var(--c-neutral-gray)">MCP 标准传输协议层</text>
</g>
<!-- ========================================================================= -->
<!-- 4. 核心节点实体 (Entities) -->
<!-- ========================================================================= -->
<g id="nodes" transform="translate(0, 140)">
<!-- [4.1] 用户层 (User Layer) -->
<!-- 研究人员 -->
<g transform="translate(170, 90)">
<circle cx="0" cy="-15" r="15" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<path d="M -20,15 C -20,5 20,5 20,15" fill="none" stroke="var(--c-local-green)" stroke-width="2" />
<text x="0" y="35" text-anchor="middle" class="text-sans" font-weight="bold" font-size="12" fill="#000000">研究人员</text>
<text x="0" y="50" text-anchor="middle" class="text-sans" font-size="10" fill="var(--c-neutral-gray)">学术用户</text>
</g>
<!-- MCP 客户端 (Host Application) -->
<g transform="translate(60, 200)">
<rect width="220" height="120" rx="6" class="node-local" />
<text x="110" y="30" text-anchor="middle" class="text-title" font-size="16" fill="var(--c-local-green)">MCP 客户端</text>
<text x="110" y="50" text-anchor="middle" class="text-mono" font-size="12" fill="#000000">Claude Desktop / Cursor</text>
<rect x="20" y="70" width="180" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-local-green)" stroke-width="1" />
<text x="110" y="89" text-anchor="middle" class="text-sans" font-size="12" fill="#000000">大模型上下文与工具调度</text>
</g>
<!-- 远程 LLM (Remote Brain) - 从 Client 发起调用 -->
<g transform="translate(90, 420)">
<!-- Hexagon -->
<polygon points="30,-15 130,-15 160,25 130,65 30,65 0,25" class="node-cloud" />
<text x="80" y="20" text-anchor="middle" class="text-title" font-size="14" fill="#000000">远程大模型</text>
<text x="80" y="40" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-cloud-blue)">OpenAI / Anthropic API</text>
</g>
<!-- 连接 Client 与 Remote LLM -->
<path d="M 170,320 L 170,405" class="line-async" marker-end="url(#arrow-async)" marker-start="url(#arrow-async-rev)" />
<text x="180" y="365" class="text-mono" font-size="10" fill="var(--c-risk-amber)">HTTPS 网络通信</text>
<text x="180" y="380" class="text-sans" font-size="10" fill="var(--c-risk-amber)">提示词请求 / 结果流式响应</text>
<!-- [4.2] MCP Server 集群 -->
<!-- MCP Server 1: 文献查询 -->
<g transform="translate(450, 70)">
<rect width="280" height="100" rx="6" class="node-local" />
<rect x="0" y="0" width="280" height="35" rx="6" fill="var(--c-local-green)" />
<text x="140" y="22" text-anchor="middle" class="text-title" font-size="14" fill="#FFFFFF">文献查询 MCP Server</text>
<text x="140" y="55" text-anchor="middle" class="text-mono" font-size="11" fill="#000000">工具: search_papers(), fetch_pdf()</text>
<text x="140" y="75" text-anchor="middle" class="text-sans" font-size="11" fill="var(--c-neutral-gray)">负责多源学术数据库 API 聚合与清洗</text>
</g>
<!-- MCP Server 2: 提示词策略 -->
<g transform="translate(450, 210)">
<rect width="280" height="100" rx="6" class="node-local" />
<rect x="0" y="0" width="280" height="35" rx="6" fill="var(--c-local-green)" />
<text x="140" y="22" text-anchor="middle" class="text-title" font-size="14" fill="#FFFFFF">提示词策略 MCP Server</text>
<text x="140" y="55" text-anchor="middle" class="text-mono" font-size="11" fill="#000000">提示词: synthesis_template</text>
<text x="140" y="75" text-anchor="middle" class="text-sans" font-size="11" fill="var(--c-neutral-gray)">负责基于主题动态组装超级提示词</text>
</g>
<!-- MCP Server 3: CoT 推理 -->
<g transform="translate(450, 350)">
<rect width="280" height="100" rx="6" class="node-amber" />
<rect x="0" y="0" width="280" height="35" rx="6" fill="var(--c-risk-amber)" />
<text x="140" y="22" text-anchor="middle" class="text-title" font-size="14" fill="#FFFFFF">CoT 推理 MCP Server</text>
<text x="140" y="55" text-anchor="middle" class="text-mono" font-size="11" fill="#000000">工具: run_cot_chain(), verify_logic()</text>
<text x="140" y="75" text-anchor="middle" class="text-sans" font-size="11" fill="var(--c-neutral-gray)">协调多步思考推理,抽取实体与洞察生成</text>
</g>
<!-- [4.3] 外部基础设施 (External Infrastructure) -->
<!-- 学术数据库 -->
<g transform="translate(930, 60)">
<!-- Cylinder -->
<path d="M 0,20 A 40,15 0 0,0 80,20 A 40,15 0 0,0 0,20 L 0,80 A 40,15 0 0,0 80,80 L 80,20" class="node-cloud" />
<text x="40" y="50" text-anchor="middle" class="text-title" font-size="12" fill="#000000">学术数据库</text>
<text x="40" y="68" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-cloud-blue)">PubMed, arXiv</text>
<text x="40" y="82" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-cloud-blue)">IEEE, WOS</text>
</g>
<!-- 互联网资源 -->
<g transform="translate(1080, 200)">
<!-- Hexagon-like Cloud Service -->
<polygon points="20,0 80,0 100,40 80,80 20,80 0,40" class="node-cloud" />
<text x="50" y="35" text-anchor="middle" class="text-title" font-size="12" fill="#000000">互联网资源</text>
<text x="50" y="55" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-cloud-blue)">PDF / HTML</text>
</g>
<!-- [4.4] 本地知识库 (Local Knowledge Base) -->
<g transform="translate(980, 410)">
<!-- Cylinder -->
<path d="M 0,20 A 50,15 0 0,0 100,20 A 50,15 0 0,0 0,20 L 0,80 A 50,15 0 0,0 100,80 L 100,20" class="node-local" />
<text x="50" y="50" text-anchor="middle" class="text-title" font-size="12" fill="#000000">本地知识库</text>
<text x="50" y="70" text-anchor="middle" class="text-mono" font-size="11" fill="var(--c-local-green)">Obsidian / Logseq</text>
<text x="50" y="85" text-anchor="middle" class="text-mono" font-size="9" fill="var(--c-neutral-gray)">(YAML / Markdown)</text>
</g>
<!-- [4.5] 服务器到外部/本地基础设施的连线 -->
<!-- 文献查询 MCP -> 学术数据库 (Async) -->
<path d="M 730,100 L 930,100" class="line-async" marker-end="url(#arrow-async)" />
<text x="830" y="90" text-anchor="middle" class="text-sans" font-size="10" fill="var(--c-risk-amber)">API 请求调用 (REST/GraphQL)</text>
<!-- CoT 推理 MCP -> 互联网资源 (Async) -->
<path d="M 730,400 L 1130,400 L 1130,285" class="line-async" marker-end="url(#arrow-async)" />
<text x="1000" y="390" text-anchor="middle" class="text-sans" font-size="10" fill="var(--c-risk-amber)">拉取文献全文 / 网页爬取</text>
<!-- 提示词策略 MCP -> Local KB (Sync) (如果是读取本地上下文) -->
<!-- 文献查询/CoT推理 MCP -> Local KB (Sync) (双轨制写入落盘) -->
<!-- 采用肘型连接线 -->
<path d="M 730,420 L 790,420 L 790,460 L 980,460" class="line-sync" marker-end="url(#arrow-sync)" />
<text x="885" y="452" text-anchor="middle" class="text-sans" font-size="10" fill="var(--c-local-green)">本地读写 Markdown / YAML</text>
<!-- MCP 内部的协同工作流虚线表示 (可选的逻辑联系) -->
<path d="M 590,170 L 590,210" class="line-neutral" marker-end="url(#arrow-async)" />
<path d="M 590,310 L 590,350" class="line-neutral" marker-end="url(#arrow-async)" />
<text x="600" y="195" class="text-sans" font-size="9" fill="var(--c-neutral-gray)">本地上下文共享</text>
</g>
<!-- ========================================================================= -->
<!-- 5. 底部图例与注释块 (Legend & Key Block) -->
<!-- ========================================================================= -->
<g id="legend" transform="translate(640, 750)">
<!-- 统一的半透明背景容器 -->
<rect x="-400" y="-16" width="800" height="32" rx="4" fill="rgba(255, 255, 255, 0.9)" stroke="var(--c-neutral-gray)" stroke-width="0.5"/>
<g transform="translate(-380, 0)">
<!-- 图例引导文本 -->
<text x="0" y="4" class="text-sans" font-size="12" font-weight="bold" fill="var(--c-neutral-gray)">图例说明:</text>
<!-- 图例项 1 -->
<g transform="translate(70, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-local-green)" />
<text x="12" y="4" class="text-legend">L1本地执行 / 计算节点 (极速/同步)</text>
</g>
<!-- 图例项 2 -->
<g transform="translate(300, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-cloud-blue)" />
<text x="12" y="4" class="text-legend">L2云端大脑 / 外部资源 (网络依赖)</text>
</g>
<!-- 图例项 3 -->
<g transform="translate(540, 0)">
<line x1="-8" y1="0" x2="8" y2="0" class="line-async" />
<text x="12" y="4" class="text-legend">L3网络通信 / 异步等待 (存在延迟)</text>
</g>
</g>
</g>
<!-- ========================================================================= -->
<!-- 6. 许可声明 (License) -->
<!-- ========================================================================= -->
<g id="license" transform="translate(640, 810)">
<text x="0" y="0" text-anchor="middle" class="text-sans" font-size="10" fill="var(--c-neutral-gray)">
本作品采用 CC-BY-SA 4.0 进行许可,© 2025-2026 Gitconomy Research
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,320 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200" width="100%" height="100%">
<!--
================================================================================
图表名称:个人级研究助手智能体 - 开发框架与技术栈架构图
文件命名project-caffeine-tech-stack-framework.svg
用途:展示从宿主端到三个核心 MCP Server 的底层技术栈、核心算法、Monorepo工程化及安全交互框架。
版本v1.0.0 (Added Legend)
作者Gitconomy Research-郭晧
SPDX-License-Identifier: MIT & CC-BY-SA-4.0
创建日期2026-02-27
================================================================================
-->
<!-- Background: Solid White for Git compatibility -->
<rect width="100%" height="100%" fill="#FFFFFF" />
<defs>
<style>
:root {
/* 语义色定义 */
--c-cloud-blue: #0099FF;
--c-cloud-blue-light: rgba(0, 153, 255, 0.08);
--c-local-green: #009900;
--c-local-green-light: rgba(0, 153, 0, 0.08);
--c-risk-amber: #FF991F;
--c-risk-amber-light: rgba(255, 153, 31, 0.08);
--c-gov-blue: #0052CC;
--c-gov-blue-light: rgba(0, 82, 204, 0.04);
--c-neutral-gray: #475569;
--c-neutral-gray-light: #E2E8F0;
}
/* 字体降级机制 */
.font-sans { font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif; }
.font-mono { font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace; }
/* 文本层级 */
.title-main { font-size: 16px; font-weight: bold; fill: var(--c-neutral-gray); }
.title-sub { font-size: 14px; font-weight: bold; fill: #0F172A; }
.tech-badge { font-size: 12px; font-weight: bold; }
.desc-text { font-size: 12px; fill: #64748B; }
</style>
<!-- 箭头标记 -->
<marker id="arrow-green" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
<path d="M 0 0 L 8 4 L 0 8 Z" fill="var(--c-local-green)" />
</marker>
<marker id="arrow-blue" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
<path d="M 0 0 L 8 4 L 0 8 Z" fill="var(--c-cloud-blue)" />
</marker>
<marker id="arrow-amber" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
<path d="M 0 0 L 8 4 L 0 8 Z" fill="var(--c-risk-amber)" />
</marker>
</defs>
<!--
===========================================================================
顶层标题块 (Title Block)
===========================================================================
-->
<g id="title-block" transform="translate(600, 40)">
<text y="0" text-anchor="middle" class="font-mono" font-size="12" fill="var(--c-neutral-gray)" letter-spacing="1">FIG-02</text>
<text y="30" text-anchor="middle" class="font-sans" font-weight="bold" font-size="24" fill="#000000">Project Caffeine开发框架与技术栈架构图</text>
<text y="55" text-anchor="middle" class="font-mono" font-size="14" fill="var(--c-neutral-gray)">架构图 &gt; 智能体 MCP &gt; 开发框架和技术堆栈</text>
<rect x="-30" y="70" width="60" height="3" fill="var(--c-gov-blue)" />
</g>
<!--
===========================================================================
Layer 1: 宿主环境与模型层 (Host & LLM Layer)
===========================================================================
-->
<g id="layer-host" transform="translate(100, 140)">
<text x="0" y="0" class="font-sans title-main">Layer 1: 宿主应用与大脑层 (Host &amp; Brain)</text>
<rect x="0" y="15" width="1000" height="90" rx="8" fill="var(--c-neutral-gray-light)" opacity="0.2" stroke="var(--c-neutral-gray)" stroke-dasharray="4 4" stroke-width="1.5" />
<!-- 客户端 -->
<rect x="30" y="30" width="220" height="60" rx="6" fill="#FFFFFF" stroke="var(--c-local-green)" stroke-width="2" />
<text x="140" y="55" text-anchor="middle" class="font-sans title-sub">MCP Client 宿主联调环境</text>
<text x="140" y="75" text-anchor="middle" class="font-mono desc-text">VS Code (MCP 插件) / Claude</text>
<!-- 双向箭头 -->
<line x1="260" y1="60" x2="330" y2="60" stroke="var(--c-neutral-gray)" stroke-width="2" stroke-dasharray="3 3"/>
<!-- 远程模型 (Brain) -->
<g transform="translate(400, 60)">
<!-- 六边形 Token -->
<polygon points="0,-30 26,-15 26,15 0,30 -26,15 -26,-15" fill="var(--c-cloud-blue-light)" stroke="var(--c-cloud-blue)" stroke-width="2" />
<text x="40" y="-5" class="font-sans title-sub" fill="var(--c-cloud-blue)">Remote LLM Brain</text>
<text x="40" y="15" class="font-mono desc-text">Claude 3.5 / DeepSeek (Context Engine)</text>
</g>
</g>
<!--
===========================================================================
Layer 2: 协议总线 (Protocol Bus)
===========================================================================
-->
<g id="layer-protocol" transform="translate(100, 270)">
<text x="0" y="0" class="font-sans title-main">Layer 2: 通信协议层 (JSON-RPC 2.0 Bus)</text>
<rect x="0" y="15" width="1000" height="40" rx="20" fill="var(--c-gov-blue-light)" stroke="var(--c-gov-blue)" stroke-width="2" />
<text x="500" y="40" text-anchor="middle" class="font-mono" font-size="14" font-weight="bold" fill="var(--c-gov-blue)">mcp-protocol: STDIO 协议 (MVP阶段本地 stdin/stdout 零网络开销)</text>
<!-- 连接上下层的管线 -->
<line x1="210" y1="-35" x2="210" y2="15" stroke="var(--c-local-green)" stroke-width="3" marker-end="url(#arrow-green)" />
<line x1="210" y1="55" x2="210" y2="90" stroke="var(--c-local-green)" stroke-width="3" marker-end="url(#arrow-green)" />
<line x1="500" y1="55" x2="500" y2="90" stroke="var(--c-local-green)" stroke-width="3" marker-end="url(#arrow-green)" />
<line x1="850" y1="55" x2="850" y2="90" stroke="var(--c-local-green)" stroke-width="3" marker-end="url(#arrow-green)" />
</g>
<!--
===========================================================================
Layer 3: 核心 MCP Server 集群框架 (Microservices Stack)
===========================================================================
-->
<g id="layer-servers" transform="translate(100, 370)">
<text x="0" y="0" class="font-sans title-main">Layer 3: 核心智能体引擎 / MCP Server 集群开发框架</text>
<!-- 工程化管控边界 (Monorepo) -->
<rect x="0" y="15" width="1000" height="360" rx="8" fill="transparent" stroke="var(--c-neutral-gray)" stroke-dasharray="4 4" stroke-width="2" />
<rect x="0" y="15" width="1000" height="30" fill="var(--c-neutral-gray-light)" opacity="0.4" rx="8"/>
<text x="20" y="35" class="font-mono desc-text" font-weight="bold" fill="var(--c-neutral-gray)">📦 npm Workspaces (Monorepo) - 统一包管理 / 依赖隔离 / 共享 JSON-RPC Schema</text>
<!-- ================= S1: 文献查询 Server ================= -->
<g transform="translate(20, 45)">
<rect x="0" y="0" width="300" height="320" rx="8" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<rect x="0" y="0" width="300" height="40" fill="var(--c-local-green)" rx="8" />
<rect x="0" y="20" width="300" height="20" fill="var(--c-local-green)" />
<text x="150" y="25" text-anchor="middle" class="font-sans title-sub" fill="#FFFFFF">S1: 文献查询 Server (执行者)</text>
<!-- Tech Stack Badges (Unified TS/Node) -->
<text x="20" y="65" class="font-sans desc-text" font-weight="bold">开发环境与框架</text>
<rect x="20" y="75" width="115" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="77.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">Node.js (v20+)</text>
<rect x="145" y="75" width="95" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="192.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">@mcp/sdk-ts</text>
<!-- Core Algorithms -->
<text x="20" y="130" class="font-sans desc-text" font-weight="bold">核心组件与算法集成</text>
<rect x="20" y="140" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-risk-amber)" stroke-dasharray="2 2" />
<text x="150" y="165" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-risk-amber)">Semantic Chunking 文本切块算法</text>
<rect x="20" y="190" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-risk-amber)" stroke-dasharray="2 2" />
<text x="150" y="215" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-risk-amber)">Playwright / Firecrawl 网页深抓取</text>
<!-- APIs -->
<text x="20" y="260" class="font-sans desc-text" font-weight="bold">集成外部接口</text>
<rect x="20" y="270" width="125" height="24" rx="4" fill="var(--c-cloud-blue-light)" stroke="var(--c-cloud-blue)" />
<text x="82.5" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-cloud-blue)">arXiv API</text>
<rect x="155" y="270" width="125" height="24" rx="4" fill="var(--c-cloud-blue-light)" stroke="var(--c-cloud-blue)" />
<text x="217.5" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-cloud-blue)">S.Scholar API</text>
</g>
<!-- ================= S2: 提示词策略 Server ================= -->
<g transform="translate(350, 45)">
<rect x="0" y="0" width="300" height="320" rx="8" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<rect x="0" y="0" width="300" height="40" fill="var(--c-local-green)" rx="8" />
<rect x="0" y="20" width="300" height="20" fill="var(--c-local-green)" />
<text x="150" y="25" text-anchor="middle" class="font-sans title-sub" fill="#FFFFFF">S2: 提示词策略 Server (军师)</text>
<!-- Tech Stack Badges (Unified TS/Node) -->
<text x="20" y="65" class="font-sans desc-text" font-weight="bold">开发环境与框架</text>
<rect x="20" y="75" width="115" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="77.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">Node.js (v20+)</text>
<rect x="145" y="75" width="95" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="192.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">@mcp/sdk-ts</text>
<!-- Core Algorithms -->
<text x="20" y="130" class="font-sans desc-text" font-weight="bold">核心智能体架构与引擎</text>
<rect x="20" y="140" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="150" y="165" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">Persona Matrix 角色化矩阵</text>
<rect x="20" y="190" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="150" y="215" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">Exploration State (防死循环账本)</text>
<!-- Prompts -->
<text x="20" y="260" class="font-sans desc-text" font-weight="bold">注入的静态思维框架 (Prompts)</text>
<rect x="20" y="270" width="80" height="24" rx="4" fill="#F1F5F9" stroke="var(--c-neutral-gray)" />
<text x="60" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-neutral-gray)">5W3H</text>
<rect x="110" y="270" width="80" height="24" rx="4" fill="#F1F5F9" stroke="var(--c-neutral-gray)" />
<text x="150" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-neutral-gray)">SCQA</text>
<rect x="200" y="270" width="80" height="24" rx="4" fill="#F1F5F9" stroke="var(--c-neutral-gray)" />
<text x="240" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-neutral-gray)">SWOT</text>
</g>
<!-- ================= S3: CoT 多步推理 Server ================= -->
<g transform="translate(680, 45)">
<rect x="0" y="0" width="300" height="320" rx="8" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<rect x="0" y="0" width="300" height="40" fill="var(--c-local-green)" rx="8" />
<rect x="0" y="20" width="300" height="20" fill="var(--c-local-green)" />
<text x="150" y="25" text-anchor="middle" class="font-sans title-sub" fill="#FFFFFF">S3: CoT 推理 Server (分析师)</text>
<!-- Tech Stack Badges (Unified TS/Node) -->
<text x="20" y="65" class="font-sans desc-text" font-weight="bold">开发环境与框架</text>
<rect x="20" y="75" width="115" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="77.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">Node.js (v20+)</text>
<rect x="145" y="75" width="95" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="192.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">@mcp/sdk-ts</text>
<!-- Core Algorithms -->
<text x="20" y="130" class="font-sans desc-text" font-weight="bold">质量把控与数据组装逻辑</text>
<rect x="20" y="140" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="150" y="165" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">引文密度强制校验 (Citation Check)</text>
<rect x="20" y="190" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="150" y="215" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">双轨制落盘编译器 (JSON-to-MD)</text>
<!-- Output Formats -->
<text x="20" y="260" class="font-sans desc-text" font-weight="bold">标准数据协议输出</text>
<rect x="20" y="270" width="120" height="24" rx="4" fill="#F1F5F9" stroke="var(--c-neutral-gray)" />
<text x="80" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-neutral-gray)">Markdown 解析</text>
<rect x="150" y="270" width="130" height="24" rx="4" fill="#F1F5F9" stroke="var(--c-neutral-gray)" />
<text x="215" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-neutral-gray)">YAML Frontmatter</text>
</g>
</g>
<!--
===========================================================================
Layer 4: 物理存储与图谱层 (PKM Storage Layer)
===========================================================================
-->
<g id="layer-pkm" transform="translate(100, 790)">
<text x="0" y="0" class="font-sans title-main">Layer 4: 数据存储与个人图谱化 (PKM Data Persistence)</text>
<line x1="500" y1="-30" x2="500" y2="15" stroke="var(--c-local-green)" stroke-width="3" stroke-dasharray="4 4" marker-end="url(#arrow-green)" />
<rect x="0" y="30" width="1000" height="80" rx="8" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<!-- Storage Cylinder Icon -->
<path d="M 40 55 A 25 10 0 1 0 90 55 V 85 A 25 10 0 1 1 40 85 Z" fill="#FFFFFF" stroke="var(--c-local-green)" stroke-width="2"/>
<ellipse cx="65" cy="55" rx="25" ry="10" fill="#FFFFFF" stroke="var(--c-local-green)" stroke-width="2"/>
<text x="120" y="65" class="font-sans title-sub">本地个人知识库 (Local Vault)</text>
<text x="120" y="85" class="font-mono desc-text">Obsidian / Logseq Graph System</text>
<!-- Data Spec Badges -->
<rect x="420" y="55" width="180" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="510" y="75" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">双向链接 [[文献名称]] 编排</text>
<rect x="620" y="55" width="160" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="700" y="75" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">自动化文献目录索引池</text>
</g>
<!--
===========================================================================
Layer 5: 工程化与运维安全 (Engineering & Security)
===========================================================================
-->
<g id="layer-engineering" transform="translate(100, 930)">
<text x="0" y="0" class="font-sans title-main">Layer 5: 架构运维管控与安全基线 (Engineering &amp; Security)</text>
<rect x="0" y="15" width="1000" height="60" rx="8" fill="var(--c-gov-blue-light)" stroke="var(--c-gov-blue)" stroke-width="2" />
<!-- Security Badge 1 -->
<rect x="30" y="30" width="280" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="170" y="50" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">零信任架构 (不可信负载防范)</text>
<!-- Security Badge 2 -->
<rect x="340" y="30" width="280" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="480" y="50" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">.env.example 隔离敏感凭证</text>
<!-- Performance Badge -->
<rect x="650" y="30" width="320" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="810" y="50" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">异步非阻塞事件流 (高并发处理能力)</text>
</g>
<!--
===========================================================================
底部图例与注释块 (Legend & Key Block)
===========================================================================
-->
<g id="legend" transform="translate(600, 1050)">
<rect x="-440" y="-16" width="880" height="40" rx="4" fill="rgba(255, 255, 255, 0.9)" stroke="var(--c-neutral-gray)" stroke-width="0.5"/>
<g transform="translate(-420, 0)">
<text x="0" y="8" class="font-sans" font-size="13" font-weight="bold" fill="var(--c-neutral-gray)">语义图例说明:</text>
<!-- 云端/外部 -->
<g transform="translate(110, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-cloud-blue)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">云端服务 / 外部资源</text>
</g>
<!-- 本地/核心 -->
<g transform="translate(265, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-local-green)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">本地服务 / 核心引擎</text>
</g>
<!-- 风险/高负载 -->
<g transform="translate(420, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-risk-amber)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">高频计算 / 网络爬取</text>
</g>
<!-- 治理/安全 -->
<g transform="translate(575, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-gov-blue)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">治理规范 / 安全控制</text>
</g>
<!-- 逻辑边界 -->
<g transform="translate(730, 0)">
<rect x="-8" y="-8" width="16" height="16" rx="2" fill="transparent" stroke="var(--c-neutral-gray)" stroke-dasharray="2 2" stroke-width="1.5" />
<text x="14" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">逻辑边界 / 虚拟容器</text>
</g>
</g>
</g>
<!--
===========================================================================
底部许可声明
===========================================================================
-->
<text x="600" y="1140" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">
本作品采用 CC-BY-SA 4.0 进行许可,© 2025-2026 Gitconomy Research社区
</text>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,288 @@
<!--
================================================================================
图表名称MCP 系统逻辑架构与核心流转图 (MCP Logic Architecture & Core Flow)
文件命名figure03-mcp-logic-architecture.svg
用途:展示 Model Context Protocol (MCP) 在大语言模型宿主与外部工具系统之间的标准化交互机制与核心逻辑流。
版本v1.0.0
作者Gitconomy Research-郭晧
SPDX-License-Identifier: MIT & CC-BY-SA-4.0
创建日期2026-02-28
================================================================================
-->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800" width="100%" height="100%">
<!-- Background: Solid White for Git Compatibility -->
<rect width="100%" height="100%" fill="#FFFFFF" />
<defs>
<!-- CSS Variables and Font Definitions -->
<style>
:root {
--c-cloud-blue: #0099FF;
--c-cloud-blue-light: rgba(0, 153, 255, 0.1);
--c-local-green: #009900;
--c-local-green-light: rgba(0, 153, 0, 0.1);
--c-risk-amber: #FF991F;
--c-risk-amber-light: rgba(255, 153, 31, 0.1);
--c-neutral-gray: #475569;
--c-neutral-gray-light: #E2E8F0;
--c-gov-blue: #0052CC;
--c-op-green: #00875A;
}
.font-sans { font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif; }
.font-mono { font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace; }
.title-main { font-size: 24px; font-weight: bold; fill: #000000; }
.title-sub { font-size: 14px; fill: var(--c-neutral-gray); }
.title-id { font-size: 12px; fill: var(--c-neutral-gray); letter-spacing: 1px; }
.node-text-title { font-size: 14px; font-weight: bold; fill: #1E293B; }
.node-text-desc { font-size: 12px; fill: var(--c-neutral-gray); }
.node-text-code { font-size: 11px; fill: var(--c-gov-blue); }
.badge-text { font-size: 12px; font-weight: bold; fill: #FFFFFF; }
.label-text { font-size: 12px; fill: var(--c-neutral-gray); }
.label-code { font-size: 12px; fill: var(--c-gov-blue); }
</style>
<!-- Arrow Markers -->
<marker id="arrow-sync" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">
<path d="M0,1 L10,5 L0,9 Z" fill="var(--c-local-green)" />
</marker>
<marker id="arrow-async" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">
<path d="M0,1 L10,5 L0,9 Z" fill="var(--c-risk-amber)" />
</marker>
<marker id="arrow-cloud" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">
<path d="M0,1 L10,5 L0,9 Z" fill="var(--c-cloud-blue)" />
</marker>
</defs>
<!-- =========================================================================== -->
<!-- 1. 标题块 (Title Block) -->
<!-- =========================================================================== -->
<g id="title-block" transform="translate(600, 40)">
<text y="-10" text-anchor="middle" class="font-mono title-id">FIG-MCP-03</text>
<text y="20" text-anchor="middle" class="font-sans title-main">MCP 系统工作流逻辑示意图</text>
<text y="45" text-anchor="middle" class="font-mono title-sub">架构图 &gt; 智能体 MCP &gt; 工作流</text>
<line x1="-30" y1="60" x2="30" y2="60" stroke="var(--c-cloud-blue)" stroke-width="3" />
</g>
<!-- =========================================================================== -->
<!-- 2. 主体架构图 (Diagram Content) -->
<!-- Safe Zone: Starts at y=120 -->
<!-- =========================================================================== -->
<g id="diagram-content" transform="translate(0, 120)">
<!-- 边界容器: Host Application -->
<g id="boundary-host">
<rect x="80" y="40" width="420" height="480" rx="12" stroke="var(--c-neutral-gray)" stroke-width="2" stroke-dasharray="6 4" fill="none" />
<rect x="80" y="40" width="420" height="40" rx="12" fill="var(--c-neutral-gray-light)" opacity="0.3" />
<text x="100" y="65" class="font-sans node-text-title">Host Application (宿主应用程序)</text>
<text x="320" y="65" class="font-mono node-text-desc">Cherry Studio</text>
</g>
<!-- 边界容器: MCP Server -->
<g id="boundary-server">
<rect x="700" y="40" width="420" height="480" rx="12" stroke="var(--c-neutral-gray)" stroke-width="2" stroke-dasharray="6 4" fill="none" />
<rect x="700" y="40" width="420" height="40" rx="12" fill="var(--c-neutral-gray-light)" opacity="0.3" />
<text x="720" y="65" class="font-sans node-text-title">MCP Server (MCP 服务端)</text>
<text x="960" y="65" class="font-mono node-text-desc">Local Node</text>
</g>
<!-- ==================== Host Application 内部组件 ==================== -->
<!-- User Input -->
<g id="user-input" transform="translate(290, 120)">
<circle cx="0" cy="0" r="15" fill="var(--c-neutral-gray-light)" stroke="var(--c-neutral-gray)" stroke-width="2" />
<path d="M-8,5 C-8,0 8,0 8,5" stroke="var(--c-neutral-gray)" stroke-width="2" fill="none" />
<circle cx="0" cy="-3" r="4" fill="var(--c-neutral-gray)" />
<text x="25" y="4" class="font-sans node-text-title">User Prompt</text>
</g>
<!-- 连接 User -> LLM -->
<line x1="290" y1="140" x2="290" y2="185" stroke="var(--c-cloud-blue)" stroke-width="2" marker-end="url(#arrow-cloud)" />
<!-- Node 1: Remote LLM Brain -->
<g id="llm-brain" transform="translate(290, 250)">
<!-- 六边形 (r=60, w=104, h=120) -->
<polygon points="0,-60 52,-30 52,30 0,60 -52,30 -52,-30" fill="var(--c-cloud-blue-light)" stroke="var(--c-cloud-blue)" stroke-width="2" />
<text y="-15" text-anchor="middle" class="font-sans node-text-title">大语言模型</text>
<text y="5" text-anchor="middle" class="font-sans node-text-desc">(Remote LLM)</text>
<text y="25" text-anchor="middle" class="font-mono node-text-code">Reasoning Engine</text>
</g>
<!-- Node 2: MCP Client -->
<g id="mcp-client" transform="translate(290, 430)">
<rect x="-90" y="-35" width="180" height="70" rx="8" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<text y="-10" text-anchor="middle" class="font-sans node-text-title">MCP Client (客户端)</text>
<text y="10" text-anchor="middle" class="font-sans node-text-desc">协议翻译与能力协商</text>
<text y="25" text-anchor="middle" class="font-mono node-text-code">Context Injector</text>
</g>
<!-- 连接 LLM <-> MCP Client (本地/同步调用) -->
<!-- 下行: 请求工具 -->
<path d="M 270,315 L 270,385" stroke="var(--c-local-green)" stroke-width="2" marker-end="url(#arrow-sync)" />
<text x="180" y="355" class="font-sans label-text">Tool Use 请求</text>
<!-- 上行: 注入上下文 -->
<path d="M 310,385 L 310,315" stroke="var(--c-local-green)" stroke-width="2" marker-end="url(#arrow-sync)" />
<text x="320" y="355" class="font-sans label-text">注入外部上下文</text>
<!-- ==================== MCP Server 内部组件 ==================== -->
<!-- Node 3: Server Router -->
<g id="mcp-server-router" transform="translate(910, 160)">
<rect x="-100" y="-30" width="200" height="60" rx="8" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<text y="-5" text-anchor="middle" class="font-sans node-text-title">Server Router &amp; Handler</text>
<text y="15" text-anchor="middle" class="font-mono node-text-desc">JSON-RPC 2.0 解析</text>
</g>
<!-- Node 4: MCP Primitives (三大原语) -->
<g id="mcp-primitives" transform="translate(910, 280)">
<!-- Prompts -->
<g transform="translate(-100, 0)">
<rect x="-40" y="-30" width="80" height="60" rx="6" fill="#fff" stroke="var(--c-local-green)" stroke-width="1.5" />
<text y="-5" text-anchor="middle" class="font-sans node-text-title">Prompts</text>
<text y="15" text-anchor="middle" class="font-mono node-text-desc">模板/策略</text>
</g>
<!-- Resources -->
<g transform="translate(0, 0)">
<rect x="-40" y="-30" width="80" height="60" rx="6" fill="#fff" stroke="var(--c-local-green)" stroke-width="1.5" />
<text y="-5" text-anchor="middle" class="font-sans node-text-title">Resources</text>
<text y="15" text-anchor="middle" class="font-mono node-text-desc">被动上下文</text>
</g>
<!-- Tools -->
<g transform="translate(100, 0)">
<rect x="-40" y="-30" width="80" height="60" rx="6" fill="#fff" stroke="var(--c-local-green)" stroke-width="1.5" />
<text y="-5" text-anchor="middle" class="font-sans node-text-title">Tools</text>
<text y="15" text-anchor="middle" class="font-mono node-text-desc">主动操作</text>
</g>
</g>
<!-- Node 5: Advanced Features -->
<g id="mcp-features" transform="translate(910, 390)">
<rect x="-160" y="-25" width="320" height="50" rx="4" fill="var(--c-neutral-gray-light)" stroke="var(--c-neutral-gray)" stroke-width="1" stroke-dasharray="4 2" />
<text y="-5" text-anchor="middle" class="font-sans node-text-title">核心性能与管控层</text>
<text y="15" text-anchor="middle" class="font-mono node-text-desc">LRU Cache | Semantic Chunking | Roots 鉴权</text>
</g>
<!-- Node 6: Data Source (圆柱体) -->
<g id="data-source" transform="translate(910, 480)">
<path d="M-60,-15 C-60,-30 60,-30 60,-15 L60,15 C60,30 -60,30 -60,15 Z" fill="#fff" stroke="var(--c-local-green)" stroke-width="2" />
<ellipse cx="0" cy="-15" rx="60" ry="12" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<text y="5" text-anchor="middle" class="font-sans node-text-title">外部数据源 / DB</text>
<text y="22" text-anchor="middle" class="font-mono node-text-desc">PKM / Academics API</text>
</g>
<!-- 连接 Server 内部组件 (Sync) -->
<path d="M 910,190 L 910,240" stroke="var(--c-local-green)" stroke-width="2" marker-end="url(#arrow-sync)" />
<path d="M 910,310 L 910,355" stroke="var(--c-local-green)" stroke-width="2" marker-end="url(#arrow-sync)" />
<path d="M 910,415 L 910,455" stroke="var(--c-local-green)" stroke-width="2" marker-end="url(#arrow-sync)" />
<!-- ==================== 传输层 (Transport Layer) ==================== -->
<!-- Client to Server Request -->
<g id="rpc-request" transform="translate(600, 410)">
<line x1="-200" y1="0" x2="290" y2="0" stroke="var(--c-risk-amber)" stroke-width="2" stroke-dasharray="6 4" marker-end="url(#arrow-async)" />
<rect x="-50" y="-12" width="100" height="24" rx="12" fill="#fff" stroke="var(--c-risk-amber)" stroke-width="1" />
<text y="4" text-anchor="middle" class="font-mono label-code" fill="var(--c-risk-amber)">JSON-RPC 2.0</text>
<text y="-18" text-anchor="middle" class="font-sans label-text">STDIO 或 HTTP+SSE 传输</text>
<text y="28" text-anchor="middle" class="font-sans label-text">能力发现与工具执行请求</text>
</g>
<!-- Server to Client Response -->
<g id="rpc-response" transform="translate(600, 450)">
<line x1="290" y1="0" x2="-200" y2="0" stroke="var(--c-risk-amber)" stroke-width="2" stroke-dasharray="6 4" marker-end="url(#arrow-async)" />
<rect x="-50" y="-12" width="100" height="24" rx="12" fill="#fff" stroke="var(--c-risk-amber)" stroke-width="1" />
<text y="4" text-anchor="middle" class="font-mono label-code" fill="var(--c-risk-amber)">Standard JSON</text>
<text y="28" text-anchor="middle" class="font-sans label-text">返回标准化数据/截断结果</text>
</g>
<!-- 异常连接: LLM Sampling (反向调用) -->
<path d="M 810,160 C 650,160 500,220 360,240" stroke="var(--c-risk-amber)" stroke-width="1.5" stroke-dasharray="4 2" fill="none" marker-end="url(#arrow-async)" />
<text x="560" y="180" class="font-mono node-text-desc" fill="var(--c-risk-amber)">Sampling /createMessage</text>
<!-- ==================== 逻辑编号与徽章 (Logic Steps) ==================== -->
<g id="step-badges">
<!-- Step 1 -->
<circle cx="270" cy="140" r="10" fill="var(--c-gov-blue)" />
<text x="270" y="144" text-anchor="middle" class="font-sans badge-text">1</text>
<!-- Step 2 -->
<circle cx="250" cy="350" r="10" fill="var(--c-gov-blue)" />
<text x="250" y="354" text-anchor="middle" class="font-sans badge-text">2</text>
<!-- Step 3 -->
<circle cx="200" cy="450" r="10" fill="var(--c-gov-blue)" />
<text x="200" y="454" text-anchor="middle" class="font-sans badge-text">3</text>
<!-- Step 4 -->
<circle cx="600" cy="385" r="10" fill="var(--c-gov-blue)" />
<text x="600" y="389" text-anchor="middle" class="font-sans badge-text">4</text>
<!-- Step 5 -->
<circle cx="810" cy="160" r="10" fill="var(--c-gov-blue)" />
<text x="810" y="164" text-anchor="middle" class="font-sans badge-text">5</text>
<!-- Step 6 -->
<circle cx="910" cy="440" r="10" fill="var(--c-gov-blue)" />
<text x="910" y="444" text-anchor="middle" class="font-sans badge-text">6</text>
<!-- Step 7 -->
<circle cx="600" cy="495" r="10" fill="var(--c-gov-blue)" />
<text x="600" y="499" text-anchor="middle" class="font-sans badge-text">7</text>
<!-- Step 8 -->
<circle cx="330" cy="350" r="10" fill="var(--c-gov-blue)" />
<text x="330" y="354" text-anchor="middle" class="font-sans badge-text">8</text>
</g>
</g>
<!-- =========================================================================== -->
<!-- 3. 底部图例与注释块 (Legend & Key Block) -->
<!-- =========================================================================== -->
<g id="legend" transform="translate(600, 710)">
<rect x="-420" y="-16" width="840" height="32" rx="4" fill="rgba(255, 255, 255, 0.9)" stroke="var(--c-neutral-gray)" stroke-width="0.5" />
<g transform="translate(-400, 0)">
<text x="0" y="4" class="font-sans title-sub" font-weight="bold">图例说明:</text>
<!-- Legend Item 1 -->
<g transform="translate(80, 0)">
<polygon points="0,-6 5,-3 5,3 0,6 -5,3 -5,-3" fill="var(--c-cloud-blue)" />
<text x="12" y="4" class="font-mono title-sub">LLM</text>
</g>
<!-- Legend Item 2 -->
<g transform="translate(180, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-local-green)" />
<text x="12" y="4" class="font-mono title-sub">Local Component / Tool</text>
</g>
<!-- Legend Item 3 -->
<g transform="translate(420, 0)">
<line x1="-8" y1="0" x2="8" y2="0" stroke="var(--c-risk-amber)" stroke-width="2" stroke-dasharray="4 2" />
<text x="12" y="4" class="font-mono title-sub">Network / Async I/O</text>
</g>
<!-- Legend Item 4 -->
<g transform="translate(640, 0)">
<line x1="-8" y1="0" x2="8" y2="0" stroke="var(--c-local-green)" stroke-width="2" />
<text x="12" y="4" class="font-mono title-sub">Sync I/O (Fast)</text>
</g>
</g>
</g>
<!-- =========================================================================== -->
<!-- 4. 底部许可注释规范 (License) -->
<!-- =========================================================================== -->
<g id="license" transform="translate(600, 760)">
<text text-anchor="middle" class="font-sans title-sub" font-size="11">
本作品采用 CC-BY-SA 4.0 进行许可,© 2025-2026 Gitconomy Research
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,236 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800" width="100%" height="100%">
<!--
================================================================================
图表名称:个人级研究助手智能体 - 宏观甘特图 (High-Level Gantt Chart)
文件命名project-caffeine-roadmap-high-level-gantt.svg
用途:以极简的瀑布流形式展示 5 大核心阶段的时间跨度与依赖流转,忽略底层执行细节。
版本v1.0.0 (High-Level View)
作者Gitconomy Research-AI助理
SPDX-License-Identifier: MIT & CC-BY-SA-4.0
创建日期2026-02-27
================================================================================
-->
<!-- Background: Solid White for Git compatibility -->
<rect width="100%" height="100%" fill="#FFFFFF" />
<defs>
<style>
:root {
/* 云端/外部整合 —— 主色调:科技蓝 */
--c-cloud-blue: #0099FF;
/* 本地/工具/基础建设 —— 主色调:生机绿 */
--c-local-green: #009900;
/* 风险/核心攻坚/递归等待 —— 警示琥珀 */
--c-risk-amber: #FF991F;
/* 治理/规划/架构 —— 治理蓝 */
--c-gov-blue: #0052CC;
/* 运维/发布/操作 —— 执行绿 */
--c-op-green: #00875A;
/* 中性色 —— 边框、辅助文字、背景网格 */
--c-neutral-gray: #475569;
--c-neutral-gray-light: #E2E8F0;
}
.font-sans { font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif; }
.font-mono { font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace; }
.phase-title { font-size: 16px; font-weight: bold; fill: #1E293B; }
.bar-text { font-size: 14px; font-weight: bold; fill: #FFFFFF; }
.grid-line { stroke: var(--c-neutral-gray-light); stroke-width: 1; }
.grid-dash { stroke: var(--c-neutral-gray-light); stroke-width: 1; stroke-dasharray: 4 4; }
</style>
<!-- 瀑布流向下依赖箭头 -->
<marker id="arrow-down" markerWidth="10" markerHeight="10" refX="5" refY="8" orient="auto">
<path d="M 0 0 L 10 0 L 5 8 Z" fill="var(--c-neutral-gray)" />
</marker>
</defs>
<!--
===========================================================================
顶层标题块 (Title Block)
===========================================================================
-->
<g id="title-block" transform="translate(600, 40)">
<text y="0" text-anchor="middle" class="font-mono" font-size="12" fill="var(--c-neutral-gray)" letter-spacing="1">FIG-03</text>
<text y="30" text-anchor="middle" class="font-sans" font-weight="bold" font-size="24" fill="#000000">Project Caffeine MVP阶段开发路线图总览</text>
<rect x="-30" y="70" width="60" height="3" fill="var(--c-gov-blue)" />
</g>
<!--
===========================================================================
甘特图网格与时间轴 (Gantt Grid & Timeline)
总跨度: 8周 (W1 - W8), 每周宽度 105px.
===========================================================================
-->
<g id="gantt-grid">
<!-- 横向主分隔线 -->
<line x1="40" y1="140" x2="1140" y2="140" class="grid-line" stroke-width="2"/>
<!-- 垂直背景斑马纹与周刻度线 (Height = 440) -->
<!-- W1 -->
<rect x="300" y="140" width="105" height="420" fill="transparent" />
<text x="352.5" y="125" text-anchor="middle" class="font-mono" font-weight="bold" font-size="14" fill="var(--c-neutral-gray)">W1</text>
<text x="352.5" y="105" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">03/01</text>
<line x1="300" y1="140" x2="300" y2="560" class="grid-line" />
<!-- W2 -->
<rect x="405" y="140" width="105" height="420" fill="var(--c-neutral-gray-light)" opacity="0.15" />
<text x="457.5" y="125" text-anchor="middle" class="font-mono" font-weight="bold" font-size="14" fill="var(--c-neutral-gray)">W2</text>
<text x="457.5" y="105" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">03/08</text>
<line x1="405" y1="140" x2="405" y2="560" class="grid-line" />
<!-- W3 -->
<rect x="510" y="140" width="105" height="420" fill="transparent" />
<text x="562.5" y="125" text-anchor="middle" class="font-mono" font-weight="bold" font-size="14" fill="var(--c-neutral-gray)">W3</text>
<text x="562.5" y="105" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">03/15</text>
<line x1="510" y1="140" x2="510" y2="560" class="grid-line" />
<!-- W4 -->
<rect x="615" y="140" width="105" height="420" fill="var(--c-neutral-gray-light)" opacity="0.15" />
<text x="667.5" y="125" text-anchor="middle" class="font-mono" font-weight="bold" font-size="14" fill="var(--c-neutral-gray)">W4</text>
<text x="667.5" y="105" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">03/22</text>
<line x1="615" y1="140" x2="615" y2="560" class="grid-line" />
<!-- W5 -->
<rect x="720" y="140" width="105" height="420" fill="transparent" />
<text x="772.5" y="125" text-anchor="middle" class="font-mono" font-weight="bold" font-size="14" fill="var(--c-neutral-gray)">W5</text>
<text x="772.5" y="105" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">03/29</text>
<line x1="720" y1="140" x2="720" y2="560" class="grid-line" />
<!-- W6 -->
<rect x="825" y="140" width="105" height="420" fill="var(--c-neutral-gray-light)" opacity="0.15" />
<text x="877.5" y="125" text-anchor="middle" class="font-mono" font-weight="bold" font-size="14" fill="var(--c-neutral-gray)">W6</text>
<text x="877.5" y="105" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">04/05</text>
<line x1="825" y1="140" x2="825" y2="560" class="grid-line" />
<!-- W7 -->
<rect x="930" y="140" width="105" height="420" fill="transparent" />
<text x="982.5" y="125" text-anchor="middle" class="font-mono" font-weight="bold" font-size="14" fill="var(--c-neutral-gray)">W7</text>
<text x="982.5" y="105" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">04/12</text>
<line x1="930" y1="140" x2="930" y2="560" class="grid-line" />
<!-- W8 -->
<rect x="1035" y="140" width="105" height="420" fill="var(--c-neutral-gray-light)" opacity="0.15" />
<text x="1087.5" y="125" text-anchor="middle" class="font-mono" font-weight="bold" font-size="14" fill="var(--c-neutral-gray)">W8</text>
<text x="1087.5" y="105" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">04/19</text>
<line x1="1035" y1="140" x2="1035" y2="560" class="grid-line" />
<!-- 结束边界线 -->
<line x1="1140" y1="140" x2="1140" y2="560" class="grid-line" stroke-width="2"/>
<!-- 起点红线标识 -->
<line x1="300" y1="140" x2="300" y2="570" stroke="#EF4444" stroke-width="2" stroke-dasharray="4 2" />
<rect x="260" y="568" width="80" height="20" rx="10" fill="#EF4444" />
<text x="300" y="582" text-anchor="middle" class="font-mono" font-size="11" fill="#FFFFFF" font-weight="bold">START</text>
</g>
<!--
===========================================================================
阶段轴区 (Phases & Bars)
===========================================================================
-->
<g id="gantt-bars">
<!-- P0: 设计规划 -->
<text x="50" y="185" class="font-sans phase-title">阶段 0: 核心设计与 API 规划</text>
<rect x="300" y="165" width="105" height="32" rx="6" fill="var(--c-gov-blue)" />
<text x="352.5" y="186" text-anchor="middle" class="font-sans bar-text">1 周</text>
<!-- P0 -> P1 依赖箭头 -->
<line x1="405" y1="197" x2="405" y2="218" stroke="var(--c-neutral-gray)" stroke-width="2" marker-end="url(#arrow-down)" />
<!-- P1: 基础 MVP -->
<line x1="40" y1="210" x2="1140" y2="210" class="grid-dash"/>
<text x="50" y="245" class="font-sans phase-title">阶段 1: 基础设施与 MVP 验证</text>
<rect x="405" y="225" width="105" height="32" rx="6" fill="var(--c-local-green)" />
<text x="457.5" y="246" text-anchor="middle" class="font-sans bar-text">1 周</text>
<!-- P1 -> P2 依赖箭头 -->
<line x1="510" y1="257" x2="510" y2="278" stroke="var(--c-neutral-gray)" stroke-width="2" marker-end="url(#arrow-down)" />
<!-- P2: 单次闭环 -->
<line x1="40" y1="270" x2="1140" y2="270" class="grid-dash"/>
<text x="50" y="305" class="font-sans phase-title">阶段 2: 思维框架与单次分析闭环</text>
<rect x="510" y="285" width="105" height="32" rx="6" fill="var(--c-local-green)" />
<text x="562.5" y="306" text-anchor="middle" class="font-sans bar-text">1 周</text>
<!-- P2 -> P3 依赖箭头 -->
<line x1="615" y1="317" x2="615" y2="338" stroke="var(--c-neutral-gray)" stroke-width="2" marker-end="url(#arrow-down)" />
<!-- P3: 递归深挖 -->
<line x1="40" y1="330" x2="1140" y2="330" class="grid-dash"/>
<text x="50" y="365" class="font-sans phase-title">阶段 3: 递归深挖引擎核心攻坚 🔥</text>
<rect x="615" y="345" width="210" height="32" rx="6" fill="var(--c-risk-amber)" />
<text x="720" y="366" text-anchor="middle" class="font-sans bar-text">2 周</text>
<!-- P3 -> P4 依赖箭头 -->
<line x1="825" y1="377" x2="825" y2="398" stroke="var(--c-neutral-gray)" stroke-width="2" marker-end="url(#arrow-down)" />
<!-- P4: 质量与 PKM -->
<line x1="40" y1="390" x2="1140" y2="390" class="grid-dash"/>
<text x="50" y="425" class="font-sans phase-title">阶段 4: 学术级质量把控与 PKM</text>
<rect x="825" y="405" width="210" height="32" rx="6" fill="var(--c-cloud-blue)" />
<text x="930" y="426" text-anchor="middle" class="font-sans bar-text">2 周</text>
<!-- P4 -> P5 依赖箭头 -->
<line x1="1035" y1="437" x2="1035" y2="458" stroke="var(--c-neutral-gray)" stroke-width="2" marker-end="url(#arrow-down)" />
<!-- P5: 优化发布 -->
<line x1="40" y1="450" x2="1140" y2="450" class="grid-dash"/>
<text x="50" y="485" class="font-sans phase-title">阶段 5: 性能优化与 V0.1.0 发布</text>
<rect x="1035" y="465" width="105" height="32" rx="6" fill="var(--c-op-green)" />
<text x="1087.5" y="486" text-anchor="middle" class="font-sans bar-text">1 周</text>
<line x1="40" y1="510" x2="1140" y2="510" class="grid-dash"/>
</g>
<!--
===========================================================================
底部图例与注释块 (Legend & Key Block)
===========================================================================
-->
<g id="legend" transform="translate(600, 630)">
<rect x="-440" y="-16" width="880" height="40" rx="4" fill="rgba(255, 255, 255, 0.9)" stroke="var(--c-neutral-gray)" stroke-width="0.5"/>
<g transform="translate(-420, 0)">
<text x="0" y="8" class="font-sans" font-size="13" font-weight="bold" fill="var(--c-neutral-gray)">阶段类型语义说明:</text>
<g transform="translate(130, 0)">
<rect x="-6" y="-4" width="12" height="12" rx="2" fill="var(--c-gov-blue)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">架构设计 (P0)</text>
</g>
<g transform="translate(250, 0)">
<rect x="-6" y="-4" width="12" height="12" rx="2" fill="var(--c-local-green)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">底层基建与同步闭环 (P1/P2)</text>
</g>
<g transform="translate(460, 0)">
<rect x="-6" y="-4" width="12" height="12" rx="2" fill="var(--c-risk-amber)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">高难并发与递归推理 (P3)</text>
</g>
<g transform="translate(670, 0)">
<rect x="-6" y="-4" width="12" height="12" rx="2" fill="var(--c-cloud-blue)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">外部抓取与知识图谱 (P4)</text>
</g>
</g>
</g>
<!--
===========================================================================
底部许可声明
===========================================================================
-->
<text x="600" y="700" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">
本作品采用 CC-BY-SA 4.0 进行许可,© 2025-2026 Gitconomy Research社区
</text>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,287 @@
<!--
================================================================================
图表名称:基于 MCP 的研报智能体系统拓扑图 (Research MCP Server Topology)
文件命名project-caffeine-system-topology.svg
用途:展示学术研究 MCP 系统的核心组件交互拓扑包括用户层客户端、MCP 传输协议层、MCP Server 集群逻辑分工,以及与外部学术基础设施的数据流向。
版本v1.0.1
作者Gitconomy Research-AI
SPDX-License-Identifier: MIT & CC-BY-SA-4.0
创建日期2026-02-27
================================================================================
-->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 850" width="100%" height="100%">
<!-- Background: Solid White (强制兼容深色模式的白底) -->
<rect width="100%" height="100%" fill="#FFFFFF" />
<defs>
<!-- CSS 变量定义与语义色声明 -->
<style>
:root {
/* 核心语义色 */
--c-cloud-blue: #0099FF;
--c-cloud-blue-light: rgba(0, 153, 255, 0.1);
--c-local-green: #009900;
--c-local-green-light: rgba(0, 153, 0, 0.1);
--c-risk-amber: #FF991F;
--c-risk-amber-light: rgba(255, 153, 31, 0.1);
/* 中性与辅助色 */
--c-neutral-gray: #475569;
--c-neutral-gray-light: #E2E8F0;
/* 字体体系降级兼容 */
--font-sans: "Inter", "Noto Sans SC", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
--font-mono: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;
}
/* 全局文本类 */
.text-title { font-family: var(--font-sans); font-weight: bold; }
.text-sans { font-family: var(--font-sans); }
.text-mono { font-family: var(--font-mono); }
.text-legend { font-family: var(--font-mono); font-size: 11px; fill: var(--c-neutral-gray); }
/* 节点与容器类 */
.node-cloud { fill: var(--c-cloud-blue-light); stroke: var(--c-cloud-blue); stroke-width: 2px; }
.node-local { fill: var(--c-local-green-light); stroke: var(--c-local-green); stroke-width: 2px; }
.node-amber { fill: var(--c-risk-amber-light); stroke: var(--c-risk-amber); stroke-width: 2px; }
.box-local { fill: transparent; stroke: var(--c-local-green); stroke-width: 2px; }
.box-cloud { fill: transparent; stroke: var(--c-cloud-blue); stroke-width: 2px; stroke-dasharray: 4 4; }
/* 连线类 */
.line-sync { stroke: var(--c-local-green); stroke-width: 2px; fill: none; }
.line-async { stroke: var(--c-risk-amber); stroke-width: 2px; stroke-dasharray: 4 2; fill: none; }
.line-neutral { stroke: var(--c-neutral-gray); stroke-width: 2px; stroke-dasharray: 2 2; fill: none; }
</style>
<!-- 连线箭头定义 -->
<marker id="arrow-sync" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<path d="M0,0 L0,6 L9,3 z" fill="var(--c-local-green)" />
</marker>
<marker id="arrow-async" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<path d="M0,0 L0,6 L9,3 z" fill="var(--c-risk-amber)" />
</marker>
<marker id="arrow-async-rev" markerWidth="10" markerHeight="10" refX="1" refY="3" orient="auto">
<path d="M9,0 L9,6 L0,3 z" fill="var(--c-risk-amber)" />
</marker>
<marker id="arrow-sync-rev" markerWidth="10" markerHeight="10" refX="1" refY="3" orient="auto">
<path d="M9,0 L9,6 L0,3 z" fill="var(--c-local-green)" />
</marker>
</defs>
<!-- ========================================================================= -->
<!-- 1. 标题模块 (Title Block) -->
<!-- ========================================================================= -->
<g id="title-block" transform="translate(640, 50)">
<!-- 图表编号 -->
<text y="-30" text-anchor="middle" class="text-mono" font-size="12" fill="var(--c-neutral-gray)" letter-spacing="1">FIG-01</text>
<!-- 主标题 -->
<text y="0" text-anchor="middle" class="text-title" font-size="24" fill="#000000">研报智能体 MCP 系统拓扑图</text>
<!-- 面包屑导航 -->
<text y="25" text-anchor="middle" class="text-mono" font-size="14" fill="var(--c-neutral-gray)">架构图 &gt; 学术研究智能体 MCP &gt; 系统拓扑</text>
<!-- 上下文指示线 (使用主色调代表架构主体) -->
<rect x="-30" y="40" width="60" height="3" fill="var(--c-local-green)" />
</g>
<!-- ========================================================================= -->
<!-- 2. 背景与物理区域隔离边界 (Cloud-Local Segregation) -->
<!-- ========================================================================= -->
<g id="boundaries" transform="translate(0, 140)">
<!-- 用户与客户端区域 (Left: Local) -->
<rect x="30" y="0" width="280" height="520" rx="8" class="box-local" />
<text x="45" y="25" class="text-title" font-size="14" fill="var(--c-local-green)">用户层 (本地运行环境)</text>
<!-- MCP Server 集群区域 (Center: Local/Container) -->
<rect x="420" y="0" width="340" height="520" rx="8" class="box-local" />
<text x="435" y="25" class="text-title" font-size="14" fill="var(--c-local-green)">MCP 服务端集群 (核心执行区)</text>
<!-- 外部基础设施区域 (Right: Cloud) -->
<rect x="850" y="0" width="400" height="330" rx="8" class="box-cloud" />
<text x="865" y="25" class="text-title" font-size="14" fill="var(--c-cloud-blue)">外部学术基础设施 (公有云)</text>
<!-- 本地知识库区域 (Right Bottom: Local Storage) -->
<rect x="850" y="360" width="400" height="160" rx="8" class="box-local" />
<text x="865" y="385" class="text-title" font-size="14" fill="var(--c-local-green)">本地知识库</text>
</g>
<!-- ========================================================================= -->
<!-- 3. 网络通信与 MCP 协议层 (Network & Protocol Bridge) -->
<!-- ========================================================================= -->
<g id="protocol-layer" transform="translate(0, 140)">
<!-- 协议通道背景 -->
<rect x="310" y="160" width="110" height="200" fill="var(--c-neutral-gray-light)" rx="4" opacity="0.4" />
<!-- StdIO Protocol Line -->
<path d="M 310,210 L 420,210" class="line-sync" marker-end="url(#arrow-sync)" marker-start="url(#arrow-sync-rev)" />
<text x="365" y="195" text-anchor="middle" class="text-mono" font-size="12" font-weight="bold" fill="var(--c-local-green)">stdio</text>
<text x="365" y="225" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-neutral-gray)">JSON-RPC 2.0</text>
<!-- SSE Protocol Line -->
<path d="M 310,310 L 420,310" class="line-async" marker-end="url(#arrow-async)" marker-start="url(#arrow-async-rev)" />
<text x="365" y="295" text-anchor="middle" class="text-mono" font-size="12" font-weight="bold" fill="var(--c-risk-amber)">SSE / HTTP</text>
<text x="365" y="325" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-neutral-gray)">JSON-RPC 2.0</text>
<!-- 协议层标签 -->
<text x="365" y="380" text-anchor="middle" class="text-title" font-size="12" fill="var(--c-neutral-gray)">MCP 标准传输协议层</text>
</g>
<!-- ========================================================================= -->
<!-- 4. 核心节点实体 (Entities) -->
<!-- ========================================================================= -->
<g id="nodes" transform="translate(0, 140)">
<!-- [4.1] 用户层 (User Layer) -->
<!-- 研究人员 -->
<g transform="translate(170, 90)">
<circle cx="0" cy="-15" r="15" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<path d="M -20,15 C -20,5 20,5 20,15" fill="none" stroke="var(--c-local-green)" stroke-width="2" />
<text x="0" y="35" text-anchor="middle" class="text-sans" font-weight="bold" font-size="12" fill="#000000">研究人员</text>
<text x="0" y="50" text-anchor="middle" class="text-sans" font-size="10" fill="var(--c-neutral-gray)">学术用户</text>
</g>
<!-- MCP 客户端 (Host Application) -->
<g transform="translate(60, 200)">
<rect width="220" height="120" rx="6" class="node-local" />
<text x="110" y="30" text-anchor="middle" class="text-title" font-size="16" fill="var(--c-local-green)">MCP 客户端</text>
<text x="110" y="50" text-anchor="middle" class="text-mono" font-size="12" fill="#000000">Claude Desktop / Cursor</text>
<rect x="20" y="70" width="180" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-local-green)" stroke-width="1" />
<text x="110" y="89" text-anchor="middle" class="text-sans" font-size="12" fill="#000000">大模型上下文与工具调度</text>
</g>
<!-- 远程 LLM (Remote Brain) - 从 Client 发起调用 -->
<g transform="translate(90, 420)">
<!-- Hexagon -->
<polygon points="30,-15 130,-15 160,25 130,65 30,65 0,25" class="node-cloud" />
<text x="80" y="20" text-anchor="middle" class="text-title" font-size="14" fill="#000000">远程大模型</text>
<text x="80" y="40" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-cloud-blue)">OpenAI / Anthropic API</text>
</g>
<!-- 连接 Client 与 Remote LLM -->
<path d="M 170,320 L 170,405" class="line-async" marker-end="url(#arrow-async)" marker-start="url(#arrow-async-rev)" />
<text x="180" y="365" class="text-mono" font-size="10" fill="var(--c-risk-amber)">HTTPS 网络通信</text>
<text x="180" y="380" class="text-sans" font-size="10" fill="var(--c-risk-amber)">提示词请求 / 结果流式响应</text>
<!-- [4.2] MCP Server 集群 -->
<!-- MCP Server 1: 文献查询 -->
<g transform="translate(450, 70)">
<rect width="280" height="100" rx="6" class="node-local" />
<rect x="0" y="0" width="280" height="35" rx="6" fill="var(--c-local-green)" />
<text x="140" y="22" text-anchor="middle" class="text-title" font-size="14" fill="#FFFFFF">文献查询 MCP Server</text>
<text x="140" y="55" text-anchor="middle" class="text-mono" font-size="11" fill="#000000">工具: search_papers(), fetch_pdf()</text>
<text x="140" y="75" text-anchor="middle" class="text-sans" font-size="11" fill="var(--c-neutral-gray)">负责多源学术数据库 API 聚合与清洗</text>
</g>
<!-- MCP Server 2: 提示词策略 -->
<g transform="translate(450, 210)">
<rect width="280" height="100" rx="6" class="node-local" />
<rect x="0" y="0" width="280" height="35" rx="6" fill="var(--c-local-green)" />
<text x="140" y="22" text-anchor="middle" class="text-title" font-size="14" fill="#FFFFFF">提示词策略 MCP Server</text>
<text x="140" y="55" text-anchor="middle" class="text-mono" font-size="11" fill="#000000">提示词: synthesis_template</text>
<text x="140" y="75" text-anchor="middle" class="text-sans" font-size="11" fill="var(--c-neutral-gray)">负责基于主题动态组装超级提示词</text>
</g>
<!-- MCP Server 3: CoT 推理 -->
<g transform="translate(450, 350)">
<rect width="280" height="100" rx="6" class="node-amber" />
<rect x="0" y="0" width="280" height="35" rx="6" fill="var(--c-risk-amber)" />
<text x="140" y="22" text-anchor="middle" class="text-title" font-size="14" fill="#FFFFFF">CoT 推理 MCP Server</text>
<text x="140" y="55" text-anchor="middle" class="text-mono" font-size="11" fill="#000000">工具: run_cot_chain(), verify_logic()</text>
<text x="140" y="75" text-anchor="middle" class="text-sans" font-size="11" fill="var(--c-neutral-gray)">协调多步思考推理,抽取实体与洞察生成</text>
</g>
<!-- [4.3] 外部基础设施 (External Infrastructure) -->
<!-- 学术数据库 -->
<g transform="translate(930, 60)">
<!-- Cylinder -->
<path d="M 0,20 A 40,15 0 0,0 80,20 A 40,15 0 0,0 0,20 L 0,80 A 40,15 0 0,0 80,80 L 80,20" class="node-cloud" />
<text x="40" y="50" text-anchor="middle" class="text-title" font-size="12" fill="#000000">学术数据库</text>
<text x="40" y="68" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-cloud-blue)">PubMed, arXiv</text>
<text x="40" y="82" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-cloud-blue)">IEEE, WOS</text>
</g>
<!-- 互联网资源 -->
<g transform="translate(1080, 200)">
<!-- Hexagon-like Cloud Service -->
<polygon points="20,0 80,0 100,40 80,80 20,80 0,40" class="node-cloud" />
<text x="50" y="35" text-anchor="middle" class="text-title" font-size="12" fill="#000000">互联网资源</text>
<text x="50" y="55" text-anchor="middle" class="text-mono" font-size="10" fill="var(--c-cloud-blue)">PDF / HTML</text>
</g>
<!-- [4.4] 本地知识库 (Local Knowledge Base) -->
<g transform="translate(980, 410)">
<!-- Cylinder -->
<path d="M 0,20 A 50,15 0 0,0 100,20 A 50,15 0 0,0 0,20 L 0,80 A 50,15 0 0,0 100,80 L 100,20" class="node-local" />
<text x="50" y="50" text-anchor="middle" class="text-title" font-size="12" fill="#000000">本地知识库</text>
<text x="50" y="70" text-anchor="middle" class="text-mono" font-size="11" fill="var(--c-local-green)">Obsidian / Logseq</text>
<text x="50" y="85" text-anchor="middle" class="text-mono" font-size="9" fill="var(--c-neutral-gray)">(YAML / Markdown)</text>
</g>
<!-- [4.5] 服务器到外部/本地基础设施的连线 -->
<!-- 文献查询 MCP -> 学术数据库 (Async) -->
<path d="M 730,100 L 930,100" class="line-async" marker-end="url(#arrow-async)" />
<text x="830" y="90" text-anchor="middle" class="text-sans" font-size="10" fill="var(--c-risk-amber)">API 请求调用 (REST/GraphQL)</text>
<!-- CoT 推理 MCP -> 互联网资源 (Async) -->
<path d="M 730,400 L 1130,400 L 1130,285" class="line-async" marker-end="url(#arrow-async)" />
<text x="1000" y="390" text-anchor="middle" class="text-sans" font-size="10" fill="var(--c-risk-amber)">拉取文献全文 / 网页爬取</text>
<!-- 提示词策略 MCP -> Local KB (Sync) (如果是读取本地上下文) -->
<!-- 文献查询/CoT推理 MCP -> Local KB (Sync) (双轨制写入落盘) -->
<!-- 采用肘型连接线 -->
<path d="M 730,420 L 790,420 L 790,460 L 980,460" class="line-sync" marker-end="url(#arrow-sync)" />
<text x="885" y="452" text-anchor="middle" class="text-sans" font-size="10" fill="var(--c-local-green)">本地读写 Markdown / YAML</text>
<!-- MCP 内部的协同工作流虚线表示 (可选的逻辑联系) -->
<path d="M 590,170 L 590,210" class="line-neutral" marker-end="url(#arrow-async)" />
<path d="M 590,310 L 590,350" class="line-neutral" marker-end="url(#arrow-async)" />
<text x="600" y="195" class="text-sans" font-size="9" fill="var(--c-neutral-gray)">本地上下文共享</text>
</g>
<!-- ========================================================================= -->
<!-- 5. 底部图例与注释块 (Legend & Key Block) -->
<!-- ========================================================================= -->
<g id="legend" transform="translate(640, 750)">
<!-- 统一的半透明背景容器 -->
<rect x="-400" y="-16" width="800" height="32" rx="4" fill="rgba(255, 255, 255, 0.9)" stroke="var(--c-neutral-gray)" stroke-width="0.5"/>
<g transform="translate(-380, 0)">
<!-- 图例引导文本 -->
<text x="0" y="4" class="text-sans" font-size="12" font-weight="bold" fill="var(--c-neutral-gray)">图例说明:</text>
<!-- 图例项 1 -->
<g transform="translate(70, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-local-green)" />
<text x="12" y="4" class="text-legend">L1本地执行 / 计算节点 (极速/同步)</text>
</g>
<!-- 图例项 2 -->
<g transform="translate(300, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-cloud-blue)" />
<text x="12" y="4" class="text-legend">L2云端大脑 / 外部资源 (网络依赖)</text>
</g>
<!-- 图例项 3 -->
<g transform="translate(540, 0)">
<line x1="-8" y1="0" x2="8" y2="0" class="line-async" />
<text x="12" y="4" class="text-legend">L3网络通信 / 异步等待 (存在延迟)</text>
</g>
</g>
</g>
<!-- ========================================================================= -->
<!-- 6. 许可声明 (License) -->
<!-- ========================================================================= -->
<g id="license" transform="translate(640, 810)">
<text x="0" y="0" text-anchor="middle" class="text-sans" font-size="10" fill="var(--c-neutral-gray)">
本作品采用 CC-BY-SA 4.0 进行许可,© 2025-2026 Gitconomy Research
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,320 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200" width="100%" height="100%">
<!--
================================================================================
图表名称:个人级研究助手智能体 - 开发框架与技术栈架构图
文件命名project-caffeine-tech-stack-framework.svg
用途:展示从宿主端到三个核心 MCP Server 的底层技术栈、核心算法、Monorepo工程化及安全交互框架。
版本v1.1.1 (Added Legend)
作者Gitconomy Research-郭晧
SPDX-License-Identifier: MIT & CC-BY-SA-4.0
创建日期2026-02-27
================================================================================
-->
<!-- Background: Solid White for Git compatibility -->
<rect width="100%" height="100%" fill="#FFFFFF" />
<defs>
<style>
:root {
/* 语义色定义 */
--c-cloud-blue: #0099FF;
--c-cloud-blue-light: rgba(0, 153, 255, 0.08);
--c-local-green: #009900;
--c-local-green-light: rgba(0, 153, 0, 0.08);
--c-risk-amber: #FF991F;
--c-risk-amber-light: rgba(255, 153, 31, 0.08);
--c-gov-blue: #0052CC;
--c-gov-blue-light: rgba(0, 82, 204, 0.04);
--c-neutral-gray: #475569;
--c-neutral-gray-light: #E2E8F0;
}
/* 字体降级机制 */
.font-sans { font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif; }
.font-mono { font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace; }
/* 文本层级 */
.title-main { font-size: 16px; font-weight: bold; fill: var(--c-neutral-gray); }
.title-sub { font-size: 14px; font-weight: bold; fill: #0F172A; }
.tech-badge { font-size: 12px; font-weight: bold; }
.desc-text { font-size: 12px; fill: #64748B; }
</style>
<!-- 箭头标记 -->
<marker id="arrow-green" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
<path d="M 0 0 L 8 4 L 0 8 Z" fill="var(--c-local-green)" />
</marker>
<marker id="arrow-blue" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
<path d="M 0 0 L 8 4 L 0 8 Z" fill="var(--c-cloud-blue)" />
</marker>
<marker id="arrow-amber" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
<path d="M 0 0 L 8 4 L 0 8 Z" fill="var(--c-risk-amber)" />
</marker>
</defs>
<!--
===========================================================================
顶层标题块 (Title Block)
===========================================================================
-->
<g id="title-block" transform="translate(600, 40)">
<text y="0" text-anchor="middle" class="font-mono" font-size="12" fill="var(--c-neutral-gray)" letter-spacing="1">FIG-02</text>
<text y="30" text-anchor="middle" class="font-sans" font-weight="bold" font-size="24" fill="#000000">Project Caffeine开发框架与技术栈架构图</text>
<text y="55" text-anchor="middle" class="font-mono" font-size="14" fill="var(--c-neutral-gray)">System Architecture &gt; Project Caffeine Tech Stack</text>
<rect x="-30" y="70" width="60" height="3" fill="var(--c-gov-blue)" />
</g>
<!--
===========================================================================
Layer 1: 宿主环境与模型层 (Host & LLM Layer)
===========================================================================
-->
<g id="layer-host" transform="translate(100, 140)">
<text x="0" y="0" class="font-sans title-main">Layer 1: 宿主应用与大脑层 (Host &amp; Brain)</text>
<rect x="0" y="15" width="1000" height="90" rx="8" fill="var(--c-neutral-gray-light)" opacity="0.2" stroke="var(--c-neutral-gray)" stroke-dasharray="4 4" stroke-width="1.5" />
<!-- 客户端 -->
<rect x="30" y="30" width="220" height="60" rx="6" fill="#FFFFFF" stroke="var(--c-local-green)" stroke-width="2" />
<text x="140" y="55" text-anchor="middle" class="font-sans title-sub">MCP Client 宿主联调环境</text>
<text x="140" y="75" text-anchor="middle" class="font-mono desc-text">VS Code (MCP 插件) / Claude</text>
<!-- 双向箭头 -->
<line x1="260" y1="60" x2="330" y2="60" stroke="var(--c-neutral-gray)" stroke-width="2" stroke-dasharray="3 3"/>
<!-- 远程模型 (Brain) -->
<g transform="translate(400, 60)">
<!-- 六边形 Token -->
<polygon points="0,-30 26,-15 26,15 0,30 -26,15 -26,-15" fill="var(--c-cloud-blue-light)" stroke="var(--c-cloud-blue)" stroke-width="2" />
<text x="40" y="-5" class="font-sans title-sub" fill="var(--c-cloud-blue)">Remote LLM Brain</text>
<text x="40" y="15" class="font-mono desc-text">Claude 3.5 / DeepSeek (Context Engine)</text>
</g>
</g>
<!--
===========================================================================
Layer 2: 协议总线 (Protocol Bus)
===========================================================================
-->
<g id="layer-protocol" transform="translate(100, 270)">
<text x="0" y="0" class="font-sans title-main">Layer 2: 通信协议层 (JSON-RPC 2.0 Bus)</text>
<rect x="0" y="15" width="1000" height="40" rx="20" fill="var(--c-gov-blue-light)" stroke="var(--c-gov-blue)" stroke-width="2" />
<text x="500" y="40" text-anchor="middle" class="font-mono" font-size="14" font-weight="bold" fill="var(--c-gov-blue)">mcp-protocol: STDIO 协议 (MVP阶段本地 stdin/stdout 零网络开销)</text>
<!-- 连接上下层的管线 -->
<line x1="210" y1="-35" x2="210" y2="15" stroke="var(--c-local-green)" stroke-width="3" marker-end="url(#arrow-green)" />
<line x1="210" y1="55" x2="210" y2="90" stroke="var(--c-local-green)" stroke-width="3" marker-end="url(#arrow-green)" />
<line x1="500" y1="55" x2="500" y2="90" stroke="var(--c-local-green)" stroke-width="3" marker-end="url(#arrow-green)" />
<line x1="850" y1="55" x2="850" y2="90" stroke="var(--c-local-green)" stroke-width="3" marker-end="url(#arrow-green)" />
</g>
<!--
===========================================================================
Layer 3: 核心 MCP Server 集群框架 (Microservices Stack)
===========================================================================
-->
<g id="layer-servers" transform="translate(100, 370)">
<text x="0" y="0" class="font-sans title-main">Layer 3: 核心智能体引擎 / MCP Server 集群开发框架</text>
<!-- 工程化管控边界 (Monorepo) -->
<rect x="0" y="15" width="1000" height="360" rx="8" fill="transparent" stroke="var(--c-neutral-gray)" stroke-dasharray="4 4" stroke-width="2" />
<rect x="0" y="15" width="1000" height="30" fill="var(--c-neutral-gray-light)" opacity="0.4" rx="8"/>
<text x="20" y="35" class="font-mono desc-text" font-weight="bold" fill="var(--c-neutral-gray)">📦 npm Workspaces (Monorepo) - 统一包管理 / 依赖隔离 / 共享 JSON-RPC Schema</text>
<!-- ================= S1: 文献查询 Server ================= -->
<g transform="translate(20, 45)">
<rect x="0" y="0" width="300" height="320" rx="8" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<rect x="0" y="0" width="300" height="40" fill="var(--c-local-green)" rx="8" />
<rect x="0" y="20" width="300" height="20" fill="var(--c-local-green)" />
<text x="150" y="25" text-anchor="middle" class="font-sans title-sub" fill="#FFFFFF">S1: 文献查询 Server (执行者)</text>
<!-- Tech Stack Badges (Unified TS/Node) -->
<text x="20" y="65" class="font-sans desc-text" font-weight="bold">开发环境与框架</text>
<rect x="20" y="75" width="115" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="77.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">Node.js (v20+)</text>
<rect x="145" y="75" width="95" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="192.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">@mcp/sdk-ts</text>
<!-- Core Algorithms -->
<text x="20" y="130" class="font-sans desc-text" font-weight="bold">核心组件与算法集成</text>
<rect x="20" y="140" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-risk-amber)" stroke-dasharray="2 2" />
<text x="150" y="165" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-risk-amber)">Semantic Chunking 文本切块算法</text>
<rect x="20" y="190" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-risk-amber)" stroke-dasharray="2 2" />
<text x="150" y="215" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-risk-amber)">Playwright / Firecrawl 网页深抓取</text>
<!-- APIs -->
<text x="20" y="260" class="font-sans desc-text" font-weight="bold">集成外部接口</text>
<rect x="20" y="270" width="125" height="24" rx="4" fill="var(--c-cloud-blue-light)" stroke="var(--c-cloud-blue)" />
<text x="82.5" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-cloud-blue)">arXiv API</text>
<rect x="155" y="270" width="125" height="24" rx="4" fill="var(--c-cloud-blue-light)" stroke="var(--c-cloud-blue)" />
<text x="217.5" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-cloud-blue)">S.Scholar API</text>
</g>
<!-- ================= S2: 提示词策略 Server ================= -->
<g transform="translate(350, 45)">
<rect x="0" y="0" width="300" height="320" rx="8" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<rect x="0" y="0" width="300" height="40" fill="var(--c-local-green)" rx="8" />
<rect x="0" y="20" width="300" height="20" fill="var(--c-local-green)" />
<text x="150" y="25" text-anchor="middle" class="font-sans title-sub" fill="#FFFFFF">S2: 提示词策略 Server (军师)</text>
<!-- Tech Stack Badges (Unified TS/Node) -->
<text x="20" y="65" class="font-sans desc-text" font-weight="bold">开发环境与框架</text>
<rect x="20" y="75" width="115" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="77.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">Node.js (v20+)</text>
<rect x="145" y="75" width="95" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="192.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">@mcp/sdk-ts</text>
<!-- Core Algorithms -->
<text x="20" y="130" class="font-sans desc-text" font-weight="bold">核心智能体架构与引擎</text>
<rect x="20" y="140" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="150" y="165" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">Persona Matrix 角色化矩阵</text>
<rect x="20" y="190" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="150" y="215" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">Exploration State (防死循环账本)</text>
<!-- Prompts -->
<text x="20" y="260" class="font-sans desc-text" font-weight="bold">注入的静态思维框架 (Prompts)</text>
<rect x="20" y="270" width="80" height="24" rx="4" fill="#F1F5F9" stroke="var(--c-neutral-gray)" />
<text x="60" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-neutral-gray)">5W3H</text>
<rect x="110" y="270" width="80" height="24" rx="4" fill="#F1F5F9" stroke="var(--c-neutral-gray)" />
<text x="150" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-neutral-gray)">SCQA</text>
<rect x="200" y="270" width="80" height="24" rx="4" fill="#F1F5F9" stroke="var(--c-neutral-gray)" />
<text x="240" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-neutral-gray)">SWOT</text>
</g>
<!-- ================= S3: CoT 多步推理 Server ================= -->
<g transform="translate(680, 45)">
<rect x="0" y="0" width="300" height="320" rx="8" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<rect x="0" y="0" width="300" height="40" fill="var(--c-local-green)" rx="8" />
<rect x="0" y="20" width="300" height="20" fill="var(--c-local-green)" />
<text x="150" y="25" text-anchor="middle" class="font-sans title-sub" fill="#FFFFFF">S3: CoT 推理 Server (分析师)</text>
<!-- Tech Stack Badges (Unified TS/Node) -->
<text x="20" y="65" class="font-sans desc-text" font-weight="bold">开发环境与框架</text>
<rect x="20" y="75" width="115" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="77.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">Node.js (v20+)</text>
<rect x="145" y="75" width="95" height="24" rx="12" fill="#FFFFFF" stroke="var(--c-local-green)" />
<text x="192.5" y="91" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-local-green)">@mcp/sdk-ts</text>
<!-- Core Algorithms -->
<text x="20" y="130" class="font-sans desc-text" font-weight="bold">质量把控与数据组装逻辑</text>
<rect x="20" y="140" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="150" y="165" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">引文密度强制校验 (Citation Check)</text>
<rect x="20" y="190" width="260" height="40" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="150" y="215" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">双轨制落盘编译器 (JSON-to-MD)</text>
<!-- Output Formats -->
<text x="20" y="260" class="font-sans desc-text" font-weight="bold">标准数据协议输出</text>
<rect x="20" y="270" width="120" height="24" rx="4" fill="#F1F5F9" stroke="var(--c-neutral-gray)" />
<text x="80" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-neutral-gray)">Markdown 解析</text>
<rect x="150" y="270" width="130" height="24" rx="4" fill="#F1F5F9" stroke="var(--c-neutral-gray)" />
<text x="215" y="286" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-neutral-gray)">YAML Frontmatter</text>
</g>
</g>
<!--
===========================================================================
Layer 4: 物理存储与图谱层 (PKM Storage Layer)
===========================================================================
-->
<g id="layer-pkm" transform="translate(100, 790)">
<text x="0" y="0" class="font-sans title-main">Layer 4: 数据存储与个人图谱化 (PKM Data Persistence)</text>
<line x1="500" y1="-30" x2="500" y2="15" stroke="var(--c-local-green)" stroke-width="3" stroke-dasharray="4 4" marker-end="url(#arrow-green)" />
<rect x="0" y="30" width="1000" height="80" rx="8" fill="var(--c-local-green-light)" stroke="var(--c-local-green)" stroke-width="2" />
<!-- Storage Cylinder Icon -->
<path d="M 40 55 A 25 10 0 1 0 90 55 V 85 A 25 10 0 1 1 40 85 Z" fill="#FFFFFF" stroke="var(--c-local-green)" stroke-width="2"/>
<ellipse cx="65" cy="55" rx="25" ry="10" fill="#FFFFFF" stroke="var(--c-local-green)" stroke-width="2"/>
<text x="120" y="65" class="font-sans title-sub">本地个人知识库 (Local Vault)</text>
<text x="120" y="85" class="font-mono desc-text">Obsidian / Logseq Graph System</text>
<!-- Data Spec Badges -->
<rect x="420" y="55" width="180" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="510" y="75" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">双向链接 [[文献名称]] 编排</text>
<rect x="620" y="55" width="160" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="700" y="75" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">自动化文献目录索引池</text>
</g>
<!--
===========================================================================
Layer 5: 工程化与运维安全 (Engineering & Security)
===========================================================================
-->
<g id="layer-engineering" transform="translate(100, 930)">
<text x="0" y="0" class="font-sans title-main">Layer 5: 架构运维管控与安全基线 (Engineering &amp; Security)</text>
<rect x="0" y="15" width="1000" height="60" rx="8" fill="var(--c-gov-blue-light)" stroke="var(--c-gov-blue)" stroke-width="2" />
<!-- Security Badge 1 -->
<rect x="30" y="30" width="280" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="170" y="50" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">零信任架构 (不可信负载防范)</text>
<!-- Security Badge 2 -->
<rect x="340" y="30" width="280" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="480" y="50" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">.env.example 隔离敏感凭证</text>
<!-- Performance Badge -->
<rect x="650" y="30" width="320" height="30" rx="4" fill="#FFFFFF" stroke="var(--c-gov-blue)" />
<text x="810" y="50" text-anchor="middle" class="font-mono tech-badge" fill="var(--c-gov-blue)">异步非阻塞事件流 (高并发处理能力)</text>
</g>
<!--
===========================================================================
底部图例与注释块 (Legend & Key Block)
===========================================================================
-->
<g id="legend" transform="translate(600, 1050)">
<rect x="-440" y="-16" width="880" height="40" rx="4" fill="rgba(255, 255, 255, 0.9)" stroke="var(--c-neutral-gray)" stroke-width="0.5"/>
<g transform="translate(-420, 0)">
<text x="0" y="8" class="font-sans" font-size="13" font-weight="bold" fill="var(--c-neutral-gray)">语义图例说明:</text>
<!-- 云端/外部 -->
<g transform="translate(110, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-cloud-blue)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">云端服务 / 外部资源</text>
</g>
<!-- 本地/核心 -->
<g transform="translate(265, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-local-green)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">本地服务 / 核心引擎</text>
</g>
<!-- 风险/高负载 -->
<g transform="translate(420, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-risk-amber)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">高频计算 / 网络爬取</text>
</g>
<!-- 治理/安全 -->
<g transform="translate(575, 0)">
<rect x="-6" y="-6" width="12" height="12" rx="2" fill="var(--c-gov-blue)" />
<text x="12" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">治理规范 / 安全控制</text>
</g>
<!-- 逻辑边界 -->
<g transform="translate(730, 0)">
<rect x="-8" y="-8" width="16" height="16" rx="2" fill="transparent" stroke="var(--c-neutral-gray)" stroke-dasharray="2 2" stroke-width="1.5" />
<text x="14" y="8" class="font-sans" font-size="12" fill="var(--c-neutral-gray)">逻辑边界 / 虚拟容器</text>
</g>
</g>
</g>
<!--
===========================================================================
底部许可声明
===========================================================================
-->
<text x="600" y="1140" text-anchor="middle" class="font-sans" font-size="11" fill="var(--c-neutral-gray)">
本作品采用 CC-BY-SA 4.0 进行许可,© 2025-2026 Gitconomy Research社区
</text>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB