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.
- package/README.md +37 -13
- package/README.zh-CN.md +38 -14
- package/assets/readme/README.md +28 -3
- package/assets/readme/architecture-en.png +0 -0
- package/assets/readme/architecture-en.svg +89 -35
- package/assets/readme/architecture-zh.png +0 -0
- package/assets/readme/architecture-zh.svg +89 -35
- package/assets/readme/excalidraw.png +0 -0
- package/dist/extension.js +13 -13
- package/dist/hosted-recovery.js +2 -2
- package/dist/hosted-worker.js +2 -2
- package/docs/hosted-plugin-ui-integration.md +3 -0
- package/docs/hosted-tool-ui.md +319 -0
- package/package.json +2 -2
- package/web/dist/.vite/manifest.json +23 -23
- package/web/dist/assets/{app-BBFTvBi3.js → app-CkF-eYrh.js} +106 -105
- package/web/dist/assets/app.css +1 -1
- package/web/dist/assets/app.js +4 -4
- package/web/dist/assets/{graphql-BFXbgt0v.js → graphql-DEw7u2-a.js} +1 -1
- package/web/dist/assets/{http-BMsNnnT0.js → http-Bzp5aOjC.js} +1 -1
- package/web/dist/assets/{php-B1RNgYx_.js → php-P_Mg24pJ.js} +1 -1
- package/web/dist/assets/{plugin-vzhuCxDC.js → plugin-2N2zuxS_.js} +1 -1
- package/web/dist/assets/{plugin-BQ0HbKSE.js → plugin-BwKLp4-I.js} +1 -1
- package/web/dist/assets/{plugin-CRV0S7da.js → plugin-CcbdAA89.js} +1 -1
- package/web/dist/assets/{rst-CDdGez36.js → rst-CwQ0NEEf.js} +1 -1
- package/web/dist/assets/{ruby-DN1ypEvz.js → ruby-CGB1KBuT.js} +1 -1
- package/web/dist/assets/{svelte-Cq9y0S3R.js → svelte-D3ItaKcK.js} +1 -1
- package/web/dist/assets/{vue-Cs6SDj6Z.js → vue-C7SbdHXJ.js} +1 -1
|
@@ -1,39 +1,93 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
2
|
-
<title id="title"
|
|
3
|
-
<desc id="desc">浏览器与 Electron
|
|
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="
|
|
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="
|
|
8
|
-
<g font-family="Arial, PingFang SC, Microsoft YaHei, sans-serif"
|
|
9
|
-
<text x="
|
|
10
|
-
<text x="
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<text x="
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
<
|
|
28
|
-
<text x="
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
<text x="
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
<text x="
|
|
36
|
-
<text x="
|
|
37
|
-
<
|
|
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
|