Merge master into job lifecycle timing and refresh owned fixtures

This commit is contained in:
fz committed 2026-10-08 11:02:16 +08:00
commit 672b384eea
5646 files changed
+135257 -53826

No files matched your search

@@ -0,0 +1,28 @@
# Bilingual-pair consistency record for 2026-09-13-working-directory.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/persistence-changes/2026-09-13-working-directory.md
/:
en: 3d5a424ae7d7e46b
zh: c22a8e4a62d8cc1a
/2026-09-13-working-directory:
en: 2ae6bda09b2fb22b
zh: 45204fff7e931e07
/2026-09-13-working-directory/summary:
en: ac7c5d84de3040fa
zh: 85af1f5ea31e8956
/2026-09-13-working-directory/table-of-contents:
en: 6cf314a069ceb451
zh: 9adff678e9ecab3b
/2026-09-13-working-directory/declaration:
en: 6907136f28e48c90
zh: 02f8298485f3d8e7
/2026-09-13-working-directory/compatibility:
en: 3dae5b1bf48b0435
zh: aea832a92da37dc4
/2026-09-13-working-directory/verification:
en: ff3444e53a105e07
zh: 7a77d20c75e59a59
/2026-09-13-working-directory/dev-note:
en: b75c8458928b72b9
zh: 003ba4e17b4b5269
@@ -0,0 +1,48 @@
---
description: "Records a persistence type transition and its compatibility acknowledgement."
kind: persistence-change
---
# 2026-09-13-working-directory
English | [中文](2026-09-13-working-directory.zh.md)
## Summary
Adds durable per-Session working-directory changes.
## Table of Contents
- [Declaration](#declaration)
- [Compatibility](#compatibility)
- [Verification](#verification)
- [Dev Note](#dev-note)
<a id="declaration"></a>
## Declaration
```yaml persistence-change
schemaVersion: 1
id: 2026-09-13-working-directory
baseline: false
changes:
- root: "event:working-directory/change"
previous: null
after: "124aa62078ca3311353b39cc3bf6c75da281338be6bbf672f8b361d828cddca3"
decision: same-version
```
<a id="compatibility"></a>
## Compatibility
Existing Session headers and events remain valid. The new event is required on read: older builds that do not know working-directory/change refuse logs containing it. The event vocabulary grows without changing the structural Session format.
<a id="verification"></a>
## Verification
Focused working-directory and system-prompt suites pass 113 tests with per-file 100% coverage. Keyless headless replay verifies changes, recovery, user-context notices, and a stable system prompt.
<a id="dev-note"></a>
## Dev Note
None.
@@ -0,0 +1,76 @@
{
"formatVersion": 1,
"roots": [
{
"key": "event:working-directory/change",
"kind": "event",
"event": "working-directory/change",
"surface": false,
"digest": "124aa62078ca3311353b39cc3bf6c75da281338be6bbf672f8b361d828cddca3",
"schema": {
"root": 0,
"nodes": [
{
"kind": "object",
"properties": [
{
"name": "data",
"type": 1,
"optional": false
},
{
"name": "ignorable",
"type": 3,
"optional": true
},
{
"name": "seq",
"type": 4,
"optional": false
},
{
"name": "time",
"type": 4,
"optional": false
},
{
"name": "type",
"type": 5,
"optional": false
}
],
"indices": []
},
{
"kind": "object",
"properties": [
{
"name": "cwd",
"type": 2,
"optional": false
}
],
"indices": []
},
{
"kind": "primitive",
"type": "string"
},
{
"kind": "literal",
"value": true
},
{
"kind": "primitive",
"type": "number"
},
{
"kind": "literal",
"value": "working-directory/change"
}
]
}
}
],
"types": []
}
@@ -0,0 +1,48 @@
---
description: "记录持久化类型更改及其兼容性确认。"
kind: persistence-change
---
# 2026-09-13-working-directory
[English](2026-09-13-working-directory.md) | 中文
## 概述
增加每个 Session 的持久化工作目录变更。
## 目录
- [声明](#declaration)
- [兼容性](#compatibility)
- [验证](#verification)
- [开发备注](#dev-note)
<a id="declaration"></a>
## 声明
```yaml persistence-change
schemaVersion: 1
id: 2026-09-13-working-directory
baseline: false
changes:
- root: "event:working-directory/change"
previous: null
after: "124aa62078ca3311353b39cc3bf6c75da281338be6bbf672f8b361d828cddca3"
decision: same-version
```
<a id="compatibility"></a>
## 兼容性
已有 Session header 和事件继续有效。新事件在读取时为必需:不认识 working-directory/change 的旧版本拒绝包含它的日志。事件词汇扩展不改变 Session 的结构格式。
<a id="verification"></a>
## 验证
工作目录和系统提示词定向套件通过 113 个测试,各源码文件覆盖率达到 100%。无密钥 headless 回放验证变更、恢复、用户上下文通知和稳定的系统提示词。
<a id="dev-note"></a>
## 开发备注
无。
@@ -0,0 +1,28 @@
# Bilingual-pair consistency record for 2026-09-19-external-subagent-catalog.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/persistence-changes/2026-09-19-external-subagent-catalog.md
/:
en: 3d5a424ae7d7e46b
zh: c22a8e4a62d8cc1a
/2026-09-19-external-subagent-catalog:
en: 81860767c8b7e373
zh: 4fcb6866cd8d8696
/2026-09-19-external-subagent-catalog/summary:
en: 02848a04a27423e5
zh: 8fa393f6130f3212
/2026-09-19-external-subagent-catalog/table-of-contents:
en: 6cf314a069ceb451
zh: 9adff678e9ecab3b
/2026-09-19-external-subagent-catalog/declaration:
en: 6907136f28e48c90
zh: 02f8298485f3d8e7
/2026-09-19-external-subagent-catalog/compatibility:
en: ae460855a021bf2b
zh: 3789da36fc4202fd
/2026-09-19-external-subagent-catalog/verification:
en: f629646a19627773
zh: 7538959cb86407a1
/2026-09-19-external-subagent-catalog/dev-note:
en: b75c8458928b72b9
zh: 003ba4e17b4b5269
@@ -0,0 +1,48 @@
---
description: "Records a persistence type transition and its compatibility acknowledgement."
kind: persistence-change
---
# 2026-09-19-external-subagent-catalog
English | [中文](2026-09-19-external-subagent-catalog.zh.md)
## Summary
Add external mode to parent catalog entries for children without a local Session.
## Table of Contents
- [Declaration](#declaration)
- [Compatibility](#compatibility)
- [Verification](#verification)
- [Dev Note](#dev-note)
<a id="declaration"></a>
## Declaration
```yaml persistence-change
schemaVersion: 1
id: 2026-09-19-external-subagent-catalog
baseline: false
changes:
- root: "event:subagent/catalog"
previous: "2026-09-20-unknown-child-catalog"
after: "53750b9abf61efb7992b0aadc3e247ec927449c63266df28230fd1139f5590ac"
decision: same-version
```
<a id="compatibility"></a>
## Compatibility
Existing version-0 and version-1 one-shot and continuable facts remain valid; version 1 also retains unknown mode. New external executions write payload version 2 with mode external, without a separate marker. Creation writes one membership fact; execution and cleanup do not update it. Duplicate child ids remain invalid. This does not change released generations or the Session format version.
<a id="verification"></a>
## Verification
Focused catalog, external activation, native V4 restoration, client navigation, and control-tool tests passed. They cover external membership, historical local modes, invalid marker rejection, non-navigable external leaves, and duplicate-child rejection.
<a id="dev-note"></a>
## Dev Note
None.
@@ -0,0 +1,290 @@
{
"formatVersion": 2,
"roots": [
{
"key": "event:subagent/catalog",
"kind": "event",
"event": "subagent/catalog",
"surface": false,
"digest": "53750b9abf61efb7992b0aadc3e247ec927449c63266df28230fd1139f5590ac",
"schema": {
"root": 0,
"nodes": [
{
"kind": "object",
"properties": [
{
"name": "data",
"type": 1,
"optional": false
},
{
"name": "ignorable",
"type": 17,
"optional": true
},
{
"name": "seq",
"type": 3,
"optional": false
},
{
"name": "time",
"type": 3,
"optional": false
},
{
"name": "type",
"type": 18,
"optional": false
}
],
"indices": []
},
{
"kind": "union",
"types": [
2,
7,
9,
12,
14,
15
]
},
{
"kind": "object",
"properties": [
{
"name": "childCreatedAt",
"type": 3,
"optional": false
},
{
"name": "childId",
"type": 4,
"optional": false
},
{
"name": "label",
"type": 4,
"optional": false
},
{
"name": "mode",
"type": 5,
"optional": false
},
{
"name": "version",
"type": 6,
"optional": false
}
],
"indices": []
},
{
"kind": "primitive",
"type": "number"
},
{
"kind": "primitive",
"type": "string"
},
{
"kind": "literal",
"value": "continuable"
},
{
"kind": "literal",
"value": 0
},
{
"kind": "object",
"properties": [
{
"name": "childCreatedAt",
"type": 3,
"optional": false
},
{
"name": "childId",
"type": 4,
"optional": false
},
{
"name": "label",
"type": 4,
"optional": false
},
{
"name": "mode",
"type": 5,
"optional": false
},
{
"name": "version",
"type": 8,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": 1
},
{
"kind": "object",
"properties": [
{
"name": "childCreatedAt",
"type": 3,
"optional": false
},
{
"name": "childId",
"type": 4,
"optional": false
},
{
"name": "label",
"type": 4,
"optional": true
},
{
"name": "mode",
"type": 10,
"optional": false
},
{
"name": "version",
"type": 11,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": "external"
},
{
"kind": "literal",
"value": 2
},
{
"kind": "object",
"properties": [
{
"name": "childCreatedAt",
"type": 3,
"optional": false
},
{
"name": "childId",
"type": 4,
"optional": false
},
{
"name": "label",
"type": 4,
"optional": true
},
{
"name": "mode",
"type": 13,
"optional": false
},
{
"name": "version",
"type": 6,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": "one-shot"
},
{
"kind": "object",
"properties": [
{
"name": "childCreatedAt",
"type": 3,
"optional": false
},
{
"name": "childId",
"type": 4,
"optional": false
},
{
"name": "label",
"type": 4,
"optional": true
},
{
"name": "mode",
"type": 13,
"optional": false
},
{
"name": "version",
"type": 8,
"optional": false
}
],
"indices": []
},
{
"kind": "object",
"properties": [
{
"name": "childCreatedAt",
"type": 3,
"optional": false
},
{
"name": "childId",
"type": 4,
"optional": false
},
{
"name": "label",
"type": 4,
"optional": true
},
{
"name": "mode",
"type": 16,
"optional": false
},
{
"name": "version",
"type": 8,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": "unknown"
},
{
"kind": "literal",
"value": true
},
{
"kind": "literal",
"value": "subagent/catalog"
}
]
}
}
],
"types": []
}
@@ -0,0 +1,48 @@
---
description: "记录持久化类型更改及其兼容性确认。"
kind: persistence-change
---
# 2026-09-19-external-subagent-catalog
[English](2026-09-19-external-subagent-catalog.md) | 中文
## 概述
为父级目录中没有本地 Session 的子级添加 external 模式。
## 目录
- [声明](#declaration)
- [兼容性](#compatibility)
- [验证](#verification)
- [开发备注](#dev-note)
<a id="declaration"></a>
## 声明
```yaml persistence-change
schemaVersion: 1
id: 2026-09-19-external-subagent-catalog
baseline: false
changes:
- root: "event:subagent/catalog"
previous: "2026-09-20-unknown-child-catalog"
after: "53750b9abf61efb7992b0aadc3e247ec927449c63266df28230fd1139f5590ac"
decision: same-version
```
<a id="compatibility"></a>
## 兼容性
已有 version-0 和 version-1 的 one-shot 与 continuable 事实仍然有效;version 1 还保留 unknown 模式。新外部执行写入 payload version 2 和 external 模式,不使用单独的标记。创建时写入一次成员事实,执行和清理不更新它。重复的子 id 仍然无效。这不改变已发布的代际或 Session 格式版本。
<a id="verification"></a>
## 验证
定向 catalog、外部 activation、原生 V4 恢复、客户端导航和控制工具测试通过,覆盖外部成员关系、历史本地模式、非法标记拒绝、不可导航的外部叶节点,以及重复子级拒绝。
<a id="dev-note"></a>
## 开发备注
无。
@@ -0,0 +1,28 @@
# Bilingual-pair consistency record for 2026-10-05-ptc-operation-metadata.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/persistence-changes/2026-10-05-ptc-operation-metadata.md
/:
en: 3d5a424ae7d7e46b
zh: c22a8e4a62d8cc1a
/2026-10-05-ptc-operation-metadata:
en: 1dead83b6553cd1a
zh: 9b6177c2b132640f
/2026-10-05-ptc-operation-metadata/summary:
en: 515119ce4f93c34d
zh: 36f42e64c69945cf
/2026-10-05-ptc-operation-metadata/table-of-contents:
en: 6cf314a069ceb451
zh: 9adff678e9ecab3b
/2026-10-05-ptc-operation-metadata/declaration:
en: 6907136f28e48c90
zh: 02f8298485f3d8e7
/2026-10-05-ptc-operation-metadata/compatibility:
en: e9737c6c28ee0ab0
zh: 468a046ccd51d95b
/2026-10-05-ptc-operation-metadata/verification:
en: a6d2fb4553a4f895
zh: bb2367ad270ee0bc
/2026-10-05-ptc-operation-metadata/dev-note:
en: b75c8458928b72b9
zh: 003ba4e17b4b5269
@@ -0,0 +1,48 @@
---
description: "Records a persistence type transition and its compatibility acknowledgement."
kind: persistence-change
---
# 2026-10-05-ptc-operation-metadata
English | [中文](2026-10-05-ptc-operation-metadata.zh.md)
## Summary
Adds optional pure presentation metadata to persisted nested PTC tool results so history retains operation-time directories and file targets.
## Table of Contents
- [Declaration](#declaration)
- [Compatibility](#compatibility)
- [Verification](#verification)
- [Dev Note](#dev-note)
<a id="declaration"></a>
## Declaration
```yaml persistence-change
schemaVersion: 1
id: 2026-10-05-ptc-operation-metadata
baseline: false
changes:
- root: "event:tool/ptc-dispatch"
previous: "2026-09-16-session-format-v4"
after: "d66e11dddf5dfa3c71547e2cbd7b0608824cd8d6243fc16f532017ff28e8fba5"
decision: same-version
```
<a id="compatibility"></a>
## Compatibility
Existing tool/ptc-dispatch records without meta remain valid. The optional JsonValue field does not change canonical program values, model-visible content, tool identities or message ordering. Historical calls without a recorded relative target keep safe unavailable navigation. The writer and accepted baseline stay at V4.
<a id="verification"></a>
## Verification
963 focused tests passed with per-file 100% coverage of the six affected runtime/UI sources; actual nested shell and relative filesystem regressions, frozen metadata controls, TypeScript SDK 45 tests, Python SDK 29 tests and three owning keyless refresh/replays passed.
<a id="dev-note"></a>
## Dev Note
None.
@@ -0,0 +1,457 @@
{
"formatVersion": 2,
"roots": [
{
"key": "event:tool/ptc-dispatch",
"kind": "event",
"event": "tool/ptc-dispatch",
"surface": false,
"digest": "d66e11dddf5dfa3c71547e2cbd7b0608824cd8d6243fc16f532017ff28e8fba5",
"schema": {
"root": 0,
"nodes": [
{
"kind": "object",
"properties": [
{
"name": "data",
"type": 1,
"optional": false
},
{
"name": "ignorable",
"type": 29,
"optional": true
},
{
"name": "seq",
"type": 17,
"optional": false
},
{
"name": "time",
"type": 17,
"optional": false
},
{
"name": "type",
"type": 37,
"optional": false
}
],
"indices": []
},
{
"kind": "object",
"properties": [
{
"name": "arguments",
"type": 2,
"optional": false
},
{
"name": "content",
"type": 3,
"optional": false
},
{
"name": "error",
"type": 31,
"optional": true
},
{
"name": "isError",
"type": 32,
"optional": false
},
{
"name": "meta",
"type": 33,
"optional": true
},
{
"name": "name",
"type": 6,
"optional": false
},
{
"name": "parentCallId",
"type": 6,
"optional": false
},
{
"name": "rootCallId",
"type": 6,
"optional": false
},
{
"name": "subCallId",
"type": 6,
"optional": false
}
],
"indices": []
},
{
"kind": "opaque",
"reason": "unknown"
},
{
"kind": "array",
"element": 4
},
{
"kind": "union",
"types": [
5,
8,
10,
13,
15,
19,
21
]
},
{
"kind": "object",
"properties": [
{
"name": "text",
"type": 6,
"optional": false
},
{
"name": "type",
"type": 7,
"optional": false
}
],
"indices": []
},
{
"kind": "primitive",
"type": "string"
},
{
"kind": "literal",
"value": "reasoning"
},
{
"kind": "object",
"properties": [
{
"name": "text",
"type": 6,
"optional": false
},
{
"name": "type",
"type": 9,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": "text"
},
{
"kind": "object",
"properties": [
{
"name": "tool",
"type": 11,
"optional": true
},
{
"name": "toolName",
"type": 6,
"optional": false
},
{
"name": "type",
"type": 12,
"optional": false
}
],
"indices": []
},
{
"kind": "primitive",
"type": "never"
},
{
"kind": "literal",
"value": "tool-addition"
},
{
"kind": "object",
"properties": [
{
"name": "toolName",
"type": 6,
"optional": false
},
{
"name": "type",
"type": 14,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": "tool-removal"
},
{
"kind": "object",
"properties": [
{
"name": "attachment",
"type": 16,
"optional": false
},
{
"name": "type",
"type": 18,
"optional": false
}
],
"indices": []
},
{
"kind": "object",
"properties": [
{
"name": "attachmentId",
"type": 6,
"optional": false
},
{
"name": "bytes",
"type": 17,
"optional": false
},
{
"name": "name",
"type": 6,
"optional": false
}
],
"indices": []
},
{
"kind": "primitive",
"type": "number"
},
{
"kind": "literal",
"value": "file"
},
{
"kind": "object",
"properties": [
{
"name": "arguments",
"type": 6,
"optional": false
},
{
"name": "id",
"type": 6,
"optional": false
},
{
"name": "name",
"type": 6,
"optional": false
},
{
"name": "type",
"type": 20,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": "tool-call"
},
{
"kind": "object",
"properties": [
{
"name": "attachment",
"type": 22,
"optional": false
},
{
"name": "offloaded",
"type": 29,
"optional": true
},
{
"name": "type",
"type": 30,
"optional": false
}
],
"indices": []
},
{
"kind": "object",
"properties": [
{
"name": "attachmentId",
"type": 6,
"optional": false
},
{
"name": "bytes",
"type": 17,
"optional": false
},
{
"name": "height",
"type": 17,
"optional": false
},
{
"name": "mediaType",
"type": 23,
"optional": false
},
{
"name": "name",
"type": 6,
"optional": true
},
{
"name": "originalDimensions",
"type": 28,
"optional": true
},
{
"name": "width",
"type": 17,
"optional": false
}
],
"indices": []
},
{
"kind": "union",
"types": [
24,
25,
26,
27
]
},
{
"kind": "literal",
"value": "image/gif"
},
{
"kind": "literal",
"value": "image/jpeg"
},
{
"kind": "literal",
"value": "image/png"
},
{
"kind": "literal",
"value": "image/webp"
},
{
"kind": "object",
"properties": [
{
"name": "height",
"type": 17,
"optional": false
},
{
"name": "width",
"type": 17,
"optional": false
}
],
"indices": []
},
{
"kind": "literal",
"value": true
},
{
"kind": "literal",
"value": "image"
},
{
"kind": "object",
"properties": [
{
"name": "code",
"type": 6,
"optional": false
},
{
"name": "name",
"type": 6,
"optional": false
},
{
"name": "reason",
"type": 6,
"optional": true
}
],
"indices": []
},
{
"kind": "primitive",
"type": "boolean"
},
{
"kind": "union",
"types": [
6,
17,
32,
34,
35,
36
]
},
{
"kind": "array",
"element": 33
},
{
"kind": "primitive",
"type": "null"
},
{
"kind": "object",
"properties": [],
"indices": [
{
"key": 6,
"value": 33
}
]
},
{
"kind": "literal",
"value": "tool/ptc-dispatch"
}
]
}
}
],
"types": []
}
@@ -0,0 +1,48 @@
---
description: "记录持久化类型更改及其兼容性确认。"
kind: persistence-change
---
# 2026-10-05-ptc-operation-metadata
[English](2026-10-05-ptc-operation-metadata.md) | 中文
## 概述
为持久化的嵌套 PTC 工具结果增加可选的纯展示元数据,使历史保留操作时的目录和文件目标。
## 目录
- [声明](#declaration)
- [兼容性](#compatibility)
- [验证](#verification)
- [开发备注](#dev-note)
<a id="declaration"></a>
## 声明
```yaml persistence-change
schemaVersion: 1
id: 2026-10-05-ptc-operation-metadata
baseline: false
changes:
- root: "event:tool/ptc-dispatch"
previous: "2026-09-16-session-format-v4"
after: "d66e11dddf5dfa3c71547e2cbd7b0608824cd8d6243fc16f532017ff28e8fba5"
decision: same-version
```
<a id="compatibility"></a>
## 兼容性
没有 meta 的已有 tool/ptc-dispatch 记录仍然有效。可选 JsonValue 字段不改变程序读取的规范值、模型可见内容、工具标识或消息顺序。没有记录相对文件目标的历史调用仍安全地禁用导航。写入版本和已接受基线保持 V4。
<a id="verification"></a>
## 验证
963 个定向测试通过,六个受影响 runtime/UI 源文件逐文件覆盖率 100%;实际嵌套 shell 与相对文件操作回归、冻结元数据控制、TypeScript SDK 45 个测试、Python SDK 29 个测试及三个 owning keyless refresh/replay 通过。
<a id="dev-note"></a>
## 开发备注
无。
@@ -0,0 +1,28 @@
# Bilingual-pair consistency record for 2026-10-05-working-directory-attribution.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/persistence-changes/2026-10-05-working-directory-attribution.md
/:
en: 3d5a424ae7d7e46b
zh: c22a8e4a62d8cc1a
/2026-10-05-working-directory-attribution:
en: 0dfc1c93be2577cb
zh: 3448816e53ae4bda
/2026-10-05-working-directory-attribution/summary:
en: 5e013c7f8b9e268c
zh: 134bc44b2081addc
/2026-10-05-working-directory-attribution/table-of-contents:
en: 6cf314a069ceb451
zh: 9adff678e9ecab3b
/2026-10-05-working-directory-attribution/declaration:
en: 6907136f28e48c90
zh: 02f8298485f3d8e7
/2026-10-05-working-directory-attribution/compatibility:
en: 39494aa3af994e6f
zh: 07c2880503668176
/2026-10-05-working-directory-attribution/verification:
en: 5963942c0d87e518
zh: 5dbb6ac0fca1f279
/2026-10-05-working-directory-attribution/dev-note:
en: b75c8458928b72b9
zh: 003ba4e17b4b5269
@@ -0,0 +1,60 @@
---
description: "Records a persistence type transition and its compatibility acknowledgement."
kind: persistence-change
---
# 2026-10-05-working-directory-attribution
English | [中文](2026-10-05-working-directory-attribution.zh.md)
## Summary
Adds producer-owned working-directory notice attribution.
## Table of Contents
- [Declaration](#declaration)
- [Compatibility](#compatibility)
- [Verification](#verification)
- [Dev Note](#dev-note)
<a id="declaration"></a>
## Declaration
```yaml persistence-change
schemaVersion: 1
id: 2026-10-05-working-directory-attribution
baseline: false
changes:
- root: "event:agent/inbox/spliced"
previous: "2026-09-21-user-question-reply"
after: "9a36727716d0e73f681f3b725e7f28f89417c68174c8af0ff2b1ef52b08326a0"
decision: same-version
- root: "event:developer/message"
previous: "2026-09-21-user-question-reply"
after: "ba5b10ea77d68f4a29439a9bd2a14f6a560acf55731749d57237757cc72fbc06"
decision: same-version
- root: "event:session/title-llm-request"
previous: "2026-09-21-user-question-reply"
after: "19fab83e64cf84ee8a6caf62c592e85c9b195bfd19e84a2667c6693a395681fd"
decision: same-version
- root: "event:user/message"
previous: "2026-09-21-user-question-reply"
after: "2ace3b8059b82b6d9837fed518ca97a99eb37c4482df7aad0e71c85489428ade"
decision: same-version
```
<a id="compatibility"></a>
## Compatibility
Existing records remain valid. The additive working-directory source kind is attribution only; the declared source policy preserves unknown attribution without interpreting it. The Session format remains unchanged.
<a id="verification"></a>
## Verification
pnpm exec vitest run packages/session/working-directory/tests packages/shell/tool-bash/tests/tools.spec.ts packages/shell/tool-pwsh/tests/tools.spec.ts packages/subagent/subagent-in-process-driver/tests/schedule-tools.spec.ts: 4 files and 203 tests passed.
<a id="dev-note"></a>
## Dev Note
None.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,60 @@
---
description: "记录持久化类型更改及其兼容性确认。"
kind: persistence-change
---
# 2026-10-05-working-directory-attribution
[English](2026-10-05-working-directory-attribution.md) | 中文
## 概述
新增由工作目录组件拥有的通知来源标记。
## 目录
- [声明](#declaration)
- [兼容性](#compatibility)
- [验证](#verification)
- [开发备注](#dev-note)
<a id="declaration"></a>
## 声明
```yaml persistence-change
schemaVersion: 1
id: 2026-10-05-working-directory-attribution
baseline: false
changes:
- root: "event:agent/inbox/spliced"
previous: "2026-09-21-user-question-reply"
after: "9a36727716d0e73f681f3b725e7f28f89417c68174c8af0ff2b1ef52b08326a0"
decision: same-version
- root: "event:developer/message"
previous: "2026-09-21-user-question-reply"
after: "ba5b10ea77d68f4a29439a9bd2a14f6a560acf55731749d57237757cc72fbc06"
decision: same-version
- root: "event:session/title-llm-request"
previous: "2026-09-21-user-question-reply"
after: "19fab83e64cf84ee8a6caf62c592e85c9b195bfd19e84a2667c6693a395681fd"
decision: same-version
- root: "event:user/message"
previous: "2026-09-21-user-question-reply"
after: "2ace3b8059b82b6d9837fed518ca97a99eb37c4482df7aad0e71c85489428ade"
decision: same-version
```
<a id="compatibility"></a>
## 兼容性
已有记录仍然有效。新增的 working-directory 来源种类只提供来源标记;已声明的来源策略保留未知标记而不解释其含义。Session 格式保持不变。
<a id="verification"></a>
## 验证
pnpm exec vitest run packages/session/working-directory/tests packages/shell/tool-bash/tests/tools.spec.ts packages/shell/tool-pwsh/tests/tools.spec.ts packages/subagent/subagent-in-process-driver/tests/schedule-tools.spec.ts:4 个文件、203 个测试通过。
<a id="dev-note"></a>
## 开发备注
无。
@@ -0,0 +1,28 @@
# Bilingual-pair consistency record for 2026-10-07-title-reasoning-effort.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/persistence-changes/2026-10-07-title-reasoning-effort.md
/:
en: 3d5a424ae7d7e46b
zh: c22a8e4a62d8cc1a
/2026-10-07-title-reasoning-effort:
en: 62238f237d762372
zh: 67c868935122faba
/2026-10-07-title-reasoning-effort/summary:
en: a23a870e04888548
zh: a794ea9022adf492
/2026-10-07-title-reasoning-effort/table-of-contents:
en: 6cf314a069ceb451
zh: 9adff678e9ecab3b
/2026-10-07-title-reasoning-effort/declaration:
en: 6907136f28e48c90
zh: 02f8298485f3d8e7
/2026-10-07-title-reasoning-effort/compatibility:
en: 2aef689aa3af8d1c
zh: dc468f9d2c98d70c
/2026-10-07-title-reasoning-effort/verification:
en: 48ef9b977eaf074b
zh: b1183bda3a6a38be
/2026-10-07-title-reasoning-effort/dev-note:
en: b75c8458928b72b9
zh: 003ba4e17b4b5269
@@ -0,0 +1,48 @@
---
description: "Records a persistence type transition and its compatibility acknowledgement."
kind: persistence-change
---
# 2026-10-07-title-reasoning-effort
English | [中文](2026-10-07-title-reasoning-effort.zh.md)
## Summary
Records the concrete reasoning effort selected for auxiliary session-title requests.
## Table of Contents
- [Declaration](#declaration)
- [Compatibility](#compatibility)
- [Verification](#verification)
- [Dev Note](#dev-note)
<a id="declaration"></a>
## Declaration
```yaml persistence-change
schemaVersion: 1
id: 2026-10-07-title-reasoning-effort
baseline: false
changes:
- root: "event:session/title-llm-request"
previous: "2026-10-05-working-directory-attribution"
after: "b33545b3244861bcbf73b407d24b53402710f5acacab7ae939537e5504a68dc6"
decision: same-version
```
<a id="compatibility"></a>
## Compatibility
The new reasoningEffort field is optional. Existing V4 records remain valid and retain their original absence of a recorded effort. Prepared title requests write the resolved effort when the route exposes selectable reasoning; no Session format bump is required.
<a id="verification"></a>
## Verification
Focused LLM, adapter, title-provider, and replay tests passed: 50 files and 1960 tests. The session-title-after-turn SDK snapshot passed with a recorded low effort selected from a route whose default is high.
<a id="dev-note"></a>
## Dev Note
None.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,48 @@
---
description: "记录持久化类型更改及其兼容性确认。"
kind: persistence-change
---
# 2026-10-07-title-reasoning-effort
[English](2026-10-07-title-reasoning-effort.md) | 中文
## 概述
记录辅助会话标题请求选择的具体推理强度。
## 目录
- [声明](#declaration)
- [兼容性](#compatibility)
- [验证](#verification)
- [开发备注](#dev-note)
<a id="declaration"></a>
## 声明
```yaml persistence-change
schemaVersion: 1
id: 2026-10-07-title-reasoning-effort
baseline: false
changes:
- root: "event:session/title-llm-request"
previous: "2026-10-05-working-directory-attribution"
after: "b33545b3244861bcbf73b407d24b53402710f5acacab7ae939537e5504a68dc6"
decision: same-version
```
<a id="compatibility"></a>
## 兼容性
新增 reasoningEffort 字段为可选。现有 V4 记录仍有效,继续保留其未记录强度的事实。路由提供可选推理强度时,已准备的标题请求写入解析后的强度;无需提升 Session 格式版本。
<a id="verification"></a>
## 验证
LLM、适配器、标题提供方与回放的定向测试通过:50 个文件、1960 个测试。session-title-after-turn SDK 快照通过,记录从默认 high 的路由中选出的 low 强度。
<a id="dev-note"></a>
## 开发备注
无。
+2 -2
View File
@@ -18,8 +18,8 @@
en: 6cd0f79a9455bdf2
zh: a5978b7834c0802b
/persistence-type-change-records/compatibility-rules:
en: 7d5ce8c14e387922
zh: 9106c78283ad932c
en: 62ce78d5618572b6
zh: 023021d431f8a8e6
/persistence-type-change-records/history-and-limitations:
en: 10a426d36c41548b
zh: ef03b693d9d9be26
+2 -2
View File
@@ -53,14 +53,14 @@ Every detected structural change requires an acknowledgement. Record creation an
| Add an optional event-body property, including its complete subtree | `same-version` |
| Make a required event-body property optional | `same-version` |
| Add an ordinary event type | `same-version` |
| Add a higher numeric `data.version` to an ordinary event while retaining every old payload alternative unchanged | `same-version` |
| Add a higher numeric `data.version` to an ordinary event while retaining every old payload alternative under the existing compatibility rules | `same-version` |
| Add an explicitly qualified attribution kind to a user/developer source slot whose before and after schemas carry the same supported policy | `same-version` |
| Make an optional property required, add a required property, change an existing type, or remove/rename a property or event | `version-bump` |
| Change the Session header or event envelope | `version-bump` |
A finalized checkpoint protects the accepted baseline without replacing these compatibility rules. At V4, optional additions, ordinary events, and qualified attribution additions can receive new same-version records. Breaking differences require a higher writer version and an acknowledgement containing its own header increase. The accepted V4 record cannot be updated to reuse its original 3→4 transition.
An ordinary event may add payload alternatives with a required, nonnegative integer `data.version` greater than every existing payload version, provided all existing alternatives remain structurally unchanged. The reader must retain support for the old payloads; adding variants at an existing version, dropping old versions, and changing the Session header or envelope remain breaking. Older readers may reject the new payload version. The [catalog acknowledgement](2026-09-20-unknown-child-catalog.md) records one such transition.
An ordinary event may add payload alternatives with a required, nonnegative integer `data.version` greater than every existing payload version, provided every existing alternative remains readable under the compatibility rules above. Optional property additions and required-to-optional changes may accompany the new version; each retained alternative is compared separately. The reader must retain support for the old payloads; adding variants at an existing version, dropping old versions, and changing the Session header or envelope remain breaking. Older readers may reject the new payload version. The [catalog acknowledgement](2026-09-20-unknown-child-catalog.md) records one such transition.
The extractor accepts an explicit `@persistenceSource` binding for a core-owned source property on a literal user or developer role; it does not infer a binding from an unannotated type. A producer qualifies its `MessageSourceMap` entry with `@persistenceAttribution`. Qualification promises that an unknown kind and its JSON metadata survive reading without the producer, and that the kind imposes no validation, replay, or authority requirement. A producer may inspect its own kind to resume duplicate suppression; other readers must preserve and derive the recorded messages without that projection. The recorded schema retains the binding, policy version, literal `kind` discriminator, preservation promise, and qualified kind set. Inventory format 2 stores those promises; extraction without a bound policy retains format 1. Session format versions are independent. Both compared snapshots must carry compatible policy state. Existing kind groups still receive ordinary structural comparison; removals, unmarked additions, policy changes, and unrelated breaking changes remain strict. Multiple context-form alternatives with the same wire kind form one group.
+2 -2
View File
@@ -53,14 +53,14 @@ description: "审阅和维护已记录的会话持久化类型变更、对应 sc
| 添加可选事件体属性,包括其完整子树 | `same-version` |
| 将必选事件体属性改为可选 | `same-version` |
| 添加普通事件类型 | `same-version` |
| 为普通事件增加更高的数字 `data.version`,并原样保留所有旧载荷分支 | `same-version` |
| 为普通事件增加更高的数字 `data.version`,并按现有兼容性规则保留所有旧载荷分支 | `same-version` |
| 在前后 schema 均带有相同受支持策略的 user/developer 消息源字段中,添加显式声明为归属信息的 kind | `same-version` |
| 将可选属性改为必选、添加必选属性、更改已有类型,或删除/重命名属性或事件 | `version-bump` |
| 更改会话头或事件封装 | `version-bump` |
定稿检查点保护已接受基线,不替换这些兼容性规则。在 V4 中,可选新增、普通事件及符合条件的归属 kind 新增可以使用新的同版本记录。破坏性差异要求更高的写入器版本,以及包含自身头版本递增的确认记录。不能更新已接受 V4 记录以复用其原有 3→4 转换。
普通事件可增加具有必选、非负整数 `data.version` 的载荷分支,新版本必须高于所有已有载荷版本,且所有已有分支结构保持不变。读取器必须保留旧载荷支持;在已有版本中增加分支、移除旧版本,以及修改 Session header 或事件封装仍属于破坏性变更。旧读取器可能拒绝新载荷版本。[Catalog 确认记录](2026-09-20-unknown-child-catalog.zh.md) 记录了此类演进。
普通事件可增加具有必选、非负整数 `data.version` 的载荷分支,新版本必须高于所有已有载荷版本,且所有已有分支按上述兼容性规则保持可读。可选属性新增和必选改可选可以与新版本一同引入;每个保留分支均独立比较。读取器必须保留旧载荷支持;在已有版本中增加分支、移除旧版本,以及修改 Session header 或事件封装仍属于破坏性变更。旧读取器可能拒绝新载荷版本。[Catalog 确认记录](2026-09-20-unknown-child-catalog.zh.md) 记录了此类演进。
提取器接受核心拥有的 source 属性上针对 user 或 developer 字面量角色的显式 `@persistenceSource` 绑定,不会从未标记类型中推断绑定。生产者用 `@persistenceAttribution` 标记其 `MessageSourceMap` 成员。该标记承诺:读取器无需生产者即可保留未知 kind 及其 JSON 元数据,且该 kind 不引入校验、回放或权限要求。生产者可以检查自身 kind 来恢复去重状态;其他读取器必须无需该投影也能保留并派生已记录的消息。记录的 schema 保存绑定、策略版本、字面量 `kind` 判别字段、保留承诺及符合条件的 kind 集合。Inventory format 2 保存这些承诺;没有绑定策略的提取仍使用 format 1。Session 格式版本独立于此。比较双方的快照必须带有兼容的策略状态。已有 kind 分组仍进行常规结构比较;删除、未标记的添加、策略更改及无关破坏性变更继续采用严格规则。同一 wire kind 的多个上下文形式分支归为一组。
@@ -15,8 +15,8 @@
en: 14c57f30e676f6e3
zh: b1a0ccf26fab3727
/session-persistence-formats/format-references:
en: 83e6e5c81eec05c3
zh: 7f82a8b410361d4a
en: 73b4caa341293dda
zh: 305a83174f20c790
/session-persistence-formats/scope-and-evidence:
en: b220062139ddac1e
zh: 7c4c0efe05dafa9c
@@ -32,7 +32,7 @@ The index is generated from validated snapshots and the current writer constant.
| 1 | PR #3349 | [V1](v1.md) | [JSON](v1.schema.json) | 54 / 415 |
| 2 | `dsh-v0.1.3-alpha.2` | [V2](v2.md) | [JSON](v2.schema.json) | 56 / 435 |
| 3 | PR #4320 | [V3](v3.md) | [JSON](v3.schema.json) | 60 / 467 |
| 4 | Current checkout | [Current catalog](../../persistence-catalog.md) | [JSON](../../persistence-schema.json) | 64 / 603 |
| 4 | Current checkout | [Current catalog](../../persistence-catalog.md) | [JSON](../../persistence-schema.json) | 65 / 610 |
<!-- persistence-format-index:end -->
@@ -32,7 +32,7 @@ description: "查找从 V0 到工作区写入器版本的每个 Session 格式
| 1 | PR #3349 | [V1](v1.zh.md) | [JSON](v1.schema.json) | 54 / 415 |
| 2 | `dsh-v0.1.3-alpha.2` | [V2](v2.zh.md) | [JSON](v2.schema.json) | 56 / 435 |
| 3 | PR #4320 | [V3](v3.zh.md) | [JSON](v3.schema.json) | 60 / 467 |
| 4 | 当前工作树 | [当前目录](../../persistence-catalog.zh.md) | [JSON](../../persistence-schema.json) | 64 / 603 |
| 4 | 当前工作树 | [当前目录](../../persistence-catalog.zh.md) | [JSON](../../persistence-schema.json) | 65 / 610 |
<!-- persistence-format-index:end -->