目录:ACP 协议API 网关与控制器附件启动与插件管理客户端运行时客户端 UI 包上下文压缩上下文注入核心运行时凭据与授权交付物文档处理实验特性宿主扩展反馈通道文件系统目标与计划工具守卫Hooks 扩展宿主服务交互命令作业调度LLM 适配LSP 集成MCP 协议规划模式Agent 预设代码执行运行时运行时诊断沙箱定时调度SDK 与协议会话核心会话检索设置Shell 执行技能溢出存储SSH 远程执行存储子代理子进程终端待办类型契约框架 vendorWeb 访问Webhook工作流工作区
依赖链 · 上游(该插件依赖的前驱):
依赖链 · 下游(依赖该插件的节点):
无下游(叶子/被消费端)
同一拓扑层(Layer 3,层次遍历层序):
dsh-api-gatewaydsh-commandsdsh-config-editordsh-deepseek-account-platformdsh-experimental-webworker-runtimedsh-hook-protocoldsh-host-frontend-staticdsh-host-open-in-appdsh-llm-pi-aidsh-personadsh-session-log-deepseekdsh-session-persistence-jsonldsh-session-projectiondsh-session-query-sqlitedsh-session-telemetry-oteldsh-skill-badgedsh-skill-filesystemdsh-skill-officedsh-user-approvaldsh-web-fetch-httpdsh-web-search-exadsh-web-search-perplexitydsh-webhook-githubdsh-workspace
插件信息
| 包名 | @deepseek-ai/dsh-session-log-deepseek |
|---|---|
| 分组 | G33 · 会话核心 |
| 拓扑层 | Layer 3(层次遍历:被依赖方先于依赖方) |
| 源码路径 | packages/session/session-log-deepseek |
① 实现逻辑
向 DeepSeek 官方 LLM API 请求贡献增量 dsh_session_log 字段:acceptedThrough() 折叠本会话的 delivery-accepted 事件得到已确认水位(src/index.ts:141-175),prepare 从该水位起按 maxBytes 打包最长可容纳的事件前缀,并把 header/事件翻译为线格式(src/index.ts:182-243)。接受时追加 session-log-deepseek/delivery-accepted 事件记录水位,使重启后能保守重发不确定尾部(src/index.ts:233-240)。invariant.ts 校验水位字段与所在事件/会话的一致性(src/invariant.ts:17-57)。
内部结构动态 DAG(深色主题:橙色=上游依赖 · 绿色=下游依赖 · 棕色=外部seam · 蓝=本插件)
本插件
上游依赖
下游依赖
外部 seam
② 注册/提供(provides)
- DeepSeek 官方请求的 dsh_session_log 增量会话日志扩展(注册于 ctx.deepseekLlmApiExtensions)
③ 依赖(depends_on · 上游前驱)
dsh-deepseek-llm-api-extensionsE2
把 dsh_session_log 字段注册到官方 DeepSeek 请求扩展点
src/index.ts:12 type import + src/index.ts:36 static inject + src/index.ts:186 ctx.deepseekLlmApiExtensions.register
dsh-invariantsE1+E2
注册水位字段的运行时不变式
src/invariant.ts:6 import + src/invariant.ts:75 ctx.invariants.register
dsh-sessionE1+E2
从会话日志读取待上传事件并追加接受水位事件
src/index.ts:13 import + src/index.ts:36 static inject (sessions) + src/index.ts:190 ctx.sessions.get
④ 被依赖(dependents · 下游消费者)
无下游(叶子/被消费端)