Skip to content

[上游同步] 2026-11-03:上游 v3.17.2 本地预览/诊断/权限收紧(遥测保持移除) / [Upstream Sync] 2026-11-03: Upstream v3.17.2 local preview, diagnostics and permission tightening (telemetry stays removed) - #113

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
audit/upstream-2026-11-03

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@SudoUserReal

同步内容 / Synced changes

  • 内置浏览器本地 HTML 预览准入:新增 browser-local-preview 模块、zcode-html:// 协议、main 导航校验与 renderer 接线(commit:a9fe401e)/ Embedded-browser local HTML preview admission: new browser-local-preview module, zcode-html:// scheme, main navigation admission and renderer wiring (commit: a9fe401e).
  • MCP 失败诊断与 stderr 脱敏:设置页「处理建议 + 错误详情」、中英文文案、stdio 最近 stderr 附带与敏感值脱敏(commit:a9fe401e)/ MCP failure diagnostics and stderr redaction: settings "suggested steps + error details", zh/en strings, recent stdio stderr attachment and credential redaction (commit: a9fe401e).
  • 自定义命令 ! shell 块改交模型 Bash 工具:新增 handOffCustomCommandShellBlocks,CLI/bootstrap 共用,删除解析期 shell 执行器(commit:a9fe401e)/ Custom-command ! shell blocks handed off to the model's Bash tool: adds handOffCustomCommandShellBlocks, shared by CLI/bootstrap, and deletes the parse-time shell executor (commit: a9fe401e).
  • 子智能体权限继承收紧:restrictPermissionMode、插件 profile 只能收紧、Explore 继承父模式/权限服务、恢复时覆盖执行状态、Plan 下非只读 MCP 询问且无「始终允许」(commit:a9fe401e)/ Tighter subagent permission inheritance: restrictPermissionMode, plugin profiles may only tighten, Explore inherits the parent mode/permission service, resumed children get the current execution state, and non-read-only MCP tools in Plan mode ask without "always allow" (commit: a9fe401e).
  • macOS 文件应用图标回退:.icns 全透明时经 NSWorkspace/Assets.car 读取真实图标,最后才回退 app.getFileIcon(commit:a9fe401e)/ macOS file-application icon fallback: when .icns is fully transparent, read the real icon via NSWorkspace/Assets.car before falling back to app.getFileIcon (commit: a9fe401e).
  • Windows 打包平台依赖裁剪:新增 pruneIncompatiblePlatformPackages,仅在 ZCODE_PRUNE_PACKAGED_PLATFORM_DEPENDENCIES=1 时对 win32-x64 afterPack 生效(commit:a9fe401e)/ Windows packaged platform dependency prune: adds pruneIncompatiblePlatformPackages, enabled only when ZCODE_PRUNE_PACKAGED_PLATFORM_DEPENDENCIES=1 for win32-x64 afterPack (commit: a9fe401e).

剥离的遥测 / 上传行为 / Stripped telemetry or uploads

  • 无 / None。本次审计增量未发现新增上报或上传代码;同步的 6 项改动均为本地文件、诊断、权限或打包逻辑,本仓库既有的遥测移除保持不变。 / None. No new reporting or upload code was found in this increment; all 6 synced changes are local file, diagnostics, permission or packaging logic, and the fork's existing telemetry removals are preserved.

未同步 / Not synced

  • 草稿插件 UI 复用预热会话、侧栏 pane 绑定与模型上下文保活:依赖 v3.17.1 引入的 useMarketPluginUi / useRecommendedUiPlugins / plugin-ui pane 契约,main 尚未合入 PR [上游同步] 2026-10-30:上游 v3.17.1 远端诊断/CLI/文件菜单(遥测已剥离) / [Upstream Sync] 2026-10-30: Upstream v3.17.1 remote diagnostics, CLI and file menu (telemetry stripped) #103。/ Draft plugin-UI prewarm-session reuse, side-pane binding and model-context retention depend on useMarketPluginUi / useRecommendedUiPlugins / plugin-ui pane contracts introduced in v3.17.1; PR [上游同步] 2026-10-30:上游 v3.17.1 远端诊断/CLI/文件菜单(遥测已剥离) / [Upstream Sync] 2026-10-30: Upstream v3.17.1 remote diagnostics, CLI and file menu (telemetry stripped) #103 is not merged.
  • 会话生命周期 workspace 校验、fork 归属交接与 0010_remote_task_ownership:session-lifecycle/controller.ts、project-storage/repository-contract.ts 等文件在 main 不存在,无法单独应用。/ Session-lifecycle workspace validation, fork ownership and the 0010_remote_task_ownership migration cannot be applied alone because session-lifecycle/controller.ts, project-storage/repository-contract.ts and related files do not exist in main.
  • 设置页 mcp-status 的官方 MCP 身份头路由:依赖 v3.17.1 官方 MCP 链路与 zcodeAgentService 上下文。/ Official MCP identity-header routing for the settings mcp-status lane depends on the v3.17.1 official-MCP chain and zcodeAgentService context.
  • 文件管理器定位/打开方式 UI(OpenSplitButton、message.tsx、AssistantPreviewCards)与 file-open-apps/* 路径规范化:依赖 v3.17.1 文件菜单重构,main 缺少 file-open-apps/*。/ File-manager reveal/open-with UI (OpenSplitButton, message.tsx, AssistantPreviewCards) and file-open-apps/* path normalization depend on the v3.17.1 file-menu refactor; main lacks file-open-apps/*.
  • 托盘未读角标移除:审计版保留现有托盘/任务栏行为。/ Removal of the tray unread badge: the fork keeps its current tray/taskbar behavior.
  • 轮内/compact 的子会话 Plan 提醒接线:共享 helper 已同步,但调用点与 v3.17.1 turn-loop/compact 重构冲突。/ Subagent Plan-reminder wiring in the turn loop/compact path: the shared helper is synced, but the call sites conflict with the v3.17.1 turn-loop/compact refactor.
  • 测试重组、文档、架构快照与上游版本元数据:本仓库维护独立 1.y.z 版本、README 与架构快照。/ Test reorganization, docs, architecture snapshot and upstream version metadata: the fork maintains its own 1.y.z version, README and architecture snapshot.

冲突检查 / Conflict check

Warning

上一个审计增量 v3.17.1 的同步 PR #103 仍未合入 main,部分文件在 main 不存在或仍为旧结构,因此本次只同步可独立验证的 6 项改动。/ The previous v3.17.1 sync PR #103 is still unmerged, so some files do not exist in main or still use the older structure; only the 6 independently verifiable changes are synced.

  • packages/desktop/src/main/index.ts:本仓库已移除遥测装配,上游文件仍包含 conversation-telemetry / localTtft 引用;只提取本地预览协议注册与安装,保持遥测相关导入移除。/ The fork already removed telemetry wiring while the upstream file still references conversation-telemetry / localTtft; only the local-preview scheme registration and installation were taken, keeping telemetry imports removed.
  • packages/ui/src/browser-use/UnifiedBrowserView.tsx:上游补丁上下文包含 v3.17.1 的下载/恢复辅助函数,本仓库没有;只加入 loadBrowserUrl 导航准入并保留现有加载逻辑。/ The upstream patch context includes v3.17.1 download/restore helpers that the fork lacks; only loadBrowserUrl navigation admission was added, keeping the existing load logic.
  • apps/zcode-cli/packages/core/src/runtime/methods/subagent.ts:与 v3.17.1 ownedRuntimes 重构冲突;保留本仓库结构,只应用权限模式、执行状态覆盖与权限服务继承。/ Conflicts with the v3.17.1 ownedRuntimes refactor; kept the fork's structure and applied only permission mode, execution-state override and permission-service inheritance.
  • apps/zcode-cli/packages/core/tests/permission-service.test.ts:上游新用例引用本仓库不存在的 automationSelfPauseCapability,已移除该条目;其余断言保留。/ An upstream test entry referenced automationSelfPauseCapability, which does not exist in the fork; that entry was removed and the remaining assertions kept.
  • 其余同步文件(MCP adapter/UI、自定义命令、shared profile、editors、打包脚本)干净应用,无冲突。/ The remaining synced files (MCP adapter/UI, custom commands, shared profile, editors, packaging scripts) applied cleanly with no conflicts.

验证 / Verification

  • pnpm install --frozen-lockfile:成功,输出结尾 Done in 35s using pnpm v10.33.2。 / Succeeded; output ended with Done in 35s using pnpm v10.33.2.
  • pnpm typecheck:通过,退出码 0(tsc -b 覆盖 rpc/provider/shared/services/client/server/zcode-server-cli/ui/web/dev-docs/e2e-report/desktop host+e2e)。 / Passed, exit code 0 (tsc -b over rpc/provider/shared/services/client/server/zcode-server-cli/ui/web/dev-docs/e2e-report/desktop host+e2e).
  • pnpm lint:通过,退出码 0,输出 Found 116 warnings and 0 errors.。 / Passed, exit code 0, output Found 116 warnings and 0 errors.
  • pnpm architecture:check --changed:architecture: OK,violations: 0,new: 0。 / architecture: OK, violations: 0, new: 0.
  • 回归测试 / Regression tests:
    • node --test packages/desktop/tests/no-telemetry.test.mjs:3 通过 / 1 失败(4 项)。失败项 unexpected runtime import: ./desktopWebRemoteControlIpc.js 在干净 origin/main worktree 中同样复现,属既有失败;本次未改动相关文件。 / 3 passed / 1 failed (4 tests). The failing unexpected runtime import: ./desktopWebRemoteControlIpc.js also reproduces in a clean origin/main worktree, so it is pre-existing; this PR does not touch those files.
    • 定向 Vitest(contracts custom-commands、core permission-service、core subagent-plugin-permission-mode、core subagent-explore、bootstrap subagents):147 通过 / 0 失败(5 个文件)。 / Targeted Vitest (contracts custom-commands, core permission-service, core subagent-plugin-permission-mode, core subagent-explore, bootstrap subagents): 147 passed / 0 failed (5 files).
    • MCP 脱敏新增用例:2/2 通过(keeps HTTP failures separate from recent stdio stderr、redacts quoted and escaped credential values before exposing stderr)。 / New MCP redaction tests: 2/2 passed.
    • CLI 自定义命令新增用例:1/1 通过(TUI custom command expansion hands shell blocks to the model like the app path)。 / New CLI custom-command test: 1/1 passed.
    • 打包裁剪用例:packages/desktop/test/packagedPlatformDependencyPrune.test.ts 1/1 通过。 / Packaging prune test: packages/desktop/test/packagedPlatformDependencyPrune.test.ts 1/1 passed.
    • 说明 / Note:完整 apps/zcode-cli/packages/cli/tests/cli.unit.test.ts 还有 2 项 doctor/品牌断言失败(期望 zcode、实际 zcodium),不在本次改动范围;完整 mcp.test.ts 的既有 OAuth 用例在回退本次改动后仍失败,已确认与本次无关。 / The full apps/zcode-cli/packages/cli/tests/cli.unit.test.ts still has 2 doctor/branding assertion failures (expects zcode, gets zcodium) outside this change; the existing OAuth failures in the full mcp.test.ts still occur after reverting this change and are unrelated.

本 PR 由 upstream-audit 工作流自动创建,请人工审阅后合并。/ Created automatically by the upstream-audit workflow; please review before merging.

Sync non-telemetry upstream v3.17.2 changes (a60ba6a7..a9fe401e):

- local HTML preview admission for the embedded browser
- MCP failure diagnostics and stdio stderr redaction
- custom-command ! shell blocks handed off to the Bash tool
- tighter subagent permission inheritance and plugin profile restriction
- macOS application icon fallback via NSWorkspace
- Windows packaged incompatible platform dependency prune

Telemetry and upload paths remain removed. Changes depending on the
unmerged v3.17.1 sync PR #103 are deferred and documented in issue #112.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

0 participants