dsh-plugin-guide 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.es.md +5 -1
  2. package/README.hi.md +5 -1
  3. package/README.md +5 -1
  4. package/README.pt.md +5 -1
  5. package/README.zh.md +5 -1
  6. package/dist/dsh-plugin-dev.js +3 -3
  7. package/guide/plugin-dev-guide.md +2 -2
  8. package/guide/quick-reference.es.md +2 -2
  9. package/guide/quick-reference.hi.md +1 -1
  10. package/guide/quick-reference.md +2 -2
  11. package/guide/quick-reference.pt.md +2 -2
  12. package/guide/quick-reference.zh-CN.md +2 -2
  13. package/package.json +5 -4
  14. package/references/official-docs/AGENTS.md +2 -2
  15. package/references/official-docs/SNAPSHOT.md +3 -3
  16. package/references/official-docs/THIRD_PARTY_NOTICES.md +4 -6
  17. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
  18. package/references/official-docs/docs/agent-lifecycle.md +5 -3
  19. package/references/official-docs/docs/agent-lifecycle.zh.md +5 -3
  20. package/references/official-docs/docs/architecture.i18n.yaml +2 -2
  21. package/references/official-docs/docs/architecture.md +7 -3
  22. package/references/official-docs/docs/architecture.zh.md +7 -3
  23. package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
  24. package/references/official-docs/docs/capability-seams.md +5 -0
  25. package/references/official-docs/docs/capability-seams.zh.md +5 -0
  26. package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
  27. package/references/official-docs/docs/config-catalog.md +15 -21
  28. package/references/official-docs/docs/config-catalog.zh.md +15 -21
  29. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
  30. package/references/official-docs/docs/cookbook/extension-cookbook.md +12 -10
  31. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +12 -10
  32. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +2 -2
  33. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +16 -12
  34. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +16 -12
  35. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
  36. package/references/official-docs/docs/event-producer-consumer.md +28 -27
  37. package/references/official-docs/docs/event-producer-consumer.zh.md +32 -31
  38. package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
  39. package/references/official-docs/docs/module-graph.md +36 -14
  40. package/references/official-docs/docs/module-graph.zh.md +36 -14
  41. package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
  42. package/references/official-docs/docs/persistence-catalog.md +49 -39
  43. package/references/official-docs/docs/persistence-catalog.zh.md +39 -29
  44. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
  45. package/references/official-docs/docs/subsystems/attachment.md +157 -4
  46. package/references/official-docs/docs/subsystems/attachment.zh.md +157 -4
  47. package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
  48. package/references/official-docs/docs/subsystems/commands.md +24 -15
  49. package/references/official-docs/docs/subsystems/commands.zh.md +24 -15
  50. package/references/official-docs/docs/subsystems/conversation.i18n.yaml +2 -2
  51. package/references/official-docs/docs/subsystems/conversation.md +4 -4
  52. package/references/official-docs/docs/subsystems/conversation.zh.md +4 -4
  53. package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
  54. package/references/official-docs/docs/subsystems/core.md +62 -1
  55. package/references/official-docs/docs/subsystems/core.zh.md +62 -1
  56. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
  57. package/references/official-docs/docs/subsystems/llm-streaming.md +23 -2
  58. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +23 -2
  59. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
  60. package/references/official-docs/docs/subsystems/persistence.md +10 -10
  61. package/references/official-docs/docs/subsystems/persistence.zh.md +10 -10
  62. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
  63. package/references/official-docs/docs/subsystems/session-projection.md +19 -0
  64. package/references/official-docs/docs/subsystems/session-projection.zh.md +19 -0
  65. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
  66. package/references/official-docs/docs/subsystems/session-reference.md +25 -1
  67. package/references/official-docs/docs/subsystems/session-reference.zh.md +25 -1
  68. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
  69. package/references/official-docs/docs/subsystems/session-telemetry.md +6 -5
  70. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +6 -5
  71. package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
  72. package/references/official-docs/docs/subsystems/session.md +52 -40
  73. package/references/official-docs/docs/subsystems/session.zh.md +52 -40
  74. package/references/official-docs/docs/subsystems/web-client.i18n.yaml +2 -2
  75. package/references/official-docs/docs/subsystems/web-client.md +1 -1
  76. package/references/official-docs/docs/subsystems/web-client.zh.md +1 -1
  77. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
  78. package/references/official-docs/docs/subsystems/workspace.md +8 -8
  79. package/references/official-docs/docs/subsystems/workspace.zh.md +8 -8
  80. package/references/official-docs/docs/testing.i18n.yaml +2 -2
  81. package/references/official-docs/docs/testing.md +2 -2
  82. package/references/official-docs/docs/testing.zh.md +2 -2
  83. package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +6 -0
  84. package/references/official-docs/docs/user/guide/network-proxy.md +85 -0
  85. package/references/official-docs/docs/user/guide/network-proxy.zh.md +85 -0
  86. package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
  87. package/references/official-docs/docs/user/guide/providers.md +70 -17
  88. package/references/official-docs/docs/user/guide/providers.zh.md +70 -17
  89. package/references/official-docs/docs/web-styling.i18n.yaml +2 -2
  90. package/references/official-docs/docs/web-styling.md +1 -0
  91. package/references/official-docs/docs/web-styling.zh.md +1 -0
  92. package/references/official-docs/website-docs.ts +8 -0
  93. package/templates/js/README.es.md +1 -1
  94. package/templates/js/README.hi.md +1 -1
  95. package/templates/js/README.md +1 -1
  96. package/templates/js/README.pt.md +1 -1
  97. package/templates/js/README.zh.md +1 -1
  98. package/templates/ts/README.es.md +1 -1
  99. package/templates/ts/README.hi.md +1 -1
  100. package/templates/ts/README.md +1 -1
  101. package/templates/ts/README.pt.md +1 -1
  102. package/templates/ts/README.zh.md +1 -1
@@ -203,21 +203,17 @@ Source: [`packages/api/gateway/src/index.ts:119`](../packages/api/gateway/src/in
203
203
 
204
204
  ## `@deepseek-ai/dsh-api-session-controller`
205
205
 
206
- Requires: `agentDefaultModel` · `agents` · `attachments` · `llm` · `sessions` · `sessionProjections` · `sessionQuery` · `typert` · `workspaceRegistry`
206
+ Requires: `agentDefaultModel` · `agents` · `attachments` · `fileUploads` · `llm` · `sessions` · `sessionProjections` · `sessionQuery` · `typert` · `workspaceRegistry`
207
207
 
208
208
  ```ts config-catalog
209
209
  /** Session Controller deployment policy. */
210
210
  export interface Config {
211
- /** Maximum stat-reported event count eligible for one full cold projection observation; `0` disables the event-count gate. */
212
- readonly coldBlankProbeMaxEvents?: number
213
- /** Maximum stat-reported artifact byte size eligible for one full cold projection observation; `0` disables the byte-size gate. */
214
- readonly coldBlankProbeMaxBytes?: number
215
211
  /** Override platform desktop-opener detection. */
216
212
  readonly nativeOpen?: boolean
217
213
  }
218
214
  ```
219
215
 
220
- Source: [`packages/api/session-controller/src/index.ts:72`](../packages/api/session-controller/src/index.ts)
216
+ Source: [`packages/api/session-controller/src/index.ts:69`](../packages/api/session-controller/src/index.ts)
221
217
 
222
218
  <a id="deepseek-aidsh-api-settings-controller"></a>
223
219
 
@@ -266,7 +262,7 @@ export interface Config {
266
262
  }
267
263
  ```
268
264
 
269
- Source: [`packages/attachment/attachment-local/src/index.ts:55`](../packages/attachment/attachment-local/src/index.ts)
265
+ Source: [`packages/attachment/attachment-local/src/index.ts:61`](../packages/attachment/attachment-local/src/index.ts)
270
266
 
271
267
  <a id="deepseek-aidsh-bash-local"></a>
272
268
 
@@ -340,7 +336,7 @@ export interface ConnectionConfig {
340
336
  }
341
337
  ```
342
338
 
343
- Source: [`packages/client/connection/src/index.ts:70`](../packages/client/connection/src/index.ts)
339
+ Source: [`packages/client/connection/src/index.ts:71`](../packages/client/connection/src/index.ts)
344
340
 
345
341
  <a id="deepseek-aidsh-client-hmr"></a>
346
342
 
@@ -513,7 +509,7 @@ export interface Config {
513
509
  }
514
510
  ```
515
511
 
516
- Source: [`packages/e2b/e2b/src/index.ts:43`](../packages/e2b/e2b/src/index.ts)
512
+ Source: [`packages/e2b/e2b/src/index.ts:45`](../packages/e2b/e2b/src/index.ts)
517
513
 
518
514
  <a id="deepseek-aidsh-experimental-agent-team"></a>
519
515
 
@@ -1357,7 +1353,7 @@ export interface ReplayModelConfig {
1357
1353
 
1358
1354
  Depends on: [`ModelModality`](../packages/llm/llm/src/index.ts) · [`RetryPolicyConfig`](../packages/llm/llm/src/index.ts)
1359
1355
 
1360
- Source: [`packages/test-support/llm-replay/src/index.ts:924`](../packages/test-support/llm-replay/src/index.ts)
1356
+ Source: [`packages/test-support/llm-replay/src/index.ts:1294`](../packages/test-support/llm-replay/src/index.ts)
1361
1357
 
1362
1358
  <a id="deepseek-aidsh-llm-retry"></a>
1363
1359
 
@@ -1828,7 +1824,7 @@ Source: [`packages/session-query/session-log-export/src/index.ts:45`](../package
1828
1824
  ## `@deepseek-ai/dsh-session-persistence-jsonl`
1829
1825
 
1830
1826
  ```ts config-catalog
1831
- /** Plugin config: where the JSONL backend keeps its session logs, and the packed-row write switch. */
1827
+ /** Plugin config for the JSONL backend's root and physical encoding. */
1832
1828
  export interface Config {
1833
1829
  /**
1834
1830
  * Root directory for all session files. Required (no default): a default of
@@ -1838,14 +1834,6 @@ export interface Config {
1838
1834
  * readable directory; an absent root is created on first materialization.
1839
1835
  */
1840
1836
  root: string
1841
- /**
1842
- * Write runs of consecutive `assistant/chunk` delta events as packed
1843
- * `text-chunks`/`reasoning-chunks`/`tool-call-chunks` rows (lossless,
1844
- * ~60% smaller logs measured on a real session). Defaults to true; false
1845
- * keeps one `SessionEvent` per line for diagnostics. Reading packed rows is
1846
- * unconditional: a log's layout never depends on this switch.
1847
- */
1848
- packChunks?: boolean
1849
1837
  /** Physical encoding; defaults to checksummed Zstandard frames. */
1850
1838
  compression?: JsonlCompression
1851
1839
  }
@@ -1854,7 +1842,7 @@ export interface Config {
1854
1842
  export type JsonlCompression = 'zstd' | 'none'
1855
1843
  ```
1856
1844
 
1857
- Source: [`packages/session/session-persistence-jsonl/src/index.ts:73`](../packages/session/session-persistence-jsonl/src/index.ts)
1845
+ Source: [`packages/session/session-persistence-jsonl/src/index.ts:86`](../packages/session/session-persistence-jsonl/src/index.ts)
1858
1846
 
1859
1847
  <a id="deepseek-aidsh-session-projection-cache"></a>
1860
1848
 
@@ -1878,7 +1866,7 @@ export interface Config {
1878
1866
  }
1879
1867
  ```
1880
1868
 
1881
- Source: [`packages/session/session-projection-cache/src/index.ts:55`](../packages/session/session-projection-cache/src/index.ts)
1869
+ Source: [`packages/session/session-projection-cache/src/index.ts:63`](../packages/session/session-projection-cache/src/index.ts)
1882
1870
 
1883
1871
  <a id="deepseek-aidsh-session-query-sqlite"></a>
1884
1872
 
@@ -3337,6 +3325,7 @@ These load from a `cordis.yml` entry with no `config:` block; they declare no co
3337
3325
  - `@deepseek-ai/dsh-api-remotes` — requires `typertGateway` ([`packages/api/remotes/src/index.ts`](../packages/api/remotes/src/index.ts))
3338
3326
  - `@deepseek-ai/dsh-api-workspace-controller` — requires `typert` · `workspaceRegistry` ([`packages/api/workspace-controller/src/index.ts`](../packages/api/workspace-controller/src/index.ts))
3339
3327
  - `@deepseek-ai/dsh-authorization` — requires `credentials` ([`packages/credentials/authorization/src/index.ts`](../packages/credentials/authorization/src/index.ts))
3328
+ - `@deepseek-ai/dsh-client-file-upload` — requires `agents` · `attachments` · `commands` · `connection` ([`packages/client/file-upload/src/index.ts`](../packages/client/file-upload/src/index.ts))
3340
3329
  - `@deepseek-ai/dsh-client-locale` ([`packages/client/locale/src/index.ts`](../packages/client/locale/src/index.ts))
3341
3330
  - `@deepseek-ai/dsh-client-modules` — requires `webServer` · `loader` ([`packages/client/modules/src/index.ts`](../packages/client/modules/src/index.ts))
3342
3331
  - `@deepseek-ai/dsh-client-ui-agent-preset` ([`packages/client/ui-agent-preset/src/index.ts`](../packages/client/ui-agent-preset/src/index.ts))
@@ -3454,6 +3443,7 @@ Imported as libraries by other packages; a `cordis.yml` cannot load them.
3454
3443
  - `@deepseek-ai/dsh-experimental-webworker-runtime` ([`packages/experimental/webworker-runtime/src/index.ts`](../packages/experimental/webworker-runtime/src/index.ts))
3455
3444
  - `@deepseek-ai/dsh-home-paths` ([`packages/util/home-paths/src/index.ts`](../packages/util/home-paths/src/index.ts))
3456
3445
  - `@deepseek-ai/dsh-hook-protocol` ([`packages/hooks/hook-protocol/src/index.ts`](../packages/hooks/hook-protocol/src/index.ts))
3446
+ - `@deepseek-ai/dsh-http-proxy` ([`packages/util/http-proxy/src/index.ts`](../packages/util/http-proxy/src/index.ts))
3457
3447
  - `@deepseek-ai/dsh-launch-environment` ([`packages/util/launch-environment/src/index.ts`](../packages/util/launch-environment/src/index.ts))
3458
3448
  - `@deepseek-ai/dsh-llm-mock-server` ([`packages/test-support/llm-mock-server/src/index.ts`](../packages/test-support/llm-mock-server/src/index.ts))
3459
3449
  - `@deepseek-ai/dsh-loader-smoke` ([`packages/test-support/loader-smoke/src/index.ts`](../packages/test-support/loader-smoke/src/index.ts))
@@ -3464,6 +3454,10 @@ Imported as libraries by other packages; a `cordis.yml` cannot load them.
3464
3454
  - `@deepseek-ai/dsh-sdk-client` ([`packages/sdk/client/src/index.ts`](../packages/sdk/client/src/index.ts))
3465
3455
  - `@deepseek-ai/dsh-sdk-minimal` ([`packages/bundle/sdk-minimal/src/index.ts`](../packages/bundle/sdk-minimal/src/index.ts))
3466
3456
  - `@deepseek-ai/dsh-sdk-protocol` ([`packages/sdk/protocol/src/index.ts`](../packages/sdk/protocol/src/index.ts))
3457
+ - `@deepseek-ai/dsh-session-format` ([`packages/session/session-format/src/index.ts`](../packages/session/session-format/src/index.ts))
3458
+ - `@deepseek-ai/dsh-session-format-catalog` ([`packages/session/session-format-catalog/src/index.ts`](../packages/session/session-format-catalog/src/index.ts))
3459
+ - `@deepseek-ai/dsh-session-format-v0-to-v1` ([`packages/session/session-format-v0-to-v1/src/index.ts`](../packages/session/session-format-v0-to-v1/src/index.ts))
3460
+ - `@deepseek-ai/dsh-session-format-v1-to-v2` ([`packages/session/session-format-v1-to-v2/src/index.ts`](../packages/session/session-format-v1-to-v2/src/index.ts))
3467
3461
  - `@deepseek-ai/dsh-session-snapshot` ([`packages/test-support/session-snapshot/src/index.ts`](../packages/test-support/session-snapshot/src/index.ts))
3468
3462
  - `@deepseek-ai/dsh-session-telemetry` ([`packages/session/session-telemetry/src/index.ts`](../packages/session/session-telemetry/src/index.ts))
3469
3463
  - `@deepseek-ai/dsh-session-title-llm` ([`packages/session/session-title-llm/src/index.ts`](../packages/session/session-title-llm/src/index.ts))
@@ -205,21 +205,17 @@ export interface Config {
205
205
 
206
206
  ## `@deepseek-ai/dsh-api-session-controller`
207
207
 
208
- 需要:`agentDefaultModel` · `agents` · `attachments` · `llm` · `sessions` · `sessionProjections` · `sessionQuery` · `typert` · `workspaceRegistry`
208
+ 需要:`agentDefaultModel` · `agents` · `attachments` · `fileUploads` · `llm` · `sessions` · `sessionProjections` · `sessionQuery` · `typert` · `workspaceRegistry`
209
209
 
210
210
  ```ts config-catalog
211
211
  /** Session Controller deployment policy. */
212
212
  export interface Config {
213
- /** Maximum stat-reported event count eligible for one full cold projection observation; `0` disables the event-count gate. */
214
- readonly coldBlankProbeMaxEvents?: number
215
- /** Maximum stat-reported artifact byte size eligible for one full cold projection observation; `0` disables the byte-size gate. */
216
- readonly coldBlankProbeMaxBytes?: number
217
213
  /** Override platform desktop-opener detection. */
218
214
  readonly nativeOpen?: boolean
219
215
  }
220
216
  ```
221
217
 
222
- 来源:[`packages/api/session-controller/src/index.ts:72`](../packages/api/session-controller/src/index.ts)
218
+ 来源:[`packages/api/session-controller/src/index.ts:69`](../packages/api/session-controller/src/index.ts)
223
219
 
224
220
  <a id="deepseek-aidsh-api-settings-controller"></a>
225
221
 
@@ -268,7 +264,7 @@ export interface Config {
268
264
  }
269
265
  ```
270
266
 
271
- 来源:[`packages/attachment/attachment-local/src/index.ts:55`](../packages/attachment/attachment-local/src/index.ts)
267
+ 来源:[`packages/attachment/attachment-local/src/index.ts:61`](../packages/attachment/attachment-local/src/index.ts)
272
268
 
273
269
  <a id="deepseek-aidsh-bash-local"></a>
274
270
 
@@ -342,7 +338,7 @@ export interface ConnectionConfig {
342
338
  }
343
339
  ```
344
340
 
345
- 来源:[`packages/client/connection/src/index.ts:55`](../packages/client/connection/src/index.ts)
341
+ 来源:[`packages/client/connection/src/index.ts:71`](../packages/client/connection/src/index.ts)
346
342
 
347
343
  <a id="deepseek-aidsh-client-hmr"></a>
348
344
 
@@ -515,7 +511,7 @@ export interface Config {
515
511
  }
516
512
  ```
517
513
 
518
- 来源:[`packages/e2b/e2b/src/index.ts:43`](../packages/e2b/e2b/src/index.ts)
514
+ 来源:[`packages/e2b/e2b/src/index.ts:45`](../packages/e2b/e2b/src/index.ts)
519
515
 
520
516
  <a id="deepseek-aidsh-experimental-agent-team"></a>
521
517
 
@@ -1359,7 +1355,7 @@ export interface ReplayModelConfig {
1359
1355
 
1360
1356
  依赖:[`ModelModality`](../packages/llm/llm/src/index.ts) · [`RetryPolicyConfig`](../packages/llm/llm/src/index.ts)
1361
1357
 
1362
- 来源:[`packages/test-support/llm-replay/src/index.ts:924`](../packages/test-support/llm-replay/src/index.ts)
1358
+ 来源:[`packages/test-support/llm-replay/src/index.ts:1294`](../packages/test-support/llm-replay/src/index.ts)
1363
1359
 
1364
1360
  <a id="deepseek-aidsh-llm-retry"></a>
1365
1361
 
@@ -1830,7 +1826,7 @@ export type SessionLogCompressionLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
1830
1826
  ## `@deepseek-ai/dsh-session-persistence-jsonl`
1831
1827
 
1832
1828
  ```ts config-catalog
1833
- /** Plugin config: where the JSONL backend keeps its session logs, and the packed-row write switch. */
1829
+ /** Plugin config for the JSONL backend's root and physical encoding. */
1834
1830
  export interface Config {
1835
1831
  /**
1836
1832
  * Root directory for all session files. Required (no default): a default of
@@ -1840,14 +1836,6 @@ export interface Config {
1840
1836
  * readable directory; an absent root is created on first materialization.
1841
1837
  */
1842
1838
  root: string
1843
- /**
1844
- * Write runs of consecutive `assistant/chunk` delta events as packed
1845
- * `text-chunks`/`reasoning-chunks`/`tool-call-chunks` rows (lossless,
1846
- * ~60% smaller logs measured on a real session). Defaults to true; false
1847
- * keeps one `SessionEvent` per line for diagnostics. Reading packed rows is
1848
- * unconditional: a log's layout never depends on this switch.
1849
- */
1850
- packChunks?: boolean
1851
1839
  /** Physical encoding; defaults to checksummed Zstandard frames. */
1852
1840
  compression?: JsonlCompression
1853
1841
  }
@@ -1856,7 +1844,7 @@ export interface Config {
1856
1844
  export type JsonlCompression = 'zstd' | 'none'
1857
1845
  ```
1858
1846
 
1859
- 来源:[`packages/session/session-persistence-jsonl/src/index.ts:73`](../packages/session/session-persistence-jsonl/src/index.ts)
1847
+ 来源:[`packages/session/session-persistence-jsonl/src/index.ts:85`](../packages/session/session-persistence-jsonl/src/index.ts)
1860
1848
 
1861
1849
  <a id="deepseek-aidsh-session-projection-cache"></a>
1862
1850
 
@@ -1880,7 +1868,7 @@ export interface Config {
1880
1868
  }
1881
1869
  ```
1882
1870
 
1883
- 来源:[`packages/session/session-projection-cache/src/index.ts:55`](../packages/session/session-projection-cache/src/index.ts)
1871
+ 来源:[`packages/session/session-projection-cache/src/index.ts:63`](../packages/session/session-projection-cache/src/index.ts)
1884
1872
 
1885
1873
  <a id="deepseek-aidsh-session-query-sqlite"></a>
1886
1874
 
@@ -3339,6 +3327,7 @@ export interface Config {
3339
3327
  - `@deepseek-ai/dsh-api-remotes` — 需要 `typertGateway`([`packages/api/remotes/src/index.ts`](../packages/api/remotes/src/index.ts))
3340
3328
  - `@deepseek-ai/dsh-api-workspace-controller` — 需要 `typert` · `workspaceRegistry`([`packages/api/workspace-controller/src/index.ts`](../packages/api/workspace-controller/src/index.ts))
3341
3329
  - `@deepseek-ai/dsh-authorization` — 需要 `credentials`([`packages/credentials/authorization/src/index.ts`](../packages/credentials/authorization/src/index.ts))
3330
+ - `@deepseek-ai/dsh-client-file-upload` — 需要 `agents` · `attachments` · `commands` · `connection`([`packages/client/file-upload/src/index.ts`](../packages/client/file-upload/src/index.ts))
3342
3331
  - `@deepseek-ai/dsh-client-locale`([`packages/client/locale/src/index.ts`](../packages/client/locale/src/index.ts))
3343
3332
  - `@deepseek-ai/dsh-client-modules` — 需要 `webServer` · `loader`([`packages/client/modules/src/index.ts`](../packages/client/modules/src/index.ts))
3344
3333
  - `@deepseek-ai/dsh-client-ui-agent-preset`([`packages/client/ui-agent-preset/src/index.ts`](../packages/client/ui-agent-preset/src/index.ts))
@@ -3455,6 +3444,7 @@ export interface Config {
3455
3444
  - `@deepseek-ai/dsh-experimental-webworker-runtime`([`packages/experimental/webworker-runtime/src/index.ts`](../packages/experimental/webworker-runtime/src/index.ts))
3456
3445
  - `@deepseek-ai/dsh-home-paths`([`packages/util/home-paths/src/index.ts`](../packages/util/home-paths/src/index.ts))
3457
3446
  - `@deepseek-ai/dsh-hook-protocol`([`packages/hooks/hook-protocol/src/index.ts`](../packages/hooks/hook-protocol/src/index.ts))
3447
+ - `@deepseek-ai/dsh-http-proxy`([`packages/util/http-proxy/src/index.ts`](../packages/util/http-proxy/src/index.ts))
3458
3448
  - `@deepseek-ai/dsh-launch-environment`([`packages/util/launch-environment/src/index.ts`](../packages/util/launch-environment/src/index.ts))
3459
3449
  - `@deepseek-ai/dsh-llm-mock-server`([`packages/test-support/llm-mock-server/src/index.ts`](../packages/test-support/llm-mock-server/src/index.ts))
3460
3450
  - `@deepseek-ai/dsh-loader-smoke`([`packages/test-support/loader-smoke/src/index.ts`](../packages/test-support/loader-smoke/src/index.ts))
@@ -3465,6 +3455,10 @@ export interface Config {
3465
3455
  - `@deepseek-ai/dsh-sdk-client`([`packages/sdk/client/src/index.ts`](../packages/sdk/client/src/index.ts))
3466
3456
  - `@deepseek-ai/dsh-sdk-minimal`([`packages/bundle/sdk-minimal/src/index.ts`](../packages/bundle/sdk-minimal/src/index.ts))
3467
3457
  - `@deepseek-ai/dsh-sdk-protocol`([`packages/sdk/protocol/src/index.ts`](../packages/sdk/protocol/src/index.ts))
3458
+ - `@deepseek-ai/dsh-session-format`([`packages/session/session-format/src/index.ts`](../packages/session/session-format/src/index.ts))
3459
+ - `@deepseek-ai/dsh-session-format-catalog`([`packages/session/session-format-catalog/src/index.ts`](../packages/session/session-format-catalog/src/index.ts))
3460
+ - `@deepseek-ai/dsh-session-format-v0-to-v1`([`packages/session/session-format-v0-to-v1/src/index.ts`](../packages/session/session-format-v0-to-v1/src/index.ts))
3461
+ - `@deepseek-ai/dsh-session-format-v1-to-v2`([`packages/session/session-format-v1-to-v2/src/index.ts`](../packages/session/session-format-v1-to-v2/src/index.ts))
3468
3462
  - `@deepseek-ai/dsh-session-snapshot`([`packages/test-support/session-snapshot/src/index.ts`](../packages/test-support/session-snapshot/src/index.ts))
3469
3463
  - `@deepseek-ai/dsh-session-telemetry`([`packages/session/session-telemetry/src/index.ts`](../packages/session/session-telemetry/src/index.ts))
3470
3464
  - `@deepseek-ai/dsh-session-title-llm`([`packages/session/session-title-llm/src/index.ts`](../packages/session/session-title-llm/src/index.ts))
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/cookbook/extension-cookbook.md
5
- extension-cookbook.md: 0bbd1d0d531de755708da6c7a68b312675ba4b52
6
- extension-cookbook.zh.md: 5067c57bef08af65102e011f6d4c4394e03a3f5f
5
+ extension-cookbook.md: b7f0f7939797d7c9929a87427eb624b7cfcc7a87
6
+ extension-cookbook.zh.md: 6813a41baad4488123a2ad92672fdc275016d98b
@@ -34,7 +34,7 @@ This waterfall is the reorderable policy layer. Use `ctx.tools.guard()` when an
34
34
 
35
35
  ## A UI plugin
36
36
 
37
- A UI plugin renders from the `session/event` feed (the assistant token stream as `assistant/chunk`, plus turn/step boundaries and tool activity), and drives input back in via `agent.followup()` / `agent.steer()`. A browser plugin contributing a business row to the built-in Web Client instead registers a `ConversationNodeDefinition` and keyed Chat renderer; follow the [Conversation subsystem reference](../subsystems/conversation.md).
37
+ A UI plugin combines durable `session/event` records (Assistant settlements, turn/step boundaries, and tool activity) with transient `agent/assistant-stream` frames for live token presentation, and drives input back in via `agent.followup()` / `agent.steer()`. A browser plugin contributing a business row to the built-in Web Client instead registers a `ConversationNodeDefinition` and keyed Chat renderer; follow the [Conversation subsystem reference](../subsystems/conversation.md).
38
38
 
39
39
  ```ts
40
40
  import type { Context } from '@deepseek-ai/cordis'
@@ -49,9 +49,9 @@ export const name = 'my-ui'
49
49
  export const inject = ['agents']
50
50
 
51
51
  export function apply(ctx: Context) {
52
- ctx.on('session/event', (_session, event) => {
53
- if (event.type === 'assistant/chunk' && event.data.chunk.type === 'text-delta') {
54
- render(event.data.chunk.text)
52
+ ctx.on('agent/assistant-stream', ({ frame }) => {
53
+ if (frame.type === 'chunk' && frame.chunk.type === 'text-delta') {
54
+ render(frame.chunk.text)
55
55
  }
56
56
  })
57
57
  onUserInput(text => ctx.agents.get(brandString<SessionId>('client-session'))?.followup(createUserMessage({
@@ -69,17 +69,19 @@ A *protocol driver* adapts a wire peer to `ctx.agents`; it may serve a UI or an
69
69
 
70
70
  ```ts
71
71
  import type { Context } from '@deepseek-ai/cordis'
72
+ import { expandAssistantStream } from '@deepseek-ai/dsh-llm'
72
73
 
73
74
  export const name = 'my-protocol-bridge'
74
75
  export const inject = ['agents', 'sessions', 'sessionPersistence']
75
76
 
76
77
  export function apply(ctx: Context) {
77
- // Stream every logged assistant text/reasoning delta out to the client.
78
+ // Publish every committed Assistant text delta to the client.
78
79
  ctx.on('session/event', (_session, event) => {
79
- if (event.type === 'assistant/chunk') {
80
- const chunk = event.data.chunk
81
- if (chunk.type === 'text-delta') {
82
- // sendToClient({ kind: 'message_chunk', text: chunk.text })
80
+ if (event.type === 'assistant/message' || event.type === 'assistant/attempt') {
81
+ for (const { chunk } of expandAssistantStream(event.data.stream)) {
82
+ if (chunk.type === 'text-delta') {
83
+ // sendToClient({ kind: 'message_chunk', text: chunk.text })
84
+ }
83
85
  }
84
86
  }
85
87
  })
@@ -123,7 +125,7 @@ Every product feature maps to a listener on a documented extension point — the
123
125
  | Skills | section + tool registration; `inject()` skill content on invocation |
124
126
  | Memory | section provider + tool |
125
127
  | Scheduled tasks (cron) | a plugin registers model-callable scheduling tools; timer fires → `followup(…, {source: {kind: 'plugin', plugin: 'schedule'}})` when idle / `inject()` notification when busy |
126
- | UI (GUI; CLI emits JSONL) | listen `session/event` (assistant chunks, boundaries, tool activity); input → `followup()` |
128
+ | UI (GUI; CLI emits JSONL) | listen to `agent/assistant-stream` for live chunks and `session/event` for durable settlements, boundaries, and tool activity; input → `followup()` |
127
129
  | Web Client Chat business node | register a `ConversationNodeDefinition` and `conversation.chat.node` keyed renderer |
128
130
  | SessionTelemetryBackend / replayable trace | `session/event` → JSONL; replay = `sessions.create(id, { seed })` |
129
131
  | Model adapters | `LlmAdapter` subclass via `registerAdapter` (`dsh-llm-deepseek`, `dsh-llm-pi-ai`) |
@@ -36,7 +36,7 @@ export function apply(ctx: Context) {
36
36
 
37
37
  ## UI 插件
38
38
 
39
- UI 插件从 `session/event` 事件流渲染(助手 token 流以 `assistant/chunk` 形式到达,加上轮次/步骤边界与工具活动),并通过 `agent.followup()` / `agent.steer()` 将输入驱动回去。如果浏览器插件要向内建 Web Client 贡献业务行,则应注册 `ConversationNodeDefinition` 与 keyed Chat renderer;具体约定见 [Conversation 子系统参考](../subsystems/conversation.zh.md)。
39
+ UI 插件把持久 `session/event` record(Assistant settlement、轮次/步骤边界与工具活动)和用于实时 token 呈现的瞬态 `agent/assistant-stream` frame 组合起来,并通过 `agent.followup()` / `agent.steer()` 将输入驱动回去。如果浏览器插件要向内建 Web Client 贡献业务行,则应注册 `ConversationNodeDefinition` 与 keyed Chat renderer;具体约定见 [Conversation 子系统参考](../subsystems/conversation.zh.md)。
40
40
 
41
41
  ```ts
42
42
  import type { Context } from '@deepseek-ai/cordis'
@@ -51,9 +51,9 @@ export const name = 'my-ui'
51
51
  export const inject = ['agents']
52
52
 
53
53
  export function apply(ctx: Context) {
54
- ctx.on('session/event', (_session, event) => {
55
- if (event.type === 'assistant/chunk' && event.data.chunk.type === 'text-delta') {
56
- render(event.data.chunk.text)
54
+ ctx.on('agent/assistant-stream', ({ frame }) => {
55
+ if (frame.type === 'chunk' && frame.chunk.type === 'text-delta') {
56
+ render(frame.chunk.text)
57
57
  }
58
58
  })
59
59
  onUserInput(text => ctx.agents.get(brandString<SessionId>('client-session'))?.followup(createUserMessage({
@@ -71,17 +71,19 @@ export function apply(ctx: Context) {
71
71
 
72
72
  ```ts
73
73
  import type { Context } from '@deepseek-ai/cordis'
74
+ import { expandAssistantStream } from '@deepseek-ai/dsh-llm'
74
75
 
75
76
  export const name = 'my-protocol-bridge'
76
77
  export const inject = ['agents', 'sessions', 'sessionPersistence']
77
78
 
78
79
  export function apply(ctx: Context) {
79
- // Stream every logged assistant text/reasoning delta out to the client.
80
+ // Publish every committed Assistant text delta to the client.
80
81
  ctx.on('session/event', (_session, event) => {
81
- if (event.type === 'assistant/chunk') {
82
- const chunk = event.data.chunk
83
- if (chunk.type === 'text-delta') {
84
- // sendToClient({ kind: 'message_chunk', text: chunk.text })
82
+ if (event.type === 'assistant/message' || event.type === 'assistant/attempt') {
83
+ for (const { chunk } of expandAssistantStream(event.data.stream)) {
84
+ if (chunk.type === 'text-delta') {
85
+ // sendToClient({ kind: 'message_chunk', text: chunk.text })
86
+ }
85
87
  }
86
88
  }
87
89
  })
@@ -127,7 +129,7 @@ export function apply(ctx: Context) {
127
129
  | skill(技能) | section + 工具注册;调用时通过 `inject()` 注入 skill 内容 |
128
130
  | 记忆 | section 提供方 + 工具 |
129
131
  | 定时任务(cron) | 插件注册面向模型的调度工具;定时器触发 → 空闲时 `followup(…, {source: {kind: 'plugin', plugin: 'schedule'}})`/忙碌时 `inject()` 通知 |
130
- | UI(GUI;CLI(命令行界面)输出 JSONL) | 监听 `session/event`(助手分片、边界、工具活动);输入 → `followup()` |
132
+ | UI(GUI;CLI(命令行界面)输出 JSONL) | 监听 `agent/assistant-stream` 的实时 chunk,并监听 `session/event` 的持久 settlement、边界与工具活动;输入 → `followup()` |
131
133
  | Web Client Chat 业务节点 | 注册 `ConversationNodeDefinition` 与 `conversation.chat.node` keyed renderer |
132
134
  | 遥测 / 可回放 trace | `session/event` → JSONL;回放 = `sessions.create(id, { seed })` |
133
135
  | 模型适配器 | 通过 `registerAdapter` 注册 `LlmAdapter` 子类(`dsh-llm-deepseek`、`dsh-llm-pi-ai`) |
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/deepseek-llm-api-wire-extensions.md
5
- deepseek-llm-api-wire-extensions.md: fd42609693ac6fbf91dd82b6e73b2d1d06e65a54
6
- deepseek-llm-api-wire-extensions.zh.md: 61af718841c8778e8943a1a1c16621a9a6618add
5
+ deepseek-llm-api-wire-extensions.md: 5b1c4de68949d56f99cbfa70ba4af7ca0b71715d
6
+ deepseek-llm-api-wire-extensions.zh.md: a78baace34dcb3e24667295cf06e111ce355aa72
@@ -78,11 +78,13 @@ An enabled inventory with no qualifying entries sends `packages: []`; disabling
78
78
  ```json
79
79
  {
80
80
  "dsh_session_log": {
81
- "version": 1,
81
+ "version": 2,
82
+ "sessionFormatVersion": 2,
82
83
  "session": {
83
- "version": 0,
84
+ "version": 2,
84
85
  "id": "session-id",
85
- "createdAt": 1780000000000
86
+ "createdAt": 1780000000000,
87
+ "isSeeded": false
86
88
  },
87
89
  "afterSeq": -1,
88
90
  "throughSeq": 0,
@@ -102,26 +104,27 @@ An enabled inventory with no qualifying entries sends `packages: []`; disabling
102
104
 
103
105
  | Member | Type | Meaning |
104
106
  |---|---|---|
105
- | `version` | `1` | Schema version for `dsh_session_log` |
106
- | `session` | object | Immutable canonical `SessionHeader` |
107
+ | `version` | `2` | Schema version for `dsh_session_log` |
108
+ | `sessionFormatVersion` | non-negative integer | Session format generation represented by this suffix |
109
+ | `session` | object | Immutable wire projection of the current Session header |
107
110
  | `afterSeq` | integer | Greatest sequence recorded as accepted before this request, or `-1` |
108
111
  | `throughSeq` | non-negative integer | Greatest sequence represented by this request |
109
112
  | `events` | array | Contiguous events from `afterSeq + 1` through `throughSeq` |
110
113
 
111
114
  The first upload uses `afterSeq: -1` and carries the complete current log. Each later upload starts after the greatest accepted watermark for the same Session id. The sender snapshots the event array once per request; appends after that snapshot belong to a later request.
112
115
 
113
- ### Session header
116
+ ### Wire Session header
114
117
 
115
- The `session` member is the exact `Session.header`, not a complete runtime Session. The outer `dsh_session_log.version` selects this extension schema, while `session.version` selects the canonical on-disk Session format; the two version values evolve independently.
118
+ The `session` member projects `Session.header`, not a complete runtime Session or the header object itself. It copies the current header facts, including the required `isSeeded` lineage bit; the exact `Session.inheritedEventCount` is not part of this request field. The outer `dsh_session_log.version` selects this extension schema, while `session.version` selects the logical Session format. Changing the Session header projection requires an extension-schema bump even when the embedded logical format also changes.
116
119
 
117
120
  | Member | Presence | Meaning |
118
121
  |---|---|---|
119
- | `version` | required | Canonical Session format version; currently `0` |
122
+ | `version` | required | Logical Session format version; currently `2` |
120
123
  | `id` | required | Exact Session id |
121
124
  | `createdAt` | required | Non-negative safe-integer Unix epoch milliseconds |
122
125
  | `cwd` | optional | Absolute working directory recorded at Session creation |
123
126
  | `parentSession` | optional | Parent Session id for a fork |
124
- | `seedLength` | optional | Number of leading events inherited through the seed |
127
+ | `isSeeded` | required | Whether the Session contains a fork-inherited event prefix |
125
128
  | `origin` | optional | Literal `subagent` for a subagent child |
126
129
  | `delegationDepth` | optional | Non-negative persisted subagent delegation depth |
127
130
  | `agentPreset` | optional | Agent preset id used to compose this Session |
@@ -141,19 +144,20 @@ After the endpoint returns HTTP 2xx, the contribution appends this canonical eve
141
144
  "time": 1780000000002,
142
145
  "data": {
143
146
  "sessionId": "session-id",
147
+ "sessionFormatVersion": 2,
144
148
  "throughSeq": 7
145
149
  }
146
150
  }
147
151
  ```
148
152
 
149
- `delivery-accepted` means that the configured endpoint returned HTTP 2xx for the containing LLM request. It does not assert SSE completion or remote persistence. The event's `throughSeq` must identify an earlier event, and its `sessionId` identifies the Session whose suffix was sent.
153
+ `delivery-accepted` means that the configured endpoint returned HTTP 2xx for the containing LLM request. It does not assert SSE completion or remote persistence. The event's `throughSeq` must identify an earlier event, its `sessionId` identifies the Session whose suffix was sent, and `sessionFormatVersion` binds the watermark to that exact logical generation. Absence means historical format v0.
150
154
 
151
- The sender folds the greatest matching `throughSeq`, so concurrent accepted requests cannot move the cursor backward. A resumed process rebuilds the cursor from the durable log. A fork ignores inherited watermarks that name its parent, and therefore sends its own complete inherited prefix before advancing under the child id. The watermark event itself belongs to the next unsent suffix.
155
+ The sender folds the greatest matching `throughSeq` for the current Session id and format generation, so concurrent accepted requests cannot move the cursor backward and a watermark from another generation cannot authorize the current suffix. A resumed process rebuilds the cursor from the durable log. A fork ignores inherited watermarks that name another Session, and therefore sends its own complete inherited prefix before advancing under the child id. The watermark event itself belongs to the next unsent suffix.
152
156
 
153
157
  Transport and non-2xx failures append no watermark. A crash after endpoint acceptance but before local persistence may resend an already accepted range; uncertainty produces duplicates, never a sequence gap. There is no independent upload store, size cap, or truncation path.
154
158
 
155
159
  ## Exposure and receiver requirements
156
160
 
157
- The request headers expose the Harness application version, one anonymous Harness-home identity, and an optional Session identity. `dsh_plugin_packages` exposes active npm package names and versions. When enabled, `dsh_session_log` may expose the Session working directory, system-prompt snapshots, user and assistant content, raw assistant chunks, tool arguments and results, compaction summaries, feedback, and plugin-owned events. Adapter API keys are not Session events and therefore do not enter the field. A gateway selected through `baseURL` receives the same values as the official endpoint.
161
+ The request headers expose the Harness application version, one anonymous Harness-home identity, and an optional Session identity. `dsh_plugin_packages` exposes active npm package names and versions. When enabled, `dsh_session_log` may expose the Session working directory, system-prompt snapshots, user and Assistant content, embedded Assistant streams, failed-attempt output, tool arguments and results, compaction summaries, feedback, and plugin-owned events. Adapter API keys are not Session events and therefore do not enter the field. A gateway selected through `baseURL` receives the same values as the official endpoint.
158
162
 
159
163
  Receivers address extension fields by name, dispatch each field by its own `version`, preserve distinct package versions, and ignore JSON member ordering. A session-log receiver validates the contiguous sequence range before interpreting event types. An unrecognized canonical event without `ignorable: true` prevents lossless reconstruction. The base request remains usable without either the registry or a particular contribution; field absence means that contribution did not apply to that request.
@@ -78,11 +78,13 @@
78
78
  ```json
79
79
  {
80
80
  "dsh_session_log": {
81
- "version": 1,
81
+ "version": 2,
82
+ "sessionFormatVersion": 2,
82
83
  "session": {
83
- "version": 0,
84
+ "version": 2,
84
85
  "id": "session-id",
85
- "createdAt": 1780000000000
86
+ "createdAt": 1780000000000,
87
+ "isSeeded": false
86
88
  },
87
89
  "afterSeq": -1,
88
90
  "throughSeq": 0,
@@ -102,26 +104,27 @@
102
104
 
103
105
  | 成员 | 类型 | 含义 |
104
106
  |---|---|---|
105
- | `version` | `1` | `dsh_session_log` 的 schema 版本 |
106
- | `session` | 对象 | 不可变的权威 `SessionHeader` |
107
+ | `version` | `2` | `dsh_session_log` 的 schema 版本 |
108
+ | `sessionFormatVersion` | 非负整数 | 该后缀所表示的 Session 格式 generation |
109
+ | `session` | 对象 | 当前 Session header 的不可变协议投影 |
107
110
  | `afterSeq` | 整数 | 本次请求前记录为已接受的最大序号,或 `-1` |
108
111
  | `throughSeq` | 非负整数 | 本次请求所表示的最大序号 |
109
112
  | `events` | 数组 | 从 `afterSeq + 1` 到 `throughSeq` 的连续事件 |
110
113
 
111
114
  首次上传使用 `afterSeq: -1`,并携带当前的完整日志。此后每次上传都从同一会话 id 的最大已接受水位(watermark)之后开始。发送方为每次请求仅快照一次事件数组;快照后的追加内容属于后续请求。
112
115
 
113
- ### 会话头
116
+ ### Session 协议 header
114
117
 
115
- `session` 成员是确切的 `Session.header`,不是完整的运行时会话。外层 `dsh_session_log.version` 选择本扩展 schema,`session.version` 则选择权威磁盘会话格式;两个版本值相互独立演进。
118
+ `session` 成员投影 `Session.header`,既不是完整的运行时 Session,也不是 header 对象本身。它复制当前 header 事实,包括必需的 `isSeeded` 谱系位;精确的 `Session.inheritedEventCount` 不属于该请求字段。外层 `dsh_session_log.version` 选择本扩展 schema,`session.version` 则选择逻辑 Session 格式。即使嵌入的逻辑格式同时变化,只要 Session header 投影变化,扩展 schema 也必须升版。
116
119
 
117
120
  | 成员 | 出现条件 | 含义 |
118
121
  |---|---|---|
119
- | `version` | 必需 | 权威会话格式版本;当前为 `0` |
122
+ | `version` | 必需 | 逻辑 Session 格式版本;当前为 `2` |
120
123
  | `id` | 必需 | 确切的会话 id |
121
124
  | `createdAt` | 必需 | 非负安全整数 Unix epoch 毫秒数 |
122
125
  | `cwd` | 可选 | 创建会话时记录的绝对工作目录 |
123
126
  | `parentSession` | 可选 | fork 的父会话 id |
124
- | `seedLength` | 可选 | 通过 seed 继承的前导事件数量 |
127
+ | `isSeeded` | 必需 | Session 是否包含 fork 继承的事件前缀 |
125
128
  | `origin` | 可选 | subagent 子项使用的字面值 `subagent` |
126
129
  | `delegationDepth` | 可选 | 持久化的非负 subagent 委派深度 |
127
130
  | `agentPreset` | 可选 | 用于组合该会话的 agent preset id |
@@ -141,19 +144,20 @@
141
144
  "time": 1780000000002,
142
145
  "data": {
143
146
  "sessionId": "session-id",
147
+ "sessionFormatVersion": 2,
144
148
  "throughSeq": 7
145
149
  }
146
150
  }
147
151
  ```
148
152
 
149
- `delivery-accepted` 表示已配置端点为包含该字段的 LLM 请求返回 HTTP 2xx。它不表示 SSE 已完整结束,也不表示远端已经持久化。该事件的 `throughSeq` 必须标识一项更早的事件,`sessionId` 则标识已发送后缀所属的会话。
153
+ `delivery-accepted` 表示已配置端点为包含该字段的 LLM 请求返回 HTTP 2xx。它不表示 SSE 已完整结束,也不表示远端已经持久化。该事件的 `throughSeq` 必须标识一项更早的事件,`sessionId` 标识已发送后缀所属的 Session,`sessionFormatVersion` 则把水位绑定到该逻辑 generation。缺少该字段表示历史格式 v0。
150
154
 
151
- 发送方会折叠最大的匹配 `throughSeq`,因此并发已接受请求无法使游标倒退。恢复后的进程会从持久日志重建游标。fork 会忽略命名其父会话的继承水位,因此先发送自身完整的继承前缀,再以子会话 id 推进。水位事件自身属于下一段未发送后缀。
155
+ 发送方只会为当前 Session id 与格式 generation 折叠最大的匹配 `throughSeq`,因此并发已接受请求无法使游标倒退,其他 generation 的水位也不能授权当前后缀。恢复后的进程会从持久日志重建游标。fork 会忽略命名其他 Session 的继承水位,因此先发送自身完整的继承前缀,再以子会话 id 推进。水位事件自身属于下一段未发送后缀。
152
156
 
153
157
  传输失败和非 2xx 响应不会追加水位。端点接受后、本地持久化前发生崩溃时,系统可能重新发送已接受范围;不确定性只会产生重复,绝不会产生序号缺口。系统没有独立上传存储、大小上限或截断路径。
154
158
 
155
159
  ## 暴露内容与接收方要求
156
160
 
157
- 请求标头会暴露 Harness 应用版本、一个匿名 Harness-home 身份和可选的会话身份。`dsh_plugin_packages` 会暴露存活 npm 包的名称与版本。启用后,`dsh_session_log` 可能暴露会话工作目录、系统提示词快照、用户与 assistant 内容、原始 assistant 分片、工具参数与结果、压缩摘要、反馈和插件持有的事件。适配器 API key 不是会话事件,因此不会进入该字段。通过 `baseURL` 选择的网关会收到与官方端点相同的值。
161
+ 请求标头会暴露 Harness 应用版本、一个匿名 Harness-home 身份和可选的会话身份。`dsh_plugin_packages` 会暴露存活 npm 包的名称与版本。启用后,`dsh_session_log` 可能暴露会话工作目录、系统提示词快照、用户与 Assistant 内容、嵌入式 Assistant stream、失败 attempt 输出、工具参数与结果、压缩摘要、反馈和插件持有的事件。适配器 API key 不是会话事件,因此不会进入该字段。通过 `baseURL` 选择的网关会收到与官方端点相同的值。
158
162
 
159
163
  接收方按名称定位扩展字段,按各字段自己的 `version` 分派,保留不同的包版本,并忽略 JSON 成员顺序。会话日志接收方必须先校验连续序号范围,再解释事件类型。遇到不带 `ignorable: true` 的未知权威事件时,接收方无法进行无损重建。即使缺少注册表或某项贡献,基础请求仍然可用;字段缺失表示该项贡献不适用于本次请求。
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write docs/event-producer-consumer.md
5
- event-producer-consumer.md: d04a37ee71756619b36de192011a0053e5ceccb8
6
- event-producer-consumer.zh.md: 226c368517d989cba2eeac515ee2c544151e8005
5
+ event-producer-consumer.md: 1d643f14cabd361e82468cbcec1e2d418e4f079c
6
+ event-producer-consumer.zh.md: 80857c699e1a2b2e0956f909c26657754b5d909f