fix(workspace-context): guard baseline restoration

This commit is contained in:
fz
2026-08-03 22:05:17 +08:00
parent eff7b758b1
commit 19be29cd0b
31 changed files with 249 additions and 105 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/core-data-structures/system-prompt.md
system-prompt.md: 5abb8f46c13045c7d37bbe12ecf6c3744ee063b5
system-prompt.zh.md: 1088b20ba4289ad5912a193eead39d069c1a6e17
system-prompt.md: d585dd2604e83a808beefd8fb22685ab6b88878a
system-prompt.zh.md: ade05e151cb70af98e47c18cf63dac89fecf35f2

View File

@@ -8,7 +8,7 @@ Source: [`packages/core/system-prompt/src/index.ts`](../../packages/core/system-
## Assembly context
`AssembleContext` identifies the scope layer one assembly resolves and may carry the explicit control signal for that request. It is merge-extensible: `dsh-agent` adds the optional live `agent` field, and `assembleContextFor(agent, signal)` sets the explicit fields together. A bare assembly has neither scope nor signal.
`AssembleContext` identifies the scope layer one assembly resolves and may carry the explicit control signal for that request. It is merge-extensible: `dsh-agent` adds the optional live `agent` field and `modelRequest?: true` marker. `assembleContextFor(agent, signal)` builds an agent-scoped inspection context; `assembleRequestContextFor(agent, signal)` marks a result that the caller will materialize into the next model request. A bare assembly has neither scope nor signal.
```ts type-equiv
/** Merge-extensible context for one prompt assembly. */

View File

@@ -8,7 +8,7 @@
## 组装上下文
`AssembleContext` 标识一次组装所解析的作用域 layer并可携带该请求的显式控制 signal。它可合并扩展`dsh-agent` 添加可选的 live `agent` 字段`assembleContextFor(agent, signal)` 则一起设置这些显式字段。裸组装既没有 scope也没有 signal。
`AssembleContext` 标识一次组装所解析的作用域 layer并可携带该请求的显式控制 signal。它可合并扩展`dsh-agent` 添加可选的 live `agent` 字段`modelRequest?: true` 标记。`assembleContextFor(agent, signal)` 构建带 agent 作用域的检查上下文;`assembleRequestContextFor(agent, signal)` 将结果标记为调用方会把它物化为下一个模型请求。裸组装既没有 scope也没有 signal。
```ts type-equiv
/** Merge-extensible context for one prompt assembly. */