paseo-dsh-direct 0.2.9 → 0.2.10

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.md CHANGED
@@ -33,7 +33,7 @@ Most dsh integrations go through ACP, a generic protocol that every agent can sp
33
33
  - Your existing dsh sessions can be imported and resumed in Paseo.
34
34
  - dsh's slash commands (`/compact`, `/plan`, ...) appear in Paseo's `/` menu.
35
35
  - Paseo's usage meter shows dsh's token counts and how full the context window is.
36
- - Goal changes, plan mode switches and permission preset changes show up in the conversation as small timeline cards.
36
+ - Goal changes that dsh does not already report in a `/goal` command's own output, plan mode switches and permission preset changes show up in the conversation as small timeline cards.
37
37
 
38
38
  ## Versioning
39
39
 
package/README.zh.md CHANGED
@@ -33,7 +33,7 @@ paseo plugin update paseo-dsh-direct --yes # 更新到最新
33
33
  - 已有的 dsh 会话可以导入 Paseo 接着用。
34
34
  - dsh 的斜杠命令(`/compact`、`/plan` 等)出现在 Paseo 的 `/` 菜单里。
35
35
  - Paseo 的用量表显示 dsh 的 token 用量和上下文占用。
36
- - 目标变化、计划模式切换和权限预设变化会在对话里显示为小的时间线卡片。
36
+ - 目标变化(dsh 自己在 `/goal` 命令输出里已报告的除外)、计划模式切换和权限预设变化会在对话里显示为小的时间线卡片。
37
37
 
38
38
  ## 版本号
39
39
 
@@ -5,9 +5,9 @@ import { useRef } from "react";
5
5
  import { DSH_SETTINGS } from "../shared/settings.js";
6
6
 
7
7
  const EXECUTABLE_HINT =
8
- "Path or command of dsh. PASEO_DSH_EXECUTABLE overrides this; leave it empty to use the Paseo provider command or dsh on PATH. Changes apply to new sessions.";
8
+ "Path or command of dsh. PASEO_DSH_EXECUTABLE overrides this; leave it empty to use the Paseo provider command or dsh on PATH.";
9
9
  const PROFILE_HINT =
10
- 'Name of the dsh profile to launch. PASEO_DSH_PROFILE overrides this; leave it empty to use the "paseo" profile. Changes apply to new sessions.';
10
+ 'Name of the dsh profile to launch. PASEO_DSH_PROFILE overrides this; leave it empty to use the "paseo" profile.';
11
11
 
12
12
  /** Edits the dsh executable and profile that the server reads when it launches a bridge. */
13
13
  export default function DshSettingsScreen() {
@@ -88,8 +88,8 @@ export default function DshSettingsScreen() {
88
88
  disabled={settings.saving}
89
89
  />
90
90
  <SettingsAction
91
- label="Save"
92
- hint={settings.saveError ?? undefined}
91
+ label="Apply settings"
92
+ hint={settings.saveError ?? "Changes apply to new sessions."}
93
93
  error={settings.saveError}
94
94
  actionLabel={settings.saving ? "Saving" : "Save"}
95
95
  onPress={save}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paseo-dsh-direct",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "DeepSeek Harness Direct Provider Plugin for Paseo",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,6 +35,8 @@ export class TimelineProjector {
35
35
  private planActive = false;
36
36
  private lastPreset: string | undefined;
37
37
  private readonly goals = new Map<string, { objective?: string; maxRounds?: number }>();
38
+ /** Ids of `/goal` commands between their `command/run` and `command/done`; dsh prints their result itself. */
39
+ private readonly goalCommands = new Set<string>();
38
40
 
39
41
  /**
40
42
  * @param paseoSessionId Paseo session id stamped on every projected event.
@@ -59,6 +61,8 @@ export class TimelineProjector {
59
61
  options: { clientMessageId?: string } = {},
60
62
  ): SessionEvent[] {
61
63
  const timestamp = toTimestamp(event.time);
64
+ // A `/goal` command whose `command/done` never arrived is over once any of these later events appears.
65
+ if (["command/run", "user/message", "turn/start", "turn/end"].includes(event.type)) this.goalCommands.clear();
62
66
  switch (event.type) {
63
67
  case "user/message":
64
68
  return [
@@ -149,6 +153,7 @@ export class TimelineProjector {
149
153
  const commandId = stringValue(data.commandId);
150
154
  const name = stringValue(data.name);
151
155
  if (!commandId || !name) return [];
156
+ if (name === "goal") this.goalCommands.add(commandId);
152
157
  const id = `command:${commandId}`;
153
158
  // `args` keeps DSH's raw separator whitespace after the command name.
154
159
  const text = `/${name}${stringValue(data.args) ?? ""}`;
@@ -165,6 +170,7 @@ export class TimelineProjector {
165
170
  const data = event.data;
166
171
  const commandId = stringValue(data.commandId);
167
172
  const message = stringValue(data.text);
173
+ if (commandId) this.goalCommands.delete(commandId);
168
174
  if (!commandId || !message) return [];
169
175
  return [
170
176
  this.notice(`command-done:${commandId}`, data.kind === "error" ? "error" : "info", message, timestamp),
@@ -258,7 +264,8 @@ export class TimelineProjector {
258
264
  }
259
265
  } else if (event.type === "goal/change") {
260
266
  const card = this.goalChangeCard(data);
261
- if (card) cards.push({ id: `goal:${event.seq}`, kind: CARD_KINDS.goal, data: { ...card } });
267
+ // A change made while a `/goal` command runs is already reported by that command's own output.
268
+ if (card && this.goalCommands.size === 0) cards.push({ id: `goal:${event.seq}`, kind: CARD_KINDS.goal, data: { ...card } });
262
269
  } else if (event.type === "user/message") {
263
270
  const source = objectValue(data.source);
264
271
  const round = numberValue(source?.round);