# 文档变更分析
## 总体摘要
本次更新主要涉及文档结构的重大重组,将管理类主题(如认证、数据驻留、速率限制)迁移至新路径,同时大幅完善了 API 引用字段的说明,并发布了包含多项新功能和修复的 CLI 版本。
## 关键主题
* **文档结构重组(路径迁移)**
* 系统性地将管理与合规相关文档从 `/docs/en/build-with-claude/` 迁移至 `/docs/en/manage-claude/`。
* 受影响的路径包括:`data-residency`(数据驻留)、`workload-identity-federation`(工作负载身份联合)、`authentication`(认证)、`rate-limits-api`(速率限制 API)、`workspaces`(工作区)以及 `api-and-data-retention`(API 和数据保留)。
* **解读:** 这标志着文档逻辑从“如何构建”到“如何管理/运维”的明确分离。
* **API 引用功能澄清**
* 在 `api/messages`、`count_tokens` 和 `batches` 文档中,为引用字段(`cited_text`、`start_block_index`、`end_block_index` 等)添加了详细描述。
* **关键细节:** 明确指出 `cited_text` 字段**不计入输出 Token**,且在后续轮次中发回时**也不计入输入 Token**。这对成本控制是一个重要的利好。
* **新功能能力标志**
* 在 `api/models` 和 `api/beta/files/upload` 中发现了一个新的能力标志:`"managed-agents-2026-04-01"`。这预示着未来将发布名为“托管代理”的新功能。
* **Claude Code CLI 更新 (v2.1.129)**
* 新增从 URL 获取插件的标志 (`--plugin-url`)。
* 新增环境变量以强制同步输出 (`CLAUDE_CODE_FORCE_SYNC_OUTPUT`) 和控制包管理器自动更新。
* **行为变更:** `Ctrl+R` 历史记录选择器现在默认搜索所有项目的所有提示词(可通过 Ctrl+S 切换回当前项目)。
* 修复了包括 1 小时 Prompt Cache TTL 被静默降级、`/clear` 命令问题、以及 `Bash` 规则匹配等多个 Bug。
## 影响等级:**中等**
**理由:**
1. **链接失效风险:** 大规模的文档路径迁移会导致现有的书签或内部 Wiki 中的链接失效,虽然不影响代码运行,但会增加维护成本。
2. **成本透明度提升:** 明确 `cited_text` 不计费有助于开发者更精确地计算 Token 成本,但属于认知层面的优化,不涉及 API 行为变更。
3. **CLI 行为变更:** `Ctrl+R` 搜索行为的改变可能会影响用户的使用习惯,但属于工具层面的微调。
## 开发者行动项
* **更新文档链接:** 检查并更新您内部知识库或代码注释中指向数据驻留、速率限制 API 和工作负载身份联合的旧路径链接(从 `build-with-claude` 改为 `manage-claude`)。
* **利用免费的引用文本:** 在实现引用逻辑时,可以放心使用 `cited_text` 字段来获取完整的引用内容,而不必担心产生额外的 Token 费用。
* **适应 CLI 搜索变化:** 如果您使用 Claude Code CLI,请注意 `Ctrl+R` 现在默认搜索全局历史,如需仅搜索当前项目,请使用 `Ctrl+S`。
* **关注 Prompt Cache 修复:** 验证您的应用是否受益于此次更新中关于“1 小时 Prompt Cache TTL 被静默降级”问题的修复。
💭 Model Reasoning
1. **Analyze the Request:**
* **Role:** World-class programmer, expert in dev tools/docs.
* **Task:** Analyze a batch of documentation changes (21 pages total) as a single batch.
* **Output Format:** Markdown, concise, insightful, focusing on what matters to developers.
* **Language:** Chinese (as requested: "请用中文回复").
* **Structure Required:**
1. Overall Summary (1-2 sentences).
2. Key Themes (bullets).
3. Impact Level (Low/Medium/High/Breaking) with reasoning.
4. Action Items (bullets, max 5).
2. **Analyze the Diff Data:**
* *Page 1: `about-claude/pricing.md`*
* Change: Path updates. `build-with-claude/data-residency` -> `manage-claude/data-residency`.
* *Page 2: `api/overview.md`*
* Change: Path updates. `build-with-claude/workload-identity-federation` -> `manage-claude/workload-identity-federation`, `api/authentication/overview` -> `manage-claude/authentication`.
* *Page 3: `api/messages.md`*
* Change: Added extensive documentation for citation fields (`cited_text`, `document_index`, `end_block_index`, `start_block_index`, `search_result_index`).
* Details: Explains what these fields represent (indices, concatenated text), and crucially states `cited_text` is "Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns." Also clarifies `search_result_index` behavior.
* *Page 4: `api/messages/count_tokens.md`*
* Change: Same citation field documentation additions as Page 3.
* *Page 5: `api/messages/batches/create.md`*
* Change: Same citation field documentation additions as Page 3.
* *Page 6: `api/models/list.md`*
* Change: "21 more" instead of "20 more" in UnionMember1 description.
* New Capability: Added `"managed-agents-2026-04-01"` capability string.
* *Page 7: `api/beta/files/upload.md`*
* Change: "21 more" instead of "20 more" in UnionMember1 description.
* New Capability: Added `"managed-agents-2026-04-01"` capability string.
* *Page 8: `api/rate-limits.md`*
* Change: Path updates. `build-with-claude/rate-limits-api` -> `manage-claude/rate-limits-api`, `build-with-claude/workspaces` -> `manage-claude/workspaces`.
* *Page 9: `api/service-tiers.md`*
* Change: Path updates. `build-with-claude/data-residency` -> `manage-claude/data-residency`.
* *Page 10: `build-with-claude/overview.md`*
* Change: Path update for "Data residency". Also updates the footnote link at the bottom for ZDR details.
* *Page 11: `build-with-claude/text-generation.md`*
* Change: Same path updates as Page 10.
* *Page 12-21 (various)*:
* `build-with-claude/prompt-caching.md`
* `build-with-claude/batch-processing.md`
* `build-with-claude/structured-outputs.md`
* `build-with-claude/files.md`
* `agents-and-tools/tool-use/computer-use-tool.md`
* `agents-and-tools/tool-use/code-execution-tool.md`
* `agents-and-tools/tool-use/programmatic-tool-calling.md`
* `agents-and-tools/agent-skills/overview.md`
* `agents-and-tools/mcp-connector.md`
* `CHANGELOG.md.md`
* Changes: All of these update the link for "API and data retention" from `build-with-claude/api-and-data-retention` to `manage-claude/api-and-data-retention`.
* *Page 21: `CHANGELOG.md.md`*
* Change: Added version `2.1.129` changelog.
* Key Features: Plugin URL fetching, env vars for sync output and package updates, Gateway model discovery opt-in, Ctrl+R history search behavior change (defaults to all projects), skill overrides setting, bug fixes (clear, context, branch, bold headers, OAuth, prompt cache TTL, bash rules, MCP server patterns, VSCode clear).
3. **Synthesize and Categorize:**
* **Theme 1: Documentation Restructuring (Path Changes).**
* There is a massive move from `build-with-claude/...` to `manage-claude/...` for infrastructure/management topics like Data Residency, Workload Identity Federation, Rate Limits API, Workspaces, and API/Data Retention.
* *Developer Impact:* Bookmarks or hardcoded links in code/docs might break. It suggests a conceptual separation between "Building features" (Prompts, Tools, Agents) and "Managing Platform" (Auth, Limits, Billing, Compliance).
* **Theme 2: API Clarification - Citations.**
* Significant detail added to `api/messages.md`, `count_tokens.md`, and `batches/create.md` regarding citation fields (`start_block_index`, `end_block_index`, `cited_text`, `search_result_index`).
* *Crucial Detail:* `cited_text` is **not counted towards tokens** (output or input in subsequent turns). This is a huge win for cost calculation and transparency.
* **Theme 3: New Capability Flag.**
* Addition of `"managed-agents-2026-04-01"` in model lists and file uploads. Teases a future feature (Managed Agents).
* **Theme 4: CLI Tool Updates (Changelog).**
* `CHANGELOG.md` shows extensive updates to the Claude Code CLI (v2.1.129).
* Behavioral changes: `Ctrl+R` now searches all prompts by default.
* Fixes: Prompt cache TTL enforcement, `clear` command issues, path matching improvements.
4. **Drafting the Content (in Chinese):**
* *Summary:* The changes involve a major documentation restructuring moving management topics to a new path, detailed clarification on the token-free nature of citation text in the API, and a significant CLI update with new features and bug fixes.
* *Themes:*
1. **Documentation Restructuring:** Systematic migration of "management" related docs (auth, rate limits, data residency) from `build-with-claude/` to `manage-claude/`.
2. **Citations Clarification:** Added detailed descriptions for citation fields, explicitly stating that `cited_text` is not counted towards token usage.
3. **New Capability Flags:** Introduced a new `managed-agents-2026-04-01` capability flag.
4. **CLI Enhancements:** Version 2.1.129 update brings plugin URL fetching, refined search behavior, and multiple bug fixes.
* *Impact:* **Medium**. The path changes break existing links, which is annoying but not code-breaking. The citation token clarification is beneficial knowledge but doesn't change existing behavior. The CLI changes are behavioral but backwards compatible enough (mostly fixes).
* *Action Items:*
1. Update any hardcoded documentation links in your internal wikis or code comments pointing to `build-with-claude/data-residency`, `rate-limits-api`, etc.
2. Review the `cited_text` field implementation in your citation logic; note that it effectively provides free context.
3. If using the Claude Code CLI, be aware of the `Ctrl+R` search behavior change (now global by default).
4. Check the new `CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE` environment variable if auto-updating the CLI is a concern.
5. **Refining the Output (Self-Correction/Translation Check):**
* *Chinese Translation Check:*
* "Restructuring" -> 文档结构重组 / 路径迁移.
* "Citations" -> 引用.
* "Token-free" -> 不计入 Token.
* "Capability Flag" -> 能力标志 / 功能标记.
* "CLI" -> 命令行工具.
* *Formatting:* Ensure markdown syntax is correct.
6. **Final Polish:**
* Make sure the summary is punchy.
* Ensure the distinction between `build-with-claude` (development) and `manage-claude` (ops/management) is clear in the themes.
* Highlight the `cited_text` token cost benefit clearly.
*(Self-Correction during drafting)*: The prompt asks for "concise, insightful analysis". Don't just list every changed file. Group them.
*Drafting Action Items:*
1. Update bookmarked links for Data Residency, Rate Limits, and Auth docs.
2. Utilize the `cited_text` field knowing it doesn't incur token costs.
3. Adapt to the new `Ctrl+R` default search behavior in the CLI.
4. Monitor for the upcoming `managed-agents-2026-04-01` feature.
7. **Final Output Generation** (matches the thought process above).