@linxin666/dsh-client-ui-browser-view 0.0.0-stage → 0.4.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.
@@ -0,0 +1,395 @@
1
+ /**
2
+ * The host-side browser service: one lazy Chrome, one tab per agent session,
3
+ * and the fan-out that keeps every attached panel in sync.
4
+ *
5
+ * Lifecycle. Chrome is not started when the plugin mounts — a plugin that
6
+ * launches a browser the moment the GUI loads spends a process on a feature
7
+ * nobody has opened. The first tool call or socket attach starts it, and a
8
+ * failed start is remembered as a panel message instead of being retried in a
9
+ * loop on every keystroke.
10
+ *
11
+ * Binding. `sessionId -> tabId` is the reason two agents never fight over one
12
+ * page: a tool call from session A reuses A's tab, creates one on first use, and
13
+ * leaves B's tab alone. Tab ids stay explicit arguments too, so a caller can
14
+ * address any open tab on purpose.
15
+ *
16
+ * Broadcast. Paths, once a socket is attached, are push-only: frames, state
17
+ * changes, and action traces go to every attached panel. The service never
18
+ * lets one dead socket break the fan-out — a throwing send drops that sink.
19
+ *
20
+ * @module @linxin666/dsh-client-ui-browser-view/host/service
21
+ */
22
+ import type { CdpTransport } from '../core/cdp.ts';
23
+ import { ChromeProcess } from '../core/chrome.ts';
24
+ import { TabManager, type ScreencastFrame } from '../core/tabs.ts';
25
+ import { type ActionOutcome, type ElementTarget } from '../core/actions.ts';
26
+ import { type BrowserConsoleEntry, type BrowserNetworkEntry, type BrowserPanelState, type BrowserSnapshot, type BrowserTabView, type BrowserViewCommand, type BrowserViewEvent } from '../core/protocol.ts';
27
+ /** One attached panel socket as the service sees it. */
28
+ export interface BrowserViewSink {
29
+ /** Deliver one event; a throw means the sink is gone. */
30
+ send(event: BrowserViewEvent): void;
31
+ /** Close the underlying transport. */
32
+ close(): void;
33
+ }
34
+ /** What the route layer needs from the service; tests stub this instead. */
35
+ export interface BrowserViewBackend {
36
+ /** The state the status route reports; safe to call before a browser exists. */
37
+ state(): BrowserPanelState;
38
+ /**
39
+ * Register one panel socket.
40
+ * @param sink - the socket adapter.
41
+ * @returns the detach function, called when the socket closes.
42
+ */
43
+ attach(sink: BrowserViewSink): () => void;
44
+ /**
45
+ * Run one validated panel command.
46
+ * @param sink - the socket that sent it.
47
+ * @param command - an already validated command.
48
+ */
49
+ handleCommand(sink: BrowserViewSink, command: BrowserViewCommand): Promise<void>;
50
+ }
51
+ /** One running browser plus the tab manager over it. */
52
+ export interface BrowserSession {
53
+ /** Protocol transport the tabs and the actions share. */
54
+ transport: CdpTransport;
55
+ /** Tabs of this browser. */
56
+ tabs: TabManager;
57
+ /** The Chrome process; absent when a test supplied its own session. */
58
+ chrome?: ChromeProcess;
59
+ /** Stop everything this session owns. */
60
+ dispose(): Promise<void>;
61
+ }
62
+ /** Construction options. */
63
+ export interface BrowserViewServiceOptions {
64
+ /** JPEG quality for frames and screenshots. @default DEFAULT_JPEG_QUALITY */
65
+ jpegQuality?: number;
66
+ /** Viewport pinned on every tab. @default DEFAULT_VIEWPORT */
67
+ viewport?: {
68
+ width: number;
69
+ height: number;
70
+ };
71
+ /** Clock for action traces. @default Date.now */
72
+ now?: () => number;
73
+ /**
74
+ * Mints the process launch-token URL for one clean URL, or returns
75
+ * undefined when the host mounts no such seam. Resolved per navigation by
76
+ * the loader from `ctx.get('connection')`; absent here means no auth top-up.
77
+ */
78
+ authenticatedUrl?: (url: string) => string | undefined;
79
+ /** Browser factory, replaced by tests. */
80
+ openSession?: (options: {
81
+ jpegQuality: number;
82
+ viewport: {
83
+ width: number;
84
+ height: number;
85
+ };
86
+ onFrame: (frame: ScreencastFrame) => void;
87
+ onTabsChanged: () => void;
88
+ }) => Promise<BrowserSession>;
89
+ }
90
+ /**
91
+ * The plugin's single browser service.
92
+ */
93
+ export declare class BrowserViewService implements BrowserViewBackend {
94
+ private readonly jpegQuality;
95
+ private readonly viewport;
96
+ private readonly now;
97
+ private readonly openSession;
98
+ private readonly authenticatedUrl;
99
+ private readonly sinks;
100
+ private readonly bindings;
101
+ /**
102
+ * Tabs whose one auth top-up for the current navigation is already spent.
103
+ * This is what stops a retry that did not clear the challenge from
104
+ * navigating again; it is reset when the navigation ends.
105
+ */
106
+ private readonly authTopUpSpent;
107
+ private session;
108
+ /**
109
+ * The tab the attached panels watch. Kept beside the tab manager instead of
110
+ * read from it because "the page the panel shows" and "the page most recently
111
+ * created" are different facts: a panel that follows the agent must NOT move
112
+ * to a tab an explicit selection pinned it to, while the tab manager still
113
+ * has to know about every tab that exists.
114
+ */
115
+ private displayedTabId;
116
+ /**
117
+ * Whether a person chose the watched tab in the panel. Until that happens the
118
+ * panels follow whatever the agent drives; afterwards they never steal it.
119
+ */
120
+ private selectionPinned;
121
+ private opening;
122
+ private openingTab;
123
+ private lastError;
124
+ private disposed;
125
+ /**
126
+ * @param options - quality, viewport, clock, and the browser factory seam.
127
+ */
128
+ constructor(options?: BrowserViewServiceOptions);
129
+ /** Whether a browser is currently running. */
130
+ get running(): boolean;
131
+ /** The current panel-facing state; safe to call before anything started. */
132
+ state(): BrowserPanelState;
133
+ /**
134
+ * Register one panel socket and start the stream it wants.
135
+ * @param sink - socket adapter.
136
+ * @returns the detach function.
137
+ */
138
+ attach(sink: BrowserViewSink): () => void;
139
+ /**
140
+ * Run one validated panel command.
141
+ * @param sink - the sending socket.
142
+ * @param command - validated command.
143
+ */
144
+ handleCommand(sink: BrowserViewSink, command: BrowserViewCommand): Promise<void>;
145
+ /**
146
+ * Close one tab, drop every binding that pointed at it, and let the panels
147
+ * fall back when the tab they were watching is the one that went away.
148
+ *
149
+ * Bindings are forgotten before the target goes, so a later tool call cannot
150
+ * resurrect a tab somebody deliberately closed.
151
+ * @param tabId - tab to close.
152
+ */
153
+ closeTab(tabId: string): Promise<void>;
154
+ /**
155
+ * Close the tabs one agent session opened, and nothing else.
156
+ *
157
+ * Ownership is read off the tab record rather than the binding map: a session
158
+ * may have driven somebody else's tab through an explicit `tabId`, and that
159
+ * must not make the tab its own to destroy. A caller that names a tab it does
160
+ * not own is refused with the reason instead of being quietly ignored, because
161
+ * a cleanup that reports success while closing nothing is worse than an error.
162
+ *
163
+ * A session with no tab of its own, or a host with no browser running yet,
164
+ * closes nothing and succeeds: cleanup is the one call that must be safe to
165
+ * make unconditionally.
166
+ * @param sessionId - calling agent session; absent means no ownership basis.
167
+ * @param tabId - one tab to close; omitted closes every tab this session owns.
168
+ * @returns ids of the tabs actually closed, in close order.
169
+ */
170
+ closeOwnTabs(sessionId: string | undefined, tabId?: string): Promise<string[]>;
171
+ /**
172
+ * Resolve the tab a tool call from `sessionId` should act on.
173
+ *
174
+ * The order is a safety property, not a preference. An agent that lands on
175
+ * the tab the panel happens to be showing destroys whatever the user was
176
+ * looking at, so the watched tab is only ever a last resort:
177
+ *
178
+ * 1. the tab the caller named,
179
+ * 2. the tab this session created or last worked in,
180
+ * 3. the watched tab, but only while no other session owns it,
181
+ * 4. otherwise a tab of its own.
182
+ *
183
+ * Step 3 exists for the case where the user opened a page nobody is driving
184
+ * (they navigated or selected it themselves); step 3's ownership guard is
185
+ * what keeps a bystander session from taking over a page another session
186
+ * owns — the exact way the watched page used to be lost.
187
+ * @param sessionId - calling agent session, when the host provides one.
188
+ * @param tabId - explicit tab from the tool arguments.
189
+ * @returns the tab view.
190
+ */
191
+ tabFor(sessionId: string | undefined, tabId?: string): Promise<BrowserTabView>;
192
+ /**
193
+ * Whether a tab is bound to some other session.
194
+ * @param tabId - the tab being considered.
195
+ * @param sessionId - the asking session, which does not count as other.
196
+ * @returns true when another session already drives this tab.
197
+ */
198
+ private ownedByOtherSession;
199
+ /**
200
+ * Get (or lazily create) the tab bound to one session.
201
+ * @param sessionId - calling agent session.
202
+ * @returns the tab view.
203
+ */
204
+ ensureTab(sessionId?: string): Promise<BrowserTabView>;
205
+ /** Create a tab, bind it, and make it the one the panel watches. */
206
+ private createBoundTab;
207
+ /**
208
+ * Open one additional tab for a session, deliberately without the
209
+ * first-use deduplication {@link ensureTab} applies: asking for a new tab is
210
+ * what the caller wants, so two calls must produce two tabs.
211
+ * @param sessionId - calling agent session.
212
+ * @returns the new tab view, now the session's bound tab and the panel's active one.
213
+ */
214
+ private openTab;
215
+ /**
216
+ * Navigate a tab and trace the action.
217
+ * @param sessionId - calling agent session.
218
+ * @param url - destination.
219
+ * @param tabId - explicit tab, when the caller named one.
220
+ * @param options - `newTab` opens an additional tab instead of reusing one.
221
+ * @returns the action outcome plus the resulting tab view.
222
+ */
223
+ navigate(sessionId: string | undefined, url: string, tabId?: string, options?: {
224
+ newTab?: boolean;
225
+ }): Promise<{
226
+ outcome: ActionOutcome;
227
+ tab: BrowserTabView;
228
+ }>;
229
+ /**
230
+ * Give a loopback navigation that landed on DSH's own authentication page
231
+ * one launch-token retry.
232
+ *
233
+ * The token rides the URL, and DSH answers the site root with a 303 to the
234
+ * clean address plus the `dsh-auth-<authority>` cookie, so the retried
235
+ * request is served normally. This is an enhancement, never a dependency: a
236
+ * host that mounts no connection service, a seam that throws, and a page
237
+ * that is still the challenge afterwards all end here without an error and
238
+ * leave the navigation result exactly as it is.
239
+ * @param tabId - tab the navigation ran in.
240
+ * @param url - the URL the caller asked for.
241
+ */
242
+ private topUpAuthTicket;
243
+ /**
244
+ * The ticketed URL for this navigation, or undefined when no retry applies.
245
+ * @param tabId - tab the navigation ran in.
246
+ * @param url - the URL the caller asked for.
247
+ * @returns the URL to retry with, or undefined.
248
+ */
249
+ private authTicketUrl;
250
+ /**
251
+ * Whether the tab's current document is DSH's authentication page. Reading
252
+ * the document is best-effort: a tab that refuses the script, or reports
253
+ * something other than text, simply does not match.
254
+ * @param tabId - tab to read.
255
+ * @returns true when the page body is the challenge.
256
+ */
257
+ private documentShowsAuthChallenge;
258
+ /**
259
+ * Click in a tab and trace the action.
260
+ * @param sessionId - calling agent session.
261
+ * @param target - ref, selector, or coordinates.
262
+ * @param tabId - explicit tab.
263
+ * @returns the recorded outcome.
264
+ */
265
+ click(sessionId: string | undefined, target: ElementTarget, tabId?: string): Promise<ActionOutcome>;
266
+ /**
267
+ * Type into a tab and trace the action.
268
+ * @param sessionId - calling agent session.
269
+ * @param text - text to insert.
270
+ * @param target - optional element to focus first.
271
+ * @param tabId - explicit tab.
272
+ * @returns the recorded outcome.
273
+ */
274
+ type(sessionId: string | undefined, text: string, target?: ElementTarget, tabId?: string): Promise<ActionOutcome>;
275
+ /**
276
+ * Press one key and trace the action.
277
+ * @param sessionId - calling agent session.
278
+ * @param key - key name or single character.
279
+ * @param tabId - explicit tab.
280
+ * @returns the recorded outcome.
281
+ */
282
+ press(sessionId: string | undefined, key: string, tabId?: string): Promise<ActionOutcome>;
283
+ /**
284
+ * Scroll a tab and trace the action.
285
+ * @param sessionId - calling agent session.
286
+ * @param delta - scroll distance.
287
+ * @param tabId - explicit tab.
288
+ * @returns the recorded outcome.
289
+ */
290
+ scroll(sessionId: string | undefined, delta: {
291
+ deltaX?: number;
292
+ deltaY?: number;
293
+ x?: number;
294
+ y?: number;
295
+ }, tabId?: string): Promise<ActionOutcome>;
296
+ /**
297
+ * Walk the tab's DOM and remember the ref map for later clicks.
298
+ * @param sessionId - calling agent session.
299
+ * @param tabId - explicit tab.
300
+ * @returns the snapshot the model sees.
301
+ */
302
+ snapshot(sessionId: string | undefined, tabId?: string): Promise<BrowserSnapshot>;
303
+ /**
304
+ * Capture one JPEG of the tab.
305
+ * @param sessionId - calling agent session.
306
+ * @param tabId - explicit tab.
307
+ * @returns the tab and the base64 JPEG.
308
+ */
309
+ screenshot(sessionId: string | undefined, tabId?: string): Promise<{
310
+ tabId: string;
311
+ url: string;
312
+ title: string;
313
+ data: string;
314
+ }>;
315
+ /**
316
+ * Console entries of one tab, newest last.
317
+ * @param sessionId - calling agent session.
318
+ * @param limit - maximum trailing entries to return.
319
+ * @param tabId - explicit tab.
320
+ * @returns the entries.
321
+ */
322
+ console(sessionId: string | undefined, limit?: number, tabId?: string): Promise<{
323
+ tabId: string;
324
+ entries: BrowserConsoleEntry[];
325
+ }>;
326
+ /**
327
+ * Network entries of one tab, newest last.
328
+ * @param sessionId - calling agent session.
329
+ * @param limit - maximum trailing entries to return.
330
+ * @param tabId - explicit tab.
331
+ * @returns the entries.
332
+ */
333
+ network(sessionId: string | undefined, limit?: number, tabId?: string): Promise<{
334
+ tabId: string;
335
+ entries: BrowserNetworkEntry[];
336
+ }>;
337
+ /** Open tabs, for `browser_tabs`. */
338
+ listTabs(): Promise<{
339
+ tabs: BrowserTabView[];
340
+ activeTabId: string | null;
341
+ }>;
342
+ /** Push one event to every attached panel, dropping sockets that fail. */
343
+ broadcast(event: BrowserViewEvent): void;
344
+ /**
345
+ * Tear everything down: stop pushing, stop streaming, close the socket, kill
346
+ * the browser.
347
+ * @returns once every owned resource is released.
348
+ */
349
+ dispose(): Promise<void>;
350
+ /** The action helpers' collaborator view: one transport, one tab manager. */
351
+ private scope;
352
+ /** The protocol transport of the running session. */
353
+ private transport;
354
+ /** Resolve the live session or start one. */
355
+ private requireTabs;
356
+ /** Resolve the live session, starting the browser on first use. */
357
+ private requireSession;
358
+ /** Start the browser once, recording failures for the panel. */
359
+ private startSession;
360
+ /** Start the screencast for the tab the panel watches. */
361
+ private startStreaming;
362
+ /** Stop streaming when nobody is watching. */
363
+ private stopStreaming;
364
+ /**
365
+ * The tab the panels currently watch: an explicit choice while that tab
366
+ * still exists, otherwise the newest tab, so a panel is never left pointing
367
+ * at a tab that no longer exists.
368
+ * @returns the watched tab id, or null when nothing is open.
369
+ */
370
+ private displayedOrDefault;
371
+ /**
372
+ * Show one tab to the panels and move the screencast with it.
373
+ * @param tabId - the tab to watch, or null when the last one closed.
374
+ */
375
+ private showTab;
376
+ /**
377
+ * Let the panels follow an agent action unless a person pinned a tab.
378
+ * @param tabId - the tab the agent just used.
379
+ */
380
+ private focusFollowed;
381
+ /**
382
+ * Show the tab a panel's own session already owns, if it has one.
383
+ *
384
+ * Deliberately creates and binds nothing: an attaching panel observes. A
385
+ * session without a tab keeps following the page the agent is driving.
386
+ * @param sessionId - the session the panel belongs to.
387
+ */
388
+ private followPanelSession;
389
+ /** Broadcast one readable action trace and return it as the tool outcome. */
390
+ private trace;
391
+ /** Re-read one tab after a navigation changed its url. */
392
+ private refreshTab;
393
+ /** Report a failure to the panels without throwing at the caller. */
394
+ private fail;
395
+ }
@@ -0,0 +1,64 @@
1
+ /**
2
+ * The eleven agent tools over the browser service.
3
+ *
4
+ * Shape of a result. Every tool but `browser_screenshot` returns structured
5
+ * JSON, rendered as one pretty-printed text block: the model reads fields, not
6
+ * prose, and the GUI can present the same value later. `browser_screenshot`
7
+ * returns a real image part — an `ImageBlock` carrying a durable attachment
8
+ * reference — because a JPEG smuggled in as base64 text is not an image to any
9
+ * model that can see one.
10
+ *
11
+ * The screenshot path therefore needs the host's attachment service: the bytes
12
+ * are committed through it, and the block only carries the reference. The
13
+ * dependency is injected ({@link BrowserToolDeps.saveImage}) rather than read
14
+ * from the context here, so these tools stay testable without a host.
15
+ *
16
+ * Why the descriptions are long: a model that does not know a `ref` expires
17
+ * with its observation will happily click a stale one and report success. The
18
+ * snapshot-first rule is the single most important sentence in this file, so it
19
+ * appears in both tools that depend on it.
20
+ *
21
+ * @module @linxin666/dsh-client-ui-browser-view/host/tools
22
+ */
23
+ import type { ToolDefinition } from '@deepseek-ai/dsh-tools';
24
+ import type { BrowserViewService } from './service.ts';
25
+ /** A durable image reference as the attachment service returns it. */
26
+ export interface DurableImageRef {
27
+ /** Attachment id, unique within the host's attachment store. */
28
+ attachmentId: string;
29
+ /** Media type of the stored image. */
30
+ mediaType: string;
31
+ /** Stored byte length. */
32
+ bytes: number;
33
+ /** Stored pixel width. */
34
+ width: number;
35
+ /** Stored pixel height. */
36
+ height: number;
37
+ /** Display name, when the store keeps one. */
38
+ name?: string;
39
+ }
40
+ /** What the tools need from the host. */
41
+ export interface BrowserToolDeps {
42
+ /** The browser service every tool drives. */
43
+ service: BrowserViewService;
44
+ /**
45
+ * Commit one JPEG to the host's durable attachment store.
46
+ *
47
+ * Absent when the composing host mounts no attachment service; the screenshot
48
+ * tool then refuses with an explanation instead of returning text pretending
49
+ * to be an image.
50
+ */
51
+ saveImage?: (input: {
52
+ data: Uint8Array;
53
+ mediaType: 'image/jpeg';
54
+ name?: string;
55
+ }) => Promise<DurableImageRef>;
56
+ }
57
+ /**
58
+ * Build every browser tool against one service.
59
+ * @param deps - the service plus the optional attachment sink.
60
+ * @returns the tool definitions, in registration order.
61
+ */
62
+ export declare function createBrowserTools(deps: BrowserToolDeps): ToolDefinition[];
63
+ /** Names of every tool this plugin registers, in registration order. */
64
+ export declare const BROWSER_TOOL_NAMES: readonly ["browser_navigate", "browser_click", "browser_type", "browser_press", "browser_scroll", "browser_snapshot", "browser_screenshot", "browser_console", "browser_network", "browser_tabs", "browser_close"];
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Host loader entry for the browser-view plugin — runs in the DSH host process.
3
+ *
4
+ * Mounts three surfaces and nothing else:
5
+ *
6
+ * - the status route and the panel WebSocket under /api/dsh-browser-view,
7
+ * - the ten `browser_*` agent tools,
8
+ * - one lazily started Chromium that both share (src/host/service.ts).
9
+ *
10
+ * No system-prompt announcement: the repository requires an `announceToAgent`
11
+ * switch (default off) before a plugin injects anything into every agent's
12
+ * prompt, and this version ships no announcement at all, so there is no switch
13
+ * to add yet. The tools describe themselves.
14
+ *
15
+ * Shutdown order matters: the service stops broadcasting and closes the panel
16
+ * sockets first, then stops the screencast, then kills Chrome. A panel that
17
+ * received a frame from an already-dying browser would show a frozen image and
18
+ * no reason for it.
19
+ *
20
+ * @module @linxin666/dsh-client-ui-browser-view
21
+ */
22
+ import type { Context } from '@deepseek-ai/cordis';
23
+ /** Stable cordis plugin name. */
24
+ export declare const name = "browser-view";
25
+ /** Services required before the routes and the tools can mount. */
26
+ export declare const inject: string[];
27
+ /**
28
+ * Mount the routes, the tools, and the browser lifetime.
29
+ * @param ctx - host plugin context carrying webServer and tools.
30
+ */
31
+ export declare function apply(ctx: Context): void;
package/package.json CHANGED
@@ -1,6 +1,84 @@
1
1
  {
2
2
  "name": "@linxin666/dsh-client-ui-browser-view",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Right-docked live browser view for the DSH Web GUI: a CDP-driven Chromium the agent operates, a screencast panel the user watches, and screenshots attached to every tool result.",
4
+ "version": "0.4.10",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/types/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./client": {
14
+ "types": "./lib/types/client/index.d.ts",
15
+ "default": "./lib/client.js"
16
+ },
17
+ "./src/*": "./src/*",
18
+ "./package.json": "./package.json"
19
+ },
20
+ "dsh": {
21
+ "engines": {
22
+ "dsh": ">=0.2.1-rc.3"
23
+ },
24
+ "bundle": {
25
+ "patch": "./cordis.patch.yml"
26
+ },
27
+ "client": {
28
+ "inject": [
29
+ "@deepseek-ai/dsh-client-ui-slots",
30
+ "@deepseek-ai/dsh-client-ui-renderer",
31
+ "@deepseek-ai/dsh-client-ui-layout",
32
+ "@deepseek-ai/dsh-client-ui-sidebar-right",
33
+ "@deepseek-ai/dsh-client-locale"
34
+ ],
35
+ "platform": "web"
36
+ }
37
+ },
38
+ "dependencies": {
39
+ "ws": "^8.18.0"
40
+ },
41
+ "peerDependencies": {
42
+ "@deepseek-ai/dsh": ">=0.2.1-rc.3",
43
+ "react": "^18.2.0",
44
+ "react-dom": "^18.2.0"
45
+ },
46
+ "devDependencies": {
47
+ "@deepseek-ai/cordis": "^4.0.5",
48
+ "@deepseek-ai/dsh-client-locale": "^0.2.1-rc.3",
49
+ "@deepseek-ai/dsh-client-ui-layout": "^0.2.1-rc.3",
50
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.2.1-rc.3",
51
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.2.1-rc.3",
52
+ "@deepseek-ai/dsh-client-ui-sidebar-right": "^0.2.1-rc.3",
53
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.1-rc.3",
54
+ "@deepseek-ai/dsh-host-webserver": "^0.2.1-rc.3",
55
+ "@deepseek-ai/dsh-system-prompt": "^0.2.1-rc.3",
56
+ "@deepseek-ai/dsh-tools": "^0.2.1-rc.3",
57
+ "@deepseek-ai/schemastery": "^3.18.5",
58
+ "@types/node": "^22.20.0",
59
+ "@types/react": "~18.3.1",
60
+ "@types/react-dom": "^18.3.5",
61
+ "@types/ws": "^8.5.13",
62
+ "jsdom": "29.1.1",
63
+ "react": "^18.3.1",
64
+ "react-dom": "^18.3.1",
65
+ "tsdown": "0.22.2",
66
+ "typescript": "~5.7.2",
67
+ "vite-tsconfig-paths": "^6.1.1",
68
+ "vitest": "^4.1.8"
69
+ },
70
+ "files": [
71
+ "lib",
72
+ "cordis.patch.yml",
73
+ "README.md",
74
+ "README.zh.md",
75
+ "README.i18n.yaml"
76
+ ],
77
+ "license": "BSD-3-Clause",
78
+ "scripts": {
79
+ "build": "tsc -p tsconfig.build.json && tsdown",
80
+ "watch": "tsdown --watch",
81
+ "test": "vitest run",
82
+ "typecheck": "tsgo --noEmit"
83
+ }
6
84
  }