目录:ACP 协议API 网关与控制器附件启动与插件管理客户端运行时客户端 UI 包上下文压缩上下文注入核心运行时凭据与授权交付物文档处理实验特性宿主扩展反馈通道文件系统目标与计划工具守卫Hooks 扩展宿主服务交互命令作业调度LLM 适配LSP 集成MCP 协议规划模式Agent 预设代码执行运行时运行时诊断沙箱定时调度SDK 与协议会话核心会话检索设置Shell 执行技能溢出存储SSH 远程执行存储子代理子进程终端待办类型契约框架 vendorWeb 访问Webhook工作流工作区
依赖链 · 上游(该插件依赖的前驱):
依赖链 · 下游(依赖该插件的节点):
无下游(叶子/被消费端)
同一拓扑层(Layer 6,层次遍历层序):
dsh-agent-presetdsh-command-goaldsh-compaction-basicdsh-experimental-auto-reviewdsh-goal-round-driverdsh-host-plugin-inventorydsh-mcp-clientdsh-office-to-pdfdsh-plan-modedsh-plugin-package-inventory-deepseekdsh-subagentdsh-terminal-bashdsh-tool-ask-userdsh-tool-bash-persistentdsh-tool-cordisdsh-tool-goaldsh-tool-pwsh-persistentdsh-tool-terminal
插件信息
| 包名 | @deepseek-ai/dsh-command-goal |
|---|---|
| 分组 | G17 · 目标与计划 |
| 拓扑层 | Layer 6(层次遍历:被依赖方先于依赖方) |
| 源码路径 | packages/goal/command-goal |
① 实现逻辑
以纯函数 parseGoalCommand 解析 /goal 的人类语法(show/create/edit/pause/resume/clear),再由 executeGoalCommand 把这些控制动词映射到 ctx.goals 的 compare-and-set 变更并渲染直接 UI 输出(src/index.ts:35-45, 126-177)。命令对象携带的附件经 submitObjectiveAttachments 以模型可见的 user 消息形式在目标下一轮前投递(src/index.ts:117-123)。apply 在 ctx.commands 上注册 Codex 形状的 'goal' 命令(src/index.ts:190-197)。
内部结构动态 DAG(深色主题:橙色=上游依赖 · 绿色=下游依赖 · 棕色=外部seam · 蓝=本插件)
本插件
上游依赖
下游依赖
外部 seam
② 注册/提供(provides)
- /goal 人类命令 (注册进 commands 注册表,管理目标的创建/编辑/暂停/恢复/清除)
③ 依赖(depends_on · 上游前驱)
dsh-commandsE1+E2
把 /goal 命令注册进命令注册表并复用其调用/结果类型
src/index.ts:7-8 import (CommandDefinitionId, CommandInvocation) + src/index.ts:14 inject ['commands','goals'] + src/index.ts:191 ctx.commands.register
dsh-goalE1+E2
通过目标域服务读写持久化目标并捕获 GoalError
src/index.ts:9-10 import (GoalError, GoalPhase/GoalRef/GoalView) + src/index.ts:135 ctx.goals.get + src/index.ts:150 ctx.goals.create
④ 被依赖(dependents · 下游消费者)
无下游(叶子/被消费端)