<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>整体架构 · OpenHarmony DevLoop</title>
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&family=Noto+Serif:ital@0;1&family=Noto+Sans+SC:wght@400;500;600&family=Noto+Serif+SC:wght@400&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--color-paper: #f5f5f5;
--color-ink: #2d3142;
--color-muted: #4f5d75;
--color-accent: #bf4520;
--font-sans: 'Geist', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
--font-serif: 'Instrument Serif', 'Noto Serif', 'Noto Serif SC', serif;
--font-mono: 'Geist Mono', ui-monospace, monospace;
}
body {
font-family: var(--font-sans);
background: var(--color-paper);
color: var(--color-ink);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 3rem 2rem;
}
.frame { max-width: 1360px; width: 100%; }
type ramp is never silently scaled down). This wrapper lets a narrow
screen scroll the diagram instead of the whole page. */
.diagram-container { width: 100%; overflow-x: auto; }
svg { width: 100%; min-width: 1280px; display: block; }
scroll. Let the diagram scale down to the sheet: smaller but whole
beats sharp but cut off. Must come after the svg rule above - a media
query adds no specificity, so a later plain rule would win. */
@media print {
.diagram-container { overflow-x: visible; }
svg { min-width: 0; }
}
</style>
</head>
<body>
<div class="frame">
<div class="diagram-container">
<svg viewBox="0 0 1280 600" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="ohos-arch-title ohos-arch-desc">
<title id="ohos-arch-title">OpenHarmony DevLoop 整体架构</title>
<desc id="ohos-arch-desc">本机主 Agent 经任务契约与直连执行两条通道驱动构建服务器 code-worker 改码编译,产物先推服务器 QEMU 模拟器预验、再上 rk3568 开发板取证判定的跨机协作架构。</desc>
<defs>
<marker id="arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#4f5d75"/></marker>
<marker id="arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#bf4520"/></marker>
<marker id="arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#2e5aa8"/></marker>
</defs>
<rect width="100%" height="100%" fill="#f5f5f5"/>
<rect x="40" y="88" width="440" height="248" rx="8" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
<rect x="56" y="80" width="144" height="16" rx="2" fill="#f5f5f5"/>
<text x="128" y="92" fill="#5a6580" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">本机 · WINDOWS 桌面</text>
<rect x="800" y="88" width="440" height="348" rx="8" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
<rect x="816" y="80" width="144" height="16" rx="2" fill="#f5f5f5"/>
<text x="888" y="92" fill="#5a6580" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">构建服务器 · LINUX</text>
<line x1="456" y1="144" x2="824" y2="144" stroke="#bf4520" stroke-width="1.2" marker-end="url(#arrow-accent)"/>
<rect x="584" y="102" width="112" height="16" rx="2" fill="#f5f5f5"/>
<text x="640" y="114" fill="#5a6580" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">通道① 任务契约</text>
<rect x="604" y="122" width="72" height="12" rx="2" fill="#f5f5f5"/>
<text x="640" y="131" fill="#5a6580" font-size="8" letter-spacing="0.06em" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">collab.py</text>
<line x1="824" y1="168" x2="456" y2="168" stroke="#4f5d75" stroke-width="1" stroke-dasharray="4,3" marker-end="url(#arrow)"/>
<rect x="600" y="176" width="80" height="16" rx="2" fill="#f5f5f5"/>
<text x="640" y="188" fill="#5a6580" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">报告回收</text>
<line x1="456" y1="260" x2="824" y2="260" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arrow)"/>
<rect x="584" y="218" width="112" height="16" rx="2" fill="#f5f5f5"/>
<text x="640" y="230" fill="#5a6580" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">通道② 直连执行</text>
<rect x="584" y="238" width="112" height="12" rx="2" fill="#f5f5f5"/>
<text x="640" y="247" fill="#5a6580" font-size="8" letter-spacing="0.06em" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">apply.py · flash.py</text>
<line x1="824" y1="288" x2="456" y2="288" stroke="#4f5d75" stroke-width="1" stroke-dasharray="4,3" marker-end="url(#arrow)"/>
<rect x="600" y="296" width="80" height="16" rx="2" fill="#f5f5f5"/>
<text x="640" y="308" fill="#5a6580" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">产物回传</text>
<line x1="195" y1="312" x2="195" y2="456" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arrow)"/>
<rect x="203" y="340" width="60" height="12" rx="2" fill="#f5f5f5"/>
<text x="205" y="349" fill="#5a6580" font-size="8" letter-spacing="0.06em" font-family="'Geist Mono', ui-monospace, monospace">USB · hdc</text>
<rect x="203" y="362" width="80" height="16" rx="2" fill="#f5f5f5"/>
<text x="205" y="374" fill="#5a6580" font-size="12" font-weight="500" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">推板 · 取证</text>
<path d="M 325,312 V 368 Q 325,376 333,376 H 824" fill="none" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arrow)"/>
<rect x="333" y="322" width="88" height="16" rx="2" fill="#f5f5f5"/>
<text x="335" y="334" fill="#5a6580" font-size="12" font-weight="500" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">模拟器通道</text>
<rect x="333" y="342" width="104" height="12" rx="2" fill="#f5f5f5"/>
<text x="335" y="351" fill="#5a6580" font-size="8" letter-spacing="0.06em" font-family="'Geist Mono', ui-monospace, monospace">tdd-emulator.yaml</text>
<line x1="1020" y1="192" x2="1020" y2="232" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arrow)"/>
<rect x="1028" y="206" width="128" height="16" rx="2" fill="#f5f5f5"/>
<text x="1030" y="218" fill="#5a6580" font-size="12" font-weight="500" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">定位 · 修改 · 禁 push</text>
<rect x="64" y="120" width="392" height="72" rx="6" fill="#f5f5f5"/>
<rect x="64" y="120" width="392" height="72" rx="6" fill="rgba(191,69,32,0.08)" stroke="#bf4520" stroke-width="1"/>
<rect x="72" y="126" width="38" height="12" rx="2" fill="transparent" stroke="rgba(191,69,32,0.40)" stroke-width="0.8"/>
<text x="91" y="135" fill="rgba(191,69,32,0.85)" font-size="7" letter-spacing="0.08em" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">DRIVER</text>
<text x="260" y="158" fill="#2d3142" font-size="12" font-weight="600" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">主 Agent</text>
<text x="260" y="178" fill="#4f5d75" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">任务决策 · 板上验证闭环</text>
<rect x="64" y="232" width="392" height="80" rx="6" fill="#f5f5f5"/>
<rect x="64" y="232" width="392" height="80" rx="6" fill="#ffffff" stroke="#2d3142" stroke-width="1"/>
<rect x="72" y="238" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.40)" stroke-width="0.8"/>
<text x="89" y="247" fill="rgba(45,49,66,0.80)" font-size="7" letter-spacing="0.08em" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">TOOLS</text>
<text x="260" y="266" fill="#2d3142" font-size="12" font-weight="600" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">Agent 工具</text>
<text x="260" y="288" fill="#4f5d75" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">设备操作 · 设备连接 · 正确性判定</text>
<text x="260" y="306" fill="#4f5d75" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">判定证据:UI 树 · 截图 · 录屏</text>
<rect x="824" y="120" width="392" height="72" rx="6" fill="#f5f5f5"/>
<rect x="824" y="120" width="392" height="72" rx="6" fill="#ffffff" stroke="#2d3142" stroke-width="1"/>
<rect x="832" y="126" width="42" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.40)" stroke-width="0.8"/>
<text x="853" y="135" fill="rgba(45,49,66,0.80)" font-size="7" letter-spacing="0.08em" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">WORKER</text>
<text x="1020" y="158" fill="#2d3142" font-size="12" font-weight="600" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">code-worker</text>
<text x="1020" y="174" fill="#4f5d75" font-size="9" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">opencode</text>
<text x="1020" y="186" fill="#4f5d75" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">重模型 · 本地 commit · 禁 push</text>
<rect x="824" y="232" width="392" height="80" rx="6" fill="#f5f5f5"/>
<rect x="824" y="232" width="392" height="80" rx="6" fill="rgba(45,49,66,0.05)" stroke="#4f5d75" stroke-width="1"/>
<rect x="832" y="238" width="60" height="12" rx="2" fill="transparent" stroke="rgba(79,93,117,0.40)" stroke-width="0.8"/>
<text x="862" y="247" fill="rgba(79,93,117,0.80)" font-size="7" letter-spacing="0.08em" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">REPO+BUILD</text>
<text x="1020" y="268" fill="#2d3142" font-size="12" font-weight="600" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">OHOS 大仓 + 构建工具链</text>
<text x="1020" y="288" fill="#4f5d75" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">代码与构建同机 · 零网络开销</text>
<text x="1020" y="305" fill="#4f5d75" font-size="9" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">linux · /srv/workspace</text>
<rect x="119" y="456" width="152" height="56" rx="6" fill="#f5f5f5"/>
<rect x="119" y="456" width="152" height="56" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
<rect x="127" y="462" width="40" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
<text x="147" y="471" fill="rgba(45,49,66,0.55)" font-size="7" letter-spacing="0.08em" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">DEVICE</text>
<text x="195" y="492" fill="#2d3142" font-size="12" font-weight="600" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">rk3568 开发板</text>
<text x="195" y="506" fill="#4f5d75" font-size="9" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">USB · hdc</text>
<rect x="824" y="340" width="392" height="72" rx="6" fill="#f5f5f5"/>
<rect x="824" y="340" width="392" height="72" rx="6" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
<rect x="832" y="346" width="34" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.30)" stroke-width="0.8"/>
<text x="849" y="355" fill="rgba(45,49,66,0.55)" font-size="7" letter-spacing="0.08em" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">QEMU</text>
<text x="1020" y="376" fill="#2d3142" font-size="12" font-weight="600" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">QEMU 模拟器</text>
<text x="1020" y="392" fill="#4f5d75" font-size="9" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">x86_64_virt</text>
<text x="1020" y="406" fill="#4f5d75" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">板端门前快速预验</text>
<rect x="500" y="456" width="280" height="56" rx="6" fill="#f5f5f5"/>
<rect x="500" y="456" width="280" height="56" rx="6" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.20)" stroke-width="1" stroke-dasharray="4,3"/>
<rect x="508" y="462" width="26" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.20)" stroke-width="0.8"/>
<text x="521" y="471" fill="rgba(45,49,66,0.50)" font-size="7" letter-spacing="0.08em" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">TBD</text>
<text x="640" y="492" fill="#2d3142" font-size="12" font-weight="600" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">UI 自动化测试框架</text>
<text x="640" y="506" fill="#4f5d75" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">基于正确性判定 · 改善 XTS 执行效率</text>
<rect x="860" y="456" width="320" height="56" rx="6" fill="#f5f5f5"/>
<rect x="860" y="456" width="320" height="56" rx="6" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.20)" stroke-width="1" stroke-dasharray="4,3"/>
<rect x="868" y="462" width="26" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.20)" stroke-width="0.8"/>
<text x="881" y="471" fill="rgba(45,49,66,0.50)" font-size="7" letter-spacing="0.08em" text-anchor="middle" font-family="'Geist Mono', ui-monospace, monospace">TBD</text>
<text x="1020" y="492" fill="#2d3142" font-size="12" font-weight="600" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">云服务器集群 · 设备农场</text>
<text x="1020" y="506" fill="#4f5d75" font-size="12" font-weight="500" text-anchor="middle" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">开发任务并行 · 不间断执行</text>
<text x="287" y="484" fill="rgba(45,49,66,0.75)" font-size="14" font-style="italic" font-family="'Instrument Serif', 'Noto Serif SC', serif">板卡只与本机对话</text>
<line x1="40" y1="548" x2="1240" y2="548" stroke="rgba(45,49,66,0.12)" stroke-width="0.8"/>
<text x="40" y="570" fill="#4f5d75" font-size="8" letter-spacing="0.14em" font-family="'Geist Mono', ui-monospace, monospace">LEGEND</text>
<rect x="120" y="559" width="20" height="12" rx="2" fill="rgba(191,69,32,0.08)" stroke="#bf4520" stroke-width="1"/>
<text x="148" y="570" fill="#4f5d75" font-size="12" font-weight="500" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">主控焦点</text>
<rect x="248" y="559" width="20" height="12" rx="2" fill="#ffffff" stroke="#2d3142" stroke-width="1"/>
<text x="276" y="570" fill="#4f5d75" font-size="12" font-weight="500" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">执行组件</text>
<rect x="376" y="559" width="20" height="12" rx="2" fill="rgba(45,49,66,0.05)" stroke="#4f5d75" stroke-width="1"/>
<text x="404" y="570" fill="#4f5d75" font-size="12" font-weight="500" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">代码与数据</text>
<rect x="520" y="559" width="20" height="12" rx="2" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.30)" stroke-width="1"/>
<text x="548" y="570" fill="#4f5d75" font-size="12" font-weight="500" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">外部设备</text>
<rect x="648" y="559" width="20" height="12" rx="2" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.20)" stroke-width="1" stroke-dasharray="4,3"/>
<text x="676" y="570" fill="#4f5d75" font-size="12" font-weight="500" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">规划中(TBD)</text>
<line x1="828" y1="565" x2="856" y2="565" stroke="#bf4520" stroke-width="1.2"/>
<text x="864" y="570" fill="#4f5d75" font-size="12" font-weight="500" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">任务契约主通道</text>
<line x1="984" y1="565" x2="1012" y2="565" stroke="#4f5d75" stroke-width="1" stroke-dasharray="4,3"/>
<text x="1020" y="570" fill="#4f5d75" font-size="12" font-weight="500" font-family="Geist, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif">返回通道</text>
</svg>
</div>
</div>
</body>
</html>