提供 `/goal` 斜杠命令,让用户在同一会话内创建、编辑、暂停、恢复和清除持久化目标
ⓘ 此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。
- 语言
- TypeScript
- License
- MIT
- 分支
- master
安装
$ dsh plugin --profile web add npm:@deepseek-ai/dsh-command-goal在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程
对话式安装
帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/goal/command-goal:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。
把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。
English | 中文
Human-facing /goal control over ctx.goals. The plugin registers one global command through ctx.commands, so every composed command adapter discovers and executes it without a model turn. The human goal-command Agent Note owns the UX and composition decisions.
Command contract
| Input | Result |
|---|---|
/goal | Show the current objective, durable phase, round count/cap, process-local activation, and valid next commands; a blocked goal also shows its policy code and explanation, while no goal shows usage. |
/goal <objective> | Create and arm a goal, or replace a completed goal with a fresh identity. An unfinished goal is never replaced without an explicit clear. |
/goal edit <objective> | Edit the current objective without changing its phase or activation. Editing a completed goal creates a fresh active goal. |
/goal pause | Pause an active goal and disarm continuation. |
/goal resume | Resume a stopped goal or rearm an active goal after session resume/fork, subject to its remaining round cap. |
/goal clear | Clear the current pointer while retaining its durable history and tombstone. |
Control words are case-insensitive only when they occupy the complete input. Every other non-empty suffix is an objective, so /goal pause after verification creates that literal objective. The goal domain trims and validates objectives. Because the generic command plane has no modal editor or confirmation primitive, edit takes its replacement inline and an unfinished replacement returns a direct error instructing the user to edit or clear.
The command declares input.images, so composer image attachments may accompany an invocation. Attachments only accompany an objective: on a successful create or edit the producer submits one user followup carrying the admitted image blocks plus the fixed text Reference images for the goal objective., so later goal rounds read them from ordinary session history without the goal domain storing attachment state. Every other sub-command, and any refused create or edit, returns a direct error and submits nothing, so the dispatching composer keeps the images.
Expected domain rejections become stable direct command errors without exposing branded ids or revisions. Unexpected implementation failures still reject dispatch so adapters can report them as command failures. Generic command text and output remain live UI state; dsh-goal persists every accepted mutation through its own durable goal/change event.
Composition
The producer injects commands and goals. A custom app mounts their owners plus this plugin; automatic continuation remains an independent choice:
- id: commands
name: '@deepseek-ai/dsh-commands'
- id: goal
name: '@deepseek-ai/dsh-goal'
- id: command-goal
name: '@deepseek-ai/dsh-command-goal'
The shipped dsh base enables the persisted-goal stack and this command; the Web client provides its interactive adapter. The ACP automation app enables the domain and model tools without a command adapter; goals: false removes that stack. The UI-less agent-spine-demo requires an explicit goals: {} so headless one-shot callers do not silently change from one physical turn to a multi-round operation.
Model Experience
Human /goal control
What the model sees
The slash input, mutation, and direct status/error output are absent from model requests. The goal domain records the mutation as goal/change; an enabled same-session driver may expose the resulting state in a later continuation prompt. Presentation text is never logged. When a create or edit carries image attachments, the model sees one ordinary user message: the image blocks followed by the text Reference images for the goal objective.; it precedes the next goal round in session history.
Token effect
Reading status, mutating a goal, or receiving a direct command error adds no model tokens. An enabled same-session driver may add later goal-round prompts. An objective's image attachments add one user message billed like any image prompt.
KV Cache effect
Command discovery, mutations, and direct output do not affect the cache. Later continuation prompts follow the driver's ordinary request history.
Known Limitations and Deferred Work
- Plain-text interaction only — the generic command registry has no modal edit form or replacement-confirmation callback; inline edit and explicit clear keep destructive intent deterministic across adapters.
- No per-command round-cap argument —
defaultMaxGoalRoundsremains deployment config, while a direct human request may ask the model to editmax_goal_roundsthrough the separately authorized goal tool. - No continuous status widget — bare
/goalis the portable observation API; adapter-specific badges and reconnectable command output remain future UI work. - Web command adapter only in the shipped apps — headless, ACP automation, and JSON-RPC adapters do not consume
ctx.commands. Ordinary prompts can still authorize model-facing goal tools when those are composed.
收录徽章
[](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/goal/command-goal)把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。