pi-web-ui 0.100.0 → 0.102.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 +53 -1
- package/README.md +46 -44
- package/README.zh-CN.md +41 -39
- package/bin/pi-web-ui.mjs +17 -19
- package/dist/server/agent-formatters.js +191 -0
- package/dist/server/agent-service-daemon.js +1266 -0
- package/dist/server/agent-service.js +9884 -12815
- package/dist/server/approval-default-rules.js +158 -0
- package/dist/server/approval-rules.js +41 -167
- package/dist/server/ask-user-question-tool.js +104 -0
- package/dist/server/attachment-store.js +38 -1
- package/dist/server/bash-tool.js +83 -0
- package/dist/server/browser-page-tool.js +207 -0
- package/dist/server/client-id-utils.js +51 -0
- package/dist/server/client-state.js +38 -2
- package/dist/server/compaction-markers.js +34 -1
- package/dist/server/context-budget-runner.js +43 -0
- package/dist/server/dangling-tools.js +18 -5
- package/dist/server/delegate-mode.js +1 -0
- 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 +30 -5
- package/dist/server/dsh/runtime/goal-rpc.mjs +5 -1
- package/dist/server/goal-evidence.js +9 -2
- package/dist/server/goal-service.js +1 -1
- package/dist/server/hashline-engine.js +1 -1
- package/dist/server/index.js +191 -969
- package/dist/server/left-panel-running.js +115 -0
- package/dist/server/lsp-tool.js +40 -12
- 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/persona-chain.js +63 -0
- package/dist/server/plan-mode.js +2 -0
- package/dist/server/plan-update-tool.js +96 -0
- package/dist/server/plugin-api-catalog.js +20 -0
- package/dist/server/plugin-facilities.js +13 -3
- package/dist/server/plugin-installer.js +6 -1
- package/dist/server/plugin-ui-slots.js +39 -0
- package/dist/server/plugins.js +72 -38
- package/dist/server/preset-fields.js +35 -0
- package/dist/server/preset-share.js +9 -0
- package/dist/server/process-utils.js +30 -0
- package/dist/server/prompt-assembler.js +80 -0
- package/dist/server/protocol-version.js +1 -1
- package/dist/server/scm-commitmsg.js +74 -0
- 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 +28 -1
- package/dist/server/skill-content-filler.js +33 -0
- package/dist/server/subagent-handoff.js +18 -0
- package/dist/server/subagent-helpers.js +88 -0
- package/dist/server/terminals.js +155 -58
- package/dist/server/tool-guards.js +527 -0
- package/dist/server/tool-host-factories.js +217 -0
- package/dist/server/tool-manager.js +30 -5
- package/dist/server/wait-subscription-scan.js +46 -1
- package/dist/server/workspace-snapshot.js +18 -0
- package/extensions/webui.ts +90 -24
- package/package.json +1 -1
- package/plugin-sdk/README.md +17 -0
- package/plugin-sdk/index.d.ts +17 -0
- package/plugin-sdk/index.mjs +5 -0
- package/plugins/catalog.json +20 -0
- package/themes/aetheris.css +3 -1
- package/themes/translucent.css +8 -1
- package/themes/transparent.css +9 -1
- package/themes/zhupi-dark.css +3 -14
- package/themes/zhupi.css +2 -16
- package/web/dist/assets/{TerminalPanel-C3I1Mc-C.js → TerminalPanel-CYGOzbPT.js} +1 -1
- package/web/dist/assets/index-CP71PHb6.js +680 -0
- package/web/dist/assets/index-ytRwL6j0.css +1 -0
- package/web/dist/index.html +2 -2
- package/web/dist/sw.js +1 -1
- package/web/dist/assets/index-B-E2EM_0.css +0 -1
- package/web/dist/assets/index-BYumAaGi.js +0 -379
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,55 @@
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.102.0] — 2026-10-10
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **问卷卡片与交互式选项组件(QuestionnaireCard)** —— 在对话消息流中支持内联交互式问卷卡片,清晰呈现多分支选项、推荐选项徽标与单选/多选表单;支持键盘数字快捷键快速选定;支持附带原因拒绝或提交自定义说明;支持问卷草稿持久化与会话切换恢复(`question-draft`)。
|
|
18
|
+
- **CodeMode 代码运行模式与 Token 预算配置** —— 设置面板支持针对 CodeMode 工具进行模式切换(常规模式 `on` / 严格纯代码模式 `only`)以及内联提示词 Token 预算调节(`codemodeInlineBudget`),参数完整纳入预设共享与白名单体系。
|
|
19
|
+
- **插件升级自动保护凭据与持久化存储** —— CLI 在插件升级或强制重装时自动暂存并无损还原 `config.json`、`secrets.bin` 与 `storage.json`,防止插件升级导致凭据与私有状态丢失;新增内置插件版本变更守卫单测,保证插件代码更新时版本号严格递增。
|
|
20
|
+
- **桌面端会话深度链接与打包流程增强(#583 #584 #587)** —— 桌面端支持会话深度链接拉起;优化打包健康探测与 Token 鉴权流程;支持提示词模板填入时二次确认覆盖或追加(#586);CI 集成 SignPath Windows 安装包测试签名。
|
|
21
|
+
- **SFTP 插件深度增强与引擎优化** —— 扩充默认 SSH 私钥探测路径与连接稳定性;优化客户端文件操作列表与动作响应机制。
|
|
22
|
+
|
|
23
|
+
<!-- auto-i18n:start -->
|
|
24
|
+
### i18n
|
|
25
|
+
|
|
26
|
+
- 前端新增 key(28):`modelQuestionRejectWithNote`、`modelQuestionRejectWithNoteTip`、`recommended`、`keyShortcutTip`、`questionCardWaiting`、`questionCardCancelled`、`questionCardRejectReason`、`questionCardUserCustom`、`questionCardNoSelection`、`tpl.confirmFillTitle`、`tpl.confirmFillDesc`、`tpl.confirmFillAppend`、`tpl.confirmFillOverwrite`、`pluginOfficialMarket`、`pluginOfficialMarketHint`、`pluginOfficialLink`、`pluginOfficialLinkHint`、`copyConversationLink`、`copyMessageLink`、`codemodeModeLabel`、`codemodeModeHint`、`codemodeModeOn`、`codemodeModeOnly`、`codemodeInlineBudgetLabel`、`codemodeInlineBudgetHint`、`codemodeNestedApprovalBadge`、`codemodeNestedApprovalDesc`、`codemodeSavedImages`
|
|
27
|
+
<!-- auto-i18n:end -->
|
|
28
|
+
|
|
29
|
+
## [0.101.0] — 2026-10-10
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- **消息列表常驻渲染窗口可配置(#570)** —— 设置面板新增「常驻渲染消息数」(`keepRecentMessages`,范围 5–100 条,默认 15),用户可按机器性能与对话习惯自定义尾部完整渲染的消息数量,更早的历史消息自动折叠为可展开的摘要行;同时将惰性窗口化(占位符渲染)门槛与折叠判据解耦,配置项完整纳入预设白名单管理。
|
|
34
|
+
- **扩展左栏插件插槽与分区管理并支持插件登记运行态条目** —— 左栏插件插槽体系扩充,支持插件按项目工作区、运行中会话与历史会话三个不同分区分别登记插槽动作;开放插件向左栏直接注册带状态徽标(运行中/已完成/出错)的实时运行态条目。
|
|
35
|
+
- **插件市场收录 md-chat 社区对话归档插件(#581)** —— 官方插件清单新增 md-chat 社区对话归档插件,支持一键浏览与归档 Markdown 格式的会话记录。
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- **终端输出清洗与 ConPTY 吞输出彻底修复(#571、#572、#573)** —— 修复 Windows ConPTY 下由于哨兵未如期在真实输出之前回显,导致正文输出被整段误删吞掉的问题;终端输出清洗不再死板假定哨兵与正文顺序;哨兵每次执行注入随机 nonce,清洗严格按注入位置删行,规避真实输出包含哨兵字面量时被误杀;收尾清洗去除提示符残留;修复未闭合括号组或括号内部管道 `|` 被当成顶层限输出管道拆分的 Bug,未闭合组不再注入哨兵;语法不完整的 bash 命令直接拒绝并返回明确语法错误(不注入、不建空终端),不再空等后误判为「后台运行」;`#` 注释不再误判未闭合引号或管道;`terminal_read` 增加 `commandPending` 状态标志。
|
|
40
|
+
- **Windows 上扩展加载支持 file:// 协议 URL(#580)** —— Windows 平台上 `--import` 绝对路径(含驱动器盘符 `C:\`)改用 `file://` URL 规范传入 Node.js,修复 Node.js ESM 加载器抛出 `ERR_UNSUPPORTED_ESM_URL_SCHEME` 导致服务无法启动的严重问题,并补充加载异常捕获与友好控制台日志。
|
|
41
|
+
- **命令审批高危命中全量列出与规则表单源化(#578)** —— 命令审批弹窗中,同一规则在多段或复合命令中的每处命中均完整高亮并列出;卡片与降级高亮统一收敛至后端规则引擎事实源(彻底移除前端维护的第二份黑名单);补充 `git reset --hard`、`git clean -f` 等 git 破坏性操作的匹配规则。
|
|
42
|
+
- **会话清理不误杀第三方后台任务(#576)** —— 当当前进程内检测到正在运行的第三方后台任务(如 `.pi/tasks` 托管的任务)时保留会话运行时,切换工作目录或从界面移出会话时不再误发 SIGTERM 信号杀掉正在跑的后台任务。
|
|
43
|
+
- **悬空工具调用结果归因明确化(#574)** —— 服务重启或意外中断导致的悬空工具调用,合成结果按真实原因归因,不再一律误报为「超时/流卡死」,并向模型与用户友好提示命令可能已在系统后台部分执行。
|
|
44
|
+
- **用户主动中止渲染为中性状态(#575)** —— 用户主动点击停止或因新交互被抢占的回合,统一在中性样式下渲染为「已中止本轮」,消除红色的报错视觉干扰与不适宜的「立刻重试」按钮。
|
|
45
|
+
- **显式移出会话不再受「刚聊过」保护误拦(#579)** —— 会话列表中点击 ✕ 显式移出会话时,准确识别用户明确意图,不再被「刚聊过」安全保护拦截,避免弹出误导性文案。
|
|
46
|
+
- **会话置顶标记 📌 前置防截断(#568)** —— 左侧栏会话列表中将置顶图钉图标前置放置在会话标题前,避免因长标题发生 CSS 省略截断而将置顶标记完全隐藏。
|
|
47
|
+
- **跨标签页会话运行时去重与分支校准(#567)** —— 消除跨客户端或多标签页打开同一会话时可能产生的重复运行时实例,并在分支切换后校准过期的叶子节点引用。
|
|
48
|
+
|
|
49
|
+
<!-- auto-i18n:start -->
|
|
50
|
+
|
|
51
|
+
### i18n
|
|
52
|
+
|
|
53
|
+
- 前端新增 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`
|
|
54
|
+
- 前端中文变更(1):`pluginTopbarMore`
|
|
55
|
+
- 前端英文变更(1):`pluginTopbarMore`
|
|
56
|
+
- 服务端新增 key(1):`terminals.bash.incomplete`
|
|
57
|
+
- 服务端文案变更(2):`scm.commitmsg.timeout`、`terminals.bash.timeout`
|
|
58
|
+
- 服务端删除 key(1):`terminals.bash.nosentinel.note`
|
|
59
|
+
|
|
60
|
+
<!-- auto-i18n:end -->
|
|
61
|
+
|
|
13
62
|
## [0.100.0] — 2026-10-08
|
|
14
63
|
|
|
15
64
|
### Added
|
|
@@ -53,6 +102,7 @@
|
|
|
53
102
|
- **点开「后台任务」面板时,进程管家那块总会闪一下「未检测到 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。
|
|
54
103
|
|
|
55
104
|
<!-- auto-i18n:start -->
|
|
105
|
+
|
|
56
106
|
### i18n
|
|
57
107
|
|
|
58
108
|
- 前端新增 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`
|
|
@@ -60,6 +110,7 @@
|
|
|
60
110
|
- 前端英文变更(2):`settingsMarkersDesc`、`scheduleTaskEnabledDesc`
|
|
61
111
|
- 服务端新增 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`
|
|
62
112
|
- 服务端文案变更(4):`goal.role.review`、`sched.list.empty`、`sched.cancel.empty.id`、`sched.cancel.not.found`
|
|
113
|
+
|
|
63
114
|
<!-- auto-i18n:end -->
|
|
64
115
|
|
|
65
116
|
## [0.99.0] — 2026-10-03
|
|
@@ -1531,7 +1582,8 @@ when?, children?}`,也收 `topbar` / `settings` 这类简写别名);宿主
|
|
|
1531
1582
|
- 0.35.1(2026-08-27):编辑重问保留附件(#18)+ 全窗口拖放(#19)。
|
|
1532
1583
|
- 0.29.0(2026-08-23):全局搜索弹窗(Ctrl+K)+ 消息列表惰性窗口化。
|
|
1533
1584
|
|
|
1534
|
-
[Unreleased]: https://github.com/xing-shuyin/pi-web-ui/compare/v0.
|
|
1585
|
+
[Unreleased]: https://github.com/xing-shuyin/pi-web-ui/compare/v0.101.0...main
|
|
1586
|
+
[0.101.0]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.101.0
|
|
1535
1587
|
[0.100.0]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.100.0
|
|
1536
1588
|
[0.99.0]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.99.0
|
|
1537
1589
|
[0.98.0]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.98.0
|
package/README.md
CHANGED
|
@@ -157,7 +157,8 @@ QQ群 1126050727
|
|
|
157
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`).
|
|
158
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.
|
|
159
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.
|
|
160
|
-
- **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.
|
|
161
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.
|
|
162
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).
|
|
163
164
|
|
|
@@ -532,19 +533,20 @@ up in the UI.
|
|
|
532
533
|
These plugins ship in this repository (`plugins/<id>/`) and can be installed
|
|
533
534
|
straight from GitHub:
|
|
534
535
|
|
|
535
|
-
| Plugin | What it does
|
|
536
|
-
| -------------------------------------------------------------------------------------------- |
|
|
537
|
-
| 📬 [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.
|
|
538
|
-
| 🗄️ [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.
|
|
539
|
-
| 📝 [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`.
|
|
540
|
-
|
|
|
541
|
-
|
|
|
542
|
-
|
|
|
543
|
-
|
|
|
544
|
-
|
|
|
545
|
-
|
|
|
546
|
-
|
|
|
547
|
-
|
|
|
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. |
|
|
548
550
|
|
|
549
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.
|
|
550
552
|
|
|
@@ -577,8 +579,8 @@ The code is fetched from that repository at install time, not vendored here: a c
|
|
|
577
579
|
is a pointer, and its license, issues and release cadence belong to its author. Put a `#ref` in
|
|
578
580
|
the `source` if you want a pinned revision.
|
|
579
581
|
|
|
580
|
-
| Plugin
|
|
581
|
-
|
|
|
582
|
+
| Plugin | What it does |
|
|
583
|
+
| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
582
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. |
|
|
583
585
|
|
|
584
586
|
Getting listed is the same one line as any other entry — an entry in `plugins/catalog.json` plus a
|
|
@@ -719,28 +721,28 @@ Rules for merged themes: the file must be a single CSS file, set the `--term-*`
|
|
|
719
721
|
|
|
720
722
|
All optional — the defaults are what the app is developed against. Full reference: [`docs/env-vars.md`](docs/env-vars.md).
|
|
721
723
|
|
|
722
|
-
| Variable
|
|
723
|
-
|
|
|
724
|
-
| `PI_WEB_TOOL_TIMEOUT_MS`
|
|
725
|
-
| `PI_WEB_STALL_NOTIFY_MS`
|
|
726
|
-
| `PI_WEB_TERMINAL_IDLE_MS`
|
|
727
|
-
| `PI_WEB_TERMINAL_IDLE_LINES`
|
|
728
|
-
| `PI_WEB_VISION_TIMEOUT_MS`
|
|
729
|
-
| `PI_WEB_UPLOAD_RETENTION_DAYS`
|
|
730
|
-
| `PI_WEB_SHELL`
|
|
731
|
-
| `PI_WEB_TABS`
|
|
732
|
-
| `PI_WEB_MANAGED`
|
|
733
|
-
| `PI_WEB_ALLOW_HOSTS`
|
|
734
|
-
| `PI_WEB_LOCALE`
|
|
735
|
-
| `PI_WEB_LOCALE_BASE_URL`
|
|
736
|
-
| `PI_WEB_PKG_ROOT`
|
|
737
|
-
| `PI_CODING_AGENT_SESSION_DIR`
|
|
738
|
-
| `PI_WEB_SDK`
|
|
739
|
-
| `PI_WEB_ALLOW_ORIGINS`
|
|
740
|
-
| `PI_WEB_GIT_EXTENSION_CHECK`
|
|
741
|
-
| `PI_WEB_PLUGIN_CATALOG_URL`
|
|
742
|
-
| `PI_WEB_LAUNCHED_BY` / `PI_WEB_SERVICE_NAME` | empty
|
|
743
|
-
| `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`. |
|
|
744
746
|
|
|
745
747
|
## Security
|
|
746
748
|
|
|
@@ -878,13 +880,13 @@ Full working example (with an frp tunnel): `deploy/nginx-subpath.conf`.
|
|
|
878
880
|
|
|
879
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`. ❤️
|
|
880
882
|
|
|
881
|
-
| Way to contribute | How to get started
|
|
882
|
-
| -------------------------------- |
|
|
883
|
+
| Way to contribute | How to get started |
|
|
884
|
+
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
883
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). |
|
|
884
|
-
| 🎨 **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).
|
|
885
|
-
| 💻 **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`).
|
|
886
|
-
| 📖 **Docs & translations** | Improve the READMEs, write plugin docs, fix typos, or help translate the UI / docs into more languages.
|
|
887
|
-
| 💡 **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. |
|
|
888
890
|
|
|
889
891
|
**Before opening a PR**, a quick sanity pass keeps reviewers happy:
|
|
890
892
|
|
package/README.zh-CN.md
CHANGED
|
@@ -118,7 +118,8 @@ QQ群 1126050727
|
|
|
118
118
|
- **`edit_soft`** —— 更宽松的 `edit`(默认关):缩进/空白导致内置工具失败时用它,先精确子串、再按去空白逐行核心匹配,`newText` 原样写入并保留文件换行符/BOM,结果带 diff 与 unified patch。
|
|
119
119
|
- **`delegate_task`** —— 强制六段派单(TASK / EXPECTED OUTCOME / REQUIRED TOOLS / MUST DO / MUST NOT DO / CONTEXT)并在服务端校验:模板不可用、任务少于 20 字或任一段为空都会被打回,并把可用模板清单回给模型。卡片按六段结构化展示,跑完后可一键跳到对应子代理对话。
|
|
120
120
|
- **`ask_user_question`** —— pi 引擎本身没有问卷工具,这是 pi-web-ui 加的:模型可以问结构化问题(单选/多选 + 富文本选项预览 + 自由文本),以对话框弹出;回答作为工具结果回给模型,取消则以工具错误返回,等你回答的时间不受工具看门狗限制,未答的问卷刷新/重连后会恢复。
|
|
121
|
-
- **MCP
|
|
121
|
+
- **MCP 服务器管理与公开市场** —— 设置 →「MCP 服务器」提供完整的图形化管理,支持 Pi 全局(`~/.pi/agent/mcp.json`)与当前项目级(`.pi/mcp.json`)双作用域配置。可在界面中快捷添加、编辑、删除、启停服务器,查看实时运行状态与暴露的工具列表;接入 Smithery 开放注册中心(`api.smithery.ai`)千余款公共服务器实时搜索与 GitHub 官方仓库,并支持自定义源,一键添加至全局或当前项目。底层配置热加载,保存或手改文件即刻生效无需重启。
|
|
122
|
+
- **技能市场与公开仓库同步** —— 设置 →「技能」提供已安装技能管理与公开技能市场,遵循官方 Agent Skills 规范;支持直连 GitHub 官方 Agent Skills 库(`anthropics/skills`)或任意自定义 GitHub 仓库(`owner/repo`),在线检索技能、实时拉取并预览 `SKILL.md` 指令正文,一键安装至全局用户目录(`~/.pi/agent/skills`)或当前项目(`.pi/skills`),热生效无需重启服务。
|
|
122
123
|
- **扩展 UI 桥** —— pi 扩展可以驱动浏览器:`setWidget` 在文件树下方渲染实时面板(点标题居中放大),`setStatus` 在底栏显示状态文本,`notify` 弹通知,`select`/`confirm`/`input` 在输入框上方弹出非模态请求面板(选项走 Markdown 渲染,`Esc` 当作取消);widget 文本里的 ANSI 色码会被剥掉,不会把扩展底栏变成转义序列噪声。
|
|
123
124
|
- **插件能力** —— 插件可注册 `/命令`(选择器标 plugin 来源、服务端执行不耗 token)、注册带停止按钮的后台任务、声明设置表单、订阅运行/工具/对话事件,并在前端经 `window.__piWebUiHost` 切视图、新建对话。详见 [界面插件](#界面插件)。
|
|
124
125
|
|
|
@@ -437,19 +438,20 @@ volumes:
|
|
|
437
438
|
|
|
438
439
|
以下插件随本仓库发布(`plugins/<id>/`),可直接从 GitHub 安装:
|
|
439
440
|
|
|
440
|
-
| 插件 | 功能
|
|
441
|
-
| --------------------------------------------------------------------------------------------------------- |
|
|
442
|
-
| 📬 [网页邮箱 webmail](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/webmail) | IMAP 收件箱浏览/搜索/阅读/标记/删除 + SMTP 发信、新邮件通知,可选「允许 AI 管理邮箱」(六个 `mail_*` AI 工具)。首次激活自动补装 npm 依赖。
|
|
443
|
-
| 🗄️ [数据库 db-client](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/db-client) | 数据库工作台:MySQL / PostgreSQL / SQLite / SQL Server / MongoDB / Redis 连接管理 + 库表树 —— 表结构、分页排序、SQL 编辑器、行编辑。驱动首次使用自动安装。
|
|
444
|
-
| 📝 [编辑器 + SSH vscode-editor](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/vscode-editor) | 类 VSCode 工作台:多根文件树(本地 + SSH 主机)、CodeMirror 多标签编辑器、Remote-SSH 远程文件浏览/编辑、可拖拽多终端面板(xterm.js)、SFTP 同步与下载到电脑。自动安装 `ssh2`。
|
|
445
|
-
|
|
|
446
|
-
|
|
|
447
|
-
|
|
|
448
|
-
|
|
|
449
|
-
|
|
|
450
|
-
|
|
|
451
|
-
|
|
|
452
|
-
|
|
|
441
|
+
| 插件 | 功能 |
|
|
442
|
+
| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
443
|
+
| 📬 [网页邮箱 webmail](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/webmail) | IMAP 收件箱浏览/搜索/阅读/标记/删除 + SMTP 发信、新邮件通知,可选「允许 AI 管理邮箱」(六个 `mail_*` AI 工具)。首次激活自动补装 npm 依赖。 |
|
|
444
|
+
| 🗄️ [数据库 db-client](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/db-client) | 数据库工作台:MySQL / PostgreSQL / SQLite / SQL Server / MongoDB / Redis 连接管理 + 库表树 —— 表结构、分页排序、SQL 编辑器、行编辑。驱动首次使用自动安装。 |
|
|
445
|
+
| 📝 [编辑器 + SSH vscode-editor](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/vscode-editor) | 类 VSCode 工作台:多根文件树(本地 + SSH 主机)、CodeMirror 多标签编辑器、Remote-SSH 远程文件浏览/编辑、可拖拽多终端面板(xterm.js)、SFTP 同步与下载到电脑。自动安装 `ssh2`。 |
|
|
446
|
+
| ☁️ [sftp](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/sftp) | 项目级 SFTP 同步:配置存项目自己的 `.pi/sftp.json`(多环境 profile)+ `.pi/sftp.local.json`(本机覆盖,两层深合并,自动加进 .gitignore)。先算差异再传(待上传 / 待下载 / 一致 / 单边 / 冲突),`sftp_sync` 默认 dry-run,不显式传 `dryRun:false` 就不动文件。删除永不真删:文件进带时间戳的 `.sftp-trash/<批次>/`,垃圾桶被内部护栏永久排除。并发流式传输、`.sftp-tmp-*` + rename 原子落盘、传后大小校验。凭据只写引用(`${secret:名}` 走宿主加密存储 / `${env:VAR}` / `${file:路径}`),写法不合法的引用直接报错而不是静默成空密码。另有 `mappings` 子树映射、mtime 容差与仅比大小的降级、远端文件名防穿越、symlink 跳过、**一个** action 式 `sftp` 工具(而非十几个)与需手动开启的 `exec` 动作,外加面板里的手动上传/下载(远端树每行 ⬇、工具栏「上传本地对应目录」,永不动删除策略)、连接/差异/远端文件树视图 tab、底栏状态徽标,以及一键导入现成的 `.vscode/sftp.json`(明文口令转入加密存储)。 |
|
|
447
|
+
| 📊 [图表 mermaid](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/mermaid) | 把对话里的 ` ```mermaid ` 围栏渲染成 SVG 图表(fenced-code 渲染插件,本地引擎离线优先)。 |
|
|
448
|
+
| 🧭 [运行轨迹 run-trace](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/run-trace) | 运行轨迹:任务 → 思考 → 工具 → 文件改动 → 结果的时间线聚合视图,支持回放与节点详情。 |
|
|
449
|
+
| 📖 [阅读 legado-web](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/legado-web) | Legado 阅读(文本源):基于兼容安卓书源的搜书 / 发现 / 详情 / 目录 / 正文阅读,支持书源导入、检测与删废源,并提供四个修源 AI 工具(`legado_rules`、`legado_book_sources`、`legado_source_probe`、`legado_run_rule`)与「🤖 AI 修复源」按钮(带失败现场直接开新对话)。书源/书架/进度存在 `<dataDir>/legado-web/`。 |
|
|
450
|
+
| 💬 [微信通道 wechat-ilink](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/wechat-ilink) | 微信扫码登录(与腾讯 openclaw-weixin 同源的 ilink 协议):出站长轮询收消息,在微信里直接指挥 agent,无需公网 IP。 |
|
|
451
|
+
| 🎤 [语音输入 voice-input](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/voice-input) | 输入框旁的麦克风按钮:浏览器语音识别直接听写进输入框;不支持/识别失败时自动降级为服务端转写(远端接口,或一键安装的本地 Whisper,免费不出网)。 |
|
|
452
|
+
| 🌐 [实时预览 live-preview](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/live-preview) | Live Server 式预览:`/liveserver` 看 HTML(含相对资源与自动刷新)、`/md` 看 Markdown 渲染;真服务只绑回环地址,经宿主通用代理对外只露同源前缀。 |
|
|
453
|
+
| 🖼 [图片处理 image-toolkit](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/image-toolkit) | 图片处理工作台:压缩(按目标体积二分逼近)、裁剪、缩放、旋转/翻转、格式转换(PNG/JPEG/WebP/AVIF)、批量导出 ZIP、水印、滤镜调色、图片信息与 EXIF,可直接读写工作区图片;另给 AI 配了 4 个工具。 |
|
|
454
|
+
| 📓 [笔记 notes](https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/notes) | 随手记:笔记 + 待办 + 日程提醒三合一。顶栏按钮打开可自由拖拽的全局浮窗(位置/尺寸记忆,设置也在浮窗里,无独立视图页);提醒走服务端定时(重启不丢、错过补送),另有 5 个 AI 工具与 `/note` `/todo` `/remind` 快速捕获。 |
|
|
453
455
|
|
|
454
456
|
`plugins/demo-mailbox` 作为最小插件模板保留在仓库里(服务端入口 + 客户端视图 + 双向消息协议),兼作测试夹具——想自己写插件从这里入手。
|
|
455
457
|
|
|
@@ -472,8 +474,8 @@ pi-web-ui install https://github.com/xing-shuyin/pi-web-ui/tree/main/plugins/web
|
|
|
472
474
|
装的时候代码是从那个仓库拉的,本仓库不做内置拷贝:社区条目只是一条指针,许可证、issue 与发布节奏都归插件作者。
|
|
473
475
|
想要固定版本,在 `source` 里带上 `#ref`。
|
|
474
476
|
|
|
475
|
-
| 插件
|
|
476
|
-
|
|
|
477
|
+
| 插件 | 功能 |
|
|
478
|
+
| ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
477
479
|
| 🌿 [多仓库 Git multi-git](https://github.com/EinErste/pi-web-multigit) | 多仓库 Git 总览:项目目录下每个仓库的变更、差异、历史、分支、贮藏、跨仓搜索、时间线与单文件回滚,另有工作区分支聚合、Fetch/Pull(仅快进)与可选的内置终端;其余只读。 |
|
|
478
480
|
|
|
479
481
|
想被收录,和任何条目一样只差一行:往 `plugins/catalog.json` 加一条并发 PR。不提 PR 也可以在市场里自行登记(存在
|
|
@@ -601,28 +603,28 @@ pi-web-ui uninstall <id> # 卸载插件
|
|
|
601
603
|
|
|
602
604
|
以下全部可选——默认值就是开发时一直在用的配置。完整参考:[`docs/env-vars.md`](docs/env-vars.md)。
|
|
603
605
|
|
|
604
|
-
| 变量
|
|
605
|
-
|
|
|
606
|
-
| `PI_WEB_TOOL_TIMEOUT_MS`
|
|
607
|
-
| `PI_WEB_STALL_NOTIFY_MS`
|
|
608
|
-
| `PI_WEB_TERMINAL_IDLE_MS`
|
|
609
|
-
| `PI_WEB_TERMINAL_IDLE_LINES`
|
|
610
|
-
| `PI_WEB_VISION_TIMEOUT_MS`
|
|
611
|
-
| `PI_WEB_UPLOAD_RETENTION_DAYS`
|
|
612
|
-
| `PI_WEB_SHELL`
|
|
613
|
-
| `PI_WEB_TABS`
|
|
614
|
-
| `PI_WEB_MANAGED`
|
|
615
|
-
| `PI_WEB_ALLOW_HOSTS`
|
|
616
|
-
| `PI_WEB_LOCALE`
|
|
617
|
-
| `PI_WEB_LOCALE_BASE_URL`
|
|
618
|
-
| `PI_WEB_PKG_ROOT`
|
|
619
|
-
| `PI_CODING_AGENT_SESSION_DIR`
|
|
620
|
-
| `PI_WEB_SDK`
|
|
621
|
-
| `PI_WEB_ALLOW_ORIGINS`
|
|
622
|
-
| `PI_WEB_GIT_EXTENSION_CHECK`
|
|
623
|
-
| `PI_WEB_PLUGIN_CATALOG_URL`
|
|
624
|
-
| `PI_WEB_LAUNCHED_BY` / `PI_WEB_SERVICE_NAME` | 空
|
|
625
|
-
| `PI_WEB_DSH_*`
|
|
606
|
+
| 变量 | 默认 | 作用 |
|
|
607
|
+
| -------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
608
|
+
| `PI_WEB_TOOL_TIMEOUT_MS` | `1200000`(20 分) | 单工具调用看门狗;超时自动中止(`ask_user_question` 豁免)。只做默认值,设置面板「工具」页优先。 |
|
|
609
|
+
| `PI_WEB_STALL_NOTIFY_MS` | `180000`(3 分) | 流式运行完全没事件时给警告(不中止);`0` = 关。 |
|
|
610
|
+
| `PI_WEB_TERMINAL_IDLE_MS` | `15000` | AI 开过的终端静默这么久就催它去看一眼;`0` = 关。 |
|
|
611
|
+
| `PI_WEB_TERMINAL_IDLE_LINES` | `10` | 该催命消息回送的终端尾部行数(1–500)。 |
|
|
612
|
+
| `PI_WEB_VISION_TIMEOUT_MS` | `90000` | 视觉桥整批转写的超时。 |
|
|
613
|
+
| `PI_WEB_UPLOAD_RETENTION_DAYS` | `14` | `<dataDir>/uploads/` 保留天数;`0` = 不清理。 |
|
|
614
|
+
| `PI_WEB_SHELL` | 自动 | 仅 Windows:node-pty 用哪个 shell(自动顺序:`PI_WEB_SHELL` → `$SHELL` → Git Bash → 随包 busybox → `%COMSPEC%` → PowerShell)。 |
|
|
615
|
+
| `PI_WEB_TABS` | 全部标签页 | 逗号分隔的标签页白名单(`chat,terminal,git,search,tasks,settings,plugins`);未列入的在服务端也被拒绝,`chat` 不可关。 |
|
|
616
|
+
| `PI_WEB_MANAGED` | 关 | `1`/`true` 声明实例由外部部署管理:自更新、装 pi CLI、装插件都被拒绝并说明原因,前端也隐藏入口。 |
|
|
617
|
+
| `PI_WEB_ALLOW_HOSTS` | 空 | 严格的主机名白名单(叠加在始终生效的同权威校验之上)。 |
|
|
618
|
+
| `PI_WEB_LOCALE` | 空 | 首访回退语言(显式选择与浏览器语言优先级更高)。 |
|
|
619
|
+
| `PI_WEB_LOCALE_BASE_URL` | GitHub raw | 语言包下载根 —— 指向镜像即可做离线/内网安装。 |
|
|
620
|
+
| `PI_WEB_PKG_ROOT` | 自动 | 显式指定包根目录(非标准安装位置时用)。 |
|
|
621
|
+
| `PI_CODING_AGENT_SESSION_DIR` | 空 | 让 pi 把转录扁平写入该目录(而非 `<agentDir>/sessions/--<cwd>--/`,会改变历史列表读到的内容)。 |
|
|
622
|
+
| `PI_WEB_SDK` | `bundled` | 用哪一份 pi SDK:`bundled`(pi-web-ui 自带的副本)或 `global`(祖先链上更新的那份)。 |
|
|
623
|
+
| `PI_WEB_ALLOW_ORIGINS` | 空 | WebSocket Origin 校验的额外白名单(逗号分隔;dev 代理 / 反向代理用)。 |
|
|
624
|
+
| `PI_WEB_GIT_EXTENSION_CHECK` | `1`(默认开) | 设 `0`/`false`/`no`/`off` 关闭「全部组件更新」里的 git 行(走 `git ls-remote`),大型单体仓库场景可用。 |
|
|
625
|
+
| `PI_WEB_PLUGIN_CATALOG_URL` | 官方清单 URL | 开机插件市场清单来源:默认指向官方社区清单 `https://xing-shuyin.github.io/pi-web-ui-plugins/catalog.json`(仅拉取文档写可安装列表,**不自动安装插件**)。设为空串或 `off`/`0`/`false`/`no` 可关闭;设 `PI_WEB_PLUGIN_CATALOG_INSTALL=1` 时顺手自动全部安装。 |
|
|
626
|
+
| `PI_WEB_LAUNCHED_BY` / `PI_WEB_SERVICE_NAME` | 空 | 由 `pi-web-ui server install` 写进服务单元/启动脚本(`service` / `--name`):服务端据此知道实例由平台服务托管,更新面板才会出现「重启服务」按钮。 |
|
|
627
|
+
| `PI_WEB_DSH_*` | — | DSH 运行时旋钮:`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`。 |
|
|
626
628
|
|
|
627
629
|
## 安全
|
|
628
630
|
|
|
@@ -702,7 +704,7 @@ pi-web-ui 是一个小型开源项目 —— **你的贡献就是它成长的力
|
|
|
702
704
|
|
|
703
705
|
| 贡献方式 | 如何开始 |
|
|
704
706
|
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
705
|
-
| 🧩 **写插件** | 打造你自己的界面 tab + AI 工具。以 `plugins/demo-mailbox` 为最小模板(它兼作测试夹具),本地开发后既可开 PR 收录进[插件目录](#插件目录),也可独立发布并照样收录(见[社区插件](#社区插件))。
|
|
707
|
+
| 🧩 **写插件** | 打造你自己的界面 tab + AI 工具。以 `plugins/demo-mailbox` 为最小模板(它兼作测试夹具),本地开发后既可开 PR 收录进[插件目录](#插件目录),也可独立发布并照样收录(见[社区插件](#社区插件))。 |
|
|
706
708
|
| 🎨 **贡献主题** | 以 `themes/white.css`(浅色)或 `themes/cyberpunk.css`(深色)为纯调色板模板,调整 `:root` 配色 + `--term-*` + `.hljs`,用 `npm run dev` 验证后开 PR —— 完整步骤见[向仓库贡献主题](#向仓库贡献主题github)。 |
|
|
707
709
|
| 💻 **修 bug / 加功能** | 在 [Issues](https://github.com/xing-shuyin/pi-web-ui/issues) 里挑一个,或提出新想法。Fork → 分支 → PR。代码约定见 `AGENTS.md`(Tab 缩进、i18n 双语 key、协议改动只动 `server/protocol.ts`)。 |
|
|
708
710
|
| 📖 **文档与翻译** | 完善 README、补插件文档、改错别字,或帮忙把界面/文档翻译成更多语言。 |
|