目录: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-deepseek-account-platform |
|---|---|
| 分组 | G10 · 凭据与授权 |
| 拓扑层 | Layer 3(层次遍历:被依赖方先于依赖方) |
| 源码路径 | packages/credentials/deepseek-account-platform |
① 实现逻辑
`PlatformAccount` 继承 `DeepSeekAccount`(src/index.ts:84-85),以 PKCE 实现 DeepSeek Platform 网页登录:注册 authorization flow(src/index.ts:138-146),`run()` 生成 verifier/challenge+state、在 webServer 注册 `/oauth/callback` 时序安全校验回调、交换 token 后经 `session.commit` 写 grant 记录(src/index.ts:509-599)。grant 以 issuer 绑定 provider origin,失效或拒 token 即删除记录并广播 `deepseek-account/session-expired`/`signed-out`(src/index.ts:329-344、372-388)。profile/余额/未通知奖励经 `details.ts`/`protocol.ts` 的 zod 校验与 65KB 响应上限读取(src/details.ts:62-70、src/protocol.ts:166-234)。
内部结构动态 DAG(深色主题:橙色=上游依赖 · 绿色=下游依赖 · 棕色=外部seam · 蓝=本插件)
本插件
上游依赖
下游依赖
外部 seam
② 注册/提供(provides)
- ctx.credentials 记录 (deepseek-account-platform/default 与 /device 的 grant)
- 事件 deepseek-account/session-expired, deepseek-account/signed-out
③ 依赖(depends_on · 上游前驱)
dsh-authorizationE1+E2
把浏览器 PKCE 登录注册为授权流程并驱动一次尝试
src/index.ts:12 import AuthorizationSession + src/index.ts:85 inject + src/index.ts:138 registerFlow + src/index.ts:413 begin
dsh-host-webserverE1+E2
注册 /oauth/callback 路由接收浏览器回调
src/index.ts:4 import type {} from '@deepseek-ai/dsh-host-webserver' + src/index.ts:510 ctx.get('webServer') + src/index.ts:526 webServer.register
④ 被依赖(dependents · 下游消费者)
无下游(叶子/被消费端)