@deepseek-ai/dsh-session-reference 0.1.5-rc.1 → 0.1.6-alpha.1

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.
package/README.i18n.yaml CHANGED
@@ -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 packages/context/session-reference/README.md
5
- README.md: a7da16668c32ae50568e4012221bbaf6b7da7d2d
6
- README.zh.md: 1aaa32661845dfac790b9838b238f074d87b0f9b
5
+ README.md: 533a1282da920b6daa47ef5be98e49c691a8cb84
6
+ README.zh.md: e7b43c9a56cd5b4062770144ccea0bf125153b40
package/README.md CHANGED
@@ -68,7 +68,7 @@ This section explains the design of the service; the observable behavior is cove
68
68
 
69
69
  Preparation reads each referenced session's current surface exactly once, when the target message reaches `agent/pre-step`. Both preview and spill use that same captured projection: direct-user text, assistant text, and user checkpoints carrying the canonical compaction marker; tools, reasoning, and other injected context are excluded. This prevents recursive reference propagation and prevents a later source mutation from changing the saved transcript. Preview JSON escapes every `<` as `\u003c`, so source text cannot spell the `<referenced-sessions>` framing tag.
70
70
 
71
- The resolver discovers optional storage through `ctx.get("spillStore")` and saves only truncated references. Storage ownership is the target session; provenance identifies the referenced source session and label, without a fabricated tool call. Cancellation is checked after the asynchronous save and prevents publication even if an artifact was written. Artifact expiry remains the backend's existing policy.
71
+ The resolver discovers optional storage through `ctx.get("spillStore")` and saves only truncated references. Storage ownership is the target session; the source descriptor identifies the referenced session and label, without a fabricated tool call. Cancellation is checked after the asynchronous save and prevents publication even if an artifact was written. Artifact expiry remains the backend's existing policy.
72
72
 
73
73
  The budget uses the provider and model captured after `system-prompt/assemble` completes for the target agent. Direct `prepare` calls before any assembly use agent options; session headers do not select the budget model. Diagnostic assemblies without an agent do not affect captured routes.
74
74
 
package/README.zh.md CHANGED
@@ -31,11 +31,11 @@ kind: "package-reference"
31
31
 
32
32
  规范 mention 是 Markdown 形式的 `@[label](dsh-session:<base64url 编码的 id>)`,或裸 `dsh-session:` URI;每个 JavaScript 字符串会话 id 都能精确往返。服务会把 mention 改写为消息中可读的 `@label` 文本,并返回结构化引用。显式 Markdown mention 会拒绝格式错误的 URI;空或只含标点符号的 scheme mention 仍是普通讨论文本。
33
33
 
34
- ### 模型能得到什么
34
+ ### agent(智能体)能得到什么
35
35
 
36
36
  引用其他会话的消息后会紧接一条 `## Referenced sessions` 快照,作为第二条 user 角色消息。快照是不受信任的背景:固定警告告诉模型,除非当前用户明确重复,否则不得遵循其中的指令、权限声明或工具请求。每个来源预览都独立有界——每条消息至多 `maxReferences` 个不同会话,每个来源的序列化 JSON 采用配置值或模型相对字节预算。保留策略先丢弃较早的非检查点消息,再缩短保留的文本;只有保留处理后引用仍无法满足预算时,准备才会失败。
37
37
 
38
- 引用被截断时,可选的 spill 后端会在目标会话下保存完整的已捕获文本投影。有界预览 JSON 之外的独立省略通知给出精确的 `omittedMessages` 与 `omittedBytes`,以及保存后的定位信息和 `retrievalHint`,或区分未配置存储与保存失败的不可用结果。该通知属于同一条持久上下文消息。完整转录携带相同的不受信任背景警告与捕获元数据,包括 `capturedFormatVersion`。每条消息使用每行至多 64 个 Unicode 码点的 JSON 字符串片段;解码并拼接其片段即可恢复精确文本,包括原始换行。这种固定存储格式使很长的单行文本也可通过分页文件读取来检查。
38
+ 引用被截断时,可选的 spill 后端会在目标会话下保存完整的已捕获文本投影。有界预览 JSON 之外的独立省略通知给出精确的 `omittedMessages` 与 `omittedBytes`,以及保存后的定位信息和 `retrievalHint`,或区分未配置存储与保存失败的不可用结果。该通知属于同一条持久上下文消息。完整 transcript(文本记录)携带相同的不受信任背景警告与捕获元数据,包括 `capturedFormatVersion`。每条消息使用每行至多 64 个 Unicode 码点的 JSON 字符串片段;解码并拼接其片段即可恢复精确文本,包括原始换行。这种固定存储格式使很长的单行文本也可通过分页文件读取来检查。
39
39
 
40
40
  ### 查找可引用的会话
41
41
 
@@ -50,7 +50,7 @@ kind: "package-reference"
50
50
  | `maxReferenceBytes` | 自动 | 每个来源的最大序列化 JSON 字节数;显式设置时精确覆盖自动预算 |
51
51
  | `referenceContextFraction` | `0.2` | 每个来源的上下文窗口比例,范围为 `0` 到 `1` |
52
52
 
53
- 自动预算为每个来源 `max(65536, floor(contextWindow × 4 × referenceContextFraction))` 字节。模型上下文容量以 token 计量;每个 token 四字节是容量估算,不是精确的 token 换算。缺少路由、LLM 服务、适配器或容量时使用 64 KiB;其他模型元数据查询错误与取消会使准备失败。
53
+ 自动预算为每个来源 `max(65536, floor(contextWindow × 4 × referenceContextFraction))` 字节。模型上下文容量以 token 计量;每个 token 四字节是容量估算,不是精确的 token 换算。缺少路由、LLM(大语言模型)服务、适配器或容量时使用 64 KiB;其他模型元数据查询错误与取消会使准备失败。
54
54
 
55
55
  生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-session-reference)是每个受支持字段及其 JSDoc 的穷尽式真源。
56
56
 
@@ -66,24 +66,24 @@ kind: "package-reference"
66
66
 
67
67
  ### 设计理念
68
68
 
69
- 准备阶段在目标消息到达 `agent/pre-step` 时,对每个被引用会话的当前表层各精确读取一次。预览与 spill 使用同一份已捕获投影:用户直接发送的文本、assistant 文本,以及携带规范压缩标记的 user 检查点;工具、推理与其他注入上下文均被排除。这既防止引用递归传播,也防止源会话后续变更影响已保存转录。预览 JSON 将每个 `<` 转义为 `\u003c`,因此源文本无法拼出 `<referenced-sessions>` 定界标签。
69
+ 准备阶段在目标消息到达 `agent/pre-step` 时,对每个被引用会话的当前表层各精确读取一次。预览与 spill 使用同一份已捕获投影:用户直接发送的文本、assistant 文本,以及携带规范压缩(compaction)标记的 user 检查点;工具、推理(reasoning)与其他注入上下文均被排除。这既防止引用递归传播,也防止源会话后续变更影响已保存 transcript。预览 JSON 将每个 `<` 转义为 `\u003c`,因此源文本无法拼出 `<referenced-sessions>` 定界标签。
70
70
 
71
71
  解析器通过 `ctx.get("spillStore")` 获取可选存储,只保存被截断的引用。存储归目标会话所有;来源信息标识被引用的源会话与标签,不伪造工具调用。异步保存后会检查取消,即使产物已写入,也会阻止发布。产物过期仍遵循后端既有策略。
72
72
 
73
- 预算使用目标 agent 的 `system-prompt/assemble` 完成后捕获的 provider 与 model。首次组装前直接调用 `prepare` 时使用 agent options;会话头不决定预算模型。不带 agent 的诊断组装不会影响已捕获路由。
73
+ 预算使用目标 agent 的 `system-prompt/assemble` 完成后捕获的提供方与模型。首次组装前直接调用 `prepare` 时使用 agent 选项;会话头不决定预算模型。不带 agent 的诊断组装不会影响已捕获路由。
74
74
 
75
75
  ### 源码地图
76
76
 
77
77
  | 文件 | 职责 |
78
78
  |---|---|
79
79
  | [`src/index.ts`](src/index.ts) | `SessionReferenceResolver`:pre-step 监听器、候选发现、准备 |
80
- | [`src/config.ts`](src/config.ts) | `Config` schema、`SessionReferenceError` 错误分类 |
80
+ | [`src/config.ts`](src/config.ts) | `Config` schema、`SessionReferenceError` 错误分类体系 |
81
81
  | [`src/uri.ts`](src/uri.ts) | `dsh-session:` URI 编解码、mention 格式化与解析 |
82
82
  | [`src/projection.ts`](src/projection.ts) | 当前表层投影与字节预算保留 |
83
83
  | [`src/serialization.ts`](src/serialization.ts) | 快照载荷的标签安全 JSON 转义 |
84
- | [`src/spill.ts`](src/spill.ts) | 完整转录序列化与模型可见省略通知 |
84
+ | [`src/spill.ts`](src/spill.ts) | 完整 transcript 序列化与模型可见省略通知 |
85
85
  | [`src/types.ts`](src/types.ts) | `SessionReferenceInput`/`Candidate` 与来源类型 |
86
- | — | 不发布运行时不变式伴生入口;prepare 返回构建时已校验的不可变单次快照;持久 context 的准入、冻结与回放由 Agent 和 Session 层负责。 |
86
+ | — | 不发布运行时不变式伴生入口;准备过程返回构建时已校验的不可变单次快照;持久上下文的准入、冻结与回放由 agent 层和会话层负责。 |
87
87
 
88
88
  ### 主要流程
89
89
 
@@ -98,10 +98,10 @@ kind: "package-reference"
98
98
 
99
99
  包级约定不够用时阅读以下页面。它们从共享引用表面进入设计决策与其背后的读取服务。
100
100
 
101
- - [会话引用子系统](../../../docs/subsystems/session-reference.zh.md)——规范 URI、投影规则与稳定的错误分类。
101
+ - [会话引用子系统](../../../docs/subsystems/session-reference.zh.md)——规范 URI、投影规则与稳定的错误分类体系。
102
102
  - [会话引用 spill 复用](../../../.agents/notes/implemented/bug-fix/2026-09-05-session-reference-spill-reuse.zh.md)——快照身份、省略通知、存储归属与替代方案。
103
103
  - [会话查询子系统](../../../docs/subsystems/session-query.zh.md)——提供会话表层的读取服务。
104
- - [context 组地图](../README.zh.md)——相邻的请求上下文包。
104
+ - [上下文组地图](../README.zh.md)——相邻的请求上下文包。
105
105
  - [生成的配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-session-reference)——每个受支持配置字段及其源声明。
106
106
 
107
107
  -----
@@ -117,7 +117,7 @@ kind: "package-reference"
117
117
 
118
118
  #### Token 影响
119
119
 
120
- 每条包含引用的消息都会添加固定警告和最多三个序列化预览,每个预览都受配置值或模型相对字节预算独立限制。被截断的引用会在该预算之外添加独立省略通知;已保存的完整转录只有在被取回时才增加 token。精确上下文会保留在目标历史中,直到目标压缩遮蔽或摘要它;源会话变更不会添加更多 token。
120
+ 每条包含引用的消息都会添加固定警告和最多三个序列化预览,每个预览都受配置值或模型相对字节预算独立限制。被截断的引用会在该预算之外添加独立省略通知;已保存的完整 transcript 只有在被取回时才增加 token。精确上下文会保留在目标历史中,直到目标压缩遮蔽或摘要它;源会话变更不会添加更多 token。
121
121
 
122
122
  #### KV Cache 影响
123
123
 
@@ -131,11 +131,11 @@ kind: "package-reference"
131
131
  这些限制说明跨会话引用何时不合适。它们是当前包约束。
132
132
 
133
133
  - **不支持消息正文检索**:候选查询会检查标题,但不搜索消息主体。
134
- - **标签只来自投影**:已挂载的会话由实时投影切面标注,冷会话由持久化 checkpoint 标注,两者都答不上来的会话用 id 作标签且无法按标题搜到。发现路径绝不读日志:折叠一个标题的代价是整份日志,而这段代码位于补全的每一次击键之下。早于投影缓存组合存在的会话,只要被打开一次(销毁时即写 checkpoint)就会恢复标题。
134
+ - **标签只来自投影**:已挂载会话的标签来自实时投影切面,冷会话的标签来自持久检查点;若会话无法提供这两者,则以其 id 作为标签,也无法按标题找到。发现过程绝不读取日志:折叠出一个标题需要处理整份日志,而这段代码会在每次补全击键时运行。在投影缓存建立前持久化的会话,会在首次打开时恢复标题并写入检查点。
135
135
  - **受信任调用方边界**:该服务假设宿主有权读取 `ctx.sessionQuery` 公开的每个会话;它不是面向模型的搜索工具。
136
136
  - **只投影文本**:不会在会话间传播非文本 user 与 assistant 块。
137
137
  - **没有实时链接**:引用是快照,不是 fork、恢复、订阅或源会话变更。
138
- - **转录搜索按行进行**:字面短语可能跨越 JSON 片段行或包含转义字符;精确文本匹配需先解码并拼接消息片段。已保存产物可能按后端策略过期。
138
+ - **transcript 搜索按行进行**:字面短语可能跨越 JSON 片段行或包含转义字符;精确文本匹配需先解码并拼接消息片段。已保存产物可能按后端策略过期。
139
139
 
140
140
  <a id="dev-note"></a>
141
141
  ### 开发备注
@@ -131,8 +131,8 @@ export const TYPERT = {
131
131
  "declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
132
132
  },
133
133
  {
134
- "name": "AssistantProvenance",
135
- "declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
134
+ "name": "AssistantProviderMetadata",
135
+ "declaration": "export interface AssistantProviderMetadata {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
136
136
  },
137
137
  {
138
138
  "name": "AssistantStreamRecord",
@@ -268,12 +268,16 @@ export const TYPERT = {
268
268
  },
269
269
  {
270
270
  "name": "ImageBlock",
271
- "declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n}"
271
+ "declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n offloaded?: true;\n}"
272
272
  },
273
273
  {
274
274
  "name": "ImageMediaType",
275
275
  "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
276
276
  },
277
+ {
278
+ "name": "ImageOffloadTarget",
279
+ "declaration": "export interface ImageOffloadTarget {\n seq: SessionSeq;\n imageIndexes: number[];\n}"
280
+ },
277
281
  {
278
282
  "name": "Inbox",
279
283
  "declaration": "export interface Inbox {\n readonly nextTurn: readonly UserMessage[];\n readonly nextStep: readonly UserMessage[];\n clear(): void;\n append(target: InboxTarget, message: UserMessage): void;\n prepend(target: InboxTarget, message: UserMessage): void;\n replace(messageId: MessageId, newMessage: UserMessage): boolean;\n remove(messageId: MessageId): boolean;\n splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
@@ -296,7 +300,7 @@ export const TYPERT = {
296
300
  },
297
301
  {
298
302
  "name": "LlmFailure",
299
- "declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n}"
303
+ "declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n readonly offloadImages?: number;\n}"
300
304
  },
301
305
  {
302
306
  "name": "Message",
@@ -336,7 +340,7 @@ export const TYPERT = {
336
340
  },
337
341
  {
338
342
  "name": "ModelMessageSource",
339
- "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n kind: 'model';\n}"
343
+ "declaration": "export interface ModelMessageSource extends AssistantProviderMetadata {\n kind: 'model';\n}"
340
344
  },
341
345
  {
342
346
  "name": "ModelSelection",
@@ -360,7 +364,7 @@ export const TYPERT = {
360
364
  },
361
365
  {
362
366
  "name": "PtcDispatchEventData",
363
- "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
367
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
364
368
  },
365
369
  {
366
370
  "name": "PtcDispatchStartEventData",
@@ -400,7 +404,7 @@ export const TYPERT = {
400
404
  },
401
405
  {
402
406
  "name": "SessionEventMap",
403
- "declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
407
+ "declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
404
408
  },
405
409
  {
406
410
  "name": "SessionEventType",
@@ -444,15 +448,15 @@ export const TYPERT = {
444
448
  },
445
449
  {
446
450
  "name": "SessionSurface",
447
- "declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
451
+ "declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
448
452
  },
449
453
  {
450
454
  "name": "SessionTitleEventData",
451
455
  "declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
452
456
  },
453
457
  {
454
- "name": "SessionTitleModelProvenance",
455
- "declaration": "export interface SessionTitleModelProvenance {\n readonly provider: string;\n readonly model: string;\n}"
458
+ "name": "SessionTitleModelIdentity",
459
+ "declaration": "export interface SessionTitleModelIdentity {\n readonly provider: string;\n readonly model: string;\n}"
456
460
  },
457
461
  {
458
462
  "name": "SessionTitleProviderId",
@@ -460,7 +464,7 @@ export const TYPERT = {
460
464
  },
461
465
  {
462
466
  "name": "SessionTitleSource",
463
- "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
467
+ "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
464
468
  },
465
469
  {
466
470
  "name": "SkillInvocationSource",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-session-reference",
3
3
  "description": "Cross-session snapshot references and durable untrusted model context (ctx.sessionReferenceResolver)",
4
- "version": "0.1.5-rc.1",
4
+ "version": "0.1.6-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -45,24 +45,24 @@
45
45
  "license": "MIT",
46
46
  "dependencies": {
47
47
  "zod": "^4.4.3",
48
- "@deepseek-ai/dsh-brand": "^0.1.5-rc.1",
49
- "@deepseek-ai/dsh-util-values": "^0.1.5-rc.1",
50
- "@deepseek-ai/schemastery": "^3.18.2"
48
+ "@deepseek-ai/dsh-util-values": "^0.1.6-alpha.1",
49
+ "@deepseek-ai/schemastery": "^3.18.2",
50
+ "@deepseek-ai/dsh-brand": "^0.1.6-alpha.1"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@deepseek-ai/cordis": "^4.0.2",
54
- "@deepseek-ai/dsh-agent": "^0.1.5-rc.1",
55
- "@deepseek-ai/dsh-compaction": "^0.1.5-rc.1",
56
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.1",
57
- "@deepseek-ai/dsh-output-retention": "^0.1.5-rc.1",
58
- "@deepseek-ai/dsh-session": "^0.1.5-rc.1",
59
- "@deepseek-ai/dsh-session-projection": "^0.1.5-rc.1",
60
- "@deepseek-ai/dsh-session-projection-cache": "^0.1.5-rc.1",
61
- "@deepseek-ai/dsh-session-query": "^0.1.5-rc.1",
62
- "@deepseek-ai/dsh-session-title": "^0.1.5-rc.1",
63
- "@deepseek-ai/dsh-spill": "^0.1.5-rc.1",
64
- "@deepseek-ai/dsh-system-prompt": "^0.1.5-rc.1",
65
- "@deepseek-ai/dsh-typert-protocol": "^0.1.5-rc.1"
54
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
55
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
56
+ "@deepseek-ai/dsh-output-retention": "^0.1.6-alpha.1",
57
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
58
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
59
+ "@deepseek-ai/dsh-compaction": "^0.1.6-alpha.1",
60
+ "@deepseek-ai/dsh-session-projection-cache": "^0.1.6-alpha.1",
61
+ "@deepseek-ai/dsh-session-query": "^0.1.6-alpha.1",
62
+ "@deepseek-ai/dsh-session-title": "^0.1.6-alpha.1",
63
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.1",
64
+ "@deepseek-ai/dsh-spill": "^0.1.6-alpha.1",
65
+ "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.1"
66
66
  },
67
67
  "peerDependenciesMeta": {
68
68
  "@deepseek-ai/dsh-spill": {
@@ -75,23 +75,23 @@
75
75
  "devDependencies": {
76
76
  "@deepseek-ai/cordis": "^4.0.2",
77
77
  "@deepseek-ai/cordis-plugin-include": "^1.0.7",
78
- "@deepseek-ai/dsh-agent": "^0.1.5-rc.1",
79
- "@deepseek-ai/dsh-compaction": "^0.1.5-rc.1",
80
- "@deepseek-ai/dsh-fs-local": "^0.1.5-rc.1",
81
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.1",
82
- "@deepseek-ai/dsh-output-retention": "^0.1.5-rc.1",
83
- "@deepseek-ai/dsh-session": "^0.1.5-rc.1",
84
- "@deepseek-ai/dsh-session-projection": "^0.1.5-rc.1",
85
- "@deepseek-ai/dsh-session-projection-cache": "^0.1.5-rc.1",
86
- "@deepseek-ai/dsh-session-query": "^0.1.5-rc.1",
87
- "@deepseek-ai/dsh-session-query-sqlite": "^0.1.5-rc.1",
88
- "@deepseek-ai/dsh-session-title": "^0.1.5-rc.1",
89
- "@deepseek-ai/dsh-spill": "^0.1.5-rc.1",
90
- "@deepseek-ai/dsh-spill-local": "^0.1.5-rc.1",
91
- "@deepseek-ai/dsh-system-prompt": "^0.1.5-rc.1",
92
- "@deepseek-ai/dsh-tool-fs": "^0.1.5-rc.1",
93
- "@deepseek-ai/dsh-tools": "^0.1.5-rc.1",
94
- "@deepseek-ai/dsh-typert-protocol": "^0.1.5-rc.1",
95
- "@deepseek-ai/cordis-plugin-loader": "^1.0.3"
78
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
79
+ "@deepseek-ai/dsh-compaction": "^0.1.6-alpha.1",
80
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
81
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
82
+ "@deepseek-ai/dsh-output-retention": "^0.1.6-alpha.1",
83
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
84
+ "@deepseek-ai/dsh-fs-local": "^0.1.6-alpha.1",
85
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
86
+ "@deepseek-ai/dsh-session-projection-cache": "^0.1.6-alpha.1",
87
+ "@deepseek-ai/dsh-session-query": "^0.1.6-alpha.1",
88
+ "@deepseek-ai/dsh-session-query-sqlite": "^0.1.6-alpha.1",
89
+ "@deepseek-ai/dsh-session-title": "^0.1.6-alpha.1",
90
+ "@deepseek-ai/dsh-spill": "^0.1.6-alpha.1",
91
+ "@deepseek-ai/dsh-spill-local": "^0.1.6-alpha.1",
92
+ "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.1",
93
+ "@deepseek-ai/dsh-tool-fs": "^0.1.6-alpha.1",
94
+ "@deepseek-ai/dsh-tools": "^0.1.6-alpha.1",
95
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.1"
96
96
  }
97
97
  }