pi-web-ui 0.99.0 → 0.101.0
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/CHANGELOG.md +90 -1
- package/README.md +48 -45
- package/README.zh-CN.md +43 -40
- package/bin/pi-web-ui.mjs +172 -40
- package/dist/server/agent-formatters.js +191 -0
- package/dist/server/agent-service-daemon.js +1266 -0
- package/dist/server/agent-service.js +9851 -11892
- package/dist/server/approval-default-rules.js +158 -0
- package/dist/server/approval-rules.js +130 -184
- package/dist/server/ask-user-question-tool.js +94 -0
- package/dist/server/attachment-store.js +38 -1
- package/dist/server/attachments.js +55 -0
- package/dist/server/bash-tool.js +83 -0
- package/dist/server/bg-servers.js +82 -2
- package/dist/server/browser-page-tool.js +207 -0
- package/dist/server/claim-files-tool.js +4 -4
- package/dist/server/client-id-utils.js +51 -0
- package/dist/server/client-state.js +63 -1
- package/dist/server/compact-context-tool.js +10 -9
- package/dist/server/compaction-markers.js +34 -1
- package/dist/server/context-budget-runner.js +43 -0
- package/dist/server/conversation-read-tool.js +7 -8
- package/dist/server/conversation-touches.js +19 -0
- package/dist/server/dangling-tools.js +18 -5
- package/dist/server/delegate-mode.js +1 -0
- package/dist/server/delegate-task.js +10 -14
- package/dist/server/dispatch-domain-handlers.js +631 -0
- package/dist/server/dispatch-plugin-handlers.js +300 -0
- package/dist/server/dsh/dsh-agent-service.js +125 -13
- package/dist/server/edit-soft-tool.js +10 -12
- package/dist/server/eval-tool.js +4 -5
- package/dist/server/goal-evidence.js +180 -0
- package/dist/server/goal-service.js +49 -9
- package/dist/server/hashline-engine.js +199 -32
- package/dist/server/index.js +212 -944
- package/dist/server/left-panel-running.js +115 -0
- package/dist/server/load-tools-tool.js +100 -0
- package/dist/server/lsp-tool.js +50 -28
- package/dist/server/marker-service.js +53 -12
- package/dist/server/markers/builtins/action.js +108 -0
- package/dist/server/markers/index.js +4 -1
- package/dist/server/markers-list-tool.js +34 -0
- package/dist/server/market-service.js +277 -0
- package/dist/server/mcp-bridge.js +137 -30
- package/dist/server/mcp-hot-reload.js +84 -27
- package/dist/server/mcp-manager.js +215 -0
- package/dist/server/message-entry-resolver.js +32 -0
- package/dist/server/orphan-manager.js +44 -0
- package/dist/server/patch-remote-catalog.js +28 -10
- package/dist/server/patch-tool.js +9 -8
- package/dist/server/persona-chain.js +63 -0
- package/dist/server/plan-mode.js +9 -6
- package/dist/server/plan-update-tool.js +96 -0
- package/dist/server/plugin-api-catalog.js +30 -3
- package/dist/server/plugin-conversation-view.js +47 -0
- package/dist/server/plugin-facilities.js +13 -3
- package/dist/server/plugin-ui-slots.js +39 -0
- package/dist/server/plugins.js +183 -63
- package/dist/server/present-files-tool.js +10 -11
- package/dist/server/preset-fields.js +700 -0
- package/dist/server/preset-share.js +1179 -0
- package/dist/server/process-utils.js +30 -0
- package/dist/server/prompt-assembler.js +80 -0
- package/dist/server/prompt-composer.js +23 -9
- package/dist/server/protocol-version.js +1 -1
- package/dist/server/read-tool.js +8 -10
- package/dist/server/resolve-global-sdk.js +80 -18
- package/dist/server/schedule-agent-tool.js +147 -146
- package/dist/server/scm-commitmsg.js +74 -0
- package/dist/server/sdk-origin.js +125 -37
- package/dist/server/serialize.js +97 -7
- package/dist/server/session-branch.js +367 -0
- package/dist/server/session-parser.js +235 -0
- package/dist/server/session-search.js +158 -0
- package/dist/server/settings-service.js +115 -84
- package/dist/server/skill-content-filler.js +33 -0
- package/dist/server/skill-tool.js +3 -4
- package/dist/server/subagent-handoff.js +18 -0
- package/dist/server/subagent-helpers.js +88 -0
- package/dist/server/subagents.js +15 -22
- package/dist/server/terminals.js +171 -91
- package/dist/server/tool-approval.js +3 -1
- package/dist/server/tool-guards.js +527 -0
- package/dist/server/tool-host-factories.js +217 -0
- package/dist/server/tool-manager.js +84 -23
- package/dist/server/tool-prompt-overrides.js +158 -0
- package/dist/server/tool-prompts.js +42 -0
- package/dist/server/tool-signature.js +104 -0
- package/dist/server/wait-subscription-scan.js +46 -1
- package/dist/server/workspace-snapshot.js +60 -11
- package/extensions/webui.ts +90 -24
- package/package.json +5 -3
- package/plugin-sdk/README.md +25 -4
- package/plugin-sdk/import-check.mjs +210 -0
- package/plugin-sdk/index.d.ts +21 -1
- package/plugin-sdk/index.mjs +6 -0
- package/plugins/catalog.json +53 -2
- package/themes/aetheris.css +3 -1
- package/themes/translucent.css +8 -1
- package/themes/transparent.css +9 -1
- package/themes/zhupi-dark.css +1 -1
- package/themes/zhupi.css +1 -1
- package/web/dist/assets/{TerminalPanel-NerrJlTS.js → TerminalPanel-DD7I5_aC.js} +2 -2
- package/web/dist/assets/index-CpjA1YdT.css +1 -0
- package/web/dist/assets/index-nKn87VuM.js +678 -0
- package/web/dist/index.html +2 -2
- package/web/dist/sw.js +1 -1
- package/web/dist/assets/index-BdMaGCcs.css +0 -1
- package/web/dist/assets/index-ByCBN4Kt.js +0 -368
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,93 @@
|
|
|
12
12
|
|
|
13
13
|
暂无未发布内容。
|
|
14
14
|
|
|
15
|
+
## [0.101.0] — 2026-10-10
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **消息列表常驻渲染窗口可配置(#570)** —— 设置面板新增「常驻渲染消息数」(`keepRecentMessages`,范围 5–100 条,默认 15),用户可按机器性能与对话习惯自定义尾部完整渲染的消息数量,更早的历史消息自动折叠为可展开的摘要行;同时将惰性窗口化(占位符渲染)门槛与折叠判据解耦,配置项完整纳入预设白名单管理。
|
|
20
|
+
- **扩展左栏插件插槽与分区管理并支持插件登记运行态条目** —— 左栏插件插槽体系扩充,支持插件按项目工作区、运行中会话与历史会话三个不同分区分别登记插槽动作;开放插件向左栏直接注册带状态徽标(运行中/已完成/出错)的实时运行态条目。
|
|
21
|
+
- **插件市场收录 md-chat 社区对话归档插件(#581)** —— 官方插件清单新增 md-chat 社区对话归档插件,支持一键浏览与归档 Markdown 格式的会话记录。
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- **终端输出清洗与 ConPTY 吞输出彻底修复(#571、#572、#573)** —— 修复 Windows ConPTY 下由于哨兵未如期在真实输出之前回显,导致正文输出被整段误删吞掉的问题;终端输出清洗不再死板假定哨兵与正文顺序;哨兵每次执行注入随机 nonce,清洗严格按注入位置删行,规避真实输出包含哨兵字面量时被误杀;收尾清洗去除提示符残留;修复未闭合括号组或括号内部管道 `|` 被当成顶层限输出管道拆分的 Bug,未闭合组不再注入哨兵;语法不完整的 bash 命令直接拒绝并返回明确语法错误(不注入、不建空终端),不再空等后误判为「后台运行」;`#` 注释不再误判未闭合引号或管道;`terminal_read` 增加 `commandPending` 状态标志。
|
|
26
|
+
- **Windows 上扩展加载支持 file:// 协议 URL(#580)** —— Windows 平台上 `--import` 绝对路径(含驱动器盘符 `C:\`)改用 `file://` URL 规范传入 Node.js,修复 Node.js ESM 加载器抛出 `ERR_UNSUPPORTED_ESM_URL_SCHEME` 导致服务无法启动的严重问题,并补充加载异常捕获与友好控制台日志。
|
|
27
|
+
- **命令审批高危命中全量列出与规则表单源化(#578)** —— 命令审批弹窗中,同一规则在多段或复合命令中的每处命中均完整高亮并列出;卡片与降级高亮统一收敛至后端规则引擎事实源(彻底移除前端维护的第二份黑名单);补充 `git reset --hard`、`git clean -f` 等 git 破坏性操作的匹配规则。
|
|
28
|
+
- **会话清理不误杀第三方后台任务(#576)** —— 当当前进程内检测到正在运行的第三方后台任务(如 `.pi/tasks` 托管的任务)时保留会话运行时,切换工作目录或从界面移出会话时不再误发 SIGTERM 信号杀掉正在跑的后台任务。
|
|
29
|
+
- **悬空工具调用结果归因明确化(#574)** —— 服务重启或意外中断导致的悬空工具调用,合成结果按真实原因归因,不再一律误报为「超时/流卡死」,并向模型与用户友好提示命令可能已在系统后台部分执行。
|
|
30
|
+
- **用户主动中止渲染为中性状态(#575)** —— 用户主动点击停止或因新交互被抢占的回合,统一在中性样式下渲染为「已中止本轮」,消除红色的报错视觉干扰与不适宜的「立刻重试」按钮。
|
|
31
|
+
- **显式移出会话不再受「刚聊过」保护误拦(#579)** —— 会话列表中点击 ✕ 显式移出会话时,准确识别用户明确意图,不再被「刚聊过」安全保护拦截,避免弹出误导性文案。
|
|
32
|
+
- **会话置顶标记 📌 前置防截断(#568)** —— 左侧栏会话列表中将置顶图钉图标前置放置在会话标题前,避免因长标题发生 CSS 省略截断而将置顶标记完全隐藏。
|
|
33
|
+
- **跨标签页会话运行时去重与分支校准(#567)** —— 消除跨客户端或多标签页打开同一会话时可能产生的重复运行时实例,并在分支切换后校准过期的叶子节点引用。
|
|
34
|
+
|
|
35
|
+
<!-- auto-i18n:start -->
|
|
36
|
+
|
|
37
|
+
### i18n
|
|
38
|
+
|
|
39
|
+
- 前端新增 key(130):`settingsMcp`、`settingsMcpDesc`、`mcpReload`、`mcpAddServer`、`mcpFilterAll`、`mcpFilterGlobal`、`mcpFilterProject`、`mcpGlobalPath`、`mcpProjectPath`、`mcpEmptyTitle`、`mcpEmptyDesc`、`mcpQuickAdd`、`mcpScopeGlobal`、`mcpScopeProject`、`mcpScopeGlobalHint`、`mcpScopeProjectHint`、`mcpStatusRunning`、`mcpStatusStopped`、`mcpStatusError`、`mcpEnableHint`、`mcpDisableHint`、`mcpToolsCount`、`mcpDeleteConfirmTitle`、`mcpDeleteConfirmDesc`、`mcpAddModalTitle`、`mcpEditModalTitle`、`mcpPresetSelect`、`mcpScopeLabel`、`mcpNameLabel`、`mcpNamePlaceholder`、`mcpTransportLabel`、`mcpTransportStdio`、`mcpTransportHttp`、`mcpCommandLabel`、`mcpCommandPlaceholder`、`mcpArgsLabel`、`mcpArgsPlaceholder`、`mcpCwdLabel`、`mcpCwdPlaceholder`、`mcpEnvLabel`、`mcpAddEnv`、`mcpEnvKeyPlaceholder`、`mcpEnvValuePlaceholder`、`mcpUrlLabel`、`mcpUrlPlaceholder`、`mcpHeadersLabel`、`mcpAddHeader`、`mcpHeaderKeyPlaceholder`、`mcpHeaderValuePlaceholder`、`mcpDescriptionLabel`、`mcpDescriptionPlaceholder`、`mcpEnabledLabel`、`mcpEnabledDesc`、`mcpPresetCustom`、`mcpPresetCustomDesc`、`mcpPresetFilesystem`、`mcpPresetFilesystemDesc`、`mcpPresetFetch`、`mcpPresetFetchDesc`、`mcpPresetMemory`、`mcpPresetMemoryDesc`、`mcpPresetGithub`、`mcpPresetGithubDesc`、`mcpPresetSqlite`、`mcpPresetSqliteDesc`、`mcpTabConfigured`、`mcpTabMarket`、`mcpBrowseMarket`、`mcpMarketSearchPlaceholder`、`mcpBadgeOfficial`、`mcpConfigured`、`mcpAddGlobal`、`mcpAddProject`、`mcpAddGlobalHint`、`mcpAddProjectHint`、`skillTabInstalled`、`skillTabMarket`、`skillEmptyDesc`、`skillBrowseMarket`、`skillMarketSearchPlaceholder`、`skillCatAll`、`skillCatQuality`、`skillCatWorkflow`、`skillCatArchitecture`、`skillCatDevops`、`skillCatStack`、`skillInspectPrompt`、`skillInstalled`、`skillInstallGlobal`、`skillInstallProject`、`skillInstallGlobalHint`、`skillInstallProjectHint`、`skillInspectModalTitle`、`mcpSourceSelectLabel`、`mcpSourceSmithery`、`mcpSourceGithub`、`mcpSourceCustom`、`mcpSourceCustomPlaceholder`、`mcpMarketLoading`、`mcpMarketRetry`、`skillRepoSelect`、`skillRepoDefault`、`skillRepoCustom`、`skillRepoCustomPlaceholder`、`skillMarketLoading`、`skillContentLoading`、`skillMarketRetry`、`turnStopped`、`keepRecent`、`keepRecentDesc`、`uiLayoutLeftProjectsActions`、`uiLayoutLeftProject`、`uiLayoutLeftRunningActions`、`uiLayoutLeftHistoryActions`、`uiLayoutLeftSections`、`uiLayoutLeftRunning`、`uiLayoutLeftHistory`、`leftPanelPluginGroup`、`pluginRunStatusRunning`、`pluginRunStatusDone`、`pluginRunStatusError`、`uiLayoutContextProject`、`codemodeEnabledDesc`、`codemodeOffHint`、`codemodeNestedCalls`、`codemodeScript`、`codemodeFullOutput`、`toolSearchEnabledDesc`、`toolSearchOffHint`、`toolSearchLoaded`
|
|
40
|
+
- 前端中文变更(1):`pluginTopbarMore`
|
|
41
|
+
- 前端英文变更(1):`pluginTopbarMore`
|
|
42
|
+
- 服务端新增 key(1):`terminals.bash.incomplete`
|
|
43
|
+
- 服务端文案变更(2):`scm.commitmsg.timeout`、`terminals.bash.timeout`
|
|
44
|
+
- 服务端删除 key(1):`terminals.bash.nosentinel.note`
|
|
45
|
+
|
|
46
|
+
<!-- auto-i18n:end -->
|
|
47
|
+
|
|
48
|
+
## [0.100.0] — 2026-10-08
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- **高危命令高亮与命中清单(#566)** —— 执行审查与人机协同审批全面强化:审批弹窗展示结构化的「高危命中清单」(精确指出命中哪条规则、哪个字段、第几个字符起以及命中片段内容),针对 bash 命令在转义 JSON 参数框上方呈现直观高亮的命令预览,解决多命令串联时肉眼难寻危险点的问题;对话中的终端命令卡片(`Message` 与 `ToolCallBlock`)以及审查者执行证据(`goal-evidence`)同步标记高危命令片段。判定单源来自同一规则引擎,保持纯展示增强与现有「显示即提交」参数契约。回归:`tests/unit/approval-rules.test.ts`、`tests/unit/tool-approval.test.ts`。
|
|
53
|
+
- **左栏「运行的对话」子代理可折叠(#564)** —— 父对话(挂有子代理时)行首增加展开/折叠箭头,点按可一键收起其所有后代子代理;折叠状态持久化在本地存储(刷新与切对话保持)。折叠后父行展示「{n} 个子代理」徽标;当后台子代理正在运行(绿色脉冲呼吸灯)、等待问卷输入(问号徽标)或报错时,父行徽标同步显色提示,绝不静默吞没子代理状态。关闭已结束子代理与会话右键菜单不受折叠影响。回归:`tests/unit/conv-groups.test.ts`。
|
|
54
|
+
- **工具描述可编辑(设置→工具区「编辑文案」)** —— 每个工具行新增编辑入口,三处模型可见文案都可逐工具覆盖:`description`(tool schema 里的工具说明)、`promptSnippet`(系统提示词 Available tools 列表的一行)、`promptGuidelines`(Guidelines 段要点);留空 = 用工具自带默认(默认文案折叠可见,可一键恢复)。覆盖持久化在设置里(不进预设),改动即时对**所有工具**生效(核心内置 / 本项目工具 / 插件 / MCP),会话中途改动也会重新声明工具;DSH 引擎无 pi 工具注册面,入口隐藏。
|
|
55
|
+
- **工具延迟加载(默认开,可在设置→工具区关掉)** —— 默认只有核心工具(bash/read/edit/write)与 `load_tools` 的完整参数 schema 常驻;其余工具在系统提示词里只有「名字 + 一行摘要」(目录),模型要用时先调 `load_tools(["patch","lsp"])`,那批工具的 schema 才随之下发(加载后本对话后续轮次都可用;已被关闭/预设不允许/计划模式拦截的名字会被拒绝并给出原因)。常驻工具 schema 约 **33k → 7k 字符**,系统提示词也由 ~8.6k 降到 ~6.7k。**不损坏供应商前缀缓存**:系统提示词的目录段与已加载集合无关(逐字节不变)、被加载工具的 guidelines 随加载回执而非提示词、tools 数组只产生追加增量(回归 `lazy-tools-test` 逐字断言)。激活由用户/模型触发;只影响新会话与之后的门控重放,不会反向清空正在跑的对话。DSH 引擎不适用。
|
|
56
|
+
- **建议操作按钮(内联标记 `[[action:suggest:…]]`)** —— 模型可以在回复里挂一排「下一步」按钮:正文中的 `[[action:suggest:继续]]` 渲染成对话最底部的按钮,点一下就以该文字**作为用户消息**直接发出(你自己发新消息后建议自动清空)。按钮文字与实际发送内容可以不同:`[[action:suggest:看详情,prompt=把刚才的 diff 展开]]`(`label=` / `prompt=` 的 kwargs 写法同样支持),`[[action:clear:all]]` 清空当前建议。标记设置里对应新增「建议操作标记 action/suggest」(`suggest` 是别名),关掉即不解析;建议随对话落盘,刷新页面或过户到另一台设备后按钮仍在。
|
|
57
|
+
- **新插件「进程管家」(pm2-manager)** —— 把 AI 起的后台任务统一交给 pm2:顶栏「后台任务」面板里多出「pm2 托管的应用」一节(状态 / CPU / 内存 / 重启次数 / 日志,可单独停止、重启、删除),AI 同时拿到一个 `pm2` 工具(list / start / stop / restart / delete / logs / describe / install / version),两条路径看的是同一份列表。**插件不接管 bash**:不对命令做任何拦截或追加提示,用不用 pm2 由模型和用户自行决定。机器上没有 pm2 时面板里有「安装 pm2」按钮(`npm i -g pm2`),AI 也能直接装。安装:插件市场搜「进程管家」。
|
|
58
|
+
- **后台任务自动清理** —— AI 起的孤儿端口实例可以定时收拾:面板里选阈值(分钟;0 = 关,默认关;对应设置 / 预设字段「后台任务自动清理」),到点的实例被停掉;被 📌 钉住的永远不清理,另有「立即清理」按钮按当前阈值清一次(策略为关时兜底 30 分钟)。阈值改完即时生效,不用重启服务;pi 与 DSH 两个引擎行为一致。
|
|
59
|
+
- **设置 → 界面布局新增「编辑图标」入口** —— 以前只有侧栏能开拖拽式图标编辑器,现在设置面板的「界面布局」页签里直接有按钮打开它(同一个编辑器、同一份布局偏好);该页签的条目清单里同时多了「后台任务面板」(`tasks.panel`),面板内的插件条目从此可排序 / 隐藏。
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- **「进程管家」插件不再强行接管后台启动** —— 移除 `host.onToolPre` 硬闸门(`nohup` / 尾部 `&` / `start` / `Start-Process` 等脱管写法不再被拒并指路)、`#bg-ok` 逃生门与随之而来的告知通知、`host.onToolPost` 的 pm2 复核催办,以及它配套的 `guardMode` 设置项;`description` / `promptGuidelines` 里「被拒后改用 action=start」那一条同步删除。插件现在只提供两样东西:`pm2` 工具(不变)与「pm2 托管的应用」面板(不再显示拦截开关状态)—— 拦不拦、用不用 pm2,回到模型与用户自己。
|
|
64
|
+
|
|
65
|
+
- **预设覆盖到全部设置 + 导入时可选** —— 「保存为预设 / 导出 / 分享到社区」现在携带**全部设置**(`ClientSettings` 47 个字段:逐工具文案覆盖、工具按需加载、各专用提示词、界面布局/显示/快捷短语、子代理默认模型、隐藏插件等,与设置页一一对应;字段清单与分组在零依赖的 `server/preset-fields.ts`,前后端共用)。旧版文档、以及「只导入一部分」都能用:`SettingsPreset` 改为 `Partial<ClientSettings>`,应用预设时缺哪个字段就保持当前值。**导入预览里可以按分组/按字段勾选**(默认全选;未勾选的字段不落盘、也不改你当前的值;一个都不勾则拒写)。仍不进预设的:标记开关、审批规则、子代理模板、以及纯前端 localStorage 偏好(墙纸/宽屏/声音通知等)——它们各在自己的存储里。
|
|
66
|
+
- **底栏 / 侧栏 / 顶栏的图标条目统一到同一个组件** —— 三处栏位原先各写一套「图标 + 文字 + 动作」渲染(图标尺寸、文字截断、悬停态、插件条目的点击分派各不相同,同一个插件在不同栏位表现不一致),现在统一走 `web/src/components/BarItem.tsx`:一份实现负责图标 / 文案 / 禁用态 / 点击分派,插件条目在三处外观与行为一致。顶栏里未被你显式排过序的插件视图默认从 Git 图标之后开始排,你拖过位置就严格按你的顺序。内部重构,已保存的布局偏好(排序 / 隐藏)不受影响。
|
|
67
|
+
|
|
68
|
+
- **工具描述进一步精简(模型可见文字 -11.0%,schema -1924 字符)** —— 去掉描述 / guidelines / 参数说明里已由 JSON Schema 约束、参数自身或另一处工具信息覆盖的重复句(`browser_page` 的 target/timeoutMs 说明与 op 矩阵重复、`delegate_task` 的模板名枚举与收集方式说明、`compact_context` 的 token 区间(schema 已有 min/max)、`subagent`/`conversation_read`/`present_files`/`schedule` 的多余措辞等),并按项目自身口径(description = 做什么 + 副作用,不写「何时用」)收紧多处文案;`lsp` 的动作表从多行压缩成一段(op 与语义不变)。`edit`:SDK 原描述与它自带的 guidelines 逐条复述同一批规则,无扩展覆盖时(fallback)改由本项目提供精简版(有扩展 edit 时仍用扩展文案,参数 schema/执行体不变)。30 个目录/核心工具:文字合计 12734→11328 字符,参数说明 19480→18594,下发工具 schema 35085→33161。
|
|
69
|
+
- **定时任务三件套合并为单 `schedule` 工具** —— `schedule_task` / `schedule_list` / `schedule_cancel` 三个独立工具合并为一个 action 式 `schedule`:`action=create` 建任务、`action=list` 查看、`action=cancel` 按 id 取消。工具条目从 3 个减为 1 个(设置页「工具」照常循环渲染;旧版本关掉过任意一个 `schedule_*` 的用户会保持关闭,禁用名单自动迁移)。计划 / 审查者 / 目标审查三道只读闸门的派发名单同步为 `schedule`(保守起见整工具拒,调度面在这三道闸门都不需要)。
|
|
70
|
+
- **webmail 插件六个 AI 工具合并为单 `mail` 工具** —— `mail_list` / `mail_read` / `mail_search` / `mail_send` / `mail_manage` / `mail_folders` 合并为一个 action 式 `mail`(`action=list|read|search|send|manage|folders`),邮件条数、正文、发信与批量标记/删除的返回文本与参数语义不变;`mail_send` 原有的「发送前先与用户确认一次」守则原样保留。工具条目从 6 个减为 1 个;设置页「注册的 AI 工具」开关同步为单行。
|
|
71
|
+
- **工具提示词全量收敛(少 18.5% 字符)** —— 模型同一轮里能同时看到三处工具信息(tool schema 的 `description`、`Available tools` 列表里的 `promptSnippet`、`Guidelines` 段里的 `promptGuidelines`),过去大量内容是同一句话的三份复述。现在职责严格分开:`description` 只写「做什么 + 副作用/边界」(≤600c)、`promptSnippet` 只写触发条件(≤80c、不再重复工具名前缀、不再复述描述)、`promptGuidelines` 只管「何时用/顺序/禁止/跨工具路由」;同一个参数块被多个工具复用的(SSH 凭据、数据库连接/库参数、桌面坐标)抽成共享常量。服务端内置工具少 6.1k 字符(-24.7%,其中 1.1k 是 `terminals.ts` 里**永不发送**的终端版 bash 文案死副本),插件侧少 3.8k(-13.5%)。bash 的提示词与参数 schema 统一到新增的 `server/tool-prompts.ts`(原生/终端/分流三路径单源)。守卫升级:`tests/unit/tool-prompt-hygiene.test.ts` 新增长度上限、snippet 工具名前缀、snippet/guideline 复述检测与同文件同义重复检测。
|
|
72
|
+
- **工作区影子快照作用域收敛到对话 cwd 子树(Dual-State Rollback)** —— 之前 `createWorkspaceSnapshot` / `restoreWorkspaceSnapshot` 按整仓处理(`git add -A` + `git read-tree -u --reset` + 裸 `git clean -fd`),对话 cwd 在子目录时回滚会误伤同仓库的兄弟目录与仓库根文件。现在快照只暂存 cwd 子树(`git add -A -- .`,commit-tree 顶层只有该子目录一个条目),还原区分根目录与子目录:根目录保持原有的原子 `read-tree` + `clean`;子目录采用「`git rm -r --cached` + `git checkout <ref> -- <前缀>` + `git clean -fd -- <前缀>`」,前缀取自 `git rev-parse --show-prefix` 并以 `:(top)` 锚定到仓库根,快照中无对应子树文件时容错跳过检出;兄弟目录与仓库根在还原后保持被篡改的状态不变。回归:`tests/unit/workspace-snapshot.test.ts`(覆盖子目录、嵌套子目录、空子目录与空根目录作用域用例)。
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
|
|
76
|
+
- **SDK 跟随逻辑支持 PATH 与多全局包管理器探测(#559)** —— 修复在 git 克隆部署或直跑 dist 场景下,祖先链扫描够不到全局 prefix 导致「安装全局引擎后重启界面仍跑旧自带副本」的问题。新增 PATH 探测(符号链接、Windows .cmd/.ps1 解析、同级/上级 node_modules)与 npm/pnpm 全局 prefix 目录探测,并保持绝不降级的既有口径。回归:`tests/unit/sdk-origin.test.ts`。
|
|
77
|
+
- **pnpm 隔离安装下 SDK 缺失导致启动崩溃修复(#562)** —— 修复 pnpm 全局安装在裁剪/隔离可选依赖时,因未安装自带副本且 Node 静态 import 找不到 `@earendil-works/pi-coding-agent` 而抛错崩溃的问题。当检测到随包自带副本不存在时,自动切换至选用机器上发现的可用全局 SDK 副本,并在钩子中补充 `typebox` 的兜底解析路径;若全机均未安装任何 SDK,启动时输出双语清晰指引。回归:`tests/unit/resolve-global-sdk.test.ts`。
|
|
78
|
+
- **问卷「补充回答」输入框里敲英文按回车,不再被当成提交** —— macOS 中文输入法(鼠须管 / Squirrel、微信输入法等)在编码态下敲 Enter 是「把未上屏的编码原样上屏」,但问卷输入框只判了 `e.key === "Enter"`,于是那记上屏回车直接触发「下一步 / 提交」,刚上屏的文字被当作答案发给模型、面板随之收起,而服务端挂起提问已 resolve,**没有修改答案的入口**。现在问卷输入框与聊天输入框共用同一套输入法判定(组合态 `isComposing`、退化环境的 `keyCode 229`、以及 compositionend 后 50ms 内的那个 `isComposing=false` 回车),上屏回车一律放行给输入法;聊天输入框的既有行为不变。回归:`tests/unit/dsh-question-dialog.test.ts`、`tests/unit/ime-guard.test.ts`。
|
|
79
|
+
|
|
80
|
+
- **界面布局页的「改名」对内置条目是假承诺** —— 底栏数字徽标(上下文 / 成本 / 缓存命中 / 消息数 / 连接态…)与顶栏按钮的文案一直是写死的 i18n 与实际数值,改名只写进设置页那一行、界面上不动,重开设置有值、条目标题却还是旧的。现在合并引擎给「被显式指定过的文案」打旗(`UiSlotEntry.labelExplicit`,用户改名与插件 `arrange.label` 都算),渲染层看旗让位:名字型条目用你的文案顶掉内置文案,数值型条目把名字插在数值前(改名只换名字,不吞掉实时数据;成本仍是 `名字 $0.0123`)。没改过名的条目渲染结果与旧版逐字节一致。回归:`tests/unit/bar-item-unified.test.ts`、`tests/ui-layout-ui-test.mjs`(该脚本里两处按「底栏文字里有『上下文』」定位的旧断言一并改成按条目 id 定位 —— 它们本来永远失败,只是脚本不在 CI 里没被发现)。
|
|
81
|
+
- **pi 启动时报「宿主提供的扩展包必须只声明在 peerDependencies」** —— `@earendil-works/pi-coding-agent` 与 `typebox` 同时躺在 `dependencies` 与 `peerDependencies` 里,pi 的扩展加载器一看到 `dependencies` 就告警(怕装下嵌套副本绕开加载器注入、搞出两份 typebox 运行时)。这两个包本包**确实要**用(服务端进程直接 import,`PI_WEB_SDK=bundled` 也承诺自带副本可用),所以移进 `optionalDependencies`:npm 默认照装(自带副本不丢),而加载器只读 `dependencies`,告警消失。守卫 `tests/unit/extension-host-packages.test.ts` 拦「谁搬回去」。
|
|
82
|
+
- **过户夭折后对话变成「幽灵会话」(#556)** —— 过户是「源会话先摘除、目标会话再接入」两步,中间那一瞬间对话两头都不挂;只要第二步报错,runtime 还在跑但谁的列表里都没有,刷新页面也找不回来,只有重启服务才能靠落盘会话恢复。现在这一步是**事务性**的:接入失败就把整包对话原样搬回源页面(含订阅 / 终端 / 待答问卷 / 待审批 / 看门狗剩余时间)并切回去,两边都收到诚实的回执;万不得已也宁可留在目标页面的运行列表里,绝不落到无人持有的空档。过户进来的主对话同时显式置 `listed`,即使后续切换失败也一定在运行列表里可见。回归:`tests/takeover-rollback-test.mjs`(故障注入)。
|
|
83
|
+
- **手机上关掉页面后,另一台设备上「看不到也过不了户」的对话现在能接管了** —— 手机上 run 途中把页面关掉(run 在服务端继续跑完),换一台设备打开网页时,那条对话此前既不在左栏「运行的对话」里(断连残骸按 #291 被跳过),也没法过户;落地提示却让人「在左栏过户或从历史里打开」,而从历史里打开等于给同一份 JSONL 造第二个 writer。现在断连残骸的对话行在宽限期内(`PI_WEB_OFFLINE_ROWS_TTL_MS`,默认 30 分钟)仍会下发,带「离线」徽标、点两次即可过户到当前页(跑动中的任务也搬 runtime 本体过来继续跑完);宽限期过后行自动消失(#291「残骸不永久占位」仍然成立),`0`/`off` 可关掉离线行回到旧口径。回归:`tests/offline-takeover-test.mjs`、`tests/elsewhere-lifecycle-test.mjs`、`tests/unit/elsewhere-dedup.test.ts`。
|
|
84
|
+
- **朱批 / 朱批·夜 主题的行内代码看不清** —— 两套主题的 `--link-soft`(文件预览、问卷对话框里内联代码 chip 的前景色)恰好写反了:浅色主题拿了浅桃色 `#e8c9b8`、深色主题拿了深棕 `#5a3020`,叠上 chip 底色后对比度只剩 1.2~1.4:1(其余主题 2.4~12:1),行内代码几乎隐形。已对调为 `#5a3020`(浅色,8.4:1)/ `#e8c9b8`(深色,9.7:1)。新增守卫 `tests/unit/theme-inline-code-contrast.test.ts`:逐套主题体检 `--link-soft` 与 `--bg` 的对比度,拦「前景色写反」这类灾难性回归。
|
|
85
|
+
- **冷启动 / 手机唤醒后卡在加载态** —— 新标签页或刷新页面首次接入时,服务端重发的快照可能只是增量 `snapshot_delta`,客户端拿不到全量基线就一直停在加载态;现在「新连接首次快照」与「快照重发」一律强制走全量(`forceFull`)。另外手机锁屏 / 切后台挂一整晚后唤醒,连接常常是「开着但不通」的半死状态,页面现在会在 `visibilitychange` / `pageshow` / `online` 时主动校验并立刻重连(掐掉退避等待),不用再手动刷新。
|
|
86
|
+
- **新建分叉会把提问前面的附件卡片一起带进去** —— `fork` / 分支的截断点原先按「上一条消息」取,会把服务端提问前置注入的附件条目(文件引用等)算进上一轮,于是分叉出来的新会话开头挂着一份本该属于原轮次的附件卡片。现在截断点先上溯跳过这些前置条目,取到**本轮提问之前**的基准 entry(首轮提问则为空),补 `session-fork` 单测。
|
|
87
|
+
- **插件注册的守卫晚一步注入就不生效** —— 插件在服务启动之后才加载 / 重载时,此前已绑定的工具守卫读到的是空值,等于闸门静默失效。现在这类「可能晚一点才注入」的守卫包成**调用时解析**的代理(回归 `tests/unit/tool-guard-late-binding.test.ts`),启动顺序不再影响拦截。
|
|
88
|
+
- **点开「后台任务」面板时,进程管家那块总会闪一下「未检测到 pm2」** —— 面板 bundle 原先的初始状态写死 `installed:false`,首帧先把黄条画出来,状态回来后再抹掉;且宿主升级后 `<dataDir>/plugins` 里的已安装官方插件未自动同步更新(停留在旧版本)。现在三个层面彻底根治:① 服务端新增**随包官方插件自动热同步机制**(启动/重载时若已装插件版本落后于随包 catalog 官方插件,自动备份并增量升级,不再滞留旧版代码);② 客户端增加**模块级已知状态缓存与异常隔离**(同一会话内二次打开首帧直接复用已知结论秒开无闪烁;网络或接口异常绝不把环境误报为「未检测到」);③ 服务端扩充 Windows 默认 npm 与 PATH 候选路径,启动时毫秒级命中,并为探测增加 Promise 并发防抖。回归:`tests/unit/pm2-manager-panel.test.ts`、`tests/unit/plugin-manager.test.ts`。插件版本 0.3.1 → 0.3.2。
|
|
89
|
+
|
|
90
|
+
<!-- auto-i18n:start -->
|
|
91
|
+
|
|
92
|
+
### i18n
|
|
93
|
+
|
|
94
|
+
- 前端新增 key(97):`bgTaskKeep`、`bgTaskKeepOn`、`bgTaskCleanup`、`bgTaskCleanupOff`、`bgTaskCleanupMinutes`、`bgTaskCleanupHint`、`bgTaskCleanNow`、`bgTaskCleanNowHint`、`collapseSubagents`、`expandSubagents`、`subagentBadgeCount`、`subagentsStreamingTip`、`subagentsQuestionTip`、`subagentsErrorTip`、`subagentsCountTip`、`toolApprovalHitsTitle`、`approvalHitPos`、`approvalCommandPreview`、`markerGroupAction`、`actionSuggestions`、`actionSuggestionsTip`、`toolLazyLoading`、`toolLazyLoadingDesc`、`uiLayoutTasksPanel`、`presetShare`、`presetShareShareBtn`、`presetShareImportBtn`、`presetShareBrowseBtn`、`presetShareTabExport`、`presetShareTabImport`、`presetShareTabBrowse`、`presetShareSource`、`presetShareSourceCurrent`、`presetShareDescription`、`presetShareDescriptionPlaceholder`、`presetShareTags`、`presetShareTagsPlaceholder`、`presetShareAuthor`、`presetExportJson`、`presetExportDownload`、`presetShareSubmit`、`presetShareHint`、`presetShareSubmitting`、`presetShareOpenWebTitle`、`presetShareOpenWebBtn`、`presetShareOpenIssueBtn`、`presetShareCopyJson`、`presetSharePopupBlocked`、`presetShareBrowserCopied`、`presetImportText`、`presetImportTextPlaceholder`、`presetImportPickFile`、`presetImportFromUrl`、`presetImportUrlPlaceholder`、`presetImportPreview`、`presetImportFields`、`presetImportIgnored`、`presetImportRejected`、`presetImportReplaces`、`presetImportApply`、`presetImportConfirm`、`presetImportPick`、`presetImportSelectAll`、`presetImportSelectNone`、`presetImportAllSelected`、`presetImportNoneSelected`、`presetImportPickHint`、`presetGroupPrompt`、`presetGroupTools`、`presetGroupTerminal`、`presetGroupSkills`、`presetGroupAi`、`presetGroupUi`、`presetGroupEngine`、`presetGroupOther`、`presetImportImported`、`presetBrowseEmpty`、`presetBrowseLoading`、`presetBrowseSearch`、`presetBrowseRefresh`、`presetBrowseCached`、`presetBrowseImport`、`presetBrowseIssue`、`presetBadgeTemplate`、`presetBadgeReview`、`toolPromptEdit`、`toolPromptEdited`、`toolPromptHint`、`toolPromptDescription`、`toolPromptSnippet`、`toolPromptGuidelines`、`toolPromptDefault`、`toolPromptReset`、`toolPromptSave`、`toolPromptUnavailable`、`elsewhereOfflineBadge`、`elsewhereOfflineTip`
|
|
95
|
+
- 前端中文变更(2):`settingsMarkersDesc`、`scheduleTaskEnabledDesc`
|
|
96
|
+
- 前端英文变更(2):`settingsMarkersDesc`、`scheduleTaskEnabledDesc`
|
|
97
|
+
- 服务端新增 key(38):`loadtools.notready`、`loadtools.unknown`、`loadtools.always`、`loadtools.already`、`loadtools.disabled`、`loadtools.preset`、`goal.role.review.feedback.pass`、`goal.role.review.feedback.prev`、`goal.role.review.feedback.empty`、`loadtools.names.empty`、`loadtools.loaded`、`loadtools.rejected`、`loadtools.none`、`markers.action.guidance`、`markers.action.cleared`、`markers.action.unknown.operation`、`markers.action.requires.text`、`markers.action.already.exists`、`markers.action.added`、`presets.catalog.disabled`、`presets.catalog.url`、`presets.catalog.failed`、`presets.share.currentName`、`presets.share.missing`、`presets.import.noneSelected`、`presets.import.url.host`、`presets.import.url.scheme`、`presets.import.fetch.failed`、`presets.share.apiTokenInvalid`、`presets.share.apiTokenPermission`、`presets.share.apiGeneralFailed`、`presets.share.ghMissingHint`、`presets.share.ghNotLoggedInHint`、`presets.share.fallbackHint`、`presets.share.disabled`、`prompt.tools.lazy`、`sched.action.missing`、`sched.action.unknown`
|
|
98
|
+
- 服务端文案变更(4):`goal.role.review`、`sched.list.empty`、`sched.cancel.empty.id`、`sched.cancel.not.found`
|
|
99
|
+
|
|
100
|
+
<!-- auto-i18n:end -->
|
|
101
|
+
|
|
15
102
|
## [0.99.0] — 2026-10-03
|
|
16
103
|
|
|
17
104
|
### Added
|
|
@@ -1481,7 +1568,9 @@ when?, children?}`,也收 `topbar` / `settings` 这类简写别名);宿主
|
|
|
1481
1568
|
- 0.35.1(2026-08-27):编辑重问保留附件(#18)+ 全窗口拖放(#19)。
|
|
1482
1569
|
- 0.29.0(2026-08-23):全局搜索弹窗(Ctrl+K)+ 消息列表惰性窗口化。
|
|
1483
1570
|
|
|
1484
|
-
[Unreleased]: https://github.com/xing-shuyin/pi-web-ui/compare/v0.
|
|
1571
|
+
[Unreleased]: https://github.com/xing-shuyin/pi-web-ui/compare/v0.101.0...main
|
|
1572
|
+
[0.101.0]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.101.0
|
|
1573
|
+
[0.100.0]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.100.0
|
|
1485
1574
|
[0.99.0]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.99.0
|
|
1486
1575
|
[0.98.0]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.98.0
|
|
1487
1576
|
[0.97.0]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.97.0
|
package/README.md
CHANGED
|
@@ -146,17 +146,19 @@ QQ群 1126050727
|
|
|
146
146
|
- **Extensions** — per-extension switches, and one-click uninstall for `npm:`-installed ones (runs `pi remove npm:<pkg>` in a reusable terminal tab).
|
|
147
147
|
- **UI plugins**, **goal review**, **vision bridge** and **subagent templates** have their own pages — see [Plugins](#plugins).
|
|
148
148
|
- **Presets** — save the current combination (prompt template/mode/overrides, skill & extension switches, tool switches, terminal-bash settings, retry count, reviewer prompt, skill full-text list) under a name and re-apply or delete it; deliberately _not_ captured (questionnaire, goal mode, display prefs, vision bridge, default subagent model, quick phrases) stay as they are.
|
|
149
|
+
- **Import / export / share presets** — a preset is a portable JSON file (`pi-web-ui-preset` v1): export to the clipboard or a `.json` file, import by pasting, picking a file or **by URL** (with a preview first — name, description, fields that will be written, unknown fields ignored, whether it overwrites a same-named preset; nothing is stored until you confirm, and you can apply it right away), or share it to the community repo [pi-web-ui-presets](https://github.com/xing-shuyin/pi-web-ui-presets) in one click (submitted for you via `gh` or a GitHub token; with neither, a **prefilled** new-issue page opens — just hit Submit; a repo bot validates and commits it). The **Browse shared** tab lists the repo catalog with search and one-click import. Imported JSON is sanitized server-side against a 19-field whitelist (unknown fields ignored, wrong types dropped), URL imports only allow public http(s) hosts (private/loopback blocked) and documents are capped at 512 KB. See [docs/preset-sharing.md](docs/preset-sharing.md).
|
|
149
150
|
- **Apply timing** — tool switches, retry count, display preferences, markers and the skill full-text list apply immediately; the prompt template/overrides and skill/extension switches need a session reload, and a change made mid-answer is deferred with a “takes effect after this reply” notice.
|
|
150
151
|
- **Display preferences** — thinking blocks expanded or collapsed by default, tool cards expanded by default, wide chat column (drops the 860 px cap on very wide viewports), project name in the browser tab title, and a chat wallpaper (image URL or upload, with dim and blur sliders).
|
|
151
152
|
|
|
152
153
|
### 🧩 Agent tools & inline markers
|
|
153
154
|
|
|
154
|
-
- **Tool switches** — Settings → Tools lists every optional agent tool as its own switch: the unified `subagent` tool (default on), and
|
|
155
|
+
- **Tool switches** — Settings → Tools lists every optional agent tool as its own switch: the unified `subagent` tool (default on), and 15 other tools — `edit_soft`, `browser_page`, `eval`, and `lsp` (default off), plus `delegate_task`, `ask_user_question`, `todo_list`, `conversation_read`, `present_files`, `skill`, `schedule`, `claim_files`, `plan_update`, `patch`, and `compact_context` (default on). Toggling is live (no reload) and the tools stay registered so they can come back; core built-in tools (`bash`, `read`, `write`, `edit`) are managed in their own Core Tools section.
|
|
155
156
|
- **Inline markers** — instead of a tool round-trip the AI writes state changes straight into its reply: `[[todo:new:<subject>]]` / `[[todo:set:<id>,in_progress]]` / `[[todo:remove:<id>]]` / `[[todo:dep:<id>,blocks=<id>]]` for the task list, `[[notify:<level>:<message>]]` for a non-interruptive notice, and `[[conv:rename:<title>]]` to retitle the chat. Markers are applied as soon as a reply bubble is final, a bad marker comes back as a browser notice, and the task list also renders as a live widget under the file tree (`N/M done` with ✓ / ◐ / ○) that follows the active conversation and survives a reload — it is stored in that conversation's own session branch. Settings → Tools has a master switch plus one switch per marker (these are global, shared by all browsers).
|
|
156
157
|
- **`edit_soft`** — a looser `edit` (default off) for when indentation or whitespace makes the built-in tool fail: exact substring first, then trimmed line-core matching, `newText` written verbatim with the file's line endings/BOM preserved, and a diff + unified patch in the result. It also tolerates sloppy input (a JSON string, a bare object, legacy top-level `oldText`/`newText`).
|
|
157
158
|
- **`delegate_task`** — hands a specialist template a six-section brief (TASK / EXPECTED OUTCOME / REQUIRED TOOLS / MUST DO / MUST NOT DO / CONTEXT) validated on the server: a missing template, a task under 20 characters or any empty section is rejected, and the error tells the model which templates it may use. Cards render the brief as labelled sections, and a finished delegation gets a button that jumps to the subagent's conversation.
|
|
158
159
|
- **`ask_user_question`** — the pi engine has no questionnaire tool, so pi-web-ui adds one: the model asks structured questions (single/multi-select with rich option previews, plus free text) which open as a dialog; answers go back as the tool result, cancelling returns a tool error, waiting for you is exempt from the tool watchdog, and an unanswered questionnaire survives a page refresh or reconnect.
|
|
159
|
-
- **MCP
|
|
160
|
+
- **MCP server management & public market** — Settings → MCP Servers provides a full GUI to manage Model Context Protocol servers: supports Pi global (`~/.pi/agent/mcp.json`) and project-level (`.pi/mcp.json`) configurations. Easily add, edit, delete, and enable/disable servers, inspect live status and advertised tools; connect to the Smithery public registry (`api.smithery.ai`) with 1000+ servers, GitHub official reference repositories (`modelcontextprotocol/servers`), or custom catalog URLs. One-click addition to global or project scope with auto hot-reloading.
|
|
161
|
+
- **Skill market & GitHub repository sync** — Settings → Skills offers installed skill management alongside a live public Skill Market adhering to the Agent Skills specification; directly connects to the official Anthropic Skills repo (`anthropics/skills`) or any custom GitHub repository (`owner/repo`). Live search, remote prompt inspection (`SKILL.md`), and one-click installation into user global (`~/.pi/agent/skills`) or project-level (`.pi/skills`) directories with live session reload.
|
|
160
162
|
- **Extension UI bridge** — pi extensions can drive the browser: `setWidget` renders live panels under the file tree (click a title to open it centred), `setStatus` puts text in the status bar, `notify` raises a toast, and `select` / `confirm` / `input` open an inline request panel above the composer with Markdown-rendered options (Esc cancels). ANSI colour codes in widget text are stripped, so extension footers don't arrive as escape-sequence noise.
|
|
161
163
|
- **Plugin extras** — plugins can register `/commands` (badge “plugin”, executed server-side without spending tokens), register background tasks with their own stop button, declare a settings form, subscribe to run/tool/conversation events, and reach the host from their client bundle via `window.__piWebUiHost`. See [Plugins](#plugins).
|
|
162
164
|
|
|
@@ -531,19 +533,20 @@ up in the UI.
|
|
|
531
533
|
These plugins ship in this repository (`plugins/<id>/`) and can be installed
|
|
532
534
|
straight from GitHub:
|
|
533
535
|
|
|
534
|
-
| Plugin | What it does
|
|
535
|
-
| -------------------------------------------------------------------------------------------- |
|
|
536
|
-
| 📬 [webmail](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/webmail) | IMAP inbox browsing / search / read / mark / delete + SMTP sending, new-mail notifications, and an optional "allow AI to manage my mailbox" switch (six `mail_*` agent tools). Auto-installs its npm deps on first activation.
|
|
537
|
-
| 🗄️ [db-client](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/db-client) | Database workbench: connection manager + schema tree for MySQL / PostgreSQL / SQLite / SQL Server / MongoDB / Redis — table structure, paginated data with sorting, SQL editor, and row editing. Drivers auto-install on first use.
|
|
538
|
-
| 📝 [vscode-editor](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/vscode-editor) | VS Code-like workbench: multi-root file tree (local + SSH hosts), CodeMirror multi-tab editor, Remote-SSH remote file browsing/editing, draggable multi-terminal panel (xterm.js), SFTP sync & upload/download to your computer. Auto-installs `ssh2`.
|
|
539
|
-
|
|
|
540
|
-
|
|
|
541
|
-
|
|
|
542
|
-
|
|
|
543
|
-
|
|
|
544
|
-
|
|
|
545
|
-
|
|
|
546
|
-
|
|
|
536
|
+
| Plugin | What it does |
|
|
537
|
+
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
538
|
+
| 📬 [webmail](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/webmail) | IMAP inbox browsing / search / read / mark / delete + SMTP sending, new-mail notifications, and an optional "allow AI to manage my mailbox" switch (six `mail_*` agent tools). Auto-installs its npm deps on first activation. |
|
|
539
|
+
| 🗄️ [db-client](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/db-client) | Database workbench: connection manager + schema tree for MySQL / PostgreSQL / SQLite / SQL Server / MongoDB / Redis — table structure, paginated data with sorting, SQL editor, and row editing. Drivers auto-install on first use. |
|
|
540
|
+
| 📝 [vscode-editor](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/vscode-editor) | VS Code-like workbench: multi-root file tree (local + SSH hosts), CodeMirror multi-tab editor, Remote-SSH remote file browsing/editing, draggable multi-terminal panel (xterm.js), SFTP sync & upload/download to your computer. Auto-installs `ssh2`. |
|
|
541
|
+
| ☁️ [sftp](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/sftp) | Project-scoped SFTP sync: config lives in the project own `.pi/sftp.json` (multi-profile) plus `.pi/sftp.local.json` for machine overrides, deep-merged and auto-gitignored. Plans a diff before transferring (upload / download / identical / one-sided / conflict) and `sftp_sync` defaults to a dry run, so nothing moves until you pass `dryRun:false`. Deletions are never real: files are parked in a timestamped `.sftp-trash/<batch>/` on both sides and the trash is internally excluded from later scans. Concurrent streaming transfers, `.sftp-tmp-*` + rename atomic writes, post-transfer size checks. Credentials are references only (`${secret:name}` in the host encrypted store / `${env:VAR}` / `${file:path}`) — a malformed reference errors out instead of silently becoming an empty password. Also `mappings` for subtree targets, mtime tolerance with a size-only fallback, remote-name traversal guards, symlink skipping, 13 `sftp_*` AI tools plus an `exec` action only when you enable it (one action-style tool, not thirteen), and manual upload/download buttons in the panel (per-row ⬇ in the remote tree, “upload the matching local folder” in its toolbar) that never touch the delete policy, a connection/diff/remote-tree view tab, a bottom-bar status badge, and one-click import of an existing `.vscode/sftp.json` (plaintext passwords move to the encrypted store). |
|
|
542
|
+
| 📊 [mermaid](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/mermaid) | Renders ` ```mermaid ` fences in chat messages as SVG diagrams (fenced-code renderer plugin, offline-first local engine). |
|
|
543
|
+
| 🧭 [run-trace](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/run-trace) | Run trajectory: task → thinking → tools → file changes → result timeline with replay and node details. |
|
|
544
|
+
| 📖 [legado-web](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/legado-web) | Legado book reader (📖 阅读): search / discovery / book info / TOC / chapter reading on top of Android-compatible **book sources**, with source import, health checking and dead-source cleanup, and four agent tools (`legado_rules`, `legado_book_sources`, `legado_source_probe`, `legado_run_rule`) plus an “🤖 AI fix this source” button that opens a new chat with the failure context. Sources/shelf/progress persist under `<dataDir>/legado-web/`. |
|
|
545
|
+
| 💬 [wechat-ilink](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/wechat-ilink) | WeChat channel (ilink protocol, same origin as Tencent's openclaw-weixin): QR-code login plus outbound long-polling, so you can drive the agent straight from WeChat — no public IP needed. |
|
|
546
|
+
| 🎤 [voice-input](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/voice-input) | Voice input: a mic button next to the composer dictates through the browser's speech recognition; when that is unsupported or fails it falls back to server-side transcription (a remote API, or a one-click local Whisper that runs offline). |
|
|
547
|
+
| 🌐 [live-preview](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/live-preview) | Live-Server-style preview: `/liveserver` serves HTML with relative assets and auto-reload, `/md` renders Markdown; the real server stays loopback-only and is reached through host proxy prefixes. |
|
|
548
|
+
| 🖼 [image-toolkit](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/image-toolkit) | Image workbench: compress (binary search toward a target size), crop, resize, rotate/flip, format conversion (PNG/JPEG/WebP/AVIF), batch ZIP export, watermark, filters, image info + EXIF — read/write straight into the workspace, with 4 agent tools. |
|
|
549
|
+
| 📓 [notes](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/notes) | Notes, todos and reminders in one draggable floating panel (position/size/settings live in the panel, no separate tab); reminders fire server-side (survive restarts, delivered on next open), with 5 agent tools and `/note` `/todo` `/remind` quick capture. |
|
|
547
550
|
|
|
548
551
|
`plugins/demo-mailbox` stays in the repo as the minimal plugin template (server entry + client view + two-way message protocol) and test fixture — start there if you want to write your own.
|
|
549
552
|
|
|
@@ -576,8 +579,8 @@ The code is fetched from that repository at install time, not vendored here: a c
|
|
|
576
579
|
is a pointer, and its license, issues and release cadence belong to its author. Put a `#ref` in
|
|
577
580
|
the `source` if you want a pinned revision.
|
|
578
581
|
|
|
579
|
-
| Plugin
|
|
580
|
-
|
|
|
582
|
+
| Plugin | What it does |
|
|
583
|
+
| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
581
584
|
| 🌿 [multi-git](https://github.com/EinErste/pi-web-multigit) | Multi-repository Git overview: changes, diffs, history, branches, stashes, cross-repo search, a timeline and per-file rollback for every repository below the project directory, plus a workspace-wide branch view, Fetch/Pull (fast-forward only) and an optional PTY terminal. Read-only otherwise. |
|
|
582
585
|
|
|
583
586
|
Getting listed is the same one line as any other entry — an entry in `plugins/catalog.json` plus a
|
|
@@ -718,28 +721,28 @@ Rules for merged themes: the file must be a single CSS file, set the `--term-*`
|
|
|
718
721
|
|
|
719
722
|
All optional — the defaults are what the app is developed against. Full reference: [`docs/env-vars.md`](docs/env-vars.md).
|
|
720
723
|
|
|
721
|
-
| Variable
|
|
722
|
-
|
|
|
723
|
-
| `PI_WEB_TOOL_TIMEOUT_MS`
|
|
724
|
-
| `PI_WEB_STALL_NOTIFY_MS`
|
|
725
|
-
| `PI_WEB_TERMINAL_IDLE_MS`
|
|
726
|
-
| `PI_WEB_TERMINAL_IDLE_LINES`
|
|
727
|
-
| `PI_WEB_VISION_TIMEOUT_MS`
|
|
728
|
-
| `PI_WEB_UPLOAD_RETENTION_DAYS`
|
|
729
|
-
| `PI_WEB_SHELL`
|
|
730
|
-
| `PI_WEB_TABS`
|
|
731
|
-
| `PI_WEB_MANAGED`
|
|
732
|
-
| `PI_WEB_ALLOW_HOSTS`
|
|
733
|
-
| `PI_WEB_LOCALE`
|
|
734
|
-
| `PI_WEB_LOCALE_BASE_URL`
|
|
735
|
-
| `PI_WEB_PKG_ROOT`
|
|
736
|
-
| `PI_CODING_AGENT_SESSION_DIR`
|
|
737
|
-
| `PI_WEB_SDK`
|
|
738
|
-
| `PI_WEB_ALLOW_ORIGINS`
|
|
739
|
-
| `PI_WEB_GIT_EXTENSION_CHECK`
|
|
740
|
-
| `PI_WEB_PLUGIN_CATALOG_URL`
|
|
741
|
-
| `PI_WEB_LAUNCHED_BY` / `PI_WEB_SERVICE_NAME` | empty
|
|
742
|
-
| `PI_WEB_DSH_*`
|
|
724
|
+
| Variable | Default | What it changes |
|
|
725
|
+
| -------------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
726
|
+
| `PI_WEB_TOOL_TIMEOUT_MS` | `1200000` (20 min) | Per-tool-call watchdog; a tool still running is aborted (`ask_user_question` is exempt). Default only — the Settings → Tools field wins. |
|
|
727
|
+
| `PI_WEB_STALL_NOTIFY_MS` | `180000` (3 min) | Warn — without aborting — when a streaming run produces no event at all; `0` disables. |
|
|
728
|
+
| `PI_WEB_TERMINAL_IDLE_MS` | `15000` | Nudge the AI when a terminal it opened goes silent for this long; `0` disables. |
|
|
729
|
+
| `PI_WEB_TERMINAL_IDLE_LINES` | `10` | How many trailing terminal lines that nudge quotes back (1–500). |
|
|
730
|
+
| `PI_WEB_VISION_TIMEOUT_MS` | `90000` | Timeout for one whole vision-bridge transcription batch. |
|
|
731
|
+
| `PI_WEB_UPLOAD_RETENTION_DAYS` | `14` | Retention for `<dataDir>/uploads/`; `0` never sweeps. |
|
|
732
|
+
| `PI_WEB_SHELL` | auto | Windows only: which shell node-pty spawns (auto: `PI_WEB_SHELL` → `$SHELL` → Git Bash → bundled busybox → `%COMSPEC%` → PowerShell). |
|
|
733
|
+
| `PI_WEB_TABS` | all tabs | Comma-separated tab allow-list (`chat,terminal,git,search,tasks,settings,plugins`); hidden tabs are refused server-side, `chat` can't be turned off. |
|
|
734
|
+
| `PI_WEB_MANAGED` | off | `1`/`true` declares the instance externally deployed: self-update, pi-CLI install and plugin installs are refused with a reason and hidden in the UI. |
|
|
735
|
+
| `PI_WEB_ALLOW_HOSTS` | empty | Strict hostname allow-list for the HTTP/WS `Host` header, on top of the always-on same-authority check. |
|
|
736
|
+
| `PI_WEB_LOCALE` | empty | Fallback UI language for first-time visitors (an explicit choice and the browser's languages win over it). |
|
|
737
|
+
| `PI_WEB_LOCALE_BASE_URL` | GitHub raw | Where language packs are downloaded from — point it at a mirror for offline/intranet installs. |
|
|
738
|
+
| `PI_WEB_PKG_ROOT` | auto | Overrides where the server looks for `package.json`, `themes/`, `plugins/catalog.json` and `web/dist` (non-standard install layouts). |
|
|
739
|
+
| `PI_CODING_AGENT_SESSION_DIR` | empty | Flat session layout for pi instead of `<agentDir>/sessions/--<cwd>--/` (changes what the history list reads). |
|
|
740
|
+
| `PI_WEB_SDK` | `bundled` | Which pi SDK copy to run: `bundled` (the copy shipped with pi-web-ui) or `global` (the nearest ancestor copy when it is newer). |
|
|
741
|
+
| `PI_WEB_ALLOW_ORIGINS` | empty | Extra comma-separated `Origin` allow-list for the WebSocket check (dev proxy / reverse proxy). |
|
|
742
|
+
| `PI_WEB_GIT_EXTENSION_CHECK` | `1` (on) | `0` / `false` / `no` / `off` drops the git-source row from “Check all updates” (it runs `git ls-remote`), for very large repos. |
|
|
743
|
+
| `PI_WEB_PLUGIN_CATALOG_URL` | official catalog URL | Boot-time catalog source: defaults to the official community registry `https://xing-shuyin.github.io/pi-web-ui-plugins/catalog.json` (writes installable list only, **does not install plugins**). Set to empty or `off`/`0`/`false`/`no` to disable; combine with `PI_WEB_PLUGIN_CATALOG_INSTALL=1` to auto-install entries at boot (headless/container provisioning). |
|
|
744
|
+
| `PI_WEB_LAUNCHED_BY` / `PI_WEB_SERVICE_NAME` | empty | Written by `pi-web-ui server install` into the service unit/launcher (`service` / the `--name`): tells the server a supervisor owns it, which is what enables the update panel's “Restart service” button. |
|
|
745
|
+
| `PI_WEB_DSH_*` | — | DSH runtime knobs: `PI_WEB_DSH_RUNTIME`, `PI_WEB_DSH_DATA_DIR`, `PI_WEB_DSH_PATCH_DIR`, `PI_WEB_DSH_QUESTION_TIMEOUT_MS`, `PI_WEB_DSH_TOOL_TIMEOUT_MS`, `PI_WEB_DSH_SESSION_RETENTION_DAYS`, `PI_WEB_DSH_DEBUG`. |
|
|
743
746
|
|
|
744
747
|
## Security
|
|
745
748
|
|
|
@@ -877,13 +880,13 @@ Full working example (with an frp tunnel): `deploy/nginx-subpath.conf`.
|
|
|
877
880
|
|
|
878
881
|
pi-web-ui is a small open-source project — **your contributions are what make it grow**. Code, plugins, themes, docs, translations, ideas: everything is welcome, and every merged PR ships to all users with the next `npm publish`. ❤️
|
|
879
882
|
|
|
880
|
-
| Way to contribute | How to get started
|
|
881
|
-
| -------------------------------- |
|
|
883
|
+
| Way to contribute | How to get started |
|
|
884
|
+
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
882
885
|
| 🧩 **Write a plugin** | Build your own UI tab + agent tools. Copy `plugins/demo-mailbox` as the minimal template (it doubles as the test fixture), develop locally, then either open a PR to ship it in the [catalog](#plugin-catalog) or [publish it standalone](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins) and list it there anyway — see [Community plugins](#community-plugins). |
|
|
883
|
-
| 🎨 **Contribute a theme** | Copy `themes/white.css` (light) or `themes/cyberpunk.css` (dark) as a pure-palette template, tweak the `:root` palette + `--term-*` + `.hljs`, verify with `npm run dev`, then open a PR — full walkthrough in [Contributing a theme](#contributing-a-theme-to-the-repository-github).
|
|
884
|
-
| 💻 **Fix a bug / add a feature** | Look for [open issues](https://github.com/xing-shuyin/pi-web-ui/issues) or propose something new. Fork → branch → PR. Keep the code conventions in `AGENTS.md` (tabs, i18n keys in both languages, protocol changes in `server/protocol.ts`).
|
|
885
|
-
| 📖 **Docs & translations** | Improve the READMEs, write plugin docs, fix typos, or help translate the UI / docs into more languages.
|
|
886
|
-
| 💡 **Ideas & feedback** | Open an [issue](https://github.com/xing-shuyin/pi-web-ui/issues) or start a [discussion](https://github.com/xing-shuyin/pi-web-ui/discussions) — feature requests, bug reports, UI polish ideas, deployment experience reports.
|
|
886
|
+
| 🎨 **Contribute a theme** | Copy `themes/white.css` (light) or `themes/cyberpunk.css` (dark) as a pure-palette template, tweak the `:root` palette + `--term-*` + `.hljs`, verify with `npm run dev`, then open a PR — full walkthrough in [Contributing a theme](#contributing-a-theme-to-the-repository-github). |
|
|
887
|
+
| 💻 **Fix a bug / add a feature** | Look for [open issues](https://github.com/xing-shuyin/pi-web-ui/issues) or propose something new. Fork → branch → PR. Keep the code conventions in `AGENTS.md` (tabs, i18n keys in both languages, protocol changes in `server/protocol.ts`). |
|
|
888
|
+
| 📖 **Docs & translations** | Improve the READMEs, write plugin docs, fix typos, or help translate the UI / docs into more languages. |
|
|
889
|
+
| 💡 **Ideas & feedback** | Open an [issue](https://github.com/xing-shuyin/pi-web-ui/issues) or start a [discussion](https://github.com/xing-shuyin/pi-web-ui/discussions) — feature requests, bug reports, UI polish ideas, deployment experience reports. |
|
|
887
890
|
|
|
888
891
|
**Before opening a PR**, a quick sanity pass keeps reviewers happy:
|
|
889
892
|
|