@deepseek-ai/dsh-computer-use 0.2.2-rc.1 → 0.2.2-rc.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/brand.ts"],"names":[],"mappings":"AAAA,oFAAoF;AAEpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAErD,mEAAmE;AACnE,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAA;AAExE;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,uBAAuB,CAE7E"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brand.js","sourceRoot":"","sources":["../../src/brand.ts"],"names":[],"mappings":"AAAA,oFAAoF;AAOpF;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,OAAO,IAA+B,CAAA;AACxC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAEzD,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf,WAAW,EAAE,mBAAmB,CAAA;KACjC;CACF;AAED,kFAAkF;AAClF,qBAAa,mBAAoB,SAAQ,OAAO;IAC9C,OAAO,CAAC,YAAY,CAAqC;gBAE7C,GAAG,EAAE,OAAO;IAIxB,kFAAkF;IAClF,IAAI,YAAY,IAAI,uBAAuB,GAAG,SAAS,CAEtD;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,uBAAuB,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC;CAW7D;AAED,eAAe,mBAAmB,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAW,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAStD,kFAAkF;AAClF,MAAM,OAAO,mBAAoB,SAAQ,OAAO;IACtC,YAAY,CAAqC;IAEzD,YAAY,GAAY;QACtB,KAAK,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;IAC3B,CAAC;IAED,kFAAkF;IAClF,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,IAA6B;QACpC,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,0BAA0B,IAAI,CAAC,YAAY,yBAAyB,CAAC,CAAA;QACvF,CAAC;QACD,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE;YAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;YACxB,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,YAAY,GAAG,SAAS,CAAA;YAC/B,CAAC,CAAA;QACH,CAAC,EAAE,wBAAwB,CAAC,CAAA;IAC9B,CAAC;CACF;AAED,eAAe,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-computer-use",
3
3
  "description": "Exclusive named computer-use provider registration",
4
- "version": "0.2.2-rc.1",
4
+ "version": "0.2.2-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -30,15 +30,18 @@
30
30
  "locale/*.json",
31
31
  "lib/index.js",
32
32
  "lib/types/**/*.js",
33
- "lib/types/**/*.d.ts"
33
+ "lib/types/**/*.d.ts",
34
+ "lib/types/**/*.d.ts.map",
35
+ "lib/**/*.js.map",
36
+ "src"
34
37
  ],
35
38
  "license": "MIT",
36
39
  "peerDependencies": {
37
40
  "@deepseek-ai/cordis": "~4.1.0",
38
- "@deepseek-ai/dsh-brand": "0.2.2-rc.1"
41
+ "@deepseek-ai/dsh-brand": "0.2.2-rc.2"
39
42
  },
40
43
  "devDependencies": {
41
44
  "@deepseek-ai/cordis": "~4.1.0",
42
- "@deepseek-ai/dsh-brand": "0.2.2-rc.1"
45
+ "@deepseek-ai/dsh-brand": "0.2.2-rc.2"
43
46
  }
44
47
  }
package/src/brand.ts ADDED
@@ -0,0 +1,15 @@
1
+ /** Computer-use provider identities. @module @deepseek-ai/dsh-computer-use/brand */
2
+
3
+ import type { Branded } from '@deepseek-ai/dsh-brand'
4
+
5
+ /** Provider-owned name identifying a computer-use registration. */
6
+ export type ComputerUseProviderName = Branded<'ComputerUseProviderName'>
7
+
8
+ /**
9
+ * Brand a provider-owned name without changing or validating it.
10
+ * @param name - name chosen by the provider implementation.
11
+ * @returns the same name with its computer-use provider brand.
12
+ */
13
+ export function ComputerUseProviderName(name: string): ComputerUseProviderName {
14
+ return name as ComputerUseProviderName
15
+ }
package/src/index.ts ADDED
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Exclusive named registration for the computer-use capability.
3
+ * @module @deepseek-ai/dsh-computer-use
4
+ */
5
+
6
+ import { Context, Service } from '@deepseek-ai/cordis'
7
+ import type { ComputerUseProviderName } from './brand.ts'
8
+
9
+ declare module '@deepseek-ai/cordis' {
10
+ interface Context {
11
+ computerUse: ComputerUseRegistry
12
+ }
13
+ }
14
+
15
+ /** Owns one optional provider registration in the shared computer-use service. */
16
+ export class ComputerUseRegistry extends Service {
17
+ private registration: ComputerUseProviderName | undefined
18
+
19
+ constructor(ctx: Context) {
20
+ super(ctx, 'computerUse')
21
+ }
22
+
23
+ /** Name of the registered provider, including while its resources are closing. */
24
+ get providerName(): ComputerUseProviderName | undefined {
25
+ return this.registration
26
+ }
27
+
28
+ /**
29
+ * Reserve the sole provider slot until the contribution is disposed.
30
+ * A second registration fails even when it repeats the current name. Providers
31
+ * must stop their tools and await owned work before releasing this registration.
32
+ * @param name - provider-owned name used in registration diagnostics.
33
+ * @returns the effect disposer for this exact registration.
34
+ */
35
+ register(name: ComputerUseProviderName): () => Promise<void> {
36
+ if (this.registration !== undefined) {
37
+ throw new Error(`computer use provider "${this.registration}" is already registered`)
38
+ }
39
+ return this.ctx.effect(() => {
40
+ this.registration = name
41
+ return () => {
42
+ this.registration = undefined
43
+ }
44
+ }, 'computerUse.register()')
45
+ }
46
+ }
47
+
48
+ export default ComputerUseRegistry