@deepseek-ai/dsh-command-goal 0.1.2-rc.1 → 0.1.3-alpha.2
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 +2 -2
- package/README.md +7 -7
- package/README.zh.md +7 -7
- package/lib/index.js +5 -5
- package/package.json +10 -10
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/goal/command-goal/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 7c774d321383448110e2b159790b3368c8c0a400
|
|
6
|
+
README.zh.md: f120cafe00853ea858bf836a19317bafea73f60f
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-command-goal` gives the human `/goal` command over the persisted goal service: a user can create, edit, pause, resume, clear, and inspect the current goal directly from the UI, without involving the model. The command registers in its Cordis scope, so command adapters reading that scope discover and execute it, while command text and output stay in the UI — they never enter model requests. Every accepted mutation persists through the goal service's durable `goal/change` event.
|
|
12
|
+
`dsh-command-goal` gives the human `/goal` command over the persisted goal service: a user can create, edit, pause, resume, clear, and inspect the current goal directly from the UI, without involving the model. The command registers in its Cordis scope, so command adapters reading that scope discover and execute it, while command text and output stay in the UI — they never enter model requests. Every accepted mutation persists through the goal service's durable `goal/change` event. Ordered image and file attachments may accompany a create or edit and are submitted as one ordinary user message so later goal rounds see them. Choose it for interactive deployments with a command adapter; headless and automation apps without one do not need it.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -44,9 +44,9 @@ Every sub-command runs against the current goal of the invoking agent; a bare `/
|
|
|
44
44
|
|
|
45
45
|
Control words (`clear`, `pause`, `resume`, `edit`) are recognized only when they occupy the complete input; any other non-empty suffix is an objective, so `/goal pause after verification` creates that literal objective. `edit` takes its replacement inline and refuses to replace an unfinished goal directly. Expected domain rejections become stable, direct command errors without exposing branded ids or revisions; unexpected implementation failures still fail dispatch so adapters can report them as command failures.
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### Attachments
|
|
48
48
|
|
|
49
|
-
`/goal` declares
|
|
49
|
+
`/goal` declares attachment support. Attachments accompany only an objective: after a successful create or edit, the command submits one user followup carrying the admitted image and file blocks in selection order plus the fixed text `Reference attachments for the goal objective.` Later goal rounds read that ordinary session history; the goal domain stores no attachment state. Every other sub-command, and any refused create or edit, returns a direct error before a domain mutation and leaves the dispatching composer's draft and cards intact.
|
|
50
50
|
|
|
51
51
|
### Compose it
|
|
52
52
|
|
|
@@ -77,7 +77,7 @@ This section explains how the command parses input and renders output; the obser
|
|
|
77
77
|
|
|
78
78
|
- **Grammar, not free text.** The parser recognizes only the exact control words (`clear`, `pause`, `resume`, `edit`) when they fill the whole input; every other non-empty suffix is an objective. `edit` alone is invalid, and `edit` refuses to replace an unfinished goal directly.
|
|
79
79
|
- **Domain rejections become stable errors.** `GoalError` outcomes are converted into direct command errors with a fixed message; unexpected failures rethrow so adapters report a command failure rather than a domain result. Rendered output never exposes branded ids or revisions.
|
|
80
|
-
- **Attachments
|
|
80
|
+
- **Attachments accompany the objective.** On a successful create or edit, the command submits one user followup carrying the admitted image and file blocks in selection order plus the fixed text `Reference attachments for the goal objective.` Every other path submits nothing, so the dispatching composer keeps the draft and cards.
|
|
81
81
|
|
|
82
82
|
### Source map
|
|
83
83
|
|
|
@@ -97,7 +97,7 @@ The command is a thin adapter over the goal domain; read these pages for the sta
|
|
|
97
97
|
|
|
98
98
|
- [Goal service](../goal/README.md) — the state and lifecycle the command mutates.
|
|
99
99
|
- [Commands service](../../interaction/commands/README.md) — the command registry contract and dispatch.
|
|
100
|
-
- [
|
|
100
|
+
- [Harness-level goal-execution Agent Note](../../../.agents/notes/implemented/feature/2026-07-16-harness-level-loop.md) — the UX and composition decisions.
|
|
101
101
|
|
|
102
102
|
-----
|
|
103
103
|
|
|
@@ -108,11 +108,11 @@ The command is a thin adapter over the goal domain; read these pages for the sta
|
|
|
108
108
|
|
|
109
109
|
#### What the model sees
|
|
110
110
|
|
|
111
|
-
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
|
|
111
|
+
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 attachments, the model sees one ordinary user message: the ordered image and file blocks followed by the text `Reference attachments for the goal objective.` It precedes the next goal round in session history.
|
|
112
112
|
|
|
113
113
|
#### Token effect
|
|
114
114
|
|
|
115
|
-
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
|
|
115
|
+
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 attachments add one ordinary user message with the normal text, image, and file-handle costs.
|
|
116
116
|
|
|
117
117
|
#### KV Cache effect
|
|
118
118
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-command-goal` 为用户提供基于持久 goal 服务的 `/goal` 命令:用户可以直接在 UI 中创建、编辑、暂停、恢复、清除并查看当前 goal,无需模型参与。命令在其 Cordis scope 中注册,因此读取该 scope 的命令适配器能发现并执行它;命令文本与输出都留在 UI
|
|
12
|
+
`dsh-command-goal` 为用户提供基于持久 goal 服务的 `/goal` 命令:用户可以直接在 UI 中创建、编辑、暂停、恢复、清除并查看当前 goal,无需模型参与。命令在其 Cordis scope 中注册,因此读取该 scope 的命令适配器能发现并执行它;命令文本与输出都留在 UI 中,绝不进入模型请求。每项被接受的变更都会通过 goal 服务的持久 `goal/change` 事件落盘。有序的图片与文件附件可以随 create 或 edit 一起提交,并以一条普通用户消息发出,供后续 Goal Round 读取。为挂载了命令适配器的交互式部署选择它;没有适配器的无头与自动化应用不需要它。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -44,9 +44,9 @@ kind: "package-reference"
|
|
|
44
44
|
|
|
45
45
|
只有控制词(`clear`、`pause`、`resume`、`edit`)占据完整输入时才被识别;其他任何非空后缀都是目标,因此 `/goal pause after verification` 会创建该字面目标。`edit` 内联接收替换内容,并拒绝直接替换未完成的 goal。可预期的领域拒绝会变成稳定的直接命令错误,不暴露带品牌类型的 id 或 revision;意外实现失败仍会让分发失败,使适配器能将其报告为命令失败。
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### 附件
|
|
48
48
|
|
|
49
|
-
`/goal`
|
|
49
|
+
`/goal` 声明附件支持。附件只随目标本身:create 或 edit 成功后,命令提交一条用户 followup 消息,按选择顺序携带已准入的图片块与文件块,再附加固定文本 `Reference attachments for the goal objective.`。后续 Goal Round 从普通会话历史读取这些内容,goal 领域不存储附件状态。其他任何子命令以及被拒绝的 create 或 edit,都会在领域变更前返回直接错误,并保留 composer 的草稿和附件卡。
|
|
50
50
|
|
|
51
51
|
### 组合方式
|
|
52
52
|
|
|
@@ -77,7 +77,7 @@ kind: "package-reference"
|
|
|
77
77
|
|
|
78
78
|
- **语法,而非自由文本。** 解析器只在控制词(`clear`、`pause`、`resume`、`edit`)填满整个输入时识别它们;其他任何非空后缀都是目标。单独的 `edit` 无效,且 `edit` 拒绝直接替换未完成的 goal。
|
|
79
79
|
- **领域拒绝变成稳定错误。** `GoalError` 结果会转换为带固定消息的直接命令错误;意外失败会重新抛出,使适配器报告命令失败而非领域结果。渲染输出绝不暴露带品牌类型的 id 或 revision。
|
|
80
|
-
-
|
|
80
|
+
- **附件随目标提交。** create 或 edit 成功时,命令提交一条用户 followup 消息,按选择顺序携带已准入的图片块与文件块,再附加固定文本 `Reference attachments for the goal objective.`。其他路径不提交消息,因此分发方 composer 保留草稿和附件卡。
|
|
81
81
|
|
|
82
82
|
### 源码地图
|
|
83
83
|
|
|
@@ -97,7 +97,7 @@ kind: "package-reference"
|
|
|
97
97
|
|
|
98
98
|
- [goal 服务](../goal/README.zh.md)——命令变更的状态与生命周期。
|
|
99
99
|
- [命令服务](../../interaction/commands/README.zh.md)——命令注册表约定与分发。
|
|
100
|
-
- [
|
|
100
|
+
- [Harness 层目标式执行 Agent Note](../../../.agents/notes/implemented/feature/2026-07-16-harness-level-loop.zh.md)——用户体验与组合决策。
|
|
101
101
|
|
|
102
102
|
-----
|
|
103
103
|
|
|
@@ -108,11 +108,11 @@ kind: "package-reference"
|
|
|
108
108
|
|
|
109
109
|
#### 模型看到的内容
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
斜杠输入、变更以及直接状态或错误输出不会进入模型请求。goal 领域把变更记录为 `goal/change`;已启用的同会话驱动器可以在后续续行提示词中暴露结果状态。呈现文本不会记录到日志中。当 create 或 edit 携带附件时,模型会看到一条普通用户消息:有序的图片块与文件块后跟文本 `Reference attachments for the goal objective.`。它在会话历史中位于下一个 Goal Round 之前。
|
|
112
112
|
|
|
113
113
|
#### Token 影响
|
|
114
114
|
|
|
115
|
-
读取状态、变更 goal 或收到直接命令错误不会增加模型 token。已启用的同会话驱动器可能增加后续 Goal Round
|
|
115
|
+
读取状态、变更 goal 或收到直接命令错误不会增加模型 token。已启用的同会话驱动器可能增加后续 Goal Round 提示词。目标携带的附件会增加一条普通用户消息,产生常规文本、图片和文件句柄成本。
|
|
116
116
|
|
|
117
117
|
#### KV Cache 影响
|
|
118
118
|
|
package/lib/index.js
CHANGED
|
@@ -89,8 +89,8 @@ function missingGoal(action) {
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
|
-
* Submit the invocation's admitted composer
|
|
93
|
-
* message ahead of the goal's next round. The
|
|
92
|
+
* Submit the invocation's admitted composer attachments as one model-visible user
|
|
93
|
+
* message ahead of the goal's next round. The attachments precede a fixed text
|
|
94
94
|
* block naming their role, so a later goal round reads them from ordinary
|
|
95
95
|
* session history without the goal domain storing attachment state.
|
|
96
96
|
*/
|
|
@@ -99,7 +99,7 @@ function submitObjectiveAttachments(invocation) {
|
|
|
99
99
|
invocation.agent.followup(createUserMessage({
|
|
100
100
|
content: [...invocation.attachments, {
|
|
101
101
|
type: "text",
|
|
102
|
-
text: "Reference
|
|
102
|
+
text: "Reference attachments for the goal objective."
|
|
103
103
|
}],
|
|
104
104
|
source: { kind: "user" }
|
|
105
105
|
}));
|
|
@@ -109,7 +109,7 @@ function executeGoalCommand(ctx, invocation) {
|
|
|
109
109
|
const command = parseGoalCommand(invocation.rawInput);
|
|
110
110
|
if (invocation.attachments.length > 0 && command.kind !== "create" && command.kind !== "edit") return {
|
|
111
111
|
kind: "error",
|
|
112
|
-
text: "
|
|
112
|
+
text: "Attachments only accompany a goal objective: /goal <objective> or /goal edit <objective>."
|
|
113
113
|
};
|
|
114
114
|
try {
|
|
115
115
|
const current = ctx.goals.get(invocation.agent);
|
|
@@ -176,7 +176,7 @@ function apply(ctx) {
|
|
|
176
176
|
description: "set or view the goal for a long-running task",
|
|
177
177
|
input: {
|
|
178
178
|
hint: "[<objective>|clear|edit <objective>|pause|resume]",
|
|
179
|
-
|
|
179
|
+
attachments: true
|
|
180
180
|
},
|
|
181
181
|
handler: (invocation) => executeGoalCommand(ctx, invocation)
|
|
182
182
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-command-goal",
|
|
3
3
|
"description": "Human-facing slash command for persisted same-session goals",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@deepseek-ai/dsh-
|
|
31
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
32
|
-
"@deepseek-ai/dsh-
|
|
30
|
+
"@deepseek-ai/dsh-commands": "^0.1.3-alpha.2",
|
|
31
|
+
"@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
|
|
32
|
+
"@deepseek-ai/dsh-goal": "^0.1.3-alpha.2",
|
|
33
33
|
"@deepseek-ai/cordis": "^4.0.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@deepseek-ai/dsh-agent": "^0.1.2-rc.1",
|
|
37
36
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.3",
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
37
|
+
"@deepseek-ai/dsh-agent": "^0.1.3-alpha.2",
|
|
38
|
+
"@deepseek-ai/dsh-commands": "^0.1.3-alpha.2",
|
|
39
|
+
"@deepseek-ai/dsh-goal": "^0.1.3-alpha.2",
|
|
40
|
+
"@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
|
|
42
41
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
43
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
42
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.3-alpha.2",
|
|
43
|
+
"@deepseek-ai/dsh-session": "^0.1.3-alpha.2"
|
|
44
44
|
}
|
|
45
45
|
}
|