pi-web-ui 0.103.2 → 0.104.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 +37 -0
- package/dist/server/agent-formatters.js +18 -2
- package/dist/server/agent-service-daemon.js +4 -3
- package/dist/server/agent-service.js +773 -181
- package/dist/server/compaction-markers.js +111 -3
- package/dist/server/delegate-mode.js +2 -0
- package/dist/server/dispatch-domain-handlers.js +25 -0
- package/dist/server/dsh/dsh-agent-service.js +265 -11
- package/dist/server/goal-review-gate.js +2 -0
- package/dist/server/goal-service.js +59 -2
- package/dist/server/index.js +1 -0
- package/dist/server/markers-list-tool.js +1 -1
- package/dist/server/market-service.js +36 -9
- package/dist/server/mcp-agent-tool.js +164 -0
- package/dist/server/mcp-manager.js +182 -0
- package/dist/server/plan-mode.js +3 -0
- package/dist/server/plugin-api-catalog.js +24 -0
- package/dist/server/plugins.js +113 -0
- package/dist/server/preset-share.js +52 -1
- package/dist/server/remote-ssh-service.js +90 -25
- package/dist/server/sandbox-service.js +705 -0
- package/dist/server/sandbox-tool.js +365 -0
- package/dist/server/session-parser.js +48 -21
- package/dist/server/subagent-helpers.js +32 -1
- package/dist/server/terminals.js +210 -10
- package/dist/server/tool-manager.js +24 -0
- package/dist/server/webui-context.js +16 -2
- package/dist/server/workspace-snapshot.js +51 -13
- package/package.json +1 -1
- package/plugin-sdk/index.d.ts +39 -0
- package/plugin-sdk/index.mjs +14 -0
- package/plugins/catalog.json +110 -0
- package/themes/zhujian-dark.css +711 -0
- package/themes/zhujian.css +760 -0
- package/web/dist/assets/{TerminalPanel-DQFDRz0A.js → TerminalPanel-28naZdcs.js} +1 -1
- package/web/dist/assets/index-DbGGBf5I.js +680 -0
- package/web/dist/assets/index-RqIdFOsh.css +1 -0
- package/web/dist/index.html +2 -2
- package/web/dist/sw.js +1 -1
- package/web/dist/assets/index-CYQdZEbx.css +0 -1
- package/web/dist/assets/index-aGRL6x3h.js +0 -680
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,38 @@
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
<!-- auto-i18n:start -->
|
|
14
|
+
|
|
15
|
+
### i18n
|
|
16
|
+
|
|
17
|
+
- 前端新增 key(56):`filesShowHidden`、`filesHideHidden`、`previewTocShow`、`previewTocHide`、`previewTocLabel`、`mcpManageEnabledDesc`、`mcpManageOffHint`、`sandboxNewBtn`、`sandboxModalTitle`、`sandboxModalSubtitle`、`sandboxModeLabel`、`sandboxModeBlank`、`sandboxModeBlankDesc`、`sandboxModeImport`、`sandboxModeImportDesc`、`sandboxSourceLabel`、`sandboxSourcePlaceholder`、`sandboxLifecycleLabel`、`sandboxLifecycleEphemeral`、`sandboxLifecycleEphemeralDesc`、`sandboxLifecyclePermanent`、`sandboxLifecyclePermanentDesc`、`sandboxNameLabel`、`sandboxNamePlaceholder`、`sandboxCreateSubmit`、`sandboxBadgeEphemeral`、`sandboxBadgePermanent`、`sandboxBannerTitle`、`sandboxBannerSourceDesc`、`sandboxBannerBlankDesc`、`sandboxActionPersist`、`sandboxActionPersistTip`、`sandboxActionApplySource`、`sandboxActionApplySourceTip`、`sandboxActionApplyConfirm`、`sandboxActionReset`、`sandboxActionResetTip`、`sandboxActionResetConfirm`、`sandboxActionPromote`、`sandboxActionPromoteTip`、`sandboxActionDestroy`、`sandboxActionDestroyTip`、`sandboxActionDestroyConfirm`、`sandboxPromoteTitle`、`sandboxPromoteSubtitle`、`sandboxPromoteTargetLabel`、`sandboxPromoteTargetPlaceholder`、`sandboxPromoteSwitchLabel`、`sandboxPromoteSubmit`、`sandboxApplyTitle`、`sandboxDiffStats`、`sandboxDiffEmpty`、`sandboxDiffDeletedNote`、`sandboxApplySubmit`、`sandboxEnabledDesc`、`sandboxOffHint`
|
|
18
|
+
- 服务端新增 key(12):`mcp_manage.list.empty`、`mcp_manage.list.ok`、`mcp_manage.check.missing_query`、`mcp_manage.check.not_installed`、`mcp_manage.check.found`、`mcp_manage.install.fail`、`mcp_manage.install.tools`、`mcp_manage.install.ok`、`mcp_manage.remove.missing_name`、`mcp_manage.remove.fail`、`mcp_manage.remove.ok`、`mcp_manage.reload.ok`
|
|
19
|
+
- 服务端文案变更(1):`agent.conv.limit.reached`
|
|
20
|
+
|
|
21
|
+
<!-- auto-i18n:end -->
|
|
22
|
+
|
|
23
|
+
## [0.103.3] — 2026-10-11
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- **飞书机器人官方插件(plugins/feishu v0.1.0)** —— 支持飞书开放平台应用机器人接入(WebSocket 长连接免公网 IP,以及自定义群机器人 Webhook 通知);支持私聊与群聊 @ 触发对话、富文本与交互式卡片发送、表情回应、历史消息搜索,以及 App Secret / Encrypt Key / Verification Token 加密存储。
|
|
28
|
+
- **子代理并发名额按活跃态统计与 `PI_WEB_MAX_SUBAGENTS` 环境变量(#589)** —— 子代理配额改为仅统计正在运行(`status === "running"`)的子代理,已完成的子代理不再永久占用名额;新增 `PI_WEB_MAX_SUBAGENTS` 环境变量支持调整并发上限(默认 16)。
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- **`todo_list` 工具 Schema 显式补齐 `action.type`(#590)** —— 为 `todo_list` 工具的 `action` 参数显式声明 `type: "string"`,修复 Moonshot / Kimi 等严格校验 JSON Schema 的端点每次请求返回 HTTP 400 的问题,并新增静态守卫单测拦截缺失 `type` 的 `Type.Unsafe` 定义。
|
|
33
|
+
- **主对话执行中设定目标时自动中断旧运行并让位给执行者(#591)** —— 设目标首轮派发目标执行者前,若主对话仍有设目标前的旧运行在飞,服务端先通过 `interruptMainConv` 中断旧运行并弹出提示(同时豁免该次预期让位 abort 误清目标),避免主对话与目标执行者在同一工作区并行动工互相干扰;委托期间用户在主对话发起的新聊天不受影响。
|
|
34
|
+
- **WebUI 主题代理保留单参数装饰器包裹的组件正文(#592)** —— 在 `mockThemeProxy` 中补齐 `italic`、`underline`、`inverse` 单参数装饰器并将通用兜底改为取最后一个字符串参数,修复扩展 widget 使用单参数主题装饰器时正文被清空的问题。
|
|
35
|
+
|
|
36
|
+
<!-- auto-i18n:start -->
|
|
37
|
+
|
|
38
|
+
### i18n
|
|
39
|
+
|
|
40
|
+
- 服务端新增 key(1):`agent.goal.preempt_main`
|
|
41
|
+
- 服务端文案变更(1):`agent.subagent.limit.reached`
|
|
42
|
+
|
|
43
|
+
<!-- auto-i18n:end -->
|
|
44
|
+
|
|
13
45
|
## [0.103.2] — 2026-10-11
|
|
14
46
|
|
|
15
47
|
### Added
|
|
@@ -38,9 +70,11 @@
|
|
|
38
70
|
- **样式与 CSS 变量兼容性修复** —— 统一目录浏览器 SSH 相关面板的 Hover 高亮样式为系统标准 `--bg-elev2`,消除未定义变量告警。
|
|
39
71
|
|
|
40
72
|
<!-- auto-i18n:start -->
|
|
73
|
+
|
|
41
74
|
### i18n
|
|
42
75
|
|
|
43
76
|
- 前端新增 key(21):`workspaceModeLocal`、`workspaceModeRemote`、`sshHost`、`sshPort`、`sshUser`、`sshAuthType`、`sshPassword`、`sshKeyPath`、`sshAgent`、`sshSaveProfile`、`sshProfileName`、`sshConnectAndProbe`、`sshConnecting`、`sshSavedProfiles`、`sshInstallTool`、`sshInstalling`、`sshSkipAndBrowse`、`sshOpenRemoteWorkspace`、`sshDisconnect`、`sshDeleteProfileConfirm`、`tuiOverlayTitle`
|
|
77
|
+
|
|
44
78
|
<!-- auto-i18n:end -->
|
|
45
79
|
|
|
46
80
|
## [0.102.0] — 2026-10-10
|
|
@@ -54,9 +88,11 @@
|
|
|
54
88
|
- **SFTP 插件深度增强与引擎优化** —— 扩充默认 SSH 私钥探测路径与连接稳定性;优化客户端文件操作列表与动作响应机制。
|
|
55
89
|
|
|
56
90
|
<!-- auto-i18n:start -->
|
|
91
|
+
|
|
57
92
|
### i18n
|
|
58
93
|
|
|
59
94
|
- 前端新增 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`
|
|
95
|
+
|
|
60
96
|
<!-- auto-i18n:end -->
|
|
61
97
|
|
|
62
98
|
## [0.101.0] — 2026-10-10
|
|
@@ -1616,6 +1652,7 @@ when?, children?}`,也收 `topbar` / `settings` 这类简写别名);宿主
|
|
|
1616
1652
|
- 0.29.0(2026-08-23):全局搜索弹窗(Ctrl+K)+ 消息列表惰性窗口化。
|
|
1617
1653
|
|
|
1618
1654
|
[Unreleased]: https://github.com/xing-shuyin/pi-web-ui/compare/v0.101.0...main
|
|
1655
|
+
[0.103.3]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.103.3
|
|
1619
1656
|
[0.103.2]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.103.2
|
|
1620
1657
|
[0.103.1]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.103.1
|
|
1621
1658
|
[0.103.0]: https://github.com/xing-shuyin/pi-web-ui/releases/tag/v0.103.0
|
|
@@ -3,10 +3,26 @@ import { writeAtomicSync } from "./atomic-file.js";
|
|
|
3
3
|
export const RUN_TASK_CAP = 500;
|
|
4
4
|
export const RUN_ARGS_CAP = 4000;
|
|
5
5
|
export const RUN_RESULT_CAP = 4000;
|
|
6
|
-
/** Cap on simultaneously open NON-subagent conversations of ONE project */
|
|
6
|
+
/** Cap on simultaneously open NON-subagent conversations of ONE project(可通过 PI_WEB_MAX_OPEN_CONVERSATIONS 覆盖) */
|
|
7
7
|
export const MAX_OPEN_CONVERSATIONS = 8;
|
|
8
|
-
/**
|
|
8
|
+
/** 同时运行(非终态)的子代理默认并发上限(按客户端计,含嵌套派生的孙子辈;可通过 PI_WEB_MAX_SUBAGENTS 覆盖,#589)。 */
|
|
9
9
|
export const MAX_SUBAGENTS = 16;
|
|
10
|
+
/** 读取当前生效的子代理并发上限(支持 PI_WEB_MAX_SUBAGENTS 环境变量覆盖,默认 16,最小 1)。 */
|
|
11
|
+
export function getMaxSubagents() {
|
|
12
|
+
const raw = Number(process.env.PI_WEB_MAX_SUBAGENTS);
|
|
13
|
+
if (Number.isFinite(raw) && raw > 0) {
|
|
14
|
+
return Math.max(1, Math.floor(raw));
|
|
15
|
+
}
|
|
16
|
+
return MAX_SUBAGENTS;
|
|
17
|
+
}
|
|
18
|
+
/** 读取当前生效的对话并发上限(支持 PI_WEB_MAX_OPEN_CONVERSATIONS 环境变量覆盖,默认 8,最小 1)。 */
|
|
19
|
+
export function getMaxOpenConversations() {
|
|
20
|
+
const raw = Number(process.env.PI_WEB_MAX_OPEN_CONVERSATIONS);
|
|
21
|
+
if (Number.isFinite(raw) && raw > 0) {
|
|
22
|
+
return Math.max(1, Math.floor(raw));
|
|
23
|
+
}
|
|
24
|
+
return MAX_OPEN_CONVERSATIONS;
|
|
25
|
+
}
|
|
10
26
|
/** SubagentSnapshot.prompt 下发上限:存的是全量 prompt,快照里只带前 N 字符。 */
|
|
11
27
|
export const SUBAGENT_PROMPT_SNAPSHOT_CAP = 2000;
|
|
12
28
|
export const DEFAULT_CONV_TITLE = "新对话";
|
|
@@ -22,7 +22,7 @@ import { isPseudoClientId, checkPluginCwd } from "./client-id-utils.js";
|
|
|
22
22
|
import { pickAdoptableOrphan } from "./orphan-manager.js";
|
|
23
23
|
import { piSessionsRoot } from "./session-search.js";
|
|
24
24
|
import { isRemoteWorkspaceUri, resolveWorkspaceSessionDir } from "./remote-ssh-service.js";
|
|
25
|
-
import {
|
|
25
|
+
import { getMaxOpenConversations } from "./agent-formatters.js";
|
|
26
26
|
import { collectSubagentDescendantIds } from "./subagents.js";
|
|
27
27
|
import { pickLatestClientSnapshot } from "./plugin-conversation-view.js";
|
|
28
28
|
import { ClientSession, QuiesceRejectedError, OFFLINE_ROW_TTL_MS, } from "./agent-service.js";
|
|
@@ -873,8 +873,9 @@ export class AgentService {
|
|
|
873
873
|
// 容量:与 switchSession 同口径(目标项目非子代理且非临时会话 8 个)。
|
|
874
874
|
const movedMains = briefs.filter((b) => moveSet.has(b.id) && !b.isSubagent && !b.isEphemeral).length;
|
|
875
875
|
const openInProject = target.takeoverBriefs().filter((b) => b.cwd === main.cwd && !b.isSubagent && !b.isEphemeral).length + movedMains;
|
|
876
|
-
|
|
877
|
-
|
|
876
|
+
const maxOpenConversations = getMaxOpenConversations();
|
|
877
|
+
if (openInProject > maxOpenConversations) {
|
|
878
|
+
fail(`目标项目运行的对话已达上限(${maxOpenConversations} 个),请先移出不需要的对话(打开后离开不继续对话即移出;钉住的对话需先取消钉住)`, `This project already has the max open conversations (${maxOpenConversations}). Open one and leave it (without continuing) to remove it from the list; pinned chats must be unpinned first.`);
|
|
878
879
|
return;
|
|
879
880
|
}
|
|
880
881
|
try {
|