### Overall Summary
本次文档更新主要集中在安全策略细化与配置澄清,特别是“会话摘要”的触发限制、VS Code 扩展的诊断权限以及沙箱路径合并逻辑的调整。
### Key Themes
* **安全策略与隐私控制**:限制了自动会话摘要在第三方消息中继(如 Slack/Teams)中的触发;明确了 VS Code 新增诊断服务器的权限命名规则。
* **配置逻辑澄清**:修正了自动记忆在 AI 子会话中的开关行为;细化了沙箱文件系统路径合并时受“锁”机制影响的规则。
* **VS Code 扩展增强**:新增消息时间戳显示、`/model` 快捷指令,并引入了独立的内置诊断服务器。
* **环境配置修正**:明确 `ANTHROPIC_FOUNDRY_RESOURCE` 必须使用资源名而非 URL。
### Impact Level
**Medium**
**Reasoning:**
虽然大部分更正属于文档澄清,但 `/recap` 行为的变更(自动场景下仅返回 Notice)以及 VS Code 诊断工具的新增权限ID(`mcp__claude-vscode__getDiagnostics`)直接影响了现有的安全控制和自动化流程。若配置未及时更新,可能导致自动化任务失败或权限管控出现漏洞。
### Action Items for Developers
* **审查自动化摘要依赖**:如果你在自动化脚本或第三方集成中依赖 `/recap`,请知晓它现在将返回提示而非实际摘要内容。
* **更新 VS Code 权限规则**:若之前通过权限规则阻止诊断工具读取错误信息,需在 `deny` 列表中增加 `mcp__claude-vscode__getDiagnostics`,因为单纯的 `Read` 拒绝规则无法覆盖它。
* **修正 Foundry 配置**:检查 `ANTHROPIC_FOUNDRY_RESOURCE` 环境变量,确保它只包含资源名(如 `my-resource`),移除任何 URL 或主机名前缀。
* **理解自动记忆的限制**:在由 Claude Code 启动的子会话(如通过 Bash 工具调用)中,无法通过开关开启自动记忆,必须在直接启动的会话中操作。
* **确认沙箱合并逻辑**:在配置多层级沙箱路径时,注意被“锁”覆盖的路径不会被合并,确保策略符合预期。
💭 Model Reasoning
1. **Analyze the Request:**
* **Role:** World-class programmer analyzing documentation changes.
* **Task:** Analyze a batch of 6 documentation diffs.
* **Output:** Concise, insightful analysis in markdown, in Chinese.
* **Structure:** Overall Summary, Key Themes, Impact Level, Action Items.
2. **Analyze the Diffs (Page by Page):**
* **Page: `interactive-mode.md`** (+2/-2)
* *Change:* Updated the section on "Session recap".
* *Details:* Changed behavior: `/recap` only runs when asked *by the user*. If triggered via relay (Slack, Teams, project thread, routine), it shows a *notice* instead of the recap. Clarified that automatic recaps don't appear in non-interactive mode.
* *Implication:* Security/Privacy feature. Prevents unintended information leakage via automated triggers.
* **Page: `memory.md`** (+6/-1)
* *Change:* Updated the section on "Auto memory".
* *Details:* Clarified behavior of the toggle. In "background sessions" or sessions started by *another* Claude Code session (e.g., via Bash tool), the toggle shows "off · can't be turned on here; use a session started outside Claude Code".
* *Implication:* Usability/Config nuance. Users can't enable memory within sub-sessions spawned by AI; they must use a top-level session.
* **Page: `microsoft-foundry.md`** (+1/-0)
* *Change:* Added clarification for `ANTHROPIC_FOUNDRY_RESOURCE`.
* *Details:* Must be a resource name (e.g., `my-resource`), *not* a URL or host name. Added link to error docs.
* *Implication:* Setup fix. Prevents configuration errors.
* **Page: `sandboxing.md`** (+3/-3)
* *Change:* Refined explanations for file system merging and port settings.
* *Details:*
1. Merging filesystem arrays now excludes entries covered by a "lock" under "Keep developers from widening the policy".
2. Changed "resolves to the project root only when..." to "resolves to the project root when..." (minor grammar/precision).
3. Clarified precedence for setting ports: "The first case that matches applies."
* *Implication:* Security/Sandboxing logic clarification. Crucial for enterprise/admins configuring policies.
* **Page: `setup.md`** (+0/-3)
* *Change:* Code block formatting cleanup.
* *Details:* Removed duplicate `theme={null}` attributes in code blocks.
* *Implication:* Cosmetic/Documentation quality. No functional change.
* **Page: `vs-code.md`** (+16/-2)
* *Change:* New VS Code extension features and bug fixes.
* *Details:*
1. `/model` command now opens the picker directly (v2.1.284+).
2. New setting: `showMessageTimestamps` (v2.1.284+).
3. Clarification: `environmentVariables` setting ignores relative paths or `~` for `CLAUDE_CONFIG_DIR`.
4. New feature: Built-in diagnostics tool `claude-vscode` for the chat panel (v2.1.285+). It reads the Problems panel.
5. Security/Permissions: Hooks need to block `mcp__claude-vscode__getDiagnostics` alongside `mcp__ide__getDiagnostics`. `Read` deny rules don't work on these; use tool name denies.
* *Implication:* Feature additions and critical permission updates for VS Code extension users.
3. **Synthesize and Structure (in Chinese):**
* **Overall Summary:**
* Focus: This update refines the behavior of "Session Recap" for security, clarifies configuration precedence in sandboxing and memory features, adds small UX improvements to the VS Code extension (timestamps, model picker), and introduces a new diagnostics mechanism.
* Draft (CN): 本次文档更新主要涉及“会话摘要”的安全行为调整、沙箱与自动记忆配置逻辑的澄清,以及 VS Code 扩展的新增功能(时间戳、诊断工具)和配置限制。
* **Key Themes:**
* Security/Policy Controls (Recap in relays, Sandbox merging logic, Diagnostics permissions).
* Configuration Nuances (Auto memory in sub-sessions, Foundry resource names, Env var paths).
* VS Code Extension Enhancements (Timestamps, `/model` shortcut, Diagnostics server).
* **Impact Level:**
* *Assessment:* Medium. While mostly clarifications, the change in how `recap` works in relayed messages and the new diagnostics permissions in VS Code affect security/privacy behaviors. The sandbox merging change is important for admins.
* *Reasoning:* Breaking changes in logic (recap), new permission requirements for VS Code diagnostics, and specific config validations.
* **Action Items:**
* Check `recap` usage if relying on it in automated flows (it will fail/show notice).
* Update VS Code permission hooks/deny rules if blocking diagnostics.
* Verify `ANTHROPIC_FOUNDRY_RESOURCE` isn't a URL.
* Be aware that auto memory cannot be toggled on in AI-spawned sessions.
* Review `sandbox.filesystem` merging logic regarding "locks".
4. **Drafting the Response (Iterative refinement for tone and brevity):**
* *Summary:* 本次更新主要集中在安全策略细化与配置澄清,特别是会话摘要的触发条件、VS Code 扩展的诊断权限以及沙箱路径合并逻辑。
* *Themes:*
* 安全策略强化:限制了自动摘要在第三方集成(Slack/Teams)中的触发,明确了 VS Code 诊断工具的权限命名。
* 配置与沙箱逻辑:修正了自动记忆在子会话中的行为,细化了沙箱文件系统数组合并时的规则。
* VS Code 功能增强:新增消息时间戳显示、`/model` 快捷指令及内置诊断服务器。
* *Impact:* Medium。主要涉及行为变更和权限定义的补充,虽然代码未直接破坏,但配置和权限策略需相应调整。
* *Action Items:*
* 检查是否依赖自动化场景下的 `/recap` 功能(现会返回 Notice)。
* 更新 VS Code 权限配置,若需阻止诊断,需同时拒绝 `mcp__claude-vscode__getDiagnostics`。
* 核查 `ANTHROPIC_FOUNDRY_RESOURCE` 变量是否为纯资源名而非 URL。
* 注意自动记忆在“后台会话”或 AI 启动的会话中无法开启。
5. **Final Polish (Markdown formatting):** Ensure headers and lists match the requested format. (Self-correction: Ensure specific version numbers like v2.1.284 are mentioned if relevant to impact, but keep it concise).
* *Refining the "Recap" point:* It's a privacy/security change. Important.
* *Refining the "Diagnostics" point:* New tool name added, existing `Read` deny rules don't cover it. This is a potential security gap if ignored.
6. **Final Output Generation** (matches the provided good response).