@midscene/computer-playground 1.10.7-beta-20260722111246.0 → 1.10.7
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/dist/es/bin.mjs +12 -6
- package/dist/es/index.mjs +12 -6
- package/dist/lib/bin.js +12 -6
- package/dist/lib/index.js +12 -6
- package/dist/types/index.d.ts +2 -0
- package/package.json +5 -5
- package/static/index.html +1 -1
- package/static/static/js/{index.10a59e3d.js → index.91bbe3be.js} +23 -23
- package/static/static/js/index.91bbe3be.js.map +1 -0
- package/static/static/js/index.10a59e3d.js.map +0 -1
- /package/static/static/js/{index.10a59e3d.js.LICENSE.txt → index.91bbe3be.js.LICENSE.txt} +0 -0
package/dist/es/bin.mjs
CHANGED
|
@@ -120,16 +120,22 @@ const computerPlaygroundPlatform = definePlaygroundPlatform({
|
|
|
120
120
|
const { allPermissionsGranted, permissionError } = evaluatePermissions();
|
|
121
121
|
if (!allPermissionsGranted) throw new Error(permissionError || 'Accessibility and Screen Recording permissions are required');
|
|
122
122
|
const displayId = input?.displayId === void 0 || null === input.displayId ? void 0 : String(input.displayId);
|
|
123
|
-
const agent = await agentFromComputer(
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
const agent = await agentFromComputer({
|
|
124
|
+
...options?.getAgentOptions?.(),
|
|
125
|
+
...displayId ? {
|
|
126
|
+
displayId
|
|
127
|
+
} : {}
|
|
128
|
+
});
|
|
126
129
|
const displays = await getConnectedDisplays();
|
|
127
130
|
const selectedDisplay = displays.find((display)=>display.id === displayId) || displays.find((display)=>display.primary) || displays[0];
|
|
128
131
|
return {
|
|
129
132
|
agent,
|
|
130
|
-
agentFactory: ()=>agentFromComputer(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
agentFactory: ()=>agentFromComputer({
|
|
134
|
+
...options?.getAgentOptions?.(),
|
|
135
|
+
...selectedDisplay ? {
|
|
136
|
+
displayId: selectedDisplay.id
|
|
137
|
+
} : {}
|
|
138
|
+
}),
|
|
133
139
|
preview: createScreenshotPreviewDescriptor({
|
|
134
140
|
title: 'Desktop preview'
|
|
135
141
|
}),
|
package/dist/es/index.mjs
CHANGED
|
@@ -69,16 +69,22 @@ const computerPlaygroundPlatform = definePlaygroundPlatform({
|
|
|
69
69
|
const { allPermissionsGranted, permissionError } = evaluatePermissions();
|
|
70
70
|
if (!allPermissionsGranted) throw new Error(permissionError || 'Accessibility and Screen Recording permissions are required');
|
|
71
71
|
const displayId = input?.displayId === void 0 || null === input.displayId ? void 0 : String(input.displayId);
|
|
72
|
-
const agent = await agentFromComputer(
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
const agent = await agentFromComputer({
|
|
73
|
+
...options?.getAgentOptions?.(),
|
|
74
|
+
...displayId ? {
|
|
75
|
+
displayId
|
|
76
|
+
} : {}
|
|
77
|
+
});
|
|
75
78
|
const displays = await getConnectedDisplays();
|
|
76
79
|
const selectedDisplay = displays.find((display)=>display.id === displayId) || displays.find((display)=>display.primary) || displays[0];
|
|
77
80
|
return {
|
|
78
81
|
agent,
|
|
79
|
-
agentFactory: ()=>agentFromComputer(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
agentFactory: ()=>agentFromComputer({
|
|
83
|
+
...options?.getAgentOptions?.(),
|
|
84
|
+
...selectedDisplay ? {
|
|
85
|
+
displayId: selectedDisplay.id
|
|
86
|
+
} : {}
|
|
87
|
+
}),
|
|
82
88
|
preview: createScreenshotPreviewDescriptor({
|
|
83
89
|
title: 'Desktop preview'
|
|
84
90
|
}),
|
package/dist/lib/bin.js
CHANGED
|
@@ -146,16 +146,22 @@ const computerPlaygroundPlatform = (0, playground_namespaceObject.definePlaygrou
|
|
|
146
146
|
const { allPermissionsGranted, permissionError } = evaluatePermissions();
|
|
147
147
|
if (!allPermissionsGranted) throw new Error(permissionError || 'Accessibility and Screen Recording permissions are required');
|
|
148
148
|
const displayId = input?.displayId === void 0 || null === input.displayId ? void 0 : String(input.displayId);
|
|
149
|
-
const agent = await (0, computer_namespaceObject.agentFromComputer)(
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
const agent = await (0, computer_namespaceObject.agentFromComputer)({
|
|
150
|
+
...options?.getAgentOptions?.(),
|
|
151
|
+
...displayId ? {
|
|
152
|
+
displayId
|
|
153
|
+
} : {}
|
|
154
|
+
});
|
|
152
155
|
const displays = await (0, computer_namespaceObject.getConnectedDisplays)();
|
|
153
156
|
const selectedDisplay = displays.find((display)=>display.id === displayId) || displays.find((display)=>display.primary) || displays[0];
|
|
154
157
|
return {
|
|
155
158
|
agent,
|
|
156
|
-
agentFactory: ()=>(0, computer_namespaceObject.agentFromComputer)(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
agentFactory: ()=>(0, computer_namespaceObject.agentFromComputer)({
|
|
160
|
+
...options?.getAgentOptions?.(),
|
|
161
|
+
...selectedDisplay ? {
|
|
162
|
+
displayId: selectedDisplay.id
|
|
163
|
+
} : {}
|
|
164
|
+
}),
|
|
159
165
|
preview: (0, playground_namespaceObject.createScreenshotPreviewDescriptor)({
|
|
160
166
|
title: 'Desktop preview'
|
|
161
167
|
}),
|
package/dist/lib/index.js
CHANGED
|
@@ -108,16 +108,22 @@ const computerPlaygroundPlatform = (0, playground_namespaceObject.definePlaygrou
|
|
|
108
108
|
const { allPermissionsGranted, permissionError } = evaluatePermissions();
|
|
109
109
|
if (!allPermissionsGranted) throw new Error(permissionError || 'Accessibility and Screen Recording permissions are required');
|
|
110
110
|
const displayId = input?.displayId === void 0 || null === input.displayId ? void 0 : String(input.displayId);
|
|
111
|
-
const agent = await (0, computer_namespaceObject.agentFromComputer)(
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
const agent = await (0, computer_namespaceObject.agentFromComputer)({
|
|
112
|
+
...options?.getAgentOptions?.(),
|
|
113
|
+
...displayId ? {
|
|
114
|
+
displayId
|
|
115
|
+
} : {}
|
|
116
|
+
});
|
|
114
117
|
const displays = await (0, computer_namespaceObject.getConnectedDisplays)();
|
|
115
118
|
const selectedDisplay = displays.find((display)=>display.id === displayId) || displays.find((display)=>display.primary) || displays[0];
|
|
116
119
|
return {
|
|
117
120
|
agent,
|
|
118
|
-
agentFactory: ()=>(0, computer_namespaceObject.agentFromComputer)(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
agentFactory: ()=>(0, computer_namespaceObject.agentFromComputer)({
|
|
122
|
+
...options?.getAgentOptions?.(),
|
|
123
|
+
...selectedDisplay ? {
|
|
124
|
+
displayId: selectedDisplay.id
|
|
125
|
+
} : {}
|
|
126
|
+
}),
|
|
121
127
|
preview: (0, playground_namespaceObject.createScreenshotPreviewDescriptor)({
|
|
122
128
|
title: 'Desktop preview'
|
|
123
129
|
}),
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CDPSession } from 'puppeteer';
|
|
2
|
+
import { ComputerAgentOpt } from '@midscene/computer';
|
|
2
3
|
import type { Page } from 'puppeteer';
|
|
3
4
|
import { PlaygroundPlatformDescriptor } from '@midscene/playground';
|
|
4
5
|
|
|
@@ -18,6 +19,7 @@ export declare class BrowserWindowController {
|
|
|
18
19
|
export declare interface ComputerPlatformOptions {
|
|
19
20
|
staticDir?: string;
|
|
20
21
|
getWindowController?: () => BrowserWindowController | null;
|
|
22
|
+
getAgentOptions?: () => ComputerAgentOpt;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export declare const computerPlaygroundPlatform: PlaygroundPlatformDescriptor<ComputerPlatformOptions | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/computer-playground",
|
|
3
|
-
"version": "1.10.7
|
|
3
|
+
"version": "1.10.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/midscene.git",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"cors": "^2.8.5",
|
|
25
25
|
"express": "^4.21.2",
|
|
26
26
|
"puppeteer": "24.6.0",
|
|
27
|
-
"@midscene/computer": "1.10.7
|
|
28
|
-
"@midscene/
|
|
29
|
-
"@midscene/
|
|
30
|
-
"@midscene/
|
|
27
|
+
"@midscene/computer": "1.10.7",
|
|
28
|
+
"@midscene/playground": "1.10.7",
|
|
29
|
+
"@midscene/shared": "1.10.7",
|
|
30
|
+
"@midscene/core": "1.10.7"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@rslib/core": "^0.18.3",
|
package/static/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html><head><title>Midscene Computer Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.e13cc2e0.js"></script><script defer src="/static/js/859.c83767c9.js"></script><script defer src="/static/js/index.
|
|
1
|
+
<!doctype html><html><head><title>Midscene Computer Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.e13cc2e0.js"></script><script defer src="/static/js/859.c83767c9.js"></script><script defer src="/static/js/index.91bbe3be.js"></script><link href="/static/css/index.2b6b43ad.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|