From 7ad59710c3996bd191e9f93b626a9bebd2d081ef Mon Sep 17 00:00:00 2001 From: yudshj Date: Fri, 20 Nov 2026 23:25:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(office):=20=E6=8C=89=20review=20=E6=84=8F?= =?UTF-8?q?=E8=A7=81=E6=9B=B4=E6=96=B0=E6=97=A7=E7=AC=94=E8=AE=B0=E7=8E=B0?= =?UTF-8?q?=E7=8A=B6=E3=80=81=E6=B8=85=E7=90=86=E6=B5=8B=E8=AF=95=E5=B9=B6?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=20promptChanges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 2026-09-27 的 Office 笔记就地改写仍以现在时描述四技能目录、操作技能 和共享检查器的段落,指向取代它们的后续笔记。 - progressive-loading.spec.ts 去掉读取格式文件时遗留的本地文件系统和 文件工具挂载,setup 改为直接接收要加载的技能名。 - session-snapshot README 说明 headless 套件中非 pin 场景可以声明少于 pin 的 header.promptChanges,只比对 pin 提示词伴随文件的前导小节。 --- ...-09-27-progressive-office-skills.i18n.yaml | 12 +++++----- .../2026-09-27-progressive-office-skills.md | 10 ++++---- ...2026-09-27-progressive-office-skills.zh.md | 10 ++++---- .../tests/progressive-loading.spec.ts | 24 +++++++------------ .../session-snapshot/README.i18n.yaml | 4 ++-- .../test-support/session-snapshot/README.md | 2 +- .../session-snapshot/README.zh.md | 2 +- 7 files changed, 28 insertions(+), 36 deletions(-) diff --git a/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.i18n.yaml b/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.i18n.yaml index 47415c39ad..c1b8d85afb 100644 --- a/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.i18n.yaml +++ b/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.i18n.yaml @@ -9,11 +9,11 @@ en: a9984a594cdac98d zh: 38768e7699bc8d39 /agent-note-progressive-office-skills-with-ordinary-shell-execution/decision: - en: 35f5ac9c12056f7f - zh: f1fe3f821ff6f093 + en: 621c2a5d11fdc00f + zh: 1c1aad447d235261 /agent-note-progressive-office-skills-with-ordinary-shell-execution/alternatives-considered: - en: 0689e709dc1ff48d - zh: 5d2108ccdd13f093 + en: a706c300a7bf2c45 + zh: 6c8bbbc67282d642 /agent-note-progressive-office-skills-with-ordinary-shell-execution/consequences: - en: cd4ff2423b2f5f9e - zh: 63135aeae9c46415 + en: d310fce6180a5837 + zh: dbbc45a131231973 diff --git a/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.md b/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.md index 010c39ccd4..205406fdf0 100644 --- a/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.md +++ b/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.md @@ -11,9 +11,9 @@ Combined authoring and rendering instructions spend context on operations unrela ## Decision -The [Office provider](../../../../packages/skill/skill-office/README.md) lists a compact router and three format-specific authoring skills; the operation skills this decision introduced are replaced by the [on-demand Office tools](2026-10-31-native-office-tool.md). The model loads full instructions by name and selects rendering for appearance-focused changes unless the user explicitly skips it. Rendering uses a private, randomly named temporary directory inside the task workspace and removes it after inspection. Skills invoke the shared Python checker and configured LibreOffice Kit CLI through ordinary Bash or PowerShell. SDK and Desktop own their Office composition separately; ordinary Web and the shared base do not mount these plugins. [Office skills in every deployment](2026-10-26-cross-deployment-office-kit.md) supersedes this mounting decision, and the [on-demand Office tools](2026-10-31-native-office-tool.md) supersede the shell execution and renderer-tool rejection. The [single Office skill](2026-11-06-single-office-skill.md) supersedes the four-skill catalog with one `office` skill that carries concise inline guidance. +The [Office provider](../../../../packages/skill/skill-office/README.md) exposes Office guidance as skills that the model loads by name; the host injects no instructions for file extensions. This decision introduced a router, three format-specific authoring skills, and operation skills that ran the shared Python checker and the configured LibreOffice Kit CLI through ordinary Bash or PowerShell, mounted only by SDK and Desktop. [Office skills in every deployment](2026-10-26-cross-deployment-office-kit.md) supersedes the mounting decision; the [on-demand Office tools](2026-10-31-native-office-tool.md) supersede the operation skills, their shell execution, and the renderer-tool rejection; and the [single Office skill](2026-11-06-single-office-skill.md) replaces the router and authoring skills with one `office` skill that carries concise inline guidance. -Carriers own interpreter and resource locations. Operation skills append the configured Node and CLI paths only when their bodies are loaded; authoring skills use the selected Python and shared checker resource. Loading instructions does not prepare engines or authoring payloads. Ordinary shell execution retains its existing permissions and process management. +Carriers own interpreter and resource locations: the composition selects the Python environment named in the `office` body and the asset root that holds the skill. Loading instructions does not prepare engines or authoring payloads. Scripts that the model writes run through the ordinary shell tools, which keep their existing permissions and process management. LibreOffice Kit dependencies declare one exact version in every manifest; the root lock records the resolved adapter and engine versions. @@ -21,12 +21,12 @@ LibreOffice Kit dependencies declare one exact version in every manifest; the ro **Keep a dedicated renderer tool.** A small typed schema constrains rendering arguments, but requires its own execution configuration, scoped registration, projection, and activation lifecycle. The CLI operation skills accept shell quoting and model-selected arguments in exchange for reusing the existing approval, sandbox, cancellation, and output mechanisms. -**Hide subskills from the catalog.** This requires a generic visibility policy independent of invocation permission. Listing four short summaries preserves the existing skill API while full instruction bodies remain demand-loaded. +**Hide subskills from the catalog.** This requires a generic visibility policy independent of invocation permission. The [single Office skill](2026-11-06-single-office-skill.md) removes the subskills instead of hiding them. **Automatically inject guides for file extensions.** Extensions do not distinguish text edits, recalculation, conversion, and requested visual checks. Model-selected routing keeps unrelated operations out of context and permits explicit direct invocation. ## Consequences -Instruction loading appends ordinary logged skill results; completion does not erase them. Historical tool records remain readable and existing declaration reconciliation handles resumed sessions without a Session format change or agent-loop modification. A dedicated renderer would need a new independently justified user or security requirement before reintroduction. +Instruction loading appends ordinary logged skill results; completion does not erase them. Historical tool records remain readable and existing declaration reconciliation handles resumed sessions without a Session format change or agent-loop modification. The [on-demand Office tools](2026-10-31-native-office-tool.md) record the reasons for a dedicated renderer. -Verification covers catalog entries, denied and explicit invocation, authoring without executable paths, native/PTC requests, resume and fork, ordinary and minimal profile composition, resource packaging, context budgets, and real-model operation selection. Rendering failures preserve usable sources and stop visual checks; successful commands alone cannot establish usable images. +Verification covers catalog entries, denied and explicit invocation, authoring without executable paths, native/PTC requests, resume and fork, ordinary and minimal profile composition, resource packaging, context budgets, and real-model operation selection. diff --git a/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.zh.md b/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.zh.md index afcd634984..de448e0a0c 100644 --- a/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.zh.md +++ b/.agents/notes/implemented/architecture/2026-09-27-progressive-office-skills.zh.md @@ -11,9 +11,9 @@ Status: implemented ## 决策 -[Office 提供者](../../../../packages/skill/skill-office/README.zh.md) 列出精简路由和三个各格式创作技能;本决策引入的操作技能已由[按需激活的 Office 工具](2026-10-31-native-office-tool.zh.md)取代。模型按名称加载完整说明;以外观为目标的修改会选择渲染,除非用户明确要求跳过。渲染使用任务工作区内随机命名的私有临时目录,并在检查后删除。技能通过普通 Bash 或 PowerShell 调用共享 Python 检查器和配置的 LibreOffice Kit CLI。SDK 和 Desktop 分别拥有 Office 组合;普通 Web 和共享 base 不挂载这些插件。[Office 技能在所有部署中可用](2026-10-26-cross-deployment-office-kit.zh.md)取代此挂载决策,[按需激活的 Office 工具](2026-10-31-native-office-tool.zh.md)取代其 shell 执行方式和对渲染工具的否决。[单个 Office 技能](2026-11-06-single-office-skill.zh.md)以携带精简内联指导的单一 `office` 技能取代四技能目录。 +[Office 提供者](../../../../packages/skill/skill-office/README.zh.md)以技能形式提供 Office 指导,由模型按名称加载;宿主不会按文件扩展名注入说明。本决策引入了一个路由技能、三个各格式创作技能,以及通过普通 Bash 或 PowerShell 调用共享 Python 检查器和配置的 LibreOffice Kit CLI 的操作技能,并且只由 SDK 和 Desktop 挂载。[Office 技能在所有部署中可用](2026-10-26-cross-deployment-office-kit.zh.md)取代其挂载决策;[按需激活的 Office 工具](2026-10-31-native-office-tool.zh.md)取代操作技能、其 shell 执行方式和对渲染工具的否决;[单个 Office 技能](2026-11-06-single-office-skill.zh.md)以携带精简内联指导的单一 `office` 技能取代路由技能和创作技能。 -载体负责解释器和资源位置。操作技能仅在加载正文时附加配置的 Node 与 CLI 路径;创作技能使用选定的 Python 和共享检查器资源。加载说明不准备引擎或创作 payload。普通 shell 执行保留现有权限和进程管理。 +载体负责解释器和资源位置:由组合选择 `office` 正文中注明的 Python 环境,以及存放该技能的资源根目录。加载说明不准备引擎或创作 payload。模型编写的脚本通过普通 shell 工具运行,保留现有权限和进程管理。 LibreOffice Kit 依赖在每个清单中声明同一个精确版本;根锁文件记录实际解析的适配器与引擎版本。 @@ -21,12 +21,12 @@ LibreOffice Kit 依赖在每个清单中声明同一个精确版本;根锁文 **保留专属渲染工具。** 小型类型化 schema 能约束渲染参数,但需要专属执行配置、作用域注册、投影和激活生命周期。CLI 操作技能接受 shell 引用和模型选择参数的成本,以复用现有审批、沙箱、取消及输出机制。 -**从目录隐藏子技能。** 这需要独立于调用权限的通用可见性策略。列出四条简短摘要可保留现有技能 API,完整说明仍按需加载。 +**从目录隐藏子技能。** 这需要独立于调用权限的通用可见性策略。[单个 Office 技能](2026-11-06-single-office-skill.zh.md)直接移除子技能,而不是隐藏它们。 **按文件扩展名自动注入指南。** 扩展名无法区分文本编辑、重计算、转换和用户要求的视觉检查。模型选路使无关操作不进入上下文,并允许显式直接调用。 ## 影响 -说明加载追加普通的已记录技能结果;操作完成不会擦除这些结果。历史工具记录仍可读取,恢复会话使用现有声明更新机制,无需修改 Session 格式或 agent loop。重新引入专属渲染器需要新的、独立成立的用户或安全要求。 +说明加载追加普通的已记录技能结果;操作完成不会擦除这些结果。历史工具记录仍可读取,恢复会话使用现有声明更新机制,无需修改 Session 格式或 agent loop。[按需激活的 Office 工具](2026-10-31-native-office-tool.zh.md)记录了采用专属渲染器的理由。 -验证覆盖目录条目、拒绝及显式调用、无可执行文件路径时的创作、native/PTC 请求、恢复和 fork、常规及 minimal 组合、资源打包、上下文预算和真实模型操作选择。渲染失败时保留可用源文件并停止视觉检查;命令成功本身不能证明图片可用。 +验证覆盖目录条目、拒绝及显式调用、无可执行文件路径时的创作、native/PTC 请求、恢复和 fork、常规及 minimal 组合、资源打包、上下文预算和真实模型操作选择。 diff --git a/packages/skill/skill-office/tests/progressive-loading.spec.ts b/packages/skill/skill-office/tests/progressive-loading.spec.ts index 124b158c1b..7937895e1d 100644 --- a/packages/skill/skill-office/tests/progressive-loading.spec.ts +++ b/packages/skill/skill-office/tests/progressive-loading.spec.ts @@ -11,8 +11,6 @@ import { provideWorkingDirectoryFixture } from '@deepseek-ai/dsh-agent-loop-test import LlmRuntime, { createUserMessage } from '@deepseek-ai/dsh-llm' import SessionStore, { type SessionId } from '@deepseek-ai/dsh-session' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' -import LocalFileSystem from '@deepseek-ai/dsh-fs-local' -import * as ToolFs from '@deepseek-ai/dsh-tool-fs' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import { PtcInspectableValue, PtcRuntime, type PtcRunRequest, type PtcRunSpec } from '@deepseek-ai/dsh-ptc-runtime' @@ -23,12 +21,9 @@ import { MockAdapter, textResponse, toolCallResponse } from '../../../core/agent import { expectNoRenderContext } from './fixtures/real-office.ts' import { brandString } from '@deepseek-ai/dsh-brand' -interface ToolCall { tool: string; args: Record } - const contexts: Context[] = [] /** The `office` skill's advertised resource directory. */ const resourceBase = fileURLToPath(new URL('../assets/office/', import.meta.url)).replace(/[\\/]$/u, '').split(sep).join('/') -const office: ToolCall = { tool: 'skill', args: { name: 'office' } } afterEach(async () => { for (const ctx of contexts.splice(0)) await ctx.fiber.dispose() }) class SkillProgram extends PtcRuntime { @@ -36,14 +31,13 @@ class SkillProgram extends PtcRuntime { readonly isolation = 'fixture' resolve(request: PtcRunRequest): PtcRunSpec { return { ...request, cwd: process.cwd(), timeoutMs: 120_000 } } async run(request: PtcRunSpec) { - const { tool, args } = JSON.parse(request.program) as ToolCall - const resolved = await request.bindings[0]!.functions[tool]!(args) + const resolved = await request.bindings[0]!.functions.skill!({ name: request.program }) const value = resolved instanceof PtcInspectableValue ? resolved.value : resolved return { output: [{ type: 'text' as const, text: JSON.stringify(value) }] } } } -async function setup(mode: 'native' | 'ptc', calls: ToolCall[]) { +async function setup(mode: 'native' | 'ptc', skills: string[]) { const ctx = new Context() contexts.push(ctx) provideWorkingDirectoryFixture(ctx) @@ -57,14 +51,12 @@ async function setup(mode: 'native' | 'ptc', calls: ToolCall[]) { await ctx.plugin(AgentLoop, { agents: [] }) await ctx.plugin(SkillRegistry) await ctx.plugin(ToolSkill) - await ctx.plugin(LocalFileSystem, { cwd: '/' }) - await ctx.plugin(ToolFs) await ctx.plugin(SkillOffice) if (mode === 'ptc') await ctx.plugin(SkillProgram) const adapter = new MockAdapter([ - ...calls.map((call, index) => mode === 'native' - ? toolCallResponse(`call-${index}`, call.tool, call.args) - : toolCallResponse(`call-${index}`, 'run_code', { code: JSON.stringify(call), description: 'Load task instructions' })), + ...skills.map((name, index) => mode === 'native' + ? toolCallResponse(`call-${index}`, 'skill', { name }) + : toolCallResponse(`call-${index}`, 'run_code', { code: name, description: 'Load task instructions' })), textResponse('Done.'), textResponse('Continued.'), textResponse('Fork continued.'), ]) ctx.llm.registerAdapter(['mock'], adapter) @@ -78,7 +70,7 @@ async function send(agent: Agent, text = 'Continue the task'): Promise { } it.each(['native', 'ptc'] as const)('loads the office skill in %s; resume and fork retain its instructions', async (mode) => { - const { ctx, agent, adapter } = await setup(mode, [office]) + const { ctx, agent, adapter } = await setup(mode, ['office']) await send(agent, 'Edit the Word document text.') expect(adapter.requests).toHaveLength(2) const requests = adapter.requests.map(request => JSON.stringify(request)) @@ -108,7 +100,7 @@ it.each(['native', 'ptc'] as const)('loads the office skill in %s; resume and fo }) it('routes standalone operations to dedicated Office tools', async () => { - const { agent, adapter } = await setup('native', [office]) + const { agent, adapter } = await setup('native', ['office']) await send(agent) const loaded = JSON.stringify(adapter.requests.at(-1)) expect(loaded).toContain('# Office tasks') @@ -127,7 +119,7 @@ it('injects an explicitly invoked office skill into the first request', async () }) it.each(['native', 'ptc'] as const)('accepts loaded instructions without a render call as a non-rendering context in %s', async (mode) => { - const { agent } = await setup(mode, [office]) + const { agent } = await setup(mode, ['office']) await send(agent, 'Edit the Office files without visual inspection.') const events = agent.session.snapshotEvents() expect(JSON.stringify(events)).toContain('# Office tasks') diff --git a/packages/test-support/session-snapshot/README.i18n.yaml b/packages/test-support/session-snapshot/README.i18n.yaml index c523aef096..4a01f8a295 100644 --- a/packages/test-support/session-snapshot/README.i18n.yaml +++ b/packages/test-support/session-snapshot/README.i18n.yaml @@ -24,8 +24,8 @@ en: bd9dcb62ea4e77db zh: be9615f0ae662c9e /deepseek-ai-dsh-session-snapshot/use-this-package/pinning-request-headers-and-system-prompts: - en: fe59b0197fa5e34c - zh: dfa1844c2c965358 + en: 5c93a9b1496ccb4b + zh: ed692abdaddf6fd9 /deepseek-ai-dsh-session-snapshot/use-this-package/platform-and-composition-variants: en: cb03a05e3d77e758 zh: 439fa73419205cc0 diff --git a/packages/test-support/session-snapshot/README.md b/packages/test-support/session-snapshot/README.md index 88352db00e..4e5a3fcfaf 100644 --- a/packages/test-support/session-snapshot/README.md +++ b/packages/test-support/session-snapshot/README.md @@ -90,7 +90,7 @@ A nested `workspace.expected//.empty` marker represents an empty dire ### Pinning request headers and system prompts -A pin owns its generated `system-prompt.expected.md` or `tool-schemas.expected.json` sidecar by default; `systemPromptSource` and `toolSchemasSource` name another pin when the complete corresponding sequence is identical, so each distinct version is committed once. The system prompt is surface node 0, logged as a `system/message` event before the step's first `request/header`; every fixture stores its text block as `"text":"{{system}}"` and the prompt sidecar keeps the full text. The pin's `request/header` events store `"tools":"{{tools}}"` while retaining config and reason, and the structured schema sidecar keeps the full catalogs. Logs containing developer messages retain ordered tool names in each header instead of the token so historical addition references remain verifiable. A child Session whose own scope composes a different request declares it per fixture index with `pinsChildToolSchemas` and `pinsChildSystemPrompts`. A scenario that changes the request header mid-run declares `expectedHeaderChanges`; a scenario whose prompt changes mid-run — replacing node 0, or appending after the cached history on an `in-history` route — declares `expectedPromptChanges`, and each change adds a `` section to the prompt sidecar. The manifest spells these `header.changes` and `header.promptChanges`. Headers without tools retain an empty schema set in the sidecar, so the first later addition stays aligned with its header. +A pin owns its generated `system-prompt.expected.md` or `tool-schemas.expected.json` sidecar by default; `systemPromptSource` and `toolSchemasSource` name another pin when the complete corresponding sequence is identical, so each distinct version is committed once. The system prompt is surface node 0, logged as a `system/message` event before the step's first `request/header`; every fixture stores its text block as `"text":"{{system}}"` and the prompt sidecar keeps the full text. The pin's `request/header` events store `"tools":"{{tools}}"` while retaining config and reason, and the structured schema sidecar keeps the full catalogs. Logs containing developer messages retain ordered tool names in each header instead of the token so historical addition references remain verifiable. A child Session whose own scope composes a different request declares it per fixture index with `pinsChildToolSchemas` and `pinsChildSystemPrompts`. A scenario that changes the request header mid-run declares `expectedHeaderChanges`; a scenario whose prompt changes mid-run — replacing node 0, or appending after the cached history on an `in-history` route — declares `expectedPromptChanges`, and each change adds a `` section to the prompt sidecar. The manifest spells these `header.changes` and `header.promptChanges`. In the headless suite, a scenario that is not the pin may declare fewer `header.promptChanges` than its pin; its prompts are then compared with the leading sections of the pin's prompt sidecar through that change, while `header.changes` is always read from the pin. Headers without tools retain an empty schema set in the sidecar, so the first later addition stays aligned with its header. ### Platform and composition variants diff --git a/packages/test-support/session-snapshot/README.zh.md b/packages/test-support/session-snapshot/README.zh.md index 91de5ccb49..f5d4fc14ef 100644 --- a/packages/test-support/session-snapshot/README.zh.md +++ b/packages/test-support/session-snapshot/README.zh.md @@ -90,7 +90,7 @@ Headless/ACP 与 SDK 适配器在规范化之前,将原始目录中的子创 ### 固定请求 header 与系统提示 -每个 pin 默认拥有其生成的 `system-prompt.expected.md` 或 `tool-schemas.expected.json` 伴随文件;当完整的对应序列相同时,`systemPromptSource` 与 `toolSchemasSource` 指定另一个 pin 作为来源,因此每个不同版本只提交一次。系统提示是 surface 节点 0,作为 `system/message` 事件记录在该步骤第一个 `request/header` 之前;每个 fixture 把其文本块存储为 `"text":"{{system}}"`,提示词伴随文件保留完整文本。该 pin 的 `request/header` 事件存储 `"tools":"{{tools}}"`,同时保留配置与原因,结构化 schema 伴随文件保留完整目录。包含 developer 消息的日志会在各 header 中保留有序工具名,而不使用 token,以便继续校验历史工具添加引用。自身作用域组合出不同请求的 child Session 按 fixture 索引以 `pinsChildToolSchemas` 与 `pinsChildSystemPrompts` 单独声明。运行中改变请求 header 的场景声明 `expectedHeaderChanges`;运行中提示词发生变化的场景——替换节点 0,或在 `in-history` 路由上追加到已缓存历史之后——声明 `expectedPromptChanges`,每次变化在提示词伴随文件中增加一个 `` 小节。manifest 中对应字段为 `header.changes` 与 `header.promptChanges`。没有工具的请求头在 sidecar 中保留空 schema 集,使后续首次添加仍与其请求头对齐。 +每个 pin 默认拥有其生成的 `system-prompt.expected.md` 或 `tool-schemas.expected.json` 伴随文件;当完整的对应序列相同时,`systemPromptSource` 与 `toolSchemasSource` 指定另一个 pin 作为来源,因此每个不同版本只提交一次。系统提示是 surface 节点 0,作为 `system/message` 事件记录在该步骤第一个 `request/header` 之前;每个 fixture 把其文本块存储为 `"text":"{{system}}"`,提示词伴随文件保留完整文本。该 pin 的 `request/header` 事件存储 `"tools":"{{tools}}"`,同时保留配置与原因,结构化 schema 伴随文件保留完整目录。包含 developer 消息的日志会在各 header 中保留有序工具名,而不使用 token,以便继续校验历史工具添加引用。自身作用域组合出不同请求的 child Session 按 fixture 索引以 `pinsChildToolSchemas` 与 `pinsChildSystemPrompts` 单独声明。运行中改变请求 header 的场景声明 `expectedHeaderChanges`;运行中提示词发生变化的场景——替换节点 0,或在 `in-history` 路由上追加到已缓存历史之后——声明 `expectedPromptChanges`,每次变化在提示词伴随文件中增加一个 `` 小节。manifest 中对应字段为 `header.changes` 与 `header.promptChanges`。在 headless 套件中,非 pin 场景可以声明少于其 pin 的 `header.promptChanges`,此时其提示词只与 pin 提示词伴随文件中截至该次变化的前导小节比对;`header.changes` 始终取自 pin。没有工具的请求头在 sidecar 中保留空 schema 集,使后续首次添加仍与其请求头对齐。 ### 平台与组合变体