pi-webapp 0.1.38-alpha.2 → 0.1.39-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,39 +1,93 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="1120" height="668" viewBox="0 0 1120 668" role="img" aria-labelledby="title desc">
2
- <title id="title">一套工作台,多种使用入口</title>
3
- <desc id="desc">浏览器与 Electron 桌面端复用 React 工作台,通过 HTTP 动作和 NDJSON 事件连接本地 Node 宿主。宿主管理会话生命周期,通过扩展或 SDK 对接 Pi,并分发工作区插件能力。</desc>
1
+ <svg xmlns="http://www.w3.org/2000/svg" xml:lang="zh-CN" width="1400" height="1120" viewBox="0 0 1400 1120" role="img" aria-labelledby="title desc">
2
+ <title id="title">一个工作台,连接完整的 Agent 工作流</title>
3
+ <desc id="desc">浏览器与 Electron 复用 React 工作台,经 HTTP 动作和 NDJSON 事件连接本地 Node 宿主。宿主编排 Pi 会话与插件,由 Pi SDK、模型服务和本地工具提供执行能力。跨端契约、可选 Hosted 扩展与诊断支撑并列展示。</desc>
4
4
  <defs>
5
- <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M1 1 9 5 1 9" fill="none" stroke="#5368ed" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></marker>
5
+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M1 1 9 5 1 9Z" fill="#7b8fa1"/></marker>
6
6
  </defs>
7
- <rect width="1120" height="668" rx="16" fill="#f8fafc"/>
8
- <g font-family="Arial, PingFang SC, Microsoft YaHei, sans-serif" fill="#162033">
9
- <text x="32" y="56" font-size="32" font-weight="700">一套工作台,多种使用入口。</text>
10
- <text x="32" y="92" font-size="21" fill="#526078">增强 Pi 的可视化体验,而不是再造一套 Agent 引擎。</text>
11
- <g fill="none" stroke="#5368ed" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
12
- <path d="M288 224 V256 H560 V286" marker-end="url(#arrow)"/>
13
- <path d="M832 224 V256 H560"/>
14
- <path d="M560 408 V440 H288 V470" marker-end="url(#arrow)"/>
15
- <path d="M560 440 H832 V470" marker-end="url(#arrow)"/>
16
- </g>
17
- <g stroke="#dce2ee" stroke-width="2" fill="#ffffff">
18
- <rect x="32" y="128" width="512" height="96" rx="16"/>
19
- <rect x="576" y="128" width="512" height="96" rx="16"/>
20
- <rect x="32" y="472" width="512" height="128" rx="16"/>
21
- <rect x="576" y="472" width="512" height="128" rx="16"/>
22
- </g>
23
- <text x="64" y="168" font-size="25" font-weight="700">浏览器</text>
24
- <text x="64" y="202" font-size="21" fill="#526078">React 工作台 · npx 或 /web 打开</text>
25
- <text x="608" y="168" font-size="25" font-weight="700">Electron 桌面端</text>
26
- <text x="608" y="202" font-size="21" fill="#526078">复用 Web UI · 自带 Node / Pi</text>
27
- <rect x="224" y="288" width="672" height="120" rx="16" fill="#eef1ff" stroke="#5368ed" stroke-width="2"/>
28
- <text x="560" y="326" font-size="27" font-weight="700" text-anchor="middle" fill="#3549c6">本地 Node 宿主</text>
29
- <text x="560" y="360" font-size="21" text-anchor="middle">HTTP 动作 · NDJSON 事件 · 类型化契约</text>
30
- <text x="560" y="390" font-size="20" text-anchor="middle" fill="#526078">会话生命周期管理 + 插件注册表</text>
31
- <text x="64" y="514" font-size="25" font-weight="700">Pi Agent 引擎</text>
32
- <text x="64" y="548" font-size="21" fill="#526078">模型执行 · 工具调用 · 会话存储</text>
33
- <text x="64" y="578" font-size="20" fill="#526078">原生扩展 / SDK 接入</text>
34
- <text x="608" y="514" font-size="25" font-weight="700">工作区能力</text>
35
- <text x="608" y="548" font-size="21" fill="#526078">文件 · 终端 · Git · Web 插件</text>
36
- <text x="608" y="578" font-size="20" fill="#526078">动作分发、面板贡献与资源清理</text>
37
- <text x="560" y="642" font-size="20" text-anchor="middle" fill="#526078">界面、宿主编排与 Agent 执行,各有清晰的职责边界。</text>
7
+ <rect width="1400" height="1120" rx="16" fill="#ffffff"/>
8
+ <g font-family="Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif" stroke-linejoin="round" stroke-linecap="round">
9
+ <text x="60" y="54" font-size="16" fill="#64748b" font-weight="600" text-anchor="start">SYSTEM ARCHITECTURE / PI WEBAPP</text>
10
+ <text x="60" y="110" font-size="36" fill="#0f172a" font-weight="700" text-anchor="start">一个工作台,连接完整的 Agent 工作流</text>
11
+ <text x="60" y="150" font-size="18" fill="#64748b" font-weight="400" text-anchor="start">共享界面 · 本地优先 · 契约解耦 · 插件化扩展</text>
12
+ <rect x="60" y="190" width="1000" height="180" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
13
+ <text x="84" y="234" font-size="20" fill="#334155" font-weight="600" text-anchor="start">01 交互层</text>
14
+ <text x="1036" y="234" font-size="15" fill="#64748b" font-weight="400" text-anchor="end">web/src/ui · src/host/client</text>
15
+ <g id="entry" data-card="true">
16
+ <rect x="84" y="262" width="190" height="76" rx="12" fill="#ffffff" stroke="#cbd5e1" stroke-width="1.5"/>
17
+ <text x="179" y="294" font-size="17" fill="#334155" font-weight="600" text-anchor="middle">浏览器 / Electron</text>
18
+ <text x="179" y="318" font-size="17" fill="#334155" font-weight="400" text-anchor="middle">共用 React 界面</text>
19
+ </g>
20
+ <g id="workbench" data-card="true">
21
+ <rect x="298" y="262" width="464" height="76" rx="12" fill="#eaf2f9" stroke="#93b5d4" stroke-width="1.5"/>
22
+ <text x="530" y="294" font-size="18" fill="#334155" font-weight="600" text-anchor="middle">React + TypeScript 工作台</text>
23
+ <text x="530" y="318" font-size="18" fill="#334155" font-weight="400" text-anchor="middle">对话 · 会话导航 · Dock 面板 · 设置</text>
24
+ </g>
25
+ <g id="plugin-ui" data-card="true">
26
+ <rect x="786" y="262" width="250" height="76" rx="12" fill="#ffffff" stroke="#cbd5e1" stroke-width="1.5"/>
27
+ <text x="911" y="294" font-size="16" fill="#334155" font-weight="600" text-anchor="middle">插件视图</text>
28
+ <text x="911" y="318" font-size="16" fill="#334155" font-weight="400" text-anchor="middle">内置面板 / 扩展 UI</text>
29
+ </g>
30
+ <g id="transport" data-card="true">
31
+ <rect x="60" y="418" width="1000" height="74" rx="12" fill="#eef4f8" stroke="#a8bdce" stroke-width="1.5"/>
32
+ <text x="560" y="461" font-size="19" fill="#334155" font-weight="600" text-anchor="middle">通信边界 HTTP 动作请求 / NDJSON 实时事件 · Bearer + Origin 校验</text>
33
+ </g>
34
+ <rect x="60" y="540" width="1000" height="228" rx="12" fill="#f5f3f9" stroke="#b8b0d1" stroke-width="1.5"/>
35
+ <text x="84" y="584" font-size="20" fill="#504565" font-weight="600" text-anchor="start">02 本地 Node 宿主</text>
36
+ <text x="1036" y="584" font-size="15" fill="#776e89" font-weight="400" text-anchor="end">src/host/server</text>
37
+ <g id="orchestration" data-card="true">
38
+ <rect x="84" y="610" width="440" height="82" rx="12" fill="#ffffff" stroke="#b8b0d1" stroke-width="1.5"/>
39
+ <text x="304" y="645" font-size="17" fill="#334155" font-weight="600" text-anchor="middle">应用编排与生命周期</text>
40
+ <text x="304" y="669" font-size="17" fill="#334155" font-weight="400" text-anchor="middle">会话 / 工作区 / 模型认证 / 附件</text>
41
+ </g>
42
+ <g id="plugin-registry" data-card="true">
43
+ <rect x="548" y="610" width="488" height="82" rx="12" fill="#ebe7f4" stroke="#b8b0d1" stroke-width="1.5"/>
44
+ <text x="792" y="645" font-size="17" fill="#334155" font-weight="600" text-anchor="middle">插件注册与运行管理</text>
45
+ <text x="792" y="669" font-size="17" fill="#334155" font-weight="400" text-anchor="middle">Files · Git · Terminal / Hosted 扩展</text>
46
+ </g>
47
+ <text x="84" y="738" font-size="16" fill="#776e89" font-weight="400" text-anchor="start">Pi 薄适配入口 · 前台 / 后台会话 · 插件开关与资源清理</text>
48
+ <rect x="60" y="816" width="1000" height="156" rx="12" fill="#f1f7f4" stroke="#abc4b7" stroke-width="1.5"/>
49
+ <text x="84" y="860" font-size="20" fill="#365c4a" font-weight="600" text-anchor="start">03 执行与外部能力</text>
50
+ <g id="pi-runtime" data-card="true">
51
+ <rect x="84" y="884" width="292" height="62" rx="12" fill="#ffffff" stroke="#abc4b7" stroke-width="1.5"/>
52
+ <text x="230" y="921" font-size="18" fill="#334155" font-weight="600" text-anchor="middle">Pi SDK · AgentSession</text>
53
+ </g>
54
+ <g id="model-providers" data-card="true">
55
+ <rect x="400" y="884" width="288" height="62" rx="12" fill="#ffffff" stroke="#abc4b7" stroke-width="1.5"/>
56
+ <text x="544" y="921" font-size="18" fill="#334155" font-weight="600" text-anchor="middle">模型服务 · Provider APIs</text>
57
+ </g>
58
+ <g id="local-tools" data-card="true">
59
+ <rect x="712" y="884" width="324" height="62" rx="12" fill="#ffffff" stroke="#abc4b7" stroke-width="1.5"/>
60
+ <text x="874" y="921" font-size="17" fill="#334155" font-weight="600" text-anchor="middle">文件系统 · Git · PTY / 进程</text>
61
+ </g>
62
+ <g id="contracts" data-card="true">
63
+ <rect x="1092" y="190" width="248" height="302" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
64
+ <text x="1116" y="232" font-size="20" fill="#475569" font-weight="600" text-anchor="start">跨端契约</text>
65
+ <text x="1116" y="284" font-size="16" fill="#475569" font-weight="400" text-anchor="start">Typed DTO</text>
66
+ <text x="1116" y="309" font-size="16" fill="#475569" font-weight="400" text-anchor="start">事件校验</text>
67
+ <text x="1116" y="334" font-size="16" fill="#475569" font-weight="400" text-anchor="start">插件 / Workbench API</text>
68
+ <text x="1116" y="384" font-size="16" fill="#475569" font-weight="400" text-anchor="start">浏览器不依赖</text>
69
+ <text x="1116" y="409" font-size="16" fill="#475569" font-weight="400" text-anchor="start">Node / Pi 运行时对象</text>
70
+ <text x="1116" y="476" font-size="15" fill="#64748b" font-weight="400" text-anchor="start">src/contracts</text>
71
+ </g>
72
+ <g id="extensions" data-card="true">
73
+ <rect x="1092" y="540" width="248" height="228" rx="12" fill="#faf7f1" stroke="#c5bba9" stroke-width="1.5"/>
74
+ <text x="1116" y="582" font-size="20" fill="#756044" font-weight="600" text-anchor="start">可选扩展</text>
75
+ <text x="1116" y="634" font-size="16" fill="#756044" font-weight="400" text-anchor="start">Hosted 插件运行时</text>
76
+ <text x="1116" y="659" font-size="16" fill="#756044" font-weight="400" text-anchor="start">独立 Node 子进程</text>
77
+ <text x="1116" y="709" font-size="16" fill="#756044" font-weight="400" text-anchor="start">Excalidraw 官方插件</text>
78
+ <text x="1116" y="734" font-size="16" fill="#756044" font-weight="400" text-anchor="start">可选安装,非内置</text>
79
+ </g>
80
+ <g id="support" data-card="true">
81
+ <rect x="1092" y="816" width="248" height="156" rx="12" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
82
+ <text x="1116" y="858" font-size="20" fill="#475569" font-weight="600" text-anchor="start">横切支撑</text>
83
+ <text x="1116" y="910" font-size="14" fill="#475569" font-weight="400" text-anchor="start">Sentry · 诊断</text>
84
+ <text x="1116" y="935" font-size="14" fill="#475569" font-weight="400" text-anchor="start">CLI / 桌面启动与更新</text>
85
+ </g>
86
+ <path d="M560 373 V411" fill="none" stroke="#7b8fa1" stroke-width="2" marker-end="url(#arrow)"/>
87
+ <path d="M560 495 V533" fill="none" stroke="#7b8fa1" stroke-width="2" marker-end="url(#arrow)"/>
88
+ <path d="M560 771 V809" fill="none" stroke="#7b8fa1" stroke-width="2" marker-end="url(#arrow)"/>
89
+ <path d="M60 1014 H1340" fill="none" stroke="#e2e8f0"/>
90
+ <text x="60" y="1058" font-size="16" fill="#64748b" font-weight="400" text-anchor="start">架构边界:本地模块化宿主,不是微服务集群;同层模块并列展示,不表示串行调用。</text>
91
+ <text x="60" y="1090" font-size="14" fill="#64748b" font-weight="400" text-anchor="start">依据当前源码:src/host · src/plugins/builtin · src/contracts · web · desktop</text>
38
92
  </g>
39
93
  </svg>
Binary file