@deepseek-ai/dsh-computer-use 0.1.6-alpha.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/computer-use/computer-use/README.md
5
+ README.md: cd282a1f7450e07bc66290f79ae16ec369f09a95
6
+ README.zh.md: 872431d3a7b9790cc504f2fea289deb3550db78d
package/README.md ADDED
@@ -0,0 +1,89 @@
1
+ ---
2
+ description: "Computer-use provider registration for deployments that enable one desktop driver at a time."
3
+ kind: "package-reference"
4
+ ---
5
+
6
+ # @deepseek-ai/dsh-computer-use
7
+
8
+ English | [中文](README.zh.md)
9
+
10
+ ## Summary
11
+
12
+ A deployment can enable one computer-use provider at a time. Loading another provider fails with the registered provider name. Each provider supplies its own tools and desktop operations. This package adds no model-visible tools and does not coordinate concurrent Sessions.
13
+
14
+ ## Table of Contents
15
+
16
+ - [Use this package](#use-this-package)
17
+ - [Understand the implementation](#understand-the-implementation)
18
+ - [Further Exploration](#further-exploration)
19
+ - [Model Experience](#model-experience)
20
+ - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
21
+ - [Dev Note](#dev-note)
22
+
23
+ -----
24
+
25
+ <a id="use-this-package"></a>
26
+ ## Use this package
27
+
28
+ Mount the service once beside the chosen provider in a Cordis composition:
29
+
30
+ ```yaml
31
+ - name: '@deepseek-ai/dsh-computer-use'
32
+ ```
33
+
34
+ The service has no configuration. Provider plugins inject `computerUse` and call `ctx.computerUse.register(ComputerUseProviderName(name))`; the brand is exported from `@deepseek-ai/dsh-computer-use/brand`. The returned effect disposer releases that registration.
35
+
36
+ Providers stop admitting tool calls, close their resources, and await owned work before releasing the registration. `ctx.computerUse.providerName` reports the registered name until release.
37
+
38
+ -----
39
+
40
+ <a id="understand-the-implementation"></a>
41
+ ## Understand the implementation
42
+
43
+ <details>
44
+ <summary>Implementation internals — click to expand</summary>
45
+
46
+ One private name owns the slot. Cordis effects remove contributions when their plugin unloads; a repeated disposer cannot remove a later registration. The [source](src/index.ts) contains no driver object, operation interface, or provider selector.
47
+
48
+ No runtime invariant companion is published: the registry has one authoritative field and exposes no independently maintained observation that can diverge. Duplicate rejection and plugin disposal are covered by the owning tests.
49
+
50
+ </details>
51
+
52
+ -----
53
+
54
+ <a id="further-exploration"></a>
55
+ ## Further Exploration
56
+
57
+ - [Computer use](../../../docs/subsystems/computer-use.md) — provider selection and shared-desktop limits.
58
+ - [Cua Driver MCP provider](../../experimental/computer-use-cua-driver-mcp/README.md) — use an installed driver.
59
+ - [Cua Driver native provider](../../experimental/computer-use-cua-driver-native/README.md) — use the npm runtime.
60
+
61
+ -----
62
+
63
+ <a id="model-experience"></a>
64
+ ## Model Experience
65
+
66
+ None, as this registry only records provider names.
67
+
68
+ #### KV Cache effect
69
+
70
+ Registration does not alter model requests. Provider-owned tools and guidance determine their own request-prefix effects.
71
+
72
+ ## Known Limitations and Deferred Work
73
+
74
+ <a id="known-limitations-and-deferred-work"></a>
75
+
76
+ The service limits registrations within its Cordis service instance.
77
+
78
+ - **Shared desktop** — concurrent Sessions and separate DSH processes can operate the same desktop; callers coordinate whole computer-use workflows.
79
+ - **Provider selection** — configuration selects the provider; the model cannot switch registered drivers at runtime.
80
+
81
+ <a id="dev-note"></a>
82
+ ### Dev Note
83
+
84
+ <details>
85
+ <summary>Working context for maintainers — click to expand</summary>
86
+
87
+ None.
88
+
89
+ </details>
package/README.zh.md ADDED
@@ -0,0 +1,89 @@
1
+ ---
2
+ description: "计算机操作提供方注册:供每次启用一个桌面驱动的部署使用。"
3
+ kind: "package-reference"
4
+ ---
5
+
6
+ # @deepseek-ai/dsh-computer-use
7
+
8
+ [English](README.md) | 中文
9
+
10
+ ## 概述
11
+
12
+ 部署每次可启用一个计算机操作提供方。加载另一个提供方时会失败,并报告已注册的提供方名称。各提供方提供自己的工具和桌面操作。本包不添加模型可见工具,也不协调并发 Session。
13
+
14
+ ## 目录
15
+
16
+ - [使用本包](#use-this-package)
17
+ - [理解实现](#understand-the-implementation)
18
+ - [延伸阅读](#further-exploration)
19
+ - [模型体验](#model-experience)
20
+ - [已知限制与后续工作](#known-limitations-and-deferred-work)
21
+ - [开发备注](#dev-note)
22
+
23
+ -----
24
+
25
+ <a id="use-this-package"></a>
26
+ ## 使用本包
27
+
28
+ 在 Cordis 组合中,将服务与选定的提供方一起挂载一次:
29
+
30
+ ```yaml
31
+ - name: '@deepseek-ai/dsh-computer-use'
32
+ ```
33
+
34
+ 服务没有配置项。提供方插件注入 `computerUse` 并调用 `ctx.computerUse.register(ComputerUseProviderName(name))`;该品牌类型从 `@deepseek-ai/dsh-computer-use/brand` 导出。返回的 effect 清理函数释放此次注册。
35
+
36
+ 提供方先停止接收工具调用、关闭资源并等待自有工作结束,再释放注册。释放前,`ctx.computerUse.providerName` 始终报告已注册的名称。
37
+
38
+ -----
39
+
40
+ <a id="understand-the-implementation"></a>
41
+ ## 理解实现
42
+
43
+ <details>
44
+ <summary>实现细节 — 点击展开</summary>
45
+
46
+ 一个私有名称占用注册位置。Cordis effect 在插件卸载时移除贡献;重复调用清理函数不会移除后续注册。[源码](src/index.ts)不包含驱动对象、操作接口或提供方选择器。
47
+
48
+ 不发布 `./invariant` 伴随入口:注册表只有一个权威字段,没有可能与之分歧的独立维护观测值。所属测试覆盖重复注册拒绝和插件卸载。
49
+
50
+ </details>
51
+
52
+ -----
53
+
54
+ <a id="further-exploration"></a>
55
+ ## 延伸阅读
56
+
57
+ - [计算机操作](../../../docs/subsystems/computer-use.zh.md) — 提供方选择和共享桌面限制。
58
+ - [Cua Driver MCP 提供方](../../experimental/computer-use-cua-driver-mcp/README.zh.md) — 使用已安装的驱动。
59
+ - [Cua Driver 原生提供方](../../experimental/computer-use-cua-driver-native/README.zh.md) — 使用 npm 运行时。
60
+
61
+ -----
62
+
63
+ <a id="model-experience"></a>
64
+ ## 模型体验
65
+
66
+ 无,因为此注册表只记录提供方名称。
67
+
68
+ #### KV 缓存影响
69
+
70
+ 注册不改变模型请求。提供方拥有的工具和指导文本决定各自对请求前缀的影响。
71
+
72
+ ## 已知限制与后续工作
73
+
74
+ <a id="known-limitations-and-deferred-work"></a>
75
+
76
+ 服务在其 Cordis 服务实例内限制注册。
77
+
78
+ - **共享桌面** — 并发 Session 和独立 DSH 进程可以操作同一桌面;调用方协调完整的计算机操作流程。
79
+ - **提供方选择** — 由配置选择提供方;模型不能在运行时切换已注册的驱动。
80
+
81
+ <a id="dev-note"></a>
82
+ ### 开发备注
83
+
84
+ <details>
85
+ <summary>维护者工作背景 — 点击展开</summary>
86
+
87
+ 无。
88
+
89
+ </details>
package/lib/index.js ADDED
@@ -0,0 +1,35 @@
1
+ import { Service } from "@deepseek-ai/cordis";
2
+ //#region lib/types/index.js
3
+ /**
4
+ * Exclusive named registration for the computer-use capability.
5
+ * @module @deepseek-ai/dsh-computer-use
6
+ */
7
+ /** Owns one optional provider registration in the shared computer-use service. */
8
+ var ComputerUseRegistry = class extends Service {
9
+ registration;
10
+ constructor(ctx) {
11
+ super(ctx, "computerUse");
12
+ }
13
+ /** Name of the registered provider, including while its resources are closing. */
14
+ get providerName() {
15
+ return this.registration;
16
+ }
17
+ /**
18
+ * Reserve the sole provider slot until the contribution is disposed.
19
+ * A second registration fails even when it repeats the current name. Providers
20
+ * must stop their tools and await owned work before releasing this registration.
21
+ * @param name - provider-owned name used in registration diagnostics.
22
+ * @returns the effect disposer for this exact registration.
23
+ */
24
+ register(name) {
25
+ if (this.registration !== void 0) throw new Error(`computer use provider "${this.registration}" is already registered`);
26
+ return this.ctx.effect(() => {
27
+ this.registration = name;
28
+ return () => {
29
+ this.registration = void 0;
30
+ };
31
+ }, "computerUse.register()");
32
+ }
33
+ };
34
+ //#endregion
35
+ export { ComputerUseRegistry, ComputerUseRegistry as default };
@@ -0,0 +1,11 @@
1
+ /** Computer-use provider identities. @module @deepseek-ai/dsh-computer-use/brand */
2
+ import type { Branded } from '@deepseek-ai/dsh-brand';
3
+ /** Provider-owned name identifying a computer-use registration. */
4
+ export type ComputerUseProviderName = Branded<'ComputerUseProviderName'>;
5
+ /**
6
+ * Brand a provider-owned name without changing or validating it.
7
+ * @param name - name chosen by the provider implementation.
8
+ * @returns the same name with its computer-use provider brand.
9
+ */
10
+ export declare function ComputerUseProviderName(name: string): ComputerUseProviderName;
11
+ //# sourceMappingURL=brand.d.ts.map
@@ -0,0 +1,10 @@
1
+ /** Computer-use provider identities. @module @deepseek-ai/dsh-computer-use/brand */
2
+ /**
3
+ * Brand a provider-owned name without changing or validating it.
4
+ * @param name - name chosen by the provider implementation.
5
+ * @returns the same name with its computer-use provider brand.
6
+ */
7
+ export function ComputerUseProviderName(name) {
8
+ return name;
9
+ }
10
+ //# sourceMappingURL=brand.js.map
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Exclusive named registration for the computer-use capability.
3
+ * @module @deepseek-ai/dsh-computer-use
4
+ */
5
+ import { Context, Service } from '@deepseek-ai/cordis';
6
+ import type { ComputerUseProviderName } from './brand.ts';
7
+ declare module '@deepseek-ai/cordis' {
8
+ interface Context {
9
+ computerUse: ComputerUseRegistry;
10
+ }
11
+ }
12
+ /** Owns one optional provider registration in the shared computer-use service. */
13
+ export declare class ComputerUseRegistry extends Service {
14
+ private registration;
15
+ constructor(ctx: Context);
16
+ /** Name of the registered provider, including while its resources are closing. */
17
+ get providerName(): ComputerUseProviderName | undefined;
18
+ /**
19
+ * Reserve the sole provider slot until the contribution is disposed.
20
+ * A second registration fails even when it repeats the current name. Providers
21
+ * must stop their tools and await owned work before releasing this registration.
22
+ * @param name - provider-owned name used in registration diagnostics.
23
+ * @returns the effect disposer for this exact registration.
24
+ */
25
+ register(name: ComputerUseProviderName): () => Promise<void>;
26
+ }
27
+ export default ComputerUseRegistry;
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Exclusive named registration for the computer-use capability.
3
+ * @module @deepseek-ai/dsh-computer-use
4
+ */
5
+ import { Service } from '@deepseek-ai/cordis';
6
+ /** Owns one optional provider registration in the shared computer-use service. */
7
+ export class ComputerUseRegistry extends Service {
8
+ registration;
9
+ constructor(ctx) {
10
+ super(ctx, 'computerUse');
11
+ }
12
+ /** Name of the registered provider, including while its resources are closing. */
13
+ get providerName() {
14
+ return this.registration;
15
+ }
16
+ /**
17
+ * Reserve the sole provider slot until the contribution is disposed.
18
+ * A second registration fails even when it repeats the current name. Providers
19
+ * must stop their tools and await owned work before releasing this registration.
20
+ * @param name - provider-owned name used in registration diagnostics.
21
+ * @returns the effect disposer for this exact registration.
22
+ */
23
+ register(name) {
24
+ if (this.registration !== undefined) {
25
+ throw new Error(`computer use provider "${this.registration}" is already registered`);
26
+ }
27
+ return this.ctx.effect(() => {
28
+ this.registration = name;
29
+ return () => {
30
+ this.registration = undefined;
31
+ };
32
+ }, 'computerUse.register()');
33
+ }
34
+ }
35
+ export default ComputerUseRegistry;
36
+ //# sourceMappingURL=index.js.map
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@deepseek-ai/dsh-computer-use",
3
+ "description": "Exclusive named computer-use provider registration",
4
+ "version": "0.1.6-alpha.1",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/computer-use/computer-use"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./src/*": "./src/*",
22
+ "./package.json": "./package.json",
23
+ "./brand": {
24
+ "types": "./lib/types/brand.d.ts",
25
+ "default": "./lib/types/brand.js"
26
+ }
27
+ },
28
+ "files": [
29
+ "lib/index.js",
30
+ "lib/types/**/*.js",
31
+ "lib/types/**/*.d.ts"
32
+ ],
33
+ "license": "MIT",
34
+ "peerDependencies": {
35
+ "@deepseek-ai/dsh-brand": "^0.1.6-alpha.1",
36
+ "@deepseek-ai/cordis": "^4.0.2"
37
+ },
38
+ "devDependencies": {
39
+ "@deepseek-ai/dsh-brand": "^0.1.6-alpha.1",
40
+ "@deepseek-ai/cordis": "^4.0.2"
41
+ }
42
+ }