@copylee/dsh-computer-use 0.2.2 → 0.4.0

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.
@@ -4,11 +4,23 @@ export interface CancellableAgent {
4
4
  kind: 'user';
5
5
  }): void;
6
6
  }
7
- export type HostWindowMode = 'card' | 'minimize' | 'keep';
7
+ export type HostWindowMode = 'pet' | 'card' | 'minimize' | 'keep';
8
+ /** The slice of a DSH assistant-stream frame the progress card reads. */
9
+ export interface StreamFrame {
10
+ type: string;
11
+ chunk?: {
12
+ type: string;
13
+ text?: string;
14
+ name?: string;
15
+ };
16
+ }
17
+ /** Markdown reduced to one plain line for the progress card. */
18
+ export declare function plainLine(text: string): string;
8
19
  export interface OverlaySettings {
9
20
  overlay: boolean;
10
21
  overlayLabel: string;
11
22
  hostWindow: HostWindowMode;
23
+ cardOpacity: number;
12
24
  userIdleMs: number;
13
25
  }
14
26
  interface DisplayRow {
@@ -41,6 +53,22 @@ export declare class OverlayController {
41
53
  private idleTimer;
42
54
  private hostWindows;
43
55
  private stopping;
56
+ /** Progress card lines: the reply as it streams, and what the agent is doing. */
57
+ private streamAgent;
58
+ private text;
59
+ private thinking;
60
+ /** Recent steps (tool actions), oldest first. */
61
+ private steps;
62
+ /** Whether the agent is thinking now (newer than the last step). */
63
+ private thinkingLatest;
64
+ private freshAttempt;
65
+ private pushTimer;
66
+ /** An instruction the user typed into the progress card. */
67
+ onMessage: ((agent: CancellableAgent, text: string) => void) | undefined;
68
+ /** Called when control starts (before the first action), e.g. to remember the window layout. */
69
+ onStart: (() => Promise<void>) | undefined;
70
+ /** Opacity the card was last given, to apply setting changes while it floats. */
71
+ private cardOpacity;
44
72
  /** Paused by Esc or the pill; actions wait until resumed. */
45
73
  paused: boolean;
46
74
  /** When the user last typed on the physical keyboard while the overlay was up (ms epoch). */
@@ -62,12 +90,25 @@ export declare class OverlayController {
62
90
  /** Called before every action: shows the overlay once and updates its status line. */
63
91
  begin(agent: CancellableAgent | undefined, status: string): Promise<void>;
64
92
  status(status: string): Promise<void>;
93
+ /** One more step on the card's timeline. */
94
+ private step;
95
+ /** Live model output (DSH agent/assistant-stream) for the progress card. */
96
+ stream(agent: unknown, frame: StreamFrame): void;
97
+ /** A tool of another plugin started (computer-use tools report their own steps). */
98
+ toolStarted(agent: unknown, name: string, detail: string): void;
99
+ private schedulePush;
65
100
  /** Agent finished (idle), was cancelled, or the plugin is stopping. */
66
101
  end(agent?: CancellableAgent): Promise<void>;
67
102
  private stop;
68
103
  private armIdle;
69
104
  /** Card: shrink the DSH window to an always-on-top corner card; minimize: get it out of the way. */
70
105
  private shrinkHost;
106
+ /**
107
+ * Pet mode minimizes DeepSeek Harness; if the user opens it again while the
108
+ * agent works, it floats as the see-through card instead of covering the
109
+ * screen (the agent neither sees nor clicks it).
110
+ */
111
+ private cardIfShown;
71
112
  private restoreHost;
72
113
  }
73
114
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@copylee/dsh-computer-use",
3
- "version": "0.2.2",
3
+ "version": "0.4.0",
4
4
  "description": "DeepSeek Harness Computer Use 插件(Windows):让 AI 看屏幕、点鼠标、敲键盘操控电脑;控制时屏幕泛起橙色光晕并显示“DeepSeek Harness 正在操控你的电脑”,按 Esc 暂停 / 继续。",
5
5
  "type": "module",
6
6
  "author": "copylee",
@@ -31,6 +31,7 @@
31
31
  "lib/types/**/*.d.ts",
32
32
  "helper/CuHelper.cs",
33
33
  "helper/deepseek-white.png",
34
+ "helper/deepseek-black.png",
34
35
  "cordis.patch.yml",
35
36
  "README.md",
36
37
  "LICENSE"