diff --git a/AGENTS.md b/AGENTS.md
index 7893cbb5d3..76c5c85020 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -6,6 +6,8 @@ DeepSeek Harness is an all-plugin Cordis agent harness. Read [docs/architecture.
Public APIs are pre-stable; update every consumer. [Session version/status](docs/session-format-status.md) defines the authorities. [Adjacent migration](.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.md) may add a version-named successor but never move, overwrite, or delete committed generations; predecessors imply neither fallback nor downgrade support. SQLite uses monotonic `SCHEMA_VERSION`.
+Acknowledge [declared persistence-type changes](docs/cookbook/reviewing-persistence-type-changes.md).
+
**Application launch.** Only `dsh` profiles launch supported Node apps; package bins, demos, and public SDK argv escapes are forbidden ([rule](docs/architecture.md#application-launch)).
## Repository layout
diff --git a/docs/persistence-catalog.i18n.yaml b/docs/persistence-catalog.i18n.yaml
index 2304c6d30f..77cc9739be 100644
--- a/docs/persistence-catalog.i18n.yaml
+++ b/docs/persistence-catalog.i18n.yaml
@@ -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/persistence-catalog.md
-persistence-catalog.md: a85ff0d2ea49c6b1a359d311d6e540ec4e9e5d65
-persistence-catalog.zh.md: 504beffabe1239ea8c4ae49d0e476107246e0041
+persistence-catalog.md: 2c803bcc94738b4def2b08603c5da3efcde5be1b
+persistence-catalog.zh.md: a1040c0e89c2ff8557658520d5ff93db1834d327
diff --git a/docs/persistence-catalog.md b/docs/persistence-catalog.md
index a85ff0d2ea..2c803bcc94 100644
--- a/docs/persistence-catalog.md
+++ b/docs/persistence-catalog.md
@@ -69,9 +69,9 @@ The [change records](persistence-changes/README.md) acknowledge exact transition
| `event:tool-workflow/run-end` | event | `42e0916e0dda5f6d1e7bb05d8514717147c036a79c9f36085683469516c1fd3f` | [`event:tool-workflow/run-end`](#persistence-type-eventtool-workflowrun-end) |
| `event:tool-workflow/run-start` | event | `c1f9e0405de6d18cabb9ee70782a027f9bbdc57e5abec9dcccdd56119e2e9058` | [`event:tool-workflow/run-start`](#persistence-type-eventtool-workflowrun-start) |
| `event:tool/call` | event | `3b1be838223869fe0a08210db85bf773796ed3f2373ac16555dff227cade0c48` | [`event:tool/call`](#persistence-type-eventtoolcall) |
-| `event:tool/ptc-dispatch` | event | `da807583a19f4ebe2bc9115c9686016e1521e405bdfaced296ae652b91e8e5f6` | [`event:tool/ptc-dispatch`](#persistence-type-eventtoolptc-dispatch) |
+| `event:tool/ptc-dispatch` | event | `b5d66eaebed4da391b13498623b11142222149fbf5e025975dbc6d94f0d06796` | [`event:tool/ptc-dispatch`](#persistence-type-eventtoolptc-dispatch) |
| `event:tool/ptc-dispatch-start` | event | `ec38b5949af8eacaf00df002f4acbe344f934f8a061e9cdc65a52a48e5f6dd93` | [`event:tool/ptc-dispatch-start`](#persistence-type-eventtoolptc-dispatch-start) |
-| `event:tool/result` | event | `cc3e270ab982cbafff602b753647b6f056decb7fe4fd523afd2f157a65c3d622` | [`event:tool/result`](#persistence-type-eventtoolresult) |
+| `event:tool/result` | event | `3a803805bdeb805f32b229e399fb7258be8e32a89f89063a7c99957cfea942f7` | [`event:tool/result`](#persistence-type-eventtoolresult) |
| `event:turn/end` | event | `84c24f1209fc3e0153de6ac85d58fd6968b851f955e0e761b92321053956609e` | [`event:turn/end`](#persistence-type-eventturnend) |
| `event:turn/start` | event | `aa0957eca50aeb28bcd2e6930b95809926edacb550c8c340ba526ba6b861b3d8` | [`event:turn/start`](#persistence-type-eventturnstart) |
| `event:user/message` | event | `2e49ede7fb3a592cce8919ebe982f6ca1c1f67abe4def359ffc028c85e6d1ad8` | [`event:user/message`](#persistence-type-eventusermessage) |
@@ -1808,17 +1808,37 @@ Sources: [`packages/context/session-reference/src/types.ts:18`](../packages/cont
| `sessionId` | required | `string` |
| `truncated` | required | `boolean` |
-
+
-### `event:agent/inbox/spliced.data.inserted[0].source[16].entries`
+### `event:agent/inbox/spliced.data.inserted[0].source[16].changes`
+
+SHA-256: `2ab12a0e345658f9342816d773fe610f049982bcad82631f43b9205abe43e5ee`
+
+Array of [`packages/context/agent-instructions/src/render.ts#AgentInstructionChange`](#persistence-type-packagescontextagent-instructionssrcrendertsagentinstructionchange).
+
+
+
+### `event:agent/inbox/spliced.data.inserted[0].source[16].changes[0].action`
+
+SHA-256: `904bf499d98be4a3a5f836fcac533b6c4899569b018071e6604e1d32657d00fd`
+
+One of:
+
+- `"remove"`
+- `"replace"`
+- `"set"`
+
+
+
+### `event:agent/inbox/spliced.data.inserted[0].source[17].entries`
SHA-256: `aba175fb20ffc71112c55efe70458ff5d7dbfb83501892b4ba8d077f0ea5d7ba`
-Array of [`event:agent/inbox/spliced.data.inserted[0].source[16].entries[0]`](#persistence-type-eventagentinboxspliceddatainserted0source16entries0).
+Array of [`event:agent/inbox/spliced.data.inserted[0].source[17].entries[0]`](#persistence-type-eventagentinboxspliceddatainserted0source17entries0).
-
+
-### `event:agent/inbox/spliced.data.inserted[0].source[16].entries[0]`
+### `event:agent/inbox/spliced.data.inserted[0].source[17].entries[0]`
SHA-256: `83079c8a3f733ac3fa603eefa0fbb4737ca4d8b69e7e2e7298b60f9ac4098693`
@@ -1829,26 +1849,6 @@ Sources: [`packages/skill/tool-skill/src/index.ts:40`](../packages/skill/tool-sk
| `description` | required | `string` |
| `name` | required | `string` |
-
-
-### `event:agent/inbox/spliced.data.inserted[0].source[17].changes`
-
-SHA-256: `2ab12a0e345658f9342816d773fe610f049982bcad82631f43b9205abe43e5ee`
-
-Array of [`packages/context/agent-instructions/src/render.ts#AgentInstructionChange`](#persistence-type-packagescontextagent-instructionssrcrendertsagentinstructionchange).
-
-
-
-### `event:agent/inbox/spliced.data.inserted[0].source[17].changes[0].action`
-
-SHA-256: `904bf499d98be4a3a5f836fcac533b6c4899569b018071e6604e1d32657d00fd`
-
-One of:
-
-- `"remove"`
-- `"replace"`
-- `"set"`
-
### `event:agent/inbox/spliced.data.inserted[0].source[19]`
@@ -2875,7 +2875,7 @@ SHA-256: `5c45bf4c544a7211dcd8ba6ba7e5f1bc39b49e7a9df9d5cbdc8e87c22771b37b`
SHA-256: `8a9c990773f798eac10ca8878e6bcc531ee080bc589cac956730e462cc6a09ad`
-Sources: [`packages/interaction/permission-presets/src/index.ts:54`](../packages/interaction/permission-presets/src/index.ts)
+Sources: [`packages/interaction/permission-presets/src/index.ts:57`](../packages/interaction/permission-presets/src/index.ts)
| Property | Presence | Type |
|---|---|---|
@@ -2941,7 +2941,7 @@ SHA-256: `8ea13bcd983eab596dbfd41c5c2b62a0b318b71cd2a987a6fd752c6ced7e4489`
SHA-256: `2f0aefb72ab453c4bf21a6687f436775d359dc6f8f10410fd4c0615b20bd9d76`
-Sources: [`packages/core/session/src/types.ts:365`](../packages/core/session/src/types.ts)
+Sources: [`packages/core/session/src/types.ts:370`](../packages/core/session/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -3056,7 +3056,7 @@ SHA-256: `5e6db6e24948d4a853c71cb9fabd252ad051ce93d4672c1266cf837c1c17b84e`
SHA-256: `17d1afb770d9941936130996da00dc86782cfef731d8d6526162c301256a4ac3`
-Sources: [`packages/core/session/src/types.ts:400`](../packages/core/session/src/types.ts)
+Sources: [`packages/core/session/src/types.ts:405`](../packages/core/session/src/types.ts)
| Property | Presence | Type |
|---|---|---|
@@ -3573,7 +3573,7 @@ Sources: [`packages/core/session/src/types.ts:341`](../packages/core/session/src
### `event:tool/ptc-dispatch`
-SHA-256: `da807583a19f4ebe2bc9115c9686016e1521e405bdfaced296ae652b91e8e5f6`
+SHA-256: `b5d66eaebed4da391b13498623b11142222149fbf5e025975dbc6d94f0d06796`
| Property | Presence | Type |
|---|---|---|
@@ -3597,11 +3597,25 @@ SHA-256: `ec38b5949af8eacaf00df002f4acbe344f934f8a061e9cdc65a52a48e5f6dd93`
| `time` | required | `number` |
| `type` | required | `"tool/ptc-dispatch-start"` |
+
+
+### `event:tool/ptc-dispatch.data.error`
+
+SHA-256: `a81059ca06999da1e712414520c2c65e491d052fcf9640fae20aa38f0a5dc735`
+
+Sources: [`packages/core/session/src/types.ts:363`](../packages/core/session/src/types.ts) · [`packages/core/tools/src/types.ts:24`](../packages/core/tools/src/types.ts)
+
+| Property | Presence | Type |
+|---|---|---|
+| `code` | required | `string` |
+| `name` | required | `string` |
+| `reason` | optional | `string` |
+
### `event:tool/result`
-SHA-256: `cc3e270ab982cbafff602b753647b6f056decb7fe4fd523afd2f157a65c3d622`
+SHA-256: `3a803805bdeb805f32b229e399fb7258be8e32a89f89063a7c99957cfea942f7`
| Property | Presence | Type |
|---|---|---|
@@ -3617,31 +3631,18 @@ SHA-256: `cc3e270ab982cbafff602b753647b6f056decb7fe4fd523afd2f157a65c3d622`
### `event:tool/result.data`
-SHA-256: `a1082bd67be26461ebcc4cc9caba60ef548cd6ec625b51558d5cfa5b6b38718a`
+SHA-256: `28aa673866746f447863d828aa25213135344d61e6c568b6ca2c1e729cfff6b3`
-Sources: [`packages/core/session/src/types.ts:353`](../packages/core/session/src/types.ts)
+Sources: [`packages/core/session/src/types.ts:355`](../packages/core/session/src/types.ts)
| Property | Presence | Type |
|---|---|---|
-| `error` | optional | [`event:tool/result.data.error`](#persistence-type-eventtoolresultdataerror) |
+| `error` | optional | [`event:tool/ptc-dispatch.data.error`](#persistence-type-eventtoolptc-dispatchdataerror) |
| `message` | required | [`packages/llm/llm/src/message.ts#ToolResultMessage`](#persistence-type-packagesllmllmsrcmessagetstoolresultmessage) |
| `meta` | optional | [`event:tool/result.data.meta`](#persistence-type-eventtoolresultdatameta) |
| `step` | required | `number` |
| `turn` | required | `number` |
-
-
-### `event:tool/result.data.error`
-
-SHA-256: `55e3b6df99b0d19241e57618b04b84824c3df80ed102e440719139300ea703f6`
-
-Sources: [`packages/core/session/src/types.ts:358`](../packages/core/session/src/types.ts)
-
-| Property | Presence | Type |
-|---|---|---|
-| `code` | required | `string` |
-| `name` | required | `string` |
-
### `event:tool/result.data.message.content`
@@ -4387,7 +4388,7 @@ Sources: [`packages/context/agent-instructions/src/render.ts:47`](../packages/co
| Property | Presence | Type |
|---|---|---|
-| `action` | required | [`event:agent/inbox/spliced.data.inserted[0].source[17].changes[0].action`](#persistence-type-eventagentinboxspliceddatainserted0source17changes0action) |
+| `action` | required | [`event:agent/inbox/spliced.data.inserted[0].source[16].changes[0].action`](#persistence-type-eventagentinboxspliceddatainserted0source16changes0action) |
| `digest` | optional | `string` |
| `path` | required | `string` |
| `scope` | required | `string` |
@@ -4404,7 +4405,7 @@ Sources: [`packages/context/agent-instructions/src/state.ts:37`](../packages/con
|---|---|---|
| `baseline` | optional | `true` |
| `baselineIdentity` | optional | `string` |
-| `changes` | required | [`event:agent/inbox/spliced.data.inserted[0].source[17].changes`](#persistence-type-eventagentinboxspliceddatainserted0source17changes) |
+| `changes` | required | [`event:agent/inbox/spliced.data.inserted[0].source[16].changes`](#persistence-type-eventagentinboxspliceddatainserted0source16changes) |
| `form` | required | `"instructions"` |
| `kind` | required | `"agent-instructions"` |
@@ -4506,7 +4507,7 @@ Sources: [`packages/core/session/src/types.ts:93`](../packages/core/session/src/
SHA-256: `335e242de1fcc17b6ca920fc420d71bec2d76e53e37955c00948b65ab77f05c5`
-Sources: [`packages/core/session/src/types.ts:434`](../packages/core/session/src/types.ts)
+Sources: [`packages/core/session/src/types.ts:439`](../packages/core/session/src/types.ts)
One of:
@@ -4552,7 +4553,7 @@ One of:
SHA-256: `3cfc3a56502da1f8c6153c2c56657bab4b749056968634dd0991d325ec1c919f`
-Sources: [`packages/core/tools/src/index.ts:673`](../packages/core/tools/src/index.ts)
+Sources: [`packages/core/tools/src/index.ts:681`](../packages/core/tools/src/index.ts)
| Property | Presence | Type |
|---|---|---|
@@ -4563,7 +4564,7 @@ Sources: [`packages/core/tools/src/index.ts:673`](../packages/core/tools/src/ind
### `packages/core/tools/src/types.ts#PtcDispatchEventData`
-SHA-256: `1418e7f0c944a0453ce0851729b38b69c74194ff1e3ed41dc71904ca66e57bc5`
+SHA-256: `4c12ebe118c00be826b47b050eb5998f019df4bc3d8ebd7a93f5921c0e73617b`
Sources: [`packages/core/tools/src/types.ts:20`](../packages/core/tools/src/types.ts)
@@ -4571,6 +4572,7 @@ Sources: [`packages/core/tools/src/types.ts:20`](../packages/core/tools/src/type
|---|---|---|
| `arguments` | required | `unknown` (opaque) |
| `content` | required | [`event:agent/inbox/spliced.data.inserted[0].content`](#persistence-type-eventagentinboxspliceddatainserted0content) |
+| `error` | optional | [`event:tool/ptc-dispatch.data.error`](#persistence-type-eventtoolptc-dispatchdataerror) |
| `isError` | required | `boolean` |
| `name` | required | `string` |
| `parentCallId` | required | `string` |
@@ -5602,7 +5604,7 @@ Sources: [`packages/skill/tool-skill/src/index.ts:34`](../packages/skill/tool-sk
| Property | Presence | Type |
|---|---|---|
-| `entries` | required | [`event:agent/inbox/spliced.data.inserted[0].source[16].entries`](#persistence-type-eventagentinboxspliceddatainserted0source16entries) |
+| `entries` | required | [`event:agent/inbox/spliced.data.inserted[0].source[17].entries`](#persistence-type-eventagentinboxspliceddatainserted0source17entries) |
| `form` | required | `"catalog"` |
| `kind` | required | `"skill-catalog"` |
| `update` | optional | `true` |
@@ -6140,7 +6142,7 @@ SHA-256: `7af85bf70d4eafce63e739adae38ea85501e68df3a0e22f97f3a0be90fd9e4cb`
SHA-256: `bcf0caf62d964b2fcf5404bd5c909cfa9a21c3f3c96e6b7e36d9e33565223825`
-Sources: [`packages/core/session/src/types.ts:436`](../packages/core/session/src/types.ts)
+Sources: [`packages/core/session/src/types.ts:441`](../packages/core/session/src/types.ts)
| Property | Presence | Type |
|---|---|---|
diff --git a/docs/persistence-catalog.zh.md b/docs/persistence-catalog.zh.md
index 504beffabe..a1040c0e89 100644
--- a/docs/persistence-catalog.zh.md
+++ b/docs/persistence-catalog.zh.md
@@ -71,9 +71,9 @@
| `event:tool-workflow/run-end` | event | `42e0916e0dda5f6d1e7bb05d8514717147c036a79c9f36085683469516c1fd3f` | [`event:tool-workflow/run-end`](#persistence-type-eventtool-workflowrun-end) |
| `event:tool-workflow/run-start` | event | `c1f9e0405de6d18cabb9ee70782a027f9bbdc57e5abec9dcccdd56119e2e9058` | [`event:tool-workflow/run-start`](#persistence-type-eventtool-workflowrun-start) |
| `event:tool/call` | event | `3b1be838223869fe0a08210db85bf773796ed3f2373ac16555dff227cade0c48` | [`event:tool/call`](#persistence-type-eventtoolcall) |
-| `event:tool/ptc-dispatch` | event | `da807583a19f4ebe2bc9115c9686016e1521e405bdfaced296ae652b91e8e5f6` | [`event:tool/ptc-dispatch`](#persistence-type-eventtoolptc-dispatch) |
+| `event:tool/ptc-dispatch` | event | `b5d66eaebed4da391b13498623b11142222149fbf5e025975dbc6d94f0d06796` | [`event:tool/ptc-dispatch`](#persistence-type-eventtoolptc-dispatch) |
| `event:tool/ptc-dispatch-start` | event | `ec38b5949af8eacaf00df002f4acbe344f934f8a061e9cdc65a52a48e5f6dd93` | [`event:tool/ptc-dispatch-start`](#persistence-type-eventtoolptc-dispatch-start) |
-| `event:tool/result` | event | `cc3e270ab982cbafff602b753647b6f056decb7fe4fd523afd2f157a65c3d622` | [`event:tool/result`](#persistence-type-eventtoolresult) |
+| `event:tool/result` | event | `3a803805bdeb805f32b229e399fb7258be8e32a89f89063a7c99957cfea942f7` | [`event:tool/result`](#persistence-type-eventtoolresult) |
| `event:turn/end` | event | `84c24f1209fc3e0153de6ac85d58fd6968b851f955e0e761b92321053956609e` | [`event:turn/end`](#persistence-type-eventturnend) |
| `event:turn/start` | event | `aa0957eca50aeb28bcd2e6930b95809926edacb550c8c340ba526ba6b861b3d8` | [`event:turn/start`](#persistence-type-eventturnstart) |
| `event:user/message` | event | `2e49ede7fb3a592cce8919ebe982f6ca1c1f67abe4def359ffc028c85e6d1ad8` | [`event:user/message`](#persistence-type-eventusermessage) |
@@ -1810,17 +1810,37 @@ SHA-256: `4f91f187baeabef5c7950c4780d31bbe39f3345dff591a6cf26ac7e135ac1cf4`
| `sessionId` | 必需 | `string` |
| `truncated` | 必需 | `boolean` |
-
+
-### `event:agent/inbox/spliced.data.inserted[0].source[16].entries`
+### `event:agent/inbox/spliced.data.inserted[0].source[16].changes`
+
+SHA-256: `2ab12a0e345658f9342816d773fe610f049982bcad82631f43b9205abe43e5ee`
+
+[`packages/context/agent-instructions/src/render.ts#AgentInstructionChange`](#persistence-type-packagescontextagent-instructionssrcrendertsagentinstructionchange) 的数组。
+
+
+
+### `event:agent/inbox/spliced.data.inserted[0].source[16].changes[0].action`
+
+SHA-256: `904bf499d98be4a3a5f836fcac533b6c4899569b018071e6604e1d32657d00fd`
+
+以下类型之一:
+
+- `"remove"`
+- `"replace"`
+- `"set"`
+
+
+
+### `event:agent/inbox/spliced.data.inserted[0].source[17].entries`
SHA-256: `aba175fb20ffc71112c55efe70458ff5d7dbfb83501892b4ba8d077f0ea5d7ba`
-[`event:agent/inbox/spliced.data.inserted[0].source[16].entries[0]`](#persistence-type-eventagentinboxspliceddatainserted0source16entries0) 的数组。
+[`event:agent/inbox/spliced.data.inserted[0].source[17].entries[0]`](#persistence-type-eventagentinboxspliceddatainserted0source17entries0) 的数组。
-
+
-### `event:agent/inbox/spliced.data.inserted[0].source[16].entries[0]`
+### `event:agent/inbox/spliced.data.inserted[0].source[17].entries[0]`
SHA-256: `83079c8a3f733ac3fa603eefa0fbb4737ca4d8b69e7e2e7298b60f9ac4098693`
@@ -1831,26 +1851,6 @@ SHA-256: `83079c8a3f733ac3fa603eefa0fbb4737ca4d8b69e7e2e7298b60f9ac4098693`
| `description` | 必需 | `string` |
| `name` | 必需 | `string` |
-
-
-### `event:agent/inbox/spliced.data.inserted[0].source[17].changes`
-
-SHA-256: `2ab12a0e345658f9342816d773fe610f049982bcad82631f43b9205abe43e5ee`
-
-[`packages/context/agent-instructions/src/render.ts#AgentInstructionChange`](#persistence-type-packagescontextagent-instructionssrcrendertsagentinstructionchange) 的数组。
-
-
-
-### `event:agent/inbox/spliced.data.inserted[0].source[17].changes[0].action`
-
-SHA-256: `904bf499d98be4a3a5f836fcac533b6c4899569b018071e6604e1d32657d00fd`
-
-以下类型之一:
-
-- `"remove"`
-- `"replace"`
-- `"set"`
-
### `event:agent/inbox/spliced.data.inserted[0].source[19]`
@@ -2877,7 +2877,7 @@ SHA-256: `5c45bf4c544a7211dcd8ba6ba7e5f1bc39b49e7a9df9d5cbdc8e87c22771b37b`
SHA-256: `8a9c990773f798eac10ca8878e6bcc531ee080bc589cac956730e462cc6a09ad`
-来源:[`packages/interaction/permission-presets/src/index.ts:54`](../packages/interaction/permission-presets/src/index.ts)
+来源:[`packages/interaction/permission-presets/src/index.ts:57`](../packages/interaction/permission-presets/src/index.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -2943,7 +2943,7 @@ SHA-256: `8ea13bcd983eab596dbfd41c5c2b62a0b318b71cd2a987a6fd752c6ced7e4489`
SHA-256: `2f0aefb72ab453c4bf21a6687f436775d359dc6f8f10410fd4c0615b20bd9d76`
-来源:[`packages/core/session/src/types.ts:365`](../packages/core/session/src/types.ts)
+来源:[`packages/core/session/src/types.ts:370`](../packages/core/session/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -3058,7 +3058,7 @@ SHA-256: `5e6db6e24948d4a853c71cb9fabd252ad051ce93d4672c1266cf837c1c17b84e`
SHA-256: `17d1afb770d9941936130996da00dc86782cfef731d8d6526162c301256a4ac3`
-来源:[`packages/core/session/src/types.ts:400`](../packages/core/session/src/types.ts)
+来源:[`packages/core/session/src/types.ts:405`](../packages/core/session/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -3575,7 +3575,7 @@ SHA-256: `e4c18e294232c3ba6c9f1999f168263cc55956147cfe4121720899be8e52edd1`
### `event:tool/ptc-dispatch`
-SHA-256: `da807583a19f4ebe2bc9115c9686016e1521e405bdfaced296ae652b91e8e5f6`
+SHA-256: `b5d66eaebed4da391b13498623b11142222149fbf5e025975dbc6d94f0d06796`
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -3599,11 +3599,25 @@ SHA-256: `ec38b5949af8eacaf00df002f4acbe344f934f8a061e9cdc65a52a48e5f6dd93`
| `time` | 必需 | `number` |
| `type` | 必需 | `"tool/ptc-dispatch-start"` |
+
+
+### `event:tool/ptc-dispatch.data.error`
+
+SHA-256: `a81059ca06999da1e712414520c2c65e491d052fcf9640fae20aa38f0a5dc735`
+
+来源:[`packages/core/session/src/types.ts:363`](../packages/core/session/src/types.ts) · [`packages/core/tools/src/types.ts:24`](../packages/core/tools/src/types.ts)
+
+| 属性 | 存在性 | 类型 |
+|---|---|---|
+| `code` | 必需 | `string` |
+| `name` | 必需 | `string` |
+| `reason` | 可选 | `string` |
+
### `event:tool/result`
-SHA-256: `cc3e270ab982cbafff602b753647b6f056decb7fe4fd523afd2f157a65c3d622`
+SHA-256: `3a803805bdeb805f32b229e399fb7258be8e32a89f89063a7c99957cfea942f7`
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -3619,31 +3633,18 @@ SHA-256: `cc3e270ab982cbafff602b753647b6f056decb7fe4fd523afd2f157a65c3d622`
### `event:tool/result.data`
-SHA-256: `a1082bd67be26461ebcc4cc9caba60ef548cd6ec625b51558d5cfa5b6b38718a`
+SHA-256: `28aa673866746f447863d828aa25213135344d61e6c568b6ca2c1e729cfff6b3`
-来源:[`packages/core/session/src/types.ts:353`](../packages/core/session/src/types.ts)
+来源:[`packages/core/session/src/types.ts:355`](../packages/core/session/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
-| `error` | 可选 | [`event:tool/result.data.error`](#persistence-type-eventtoolresultdataerror) |
+| `error` | 可选 | [`event:tool/ptc-dispatch.data.error`](#persistence-type-eventtoolptc-dispatchdataerror) |
| `message` | 必需 | [`packages/llm/llm/src/message.ts#ToolResultMessage`](#persistence-type-packagesllmllmsrcmessagetstoolresultmessage) |
| `meta` | 可选 | [`event:tool/result.data.meta`](#persistence-type-eventtoolresultdatameta) |
| `step` | 必需 | `number` |
| `turn` | 必需 | `number` |
-
-
-### `event:tool/result.data.error`
-
-SHA-256: `55e3b6df99b0d19241e57618b04b84824c3df80ed102e440719139300ea703f6`
-
-来源:[`packages/core/session/src/types.ts:358`](../packages/core/session/src/types.ts)
-
-| 属性 | 存在性 | 类型 |
-|---|---|---|
-| `code` | 必需 | `string` |
-| `name` | 必需 | `string` |
-
### `event:tool/result.data.message.content`
@@ -4389,7 +4390,7 @@ SHA-256: `83da72c6857601c75da11212ef847f57d457b9c99f0a82246dcdff3e26700239`
| 属性 | 存在性 | 类型 |
|---|---|---|
-| `action` | 必需 | [`event:agent/inbox/spliced.data.inserted[0].source[17].changes[0].action`](#persistence-type-eventagentinboxspliceddatainserted0source17changes0action) |
+| `action` | 必需 | [`event:agent/inbox/spliced.data.inserted[0].source[16].changes[0].action`](#persistence-type-eventagentinboxspliceddatainserted0source16changes0action) |
| `digest` | 可选 | `string` |
| `path` | 必需 | `string` |
| `scope` | 必需 | `string` |
@@ -4406,7 +4407,7 @@ SHA-256: `6f22a9d02b9a1f1157f3b0e7bdccd7e7b12b085c4efdb709dfc74a465cd4e590`
|---|---|---|
| `baseline` | 可选 | `true` |
| `baselineIdentity` | 可选 | `string` |
-| `changes` | 必需 | [`event:agent/inbox/spliced.data.inserted[0].source[17].changes`](#persistence-type-eventagentinboxspliceddatainserted0source17changes) |
+| `changes` | 必需 | [`event:agent/inbox/spliced.data.inserted[0].source[16].changes`](#persistence-type-eventagentinboxspliceddatainserted0source16changes) |
| `form` | 必需 | `"instructions"` |
| `kind` | 必需 | `"agent-instructions"` |
@@ -4508,7 +4509,7 @@ SHA-256: `2a8b114637e66faab5fae1c6e2fba65320db6224c80f5f36c5bf32f937154d03`
SHA-256: `335e242de1fcc17b6ca920fc420d71bec2d76e53e37955c00948b65ab77f05c5`
-来源:[`packages/core/session/src/types.ts:434`](../packages/core/session/src/types.ts)
+来源:[`packages/core/session/src/types.ts:439`](../packages/core/session/src/types.ts)
以下类型之一:
@@ -4554,7 +4555,7 @@ SHA-256: `e3528b95cff70d83a080a96666877da3f9dc205e71955d6bc5b9b315b9e0da22`
SHA-256: `3cfc3a56502da1f8c6153c2c56657bab4b749056968634dd0991d325ec1c919f`
-来源:[`packages/core/tools/src/index.ts:673`](../packages/core/tools/src/index.ts)
+来源:[`packages/core/tools/src/index.ts:681`](../packages/core/tools/src/index.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -4565,7 +4566,7 @@ SHA-256: `3cfc3a56502da1f8c6153c2c56657bab4b749056968634dd0991d325ec1c919f`
### `packages/core/tools/src/types.ts#PtcDispatchEventData`
-SHA-256: `1418e7f0c944a0453ce0851729b38b69c74194ff1e3ed41dc71904ca66e57bc5`
+SHA-256: `4c12ebe118c00be826b47b050eb5998f019df4bc3d8ebd7a93f5921c0e73617b`
来源:[`packages/core/tools/src/types.ts:20`](../packages/core/tools/src/types.ts)
@@ -4573,6 +4574,7 @@ SHA-256: `1418e7f0c944a0453ce0851729b38b69c74194ff1e3ed41dc71904ca66e57bc5`
|---|---|---|
| `arguments` | 必需 | `unknown`(不透明) |
| `content` | 必需 | [`event:agent/inbox/spliced.data.inserted[0].content`](#persistence-type-eventagentinboxspliceddatainserted0content) |
+| `error` | 可选 | [`event:tool/ptc-dispatch.data.error`](#persistence-type-eventtoolptc-dispatchdataerror) |
| `isError` | 必需 | `boolean` |
| `name` | 必需 | `string` |
| `parentCallId` | 必需 | `string` |
@@ -5604,7 +5606,7 @@ SHA-256: `fc2ae6962f9f8801c2b1e414668e1e17cbb7544c4f39381198977a38bd10c093`
| 属性 | 存在性 | 类型 |
|---|---|---|
-| `entries` | 必需 | [`event:agent/inbox/spliced.data.inserted[0].source[16].entries`](#persistence-type-eventagentinboxspliceddatainserted0source16entries) |
+| `entries` | 必需 | [`event:agent/inbox/spliced.data.inserted[0].source[17].entries`](#persistence-type-eventagentinboxspliceddatainserted0source17entries) |
| `form` | 必需 | `"catalog"` |
| `kind` | 必需 | `"skill-catalog"` |
| `update` | 可选 | `true` |
@@ -6142,7 +6144,7 @@ SHA-256: `7af85bf70d4eafce63e739adae38ea85501e68df3a0e22f97f3a0be90fd9e4cb`
SHA-256: `bcf0caf62d964b2fcf5404bd5c909cfa9a21c3f3c96e6b7e36d9e33565223825`
-来源:[`packages/core/session/src/types.ts:436`](../packages/core/session/src/types.ts)
+来源:[`packages/core/session/src/types.ts:441`](../packages/core/session/src/types.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
diff --git a/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml b/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml
new file mode 100644
index 0000000000..091781d060
--- /dev/null
+++ b/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml
@@ -0,0 +1,6 @@
+# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
+# 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/persistence-changes/2026-09-12-auto-review-error-metadata.md
+2026-09-12-auto-review-error-metadata.md: d66595ec9c90fccf84cc6ad66742bc12d96a04db
+2026-09-12-auto-review-error-metadata.zh.md: 74543743ea054d8ed6af10cf6ebfe7cc5371769c
diff --git a/docs/persistence-changes/2026-09-12-auto-review-error-metadata.md b/docs/persistence-changes/2026-09-12-auto-review-error-metadata.md
new file mode 100644
index 0000000000..d66595ec9c
--- /dev/null
+++ b/docs/persistence-changes/2026-09-12-auto-review-error-metadata.md
@@ -0,0 +1,52 @@
+---
+description: "Records a persistence type transition and its compatibility acknowledgement."
+kind: persistence-change
+---
+
+# 2026-09-12-auto-review-error-metadata
+
+English | [中文](2026-09-12-auto-review-error-metadata.zh.md)
+
+## Summary
+
+Adds optional structured error metadata to persisted PTC dispatches and an optional user-facing reason to persisted native tool errors. Both additions retain the Session format version.
+
+## Table of Contents
+
+- [Declaration](#declaration)
+- [Compatibility](#compatibility)
+- [Verification](#verification)
+- [Dev Note](#dev-note)
+
+
+## Declaration
+
+```yaml persistence-change
+schemaVersion: 1
+id: 2026-09-12-auto-review-error-metadata
+baseline: false
+changes:
+ - root: "event:tool/ptc-dispatch"
+ previous: "2026-09-11-initial"
+ after: "b5d66eaebed4da391b13498623b11142222149fbf5e025975dbc6d94f0d06796"
+ decision: same-version
+ - root: "event:tool/result"
+ previous: "2026-09-11-initial"
+ after: "3a803805bdeb805f32b229e399fb7258be8e32a89f89063a7c99957cfea942f7"
+ decision: same-version
+```
+
+
+## Compatibility
+
+Existing tool/ptc-dispatch events can omit error, and existing tool/result errors can omit reason. PTC dispatch events do not enter model history; native tool-result replay projects data.message and does not include error metadata. Older readers can ignore these additions without changing model replay. Current Web readers accept absent reasons and only display Auto review denial details when the recorded error identity matches. Permission mode remains a string in the existing event; selecting auto introduces no declared persistence-type change. No header, event envelope, or existing value type changes, and no adjacent migration is required.
+
+
+## Verification
+
+pnpm exec vitest run scripts/persistence-changes.spec.ts scripts/persistence-schema.spec.ts passed 64 tests. Focused permission, Auto review, tool execution, agent-loop, subagent inheritance, and TypeScript SDK owner tests passed 390 tests across 10 files, including native and PTC denial metadata. uv run --python 3.10 --group test --project python/sdk pytest python/sdk/tests/test_client.py -k preserves_auto_review_errors passed 1 test. The persistence preview classified only the two optional additions and required no version bump.
+
+
+## Dev Note
+
+None.
diff --git a/docs/persistence-changes/2026-09-12-auto-review-error-metadata.schema.json b/docs/persistence-changes/2026-09-12-auto-review-error-metadata.schema.json
new file mode 100644
index 0000000000..679e459a93
--- /dev/null
+++ b/docs/persistence-changes/2026-09-12-auto-review-error-metadata.schema.json
@@ -0,0 +1,910 @@
+{
+ "formatVersion": 1,
+ "roots": [
+ {
+ "key": "event:tool/ptc-dispatch",
+ "kind": "event",
+ "event": "tool/ptc-dispatch",
+ "surface": false,
+ "digest": "b5d66eaebed4da391b13498623b11142222149fbf5e025975dbc6d94f0d06796",
+ "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": 30,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "arguments",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "content",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "error",
+ "type": 28,
+ "optional": true
+ },
+ {
+ "name": "isError",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "parentCallId",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "rootCallId",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "subCallId",
+ "type": 7,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "opaque",
+ "reason": "unknown"
+ },
+ {
+ "kind": "array",
+ "element": 4
+ },
+ {
+ "kind": "union",
+ "types": [
+ 5,
+ 9,
+ 11,
+ 13,
+ 15,
+ 25
+ ]
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "content",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "isError",
+ "type": 6,
+ "optional": true
+ },
+ {
+ "name": "toolCallId",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 8,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "boolean"
+ },
+ {
+ "kind": "primitive",
+ "type": "string"
+ },
+ {
+ "kind": "literal",
+ "value": "tool-result"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 10,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "reasoning"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 12,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "text"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "arguments",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "id",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 14,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "tool-call"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 24,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "height",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "mediaType",
+ "type": 18,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": true
+ },
+ {
+ "name": "originalDimensions",
+ "type": 23,
+ "optional": true
+ },
+ {
+ "name": "width",
+ "type": 17,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "number"
+ },
+ {
+ "kind": "union",
+ "types": [
+ 19,
+ 20,
+ 21,
+ 22
+ ]
+ },
+ {
+ "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": "image"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 26,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 27,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "file"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "code",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "reason",
+ "type": 7,
+ "optional": true
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": true
+ },
+ {
+ "kind": "literal",
+ "value": "tool/ptc-dispatch"
+ }
+ ]
+ }
+ },
+ {
+ "key": "event:tool/result",
+ "kind": "event",
+ "event": "tool/result",
+ "surface": true,
+ "digest": "3a803805bdeb805f32b229e399fb7258be8e32a89f89063a7c99957cfea942f7",
+ "schema": {
+ "root": 0,
+ "nodes": [
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "data",
+ "type": 1,
+ "optional": false
+ },
+ {
+ "name": "ignorable",
+ "type": 37,
+ "optional": true
+ },
+ {
+ "name": "seq",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "sourceEventSeqs",
+ "type": 38,
+ "optional": true
+ },
+ {
+ "name": "surfaceOp",
+ "type": 39,
+ "optional": false
+ },
+ {
+ "name": "time",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 43,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "error",
+ "type": 2,
+ "optional": true
+ },
+ {
+ "name": "message",
+ "type": 4,
+ "optional": false
+ },
+ {
+ "name": "meta",
+ "type": 33,
+ "optional": true
+ },
+ {
+ "name": "step",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "turn",
+ "type": 17,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "code",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "reason",
+ "type": 3,
+ "optional": true
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "string"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "content",
+ "type": 5,
+ "optional": false
+ },
+ {
+ "name": "id",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "role",
+ "type": 30,
+ "optional": false
+ },
+ {
+ "name": "source",
+ "type": 31,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "tuple",
+ "elements": [
+ {
+ "type": 6,
+ "optional": false,
+ "rest": false
+ }
+ ]
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "content",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "isError",
+ "type": 28,
+ "optional": true
+ },
+ {
+ "name": "toolCallId",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 29,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "array",
+ "element": 8
+ },
+ {
+ "kind": "union",
+ "types": [
+ 6,
+ 9,
+ 11,
+ 13,
+ 15,
+ 25
+ ]
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 10,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "text"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 12,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "reasoning"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "arguments",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "id",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 14,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "tool-call"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 24,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "height",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "mediaType",
+ "type": 18,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 3,
+ "optional": true
+ },
+ {
+ "name": "originalDimensions",
+ "type": 23,
+ "optional": true
+ },
+ {
+ "name": "width",
+ "type": 17,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "number"
+ },
+ {
+ "kind": "union",
+ "types": [
+ 19,
+ 20,
+ 21,
+ 22
+ ]
+ },
+ {
+ "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": "image"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 26,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 27,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 3,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "file"
+ },
+ {
+ "kind": "primitive",
+ "type": "boolean"
+ },
+ {
+ "kind": "literal",
+ "value": "tool-result"
+ },
+ {
+ "kind": "literal",
+ "value": "user"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "callId",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "kind",
+ "type": 32,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "tool"
+ },
+ {
+ "kind": "union",
+ "types": [
+ 3,
+ 17,
+ 28,
+ 34,
+ 35,
+ 36
+ ]
+ },
+ {
+ "kind": "array",
+ "element": 33
+ },
+ {
+ "kind": "primitive",
+ "type": "null"
+ },
+ {
+ "kind": "object",
+ "properties": [],
+ "indices": [
+ {
+ "key": 3,
+ "value": 33
+ }
+ ]
+ },
+ {
+ "kind": "literal",
+ "value": true
+ },
+ {
+ "kind": "array",
+ "element": 17
+ },
+ {
+ "kind": "union",
+ "types": [
+ 40,
+ 41
+ ]
+ },
+ {
+ "kind": "literal",
+ "value": "append"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "endSeq",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "op",
+ "type": 42,
+ "optional": false
+ },
+ {
+ "name": "startSeq",
+ "type": 17,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "replace"
+ },
+ {
+ "kind": "literal",
+ "value": "tool/result"
+ }
+ ]
+ }
+ }
+ ],
+ "types": []
+}
diff --git a/docs/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md b/docs/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md
new file mode 100644
index 0000000000..74543743ea
--- /dev/null
+++ b/docs/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md
@@ -0,0 +1,52 @@
+---
+description: "记录持久化类型更改及其兼容性确认。"
+kind: persistence-change
+---
+
+# 2026-09-12-auto-review-error-metadata
+
+[English](2026-09-12-auto-review-error-metadata.md) | 中文
+
+## 概述
+
+为持久化的 PTC dispatch 增加可选的结构化错误元数据,并为持久化的原生工具错误增加可选的用户可见理由。两项新增字段均保持 Session 格式版本。
+
+## 目录
+
+- [声明](#declaration)
+- [兼容性](#compatibility)
+- [验证](#verification)
+- [开发备注](#dev-note)
+
+
+## 声明
+
+```yaml persistence-change
+schemaVersion: 1
+id: 2026-09-12-auto-review-error-metadata
+baseline: false
+changes:
+ - root: "event:tool/ptc-dispatch"
+ previous: "2026-09-11-initial"
+ after: "b5d66eaebed4da391b13498623b11142222149fbf5e025975dbc6d94f0d06796"
+ decision: same-version
+ - root: "event:tool/result"
+ previous: "2026-09-11-initial"
+ after: "3a803805bdeb805f32b229e399fb7258be8e32a89f89063a7c99957cfea942f7"
+ decision: same-version
+```
+
+
+## 兼容性
+
+已有 tool/ptc-dispatch 事件可以省略 error,已有 tool/result 错误可以省略 reason。PTC dispatch 事件不进入模型历史;原生工具结果回放只投影 data.message,不包含错误元数据。旧读取方可以忽略新增字段,不改变模型回放。当前 Web 读取方接受缺失的理由,并且只有记录中的错误标识匹配时才显示 Auto review 拒绝详情。权限模式在已有事件中仍为字符串;选择 auto 不引入已声明持久化类型的变更。Session header、事件信封和已有值类型均未改变,无需相邻迁移。
+
+
+## 验证
+
+pnpm exec vitest run scripts/persistence-changes.spec.ts scripts/persistence-schema.spec.ts 通过 64 个测试。权限、Auto review、工具执行、agent loop(智能体循环)、subagent 继承和 TypeScript SDK 的定向测试共 10 个文件、390 个测试通过,覆盖原生与 PTC 拒绝元数据。uv run --python 3.10 --group test --project python/sdk pytest python/sdk/tests/test_client.py -k preserves_auto_review_errors 通过 1 个测试。持久化预览仅识别出这两项可选字段新增,均无需提升版本。
+
+
+## 开发备注
+
+无。
diff --git a/docs/persistence-schema.json b/docs/persistence-schema.json
index 4d502ac415..9ceeb4aa89 100644
--- a/docs/persistence-schema.json
+++ b/docs/persistence-schema.json
@@ -10869,7 +10869,7 @@
"kind": "event",
"event": "tool/ptc-dispatch",
"surface": false,
- "digest": "da807583a19f4ebe2bc9115c9686016e1521e405bdfaced296ae652b91e8e5f6",
+ "digest": "b5d66eaebed4da391b13498623b11142222149fbf5e025975dbc6d94f0d06796",
"schema": {
"root": 0,
"nodes": [
@@ -10883,7 +10883,7 @@
},
{
"name": "ignorable",
- "type": 28,
+ "type": 29,
"optional": true
},
{
@@ -10898,7 +10898,7 @@
},
{
"name": "type",
- "type": 29,
+ "type": 30,
"optional": false
}
],
@@ -10917,6 +10917,11 @@
"type": 3,
"optional": false
},
+ {
+ "name": "error",
+ "type": 28,
+ "optional": true
+ },
{
"name": "isError",
"type": 6,
@@ -11219,6 +11224,27 @@
"kind": "literal",
"value": "file"
},
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "code",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "reason",
+ "type": 7,
+ "optional": true
+ }
+ ],
+ "indices": []
+ },
{
"kind": "literal",
"value": true
@@ -11329,7 +11355,7 @@
"kind": "event",
"event": "tool/result",
"surface": true,
- "digest": "cc3e270ab982cbafff602b753647b6f056decb7fe4fd523afd2f157a65c3d622",
+ "digest": "3a803805bdeb805f32b229e399fb7258be8e32a89f89063a7c99957cfea942f7",
"schema": {
"root": 0,
"nodes": [
@@ -11417,6 +11443,11 @@
"name": "name",
"type": 3,
"optional": false
+ },
+ {
+ "name": "reason",
+ "type": 3,
+ "optional": true
}
],
"indices": []
@@ -17703,335 +17734,6 @@
],
"sources": []
},
- {
- "digest": "1418e7f0c944a0453ce0851729b38b69c74194ff1e3ed41dc71904ca66e57bc5",
- "schema": {
- "root": 0,
- "nodes": [
- {
- "kind": "object",
- "properties": [
- {
- "name": "arguments",
- "type": 1,
- "optional": false
- },
- {
- "name": "content",
- "type": 2,
- "optional": false
- },
- {
- "name": "isError",
- "type": 25,
- "optional": false
- },
- {
- "name": "name",
- "type": 5,
- "optional": false
- },
- {
- "name": "parentCallId",
- "type": 5,
- "optional": false
- },
- {
- "name": "rootCallId",
- "type": 5,
- "optional": false
- },
- {
- "name": "subCallId",
- "type": 5,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "opaque",
- "reason": "unknown"
- },
- {
- "kind": "array",
- "element": 3
- },
- {
- "kind": "union",
- "types": [
- 4,
- 7,
- 9,
- 11,
- 21,
- 24
- ]
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "text",
- "type": 5,
- "optional": false
- },
- {
- "name": "type",
- "type": 6,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "primitive",
- "type": "string"
- },
- {
- "kind": "literal",
- "value": "reasoning"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "text",
- "type": 5,
- "optional": false
- },
- {
- "name": "type",
- "type": 8,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "text"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "arguments",
- "type": 5,
- "optional": false
- },
- {
- "name": "id",
- "type": 5,
- "optional": false
- },
- {
- "name": "name",
- "type": 5,
- "optional": false
- },
- {
- "name": "type",
- "type": 10,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "tool-call"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachment",
- "type": 12,
- "optional": false
- },
- {
- "name": "type",
- "type": 20,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachmentId",
- "type": 5,
- "optional": false
- },
- {
- "name": "bytes",
- "type": 13,
- "optional": false
- },
- {
- "name": "height",
- "type": 13,
- "optional": false
- },
- {
- "name": "mediaType",
- "type": 14,
- "optional": false
- },
- {
- "name": "name",
- "type": 5,
- "optional": true
- },
- {
- "name": "originalDimensions",
- "type": 19,
- "optional": true
- },
- {
- "name": "width",
- "type": 13,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "primitive",
- "type": "number"
- },
- {
- "kind": "union",
- "types": [
- 15,
- 16,
- 17,
- 18
- ]
- },
- {
- "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": 13,
- "optional": false
- },
- {
- "name": "width",
- "type": 13,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "image"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachment",
- "type": 22,
- "optional": false
- },
- {
- "name": "type",
- "type": 23,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachmentId",
- "type": 5,
- "optional": false
- },
- {
- "name": "bytes",
- "type": 13,
- "optional": false
- },
- {
- "name": "name",
- "type": 5,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "file"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "content",
- "type": 2,
- "optional": false
- },
- {
- "name": "isError",
- "type": 25,
- "optional": true
- },
- {
- "name": "toolCallId",
- "type": 5,
- "optional": false
- },
- {
- "name": "type",
- "type": 26,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "primitive",
- "type": "boolean"
- },
- {
- "kind": "literal",
- "value": "tool-result"
- }
- ]
- },
- "names": [
- "packages/core/tools/src/types.ts#PtcDispatchEventData"
- ],
- "sources": [
- "packages/core/tools/src/types.ts:20"
- ]
- },
{
"digest": "14230f9b8b5797bb7e8c621fa636531cfbde2ffba1ef5f1fd058216ff21952a0",
"schema": {
@@ -18305,7 +18007,7 @@
"event:session/end-seed.data"
],
"sources": [
- "packages/core/session/src/types.ts:400"
+ "packages/core/session/src/types.ts:405"
]
},
{
@@ -20411,6 +20113,431 @@
"packages/llm/llm/src/types.ts:132"
]
},
+ {
+ "digest": "28aa673866746f447863d828aa25213135344d61e6c568b6ca2c1e729cfff6b3",
+ "schema": {
+ "root": 0,
+ "nodes": [
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "error",
+ "type": 1,
+ "optional": true
+ },
+ {
+ "name": "message",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "meta",
+ "type": 32,
+ "optional": true
+ },
+ {
+ "name": "step",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "turn",
+ "type": 16,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "code",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "reason",
+ "type": 2,
+ "optional": true
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "string"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "content",
+ "type": 4,
+ "optional": false
+ },
+ {
+ "name": "id",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "role",
+ "type": 29,
+ "optional": false
+ },
+ {
+ "name": "source",
+ "type": 30,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "tuple",
+ "elements": [
+ {
+ "type": 5,
+ "optional": false,
+ "rest": false
+ }
+ ]
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "content",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "isError",
+ "type": 27,
+ "optional": true
+ },
+ {
+ "name": "toolCallId",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 28,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "array",
+ "element": 7
+ },
+ {
+ "kind": "union",
+ "types": [
+ 5,
+ 8,
+ 10,
+ 12,
+ 14,
+ 24
+ ]
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 9,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "reasoning"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 11,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "text"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "arguments",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "id",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 13,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "tool-call"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 15,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 23,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "height",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "mediaType",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 2,
+ "optional": true
+ },
+ {
+ "name": "originalDimensions",
+ "type": 22,
+ "optional": true
+ },
+ {
+ "name": "width",
+ "type": 16,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "number"
+ },
+ {
+ "kind": "union",
+ "types": [
+ 18,
+ 19,
+ 20,
+ 21
+ ]
+ },
+ {
+ "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": 16,
+ "optional": false
+ },
+ {
+ "name": "width",
+ "type": 16,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "image"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 25,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 26,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 2,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "file"
+ },
+ {
+ "kind": "primitive",
+ "type": "boolean"
+ },
+ {
+ "kind": "literal",
+ "value": "tool-result"
+ },
+ {
+ "kind": "literal",
+ "value": "user"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "callId",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "kind",
+ "type": 31,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "tool"
+ },
+ {
+ "kind": "union",
+ "types": [
+ 2,
+ 16,
+ 27,
+ 33,
+ 34,
+ 35
+ ]
+ },
+ {
+ "kind": "array",
+ "element": 32
+ },
+ {
+ "kind": "primitive",
+ "type": "null"
+ },
+ {
+ "kind": "object",
+ "properties": [],
+ "indices": [
+ {
+ "key": 2,
+ "value": 32
+ }
+ ]
+ }
+ ]
+ },
+ "names": [
+ "event:tool/result.data"
+ ],
+ "sources": [
+ "packages/core/session/src/types.ts:355"
+ ]
+ },
{
"digest": "2a7f86849ae54b3398ee49661a757c4fcb59a6192b7036ee2ff514617e13fb42",
"schema": {
@@ -20839,7 +20966,7 @@
]
},
"names": [
- "event:agent/inbox/spliced.data.inserted[0].source[17].changes"
+ "event:agent/inbox/spliced.data.inserted[0].source[16].changes"
],
"sources": []
},
@@ -22381,7 +22508,7 @@
"event:request/header.data"
],
"sources": [
- "packages/core/session/src/types.ts:365"
+ "packages/core/session/src/types.ts:370"
]
},
{
@@ -23134,7 +23261,7 @@
"packages/core/session/src/types.ts#SurfaceOp"
],
"sources": [
- "packages/core/session/src/types.ts:434"
+ "packages/core/session/src/types.ts:439"
]
},
{
@@ -24633,6 +24760,518 @@
"packages/feedback/message-feedback/src/types.ts:17"
]
},
+ {
+ "digest": "3a803805bdeb805f32b229e399fb7258be8e32a89f89063a7c99957cfea942f7",
+ "schema": {
+ "root": 0,
+ "nodes": [
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "data",
+ "type": 1,
+ "optional": false
+ },
+ {
+ "name": "ignorable",
+ "type": 37,
+ "optional": true
+ },
+ {
+ "name": "seq",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "sourceEventSeqs",
+ "type": 38,
+ "optional": true
+ },
+ {
+ "name": "surfaceOp",
+ "type": 39,
+ "optional": false
+ },
+ {
+ "name": "time",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 43,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "error",
+ "type": 2,
+ "optional": true
+ },
+ {
+ "name": "message",
+ "type": 4,
+ "optional": false
+ },
+ {
+ "name": "meta",
+ "type": 33,
+ "optional": true
+ },
+ {
+ "name": "step",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "turn",
+ "type": 17,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "code",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "reason",
+ "type": 3,
+ "optional": true
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "string"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "content",
+ "type": 5,
+ "optional": false
+ },
+ {
+ "name": "id",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "role",
+ "type": 30,
+ "optional": false
+ },
+ {
+ "name": "source",
+ "type": 31,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "tuple",
+ "elements": [
+ {
+ "type": 6,
+ "optional": false,
+ "rest": false
+ }
+ ]
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "content",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "isError",
+ "type": 28,
+ "optional": true
+ },
+ {
+ "name": "toolCallId",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 29,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "array",
+ "element": 8
+ },
+ {
+ "kind": "union",
+ "types": [
+ 6,
+ 9,
+ 11,
+ 13,
+ 15,
+ 25
+ ]
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 10,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "text"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 12,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "reasoning"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "arguments",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "id",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 14,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "tool-call"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 24,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "height",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "mediaType",
+ "type": 18,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 3,
+ "optional": true
+ },
+ {
+ "name": "originalDimensions",
+ "type": 23,
+ "optional": true
+ },
+ {
+ "name": "width",
+ "type": 17,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "number"
+ },
+ {
+ "kind": "union",
+ "types": [
+ 19,
+ 20,
+ 21,
+ 22
+ ]
+ },
+ {
+ "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": "image"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 26,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 27,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 3,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "file"
+ },
+ {
+ "kind": "primitive",
+ "type": "boolean"
+ },
+ {
+ "kind": "literal",
+ "value": "tool-result"
+ },
+ {
+ "kind": "literal",
+ "value": "user"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "callId",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "kind",
+ "type": 32,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "tool"
+ },
+ {
+ "kind": "union",
+ "types": [
+ 3,
+ 17,
+ 28,
+ 34,
+ 35,
+ 36
+ ]
+ },
+ {
+ "kind": "array",
+ "element": 33
+ },
+ {
+ "kind": "primitive",
+ "type": "null"
+ },
+ {
+ "kind": "object",
+ "properties": [],
+ "indices": [
+ {
+ "key": 3,
+ "value": 33
+ }
+ ]
+ },
+ {
+ "kind": "literal",
+ "value": true
+ },
+ {
+ "kind": "array",
+ "element": 17
+ },
+ {
+ "kind": "union",
+ "types": [
+ 40,
+ 41
+ ]
+ },
+ {
+ "kind": "literal",
+ "value": "append"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "endSeq",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "op",
+ "type": 42,
+ "optional": false
+ },
+ {
+ "name": "startSeq",
+ "type": 17,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "replace"
+ },
+ {
+ "kind": "literal",
+ "value": "tool/result"
+ }
+ ]
+ },
+ "names": [
+ "event:tool/result"
+ ],
+ "sources": []
+ },
{
"digest": "3a896379a74576c5a527e4720be2fe6807d3225c27134e978a2b89a94068368e",
"schema": {
@@ -25703,7 +26342,7 @@
"packages/core/tools/src/index.ts#ToolRestriction"
],
"sources": [
- "packages/core/tools/src/index.ts:673"
+ "packages/core/tools/src/index.ts:681"
]
},
{
@@ -27773,6 +28412,361 @@
"packages/core/session/src/types.ts:192"
]
},
+ {
+ "digest": "4c12ebe118c00be826b47b050eb5998f019df4bc3d8ebd7a93f5921c0e73617b",
+ "schema": {
+ "root": 0,
+ "nodes": [
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "arguments",
+ "type": 1,
+ "optional": false
+ },
+ {
+ "name": "content",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "error",
+ "type": 27,
+ "optional": true
+ },
+ {
+ "name": "isError",
+ "type": 5,
+ "optional": false
+ },
+ {
+ "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": 3
+ },
+ {
+ "kind": "union",
+ "types": [
+ 4,
+ 8,
+ 10,
+ 12,
+ 14,
+ 24
+ ]
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "content",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "isError",
+ "type": 5,
+ "optional": true
+ },
+ {
+ "name": "toolCallId",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 7,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "boolean"
+ },
+ {
+ "kind": "primitive",
+ "type": "string"
+ },
+ {
+ "kind": "literal",
+ "value": "tool-result"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 9,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "reasoning"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 11,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "text"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "arguments",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "id",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 13,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "tool-call"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 15,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 23,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "height",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "mediaType",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 6,
+ "optional": true
+ },
+ {
+ "name": "originalDimensions",
+ "type": 22,
+ "optional": true
+ },
+ {
+ "name": "width",
+ "type": 16,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "number"
+ },
+ {
+ "kind": "union",
+ "types": [
+ 18,
+ 19,
+ 20,
+ 21
+ ]
+ },
+ {
+ "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": 16,
+ "optional": false
+ },
+ {
+ "name": "width",
+ "type": 16,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "image"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 25,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 26,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 6,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "file"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "code",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "reason",
+ "type": 6,
+ "optional": true
+ }
+ ],
+ "indices": []
+ }
+ ]
+ },
+ "names": [
+ "packages/core/tools/src/types.ts#PtcDispatchEventData"
+ ],
+ "sources": [
+ "packages/core/tools/src/types.ts:20"
+ ]
+ },
{
"digest": "4c965666d5b42116945bc356087cd5e1fd549e6dece560785ed60511059a8283",
"schema": {
@@ -29619,40 +30613,6 @@
"names": [],
"sources": []
},
- {
- "digest": "55e3b6df99b0d19241e57618b04b84824c3df80ed102e440719139300ea703f6",
- "schema": {
- "root": 0,
- "nodes": [
- {
- "kind": "object",
- "properties": [
- {
- "name": "code",
- "type": 1,
- "optional": false
- },
- {
- "name": "name",
- "type": 1,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "primitive",
- "type": "string"
- }
- ]
- },
- "names": [
- "event:tool/result.data.error"
- ],
- "sources": [
- "packages/core/session/src/types.ts:358"
- ]
- },
{
"digest": "56b7c047694875a843ba020dfea3c8380d54ae4ff88ab349e72004dc21e07c23",
"schema": {
@@ -37078,7 +38038,7 @@
]
},
"names": [
- "event:agent/inbox/spliced.data.inserted[0].source[16].entries[0]"
+ "event:agent/inbox/spliced.data.inserted[0].source[17].entries[0]"
],
"sources": [
"packages/skill/tool-skill/src/index.ts:40"
@@ -40693,7 +41653,7 @@
"event:permission/preset.data"
],
"sources": [
- "packages/interaction/permission-presets/src/index.ts:54"
+ "packages/interaction/permission-presets/src/index.ts:57"
]
},
{
@@ -41296,7 +42256,7 @@
]
},
"names": [
- "event:agent/inbox/spliced.data.inserted[0].source[17].changes[0].action"
+ "event:agent/inbox/spliced.data.inserted[0].source[16].changes[0].action"
],
"sources": []
},
@@ -43781,426 +44741,6 @@
"names": [],
"sources": []
},
- {
- "digest": "a1082bd67be26461ebcc4cc9caba60ef548cd6ec625b51558d5cfa5b6b38718a",
- "schema": {
- "root": 0,
- "nodes": [
- {
- "kind": "object",
- "properties": [
- {
- "name": "error",
- "type": 1,
- "optional": true
- },
- {
- "name": "message",
- "type": 3,
- "optional": false
- },
- {
- "name": "meta",
- "type": 32,
- "optional": true
- },
- {
- "name": "step",
- "type": 16,
- "optional": false
- },
- {
- "name": "turn",
- "type": 16,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "code",
- "type": 2,
- "optional": false
- },
- {
- "name": "name",
- "type": 2,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "primitive",
- "type": "string"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "content",
- "type": 4,
- "optional": false
- },
- {
- "name": "id",
- "type": 2,
- "optional": false
- },
- {
- "name": "role",
- "type": 29,
- "optional": false
- },
- {
- "name": "source",
- "type": 30,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "tuple",
- "elements": [
- {
- "type": 5,
- "optional": false,
- "rest": false
- }
- ]
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "content",
- "type": 6,
- "optional": false
- },
- {
- "name": "isError",
- "type": 27,
- "optional": true
- },
- {
- "name": "toolCallId",
- "type": 2,
- "optional": false
- },
- {
- "name": "type",
- "type": 28,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "array",
- "element": 7
- },
- {
- "kind": "union",
- "types": [
- 5,
- 8,
- 10,
- 12,
- 14,
- 24
- ]
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "text",
- "type": 2,
- "optional": false
- },
- {
- "name": "type",
- "type": 9,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "reasoning"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "text",
- "type": 2,
- "optional": false
- },
- {
- "name": "type",
- "type": 11,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "text"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "arguments",
- "type": 2,
- "optional": false
- },
- {
- "name": "id",
- "type": 2,
- "optional": false
- },
- {
- "name": "name",
- "type": 2,
- "optional": false
- },
- {
- "name": "type",
- "type": 13,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "tool-call"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachment",
- "type": 15,
- "optional": false
- },
- {
- "name": "type",
- "type": 23,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachmentId",
- "type": 2,
- "optional": false
- },
- {
- "name": "bytes",
- "type": 16,
- "optional": false
- },
- {
- "name": "height",
- "type": 16,
- "optional": false
- },
- {
- "name": "mediaType",
- "type": 17,
- "optional": false
- },
- {
- "name": "name",
- "type": 2,
- "optional": true
- },
- {
- "name": "originalDimensions",
- "type": 22,
- "optional": true
- },
- {
- "name": "width",
- "type": 16,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "primitive",
- "type": "number"
- },
- {
- "kind": "union",
- "types": [
- 18,
- 19,
- 20,
- 21
- ]
- },
- {
- "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": 16,
- "optional": false
- },
- {
- "name": "width",
- "type": 16,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "image"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachment",
- "type": 25,
- "optional": false
- },
- {
- "name": "type",
- "type": 26,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachmentId",
- "type": 2,
- "optional": false
- },
- {
- "name": "bytes",
- "type": 16,
- "optional": false
- },
- {
- "name": "name",
- "type": 2,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "file"
- },
- {
- "kind": "primitive",
- "type": "boolean"
- },
- {
- "kind": "literal",
- "value": "tool-result"
- },
- {
- "kind": "literal",
- "value": "user"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "callId",
- "type": 2,
- "optional": false
- },
- {
- "name": "kind",
- "type": 31,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "tool"
- },
- {
- "kind": "union",
- "types": [
- 2,
- 16,
- 27,
- 33,
- 34,
- 35
- ]
- },
- {
- "kind": "array",
- "element": 32
- },
- {
- "kind": "primitive",
- "type": "null"
- },
- {
- "kind": "object",
- "properties": [],
- "indices": [
- {
- "key": 2,
- "value": 32
- }
- ]
- }
- ]
- },
- "names": [
- "event:tool/result.data"
- ],
- "sources": [
- "packages/core/session/src/types.ts:353"
- ]
- },
{
"digest": "a10c17474eaf2ddab7095a099e0fe3d046fc18e56c3e344fc8894c05ff9ef97b",
"schema": {
@@ -46811,6 +47351,47 @@
],
"sources": []
},
+ {
+ "digest": "a81059ca06999da1e712414520c2c65e491d052fcf9640fae20aa38f0a5dc735",
+ "schema": {
+ "root": 0,
+ "nodes": [
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "code",
+ "type": 1,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 1,
+ "optional": false
+ },
+ {
+ "name": "reason",
+ "type": 1,
+ "optional": true
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "string"
+ }
+ ]
+ },
+ "names": [
+ "event:tool/ptc-dispatch.data.error",
+ "event:tool/result.data.error"
+ ],
+ "sources": [
+ "packages/core/session/src/types.ts:363",
+ "packages/core/tools/src/types.ts:24"
+ ]
+ },
{
"digest": "a853902cfab417b8f08aa51ad6855fea46f34ed4588a74e47403035111d0fb86",
"schema": {
@@ -47229,7 +47810,7 @@
]
},
"names": [
- "event:agent/inbox/spliced.data.inserted[0].source[16].entries"
+ "event:agent/inbox/spliced.data.inserted[0].source[17].entries"
],
"sources": []
},
@@ -48887,6 +49468,398 @@
"names": [],
"sources": []
},
+ {
+ "digest": "b5d66eaebed4da391b13498623b11142222149fbf5e025975dbc6d94f0d06796",
+ "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": 30,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "arguments",
+ "type": 2,
+ "optional": false
+ },
+ {
+ "name": "content",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "error",
+ "type": 28,
+ "optional": true
+ },
+ {
+ "name": "isError",
+ "type": 6,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "parentCallId",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "rootCallId",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "subCallId",
+ "type": 7,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "opaque",
+ "reason": "unknown"
+ },
+ {
+ "kind": "array",
+ "element": 4
+ },
+ {
+ "kind": "union",
+ "types": [
+ 5,
+ 9,
+ 11,
+ 13,
+ 15,
+ 25
+ ]
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "content",
+ "type": 3,
+ "optional": false
+ },
+ {
+ "name": "isError",
+ "type": 6,
+ "optional": true
+ },
+ {
+ "name": "toolCallId",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 8,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "boolean"
+ },
+ {
+ "kind": "primitive",
+ "type": "string"
+ },
+ {
+ "kind": "literal",
+ "value": "tool-result"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 10,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "reasoning"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "text",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 12,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "text"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "arguments",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "id",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 14,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "tool-call"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 16,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 24,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "height",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "mediaType",
+ "type": 18,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": true
+ },
+ {
+ "name": "originalDimensions",
+ "type": 23,
+ "optional": true
+ },
+ {
+ "name": "width",
+ "type": 17,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "primitive",
+ "type": "number"
+ },
+ {
+ "kind": "union",
+ "types": [
+ 19,
+ 20,
+ 21,
+ 22
+ ]
+ },
+ {
+ "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": "image"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachment",
+ "type": 26,
+ "optional": false
+ },
+ {
+ "name": "type",
+ "type": 27,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "attachmentId",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "bytes",
+ "type": 17,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": false
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": "file"
+ },
+ {
+ "kind": "object",
+ "properties": [
+ {
+ "name": "code",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "name",
+ "type": 7,
+ "optional": false
+ },
+ {
+ "name": "reason",
+ "type": 7,
+ "optional": true
+ }
+ ],
+ "indices": []
+ },
+ {
+ "kind": "literal",
+ "value": true
+ },
+ {
+ "kind": "literal",
+ "value": "tool/ptc-dispatch"
+ }
+ ]
+ },
+ "names": [
+ "event:tool/ptc-dispatch"
+ ],
+ "sources": []
+ },
{
"digest": "b6ef9c6210be8350cd465f485cf520031fffa6bf3809c61a1e713e834c5982d0",
"schema": {
@@ -49744,7 +50717,7 @@
"SessionEventEnvelope[6].surfaceOp[1]"
],
"sources": [
- "packages/core/session/src/types.ts:436"
+ "packages/core/session/src/types.ts:441"
]
},
{
@@ -50726,513 +51699,6 @@
"names": [],
"sources": []
},
- {
- "digest": "cc3e270ab982cbafff602b753647b6f056decb7fe4fd523afd2f157a65c3d622",
- "schema": {
- "root": 0,
- "nodes": [
- {
- "kind": "object",
- "properties": [
- {
- "name": "data",
- "type": 1,
- "optional": false
- },
- {
- "name": "ignorable",
- "type": 37,
- "optional": true
- },
- {
- "name": "seq",
- "type": 17,
- "optional": false
- },
- {
- "name": "sourceEventSeqs",
- "type": 38,
- "optional": true
- },
- {
- "name": "surfaceOp",
- "type": 39,
- "optional": false
- },
- {
- "name": "time",
- "type": 17,
- "optional": false
- },
- {
- "name": "type",
- "type": 43,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "error",
- "type": 2,
- "optional": true
- },
- {
- "name": "message",
- "type": 4,
- "optional": false
- },
- {
- "name": "meta",
- "type": 33,
- "optional": true
- },
- {
- "name": "step",
- "type": 17,
- "optional": false
- },
- {
- "name": "turn",
- "type": 17,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "code",
- "type": 3,
- "optional": false
- },
- {
- "name": "name",
- "type": 3,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "primitive",
- "type": "string"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "content",
- "type": 5,
- "optional": false
- },
- {
- "name": "id",
- "type": 3,
- "optional": false
- },
- {
- "name": "role",
- "type": 30,
- "optional": false
- },
- {
- "name": "source",
- "type": 31,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "tuple",
- "elements": [
- {
- "type": 6,
- "optional": false,
- "rest": false
- }
- ]
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "content",
- "type": 7,
- "optional": false
- },
- {
- "name": "isError",
- "type": 28,
- "optional": true
- },
- {
- "name": "toolCallId",
- "type": 3,
- "optional": false
- },
- {
- "name": "type",
- "type": 29,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "array",
- "element": 8
- },
- {
- "kind": "union",
- "types": [
- 6,
- 9,
- 11,
- 13,
- 15,
- 25
- ]
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "text",
- "type": 3,
- "optional": false
- },
- {
- "name": "type",
- "type": 10,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "text"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "text",
- "type": 3,
- "optional": false
- },
- {
- "name": "type",
- "type": 12,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "reasoning"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "arguments",
- "type": 3,
- "optional": false
- },
- {
- "name": "id",
- "type": 3,
- "optional": false
- },
- {
- "name": "name",
- "type": 3,
- "optional": false
- },
- {
- "name": "type",
- "type": 14,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "tool-call"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachment",
- "type": 16,
- "optional": false
- },
- {
- "name": "type",
- "type": 24,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachmentId",
- "type": 3,
- "optional": false
- },
- {
- "name": "bytes",
- "type": 17,
- "optional": false
- },
- {
- "name": "height",
- "type": 17,
- "optional": false
- },
- {
- "name": "mediaType",
- "type": 18,
- "optional": false
- },
- {
- "name": "name",
- "type": 3,
- "optional": true
- },
- {
- "name": "originalDimensions",
- "type": 23,
- "optional": true
- },
- {
- "name": "width",
- "type": 17,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "primitive",
- "type": "number"
- },
- {
- "kind": "union",
- "types": [
- 19,
- 20,
- 21,
- 22
- ]
- },
- {
- "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": "image"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachment",
- "type": 26,
- "optional": false
- },
- {
- "name": "type",
- "type": 27,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachmentId",
- "type": 3,
- "optional": false
- },
- {
- "name": "bytes",
- "type": 17,
- "optional": false
- },
- {
- "name": "name",
- "type": 3,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "file"
- },
- {
- "kind": "primitive",
- "type": "boolean"
- },
- {
- "kind": "literal",
- "value": "tool-result"
- },
- {
- "kind": "literal",
- "value": "user"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "callId",
- "type": 3,
- "optional": false
- },
- {
- "name": "kind",
- "type": 32,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "tool"
- },
- {
- "kind": "union",
- "types": [
- 3,
- 17,
- 28,
- 34,
- 35,
- 36
- ]
- },
- {
- "kind": "array",
- "element": 33
- },
- {
- "kind": "primitive",
- "type": "null"
- },
- {
- "kind": "object",
- "properties": [],
- "indices": [
- {
- "key": 3,
- "value": 33
- }
- ]
- },
- {
- "kind": "literal",
- "value": true
- },
- {
- "kind": "array",
- "element": 17
- },
- {
- "kind": "union",
- "types": [
- 40,
- 41
- ]
- },
- {
- "kind": "literal",
- "value": "append"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "endSeq",
- "type": 17,
- "optional": false
- },
- {
- "name": "op",
- "type": 42,
- "optional": false
- },
- {
- "name": "startSeq",
- "type": 17,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "replace"
- },
- {
- "kind": "literal",
- "value": "tool/result"
- }
- ]
- },
- "names": [
- "event:tool/result"
- ],
- "sources": []
- },
{
"digest": "cd186c309e2bef305705e1d324139240f5e681f4f6a957d6a25b0225f65560df",
"schema": {
@@ -52571,372 +53037,6 @@
"packages/llm/llm/src/message.ts:29"
]
},
- {
- "digest": "da807583a19f4ebe2bc9115c9686016e1521e405bdfaced296ae652b91e8e5f6",
- "schema": {
- "root": 0,
- "nodes": [
- {
- "kind": "object",
- "properties": [
- {
- "name": "data",
- "type": 1,
- "optional": false
- },
- {
- "name": "ignorable",
- "type": 28,
- "optional": true
- },
- {
- "name": "seq",
- "type": 17,
- "optional": false
- },
- {
- "name": "time",
- "type": 17,
- "optional": false
- },
- {
- "name": "type",
- "type": 29,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "arguments",
- "type": 2,
- "optional": false
- },
- {
- "name": "content",
- "type": 3,
- "optional": false
- },
- {
- "name": "isError",
- "type": 6,
- "optional": false
- },
- {
- "name": "name",
- "type": 7,
- "optional": false
- },
- {
- "name": "parentCallId",
- "type": 7,
- "optional": false
- },
- {
- "name": "rootCallId",
- "type": 7,
- "optional": false
- },
- {
- "name": "subCallId",
- "type": 7,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "opaque",
- "reason": "unknown"
- },
- {
- "kind": "array",
- "element": 4
- },
- {
- "kind": "union",
- "types": [
- 5,
- 9,
- 11,
- 13,
- 15,
- 25
- ]
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "content",
- "type": 3,
- "optional": false
- },
- {
- "name": "isError",
- "type": 6,
- "optional": true
- },
- {
- "name": "toolCallId",
- "type": 7,
- "optional": false
- },
- {
- "name": "type",
- "type": 8,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "primitive",
- "type": "boolean"
- },
- {
- "kind": "primitive",
- "type": "string"
- },
- {
- "kind": "literal",
- "value": "tool-result"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "text",
- "type": 7,
- "optional": false
- },
- {
- "name": "type",
- "type": 10,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "reasoning"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "text",
- "type": 7,
- "optional": false
- },
- {
- "name": "type",
- "type": 12,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "text"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "arguments",
- "type": 7,
- "optional": false
- },
- {
- "name": "id",
- "type": 7,
- "optional": false
- },
- {
- "name": "name",
- "type": 7,
- "optional": false
- },
- {
- "name": "type",
- "type": 14,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "tool-call"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachment",
- "type": 16,
- "optional": false
- },
- {
- "name": "type",
- "type": 24,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachmentId",
- "type": 7,
- "optional": false
- },
- {
- "name": "bytes",
- "type": 17,
- "optional": false
- },
- {
- "name": "height",
- "type": 17,
- "optional": false
- },
- {
- "name": "mediaType",
- "type": 18,
- "optional": false
- },
- {
- "name": "name",
- "type": 7,
- "optional": true
- },
- {
- "name": "originalDimensions",
- "type": 23,
- "optional": true
- },
- {
- "name": "width",
- "type": 17,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "primitive",
- "type": "number"
- },
- {
- "kind": "union",
- "types": [
- 19,
- 20,
- 21,
- 22
- ]
- },
- {
- "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": "image"
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachment",
- "type": 26,
- "optional": false
- },
- {
- "name": "type",
- "type": 27,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "object",
- "properties": [
- {
- "name": "attachmentId",
- "type": 7,
- "optional": false
- },
- {
- "name": "bytes",
- "type": 17,
- "optional": false
- },
- {
- "name": "name",
- "type": 7,
- "optional": false
- }
- ],
- "indices": []
- },
- {
- "kind": "literal",
- "value": "file"
- },
- {
- "kind": "literal",
- "value": true
- },
- {
- "kind": "literal",
- "value": "tool/ptc-dispatch"
- }
- ]
- },
- "names": [
- "event:tool/ptc-dispatch"
- ],
- "sources": []
- },
{
"digest": "dacf3d5f3e4ff619c1320e64a48dec5e7ecd7870bece65fbd449a0e63adfa521",
"schema": {