docs(session): catalog creation-time seed facts
The simplified inheritance path uses Session creation seeds for policy events, and the public CreateSessionOptions JSDoc now names that supported role. The type-equivalent persistence catalog still described seeds as replay/fork-only, so doc-sync correctly rejected the mismatch. Align the explanatory paragraph and exact type-equivalent block in both languages, then re-record the bilingual pair. This keeps the public catalog from understating the constructor seam that makes the simplification possible.
This commit is contained in:
@@ -2,5 +2,5 @@
|
|||||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
# 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:
|
# after editing either side, bring the other along and re-record with:
|
||||||
# pnpm run verify-translation-pairing --write docs/core-data-structures/persistence.md
|
# pnpm run verify-translation-pairing --write docs/core-data-structures/persistence.md
|
||||||
persistence.md: 5a660e17d6f498213564ca7d68dc4d7a615ba1de
|
persistence.md: 94813764bea1b87856d5c7cfc86b568df6408c68
|
||||||
persistence.zh.md: b5477cfc8242f9db47c2c6e40bd63f1b3683ace9
|
persistence.zh.md: fe5d497a58502356a0be56eec38edbfdbcf903c1
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ interface SessionHeader {
|
|||||||
|
|
||||||
## `CreateSessionOptions` — seeding and metadata
|
## `CreateSessionOptions` — seeding and metadata
|
||||||
|
|
||||||
Creating a `Session` through the store takes a `seed` (replay/fork an existing event log) and `meta` (the storage-level fields the store folds into a `SessionHeader`). The store fills in `version`/`id` and defaults `createdAt`; the caller supplies the validated absolute `cwd`, the `parentSession` lineage, the `seedLength` seed boundary, the `delegationDepth`, and — only when reconstructing a persisted session — the original `createdAt` to preserve it.
|
Creating a `Session` through the store takes a `seed` (initial events for replay, fork, or creation-time facts) and `meta` (the storage-level fields the store folds into a `SessionHeader`). The store fills in `version`/`id` and defaults `createdAt`; the caller supplies the validated absolute `cwd`, the `parentSession` lineage, the `seedLength` seed boundary, the `delegationDepth`, and — only when reconstructing a persisted session — the original `createdAt` to preserve it.
|
||||||
|
|
||||||
```ts type-equiv
|
```ts type-equiv
|
||||||
/**
|
/**
|
||||||
@@ -86,7 +86,7 @@ Creating a `Session` through the store takes a `seed` (replay/fork an existing e
|
|||||||
* store folds into a {@link SessionHeader}.
|
* store folds into a {@link SessionHeader}.
|
||||||
*/
|
*/
|
||||||
interface CreateSessionOptions {
|
interface CreateSessionOptions {
|
||||||
/** Events to seed the new session with (replay/fork). */
|
/** Initial log events supplied at construction (replay, fork, or creation-time facts). */
|
||||||
readonly seed?: readonly SessionEvent[]
|
readonly seed?: readonly SessionEvent[]
|
||||||
/**
|
/**
|
||||||
* Storage metadata read once before publication. `seedLength` is explicit
|
* Storage metadata read once before publication. `seedLength` is explicit
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ interface SessionHeader {
|
|||||||
|
|
||||||
## `CreateSessionOptions`:seed 与元数据
|
## `CreateSessionOptions`:seed 与元数据
|
||||||
|
|
||||||
通过 store 创建 `Session` 时会接收 `seed`(回放/fork 现有事件日志)与 `meta`(store 折叠进 `SessionHeader` 的存储层字段)。store 填充 `version`/`id` 并为 `createdAt` 提供默认值;调用方提供已校验的绝对 `cwd`、`parentSession` 谱系、`seedLength` 种子边界、`delegationDepth`,以及——仅在重建已持久化会话时——需要保留的原始 `createdAt`。
|
通过 store 创建 `Session` 时会接收 `seed`(用于回放、fork 或创建时事实的初始事件)与 `meta`(store 折叠进 `SessionHeader` 的存储层字段)。store 填充 `version`/`id` 并为 `createdAt` 提供默认值;调用方提供已校验的绝对 `cwd`、`parentSession` 谱系、`seedLength` 种子边界、`delegationDepth`,以及——仅在重建已持久化会话时——需要保留的原始 `createdAt`。
|
||||||
|
|
||||||
```ts type-equiv
|
```ts type-equiv
|
||||||
/**
|
/**
|
||||||
@@ -86,7 +86,7 @@ interface SessionHeader {
|
|||||||
* store folds into a {@link SessionHeader}.
|
* store folds into a {@link SessionHeader}.
|
||||||
*/
|
*/
|
||||||
interface CreateSessionOptions {
|
interface CreateSessionOptions {
|
||||||
/** Events to seed the new session with (replay/fork). */
|
/** Initial log events supplied at construction (replay, fork, or creation-time facts). */
|
||||||
readonly seed?: readonly SessionEvent[]
|
readonly seed?: readonly SessionEvent[]
|
||||||
/**
|
/**
|
||||||
* Storage metadata read once before publication. `seedLength` is explicit
|
* Storage metadata read once before publication. `seedLength` is explicit
|
||||||
|
|||||||
Reference in New Issue
Block a user