@midscene/web 0.16.6 → 0.16.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/agent.js +40 -0
- package/dist/es/agent.js.map +1 -1
- package/dist/es/bridge-mode-browser.js +3 -3
- package/dist/es/bridge-mode.js +42 -2
- package/dist/es/bridge-mode.js.map +1 -1
- package/dist/es/chrome-extension.js +41 -1
- package/dist/es/chrome-extension.js.map +1 -1
- package/dist/es/index.js +40 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/midscene-playground.js +40 -0
- package/dist/es/midscene-playground.js.map +1 -1
- package/dist/es/playground.js +40 -0
- package/dist/es/playground.js.map +1 -1
- package/dist/es/playwright.js +40 -0
- package/dist/es/playwright.js.map +1 -1
- package/dist/es/puppeteer-agent-launcher.js +40 -0
- package/dist/es/puppeteer-agent-launcher.js.map +1 -1
- package/dist/es/puppeteer.js +40 -0
- package/dist/es/puppeteer.js.map +1 -1
- package/dist/es/yaml.js +40 -0
- package/dist/es/yaml.js.map +1 -1
- package/dist/lib/agent.js +40 -0
- package/dist/lib/agent.js.map +1 -1
- package/dist/lib/bridge-mode-browser.js +3 -3
- package/dist/lib/bridge-mode.js +42 -2
- package/dist/lib/bridge-mode.js.map +1 -1
- package/dist/lib/chrome-extension.js +41 -1
- package/dist/lib/chrome-extension.js.map +1 -1
- package/dist/lib/index.js +40 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/midscene-playground.js +40 -0
- package/dist/lib/midscene-playground.js.map +1 -1
- package/dist/lib/playground.js +40 -0
- package/dist/lib/playground.js.map +1 -1
- package/dist/lib/playwright.js +40 -0
- package/dist/lib/playwright.js.map +1 -1
- package/dist/lib/puppeteer-agent-launcher.js +40 -0
- package/dist/lib/puppeteer-agent-launcher.js.map +1 -1
- package/dist/lib/puppeteer.js +40 -0
- package/dist/lib/puppeteer.js.map +1 -1
- package/dist/lib/yaml.js +40 -0
- package/dist/lib/yaml.js.map +1 -1
- package/package.json +3 -3
|
@@ -291,7 +291,7 @@ function sleep(ms) {
|
|
|
291
291
|
var ChromeExtensionProxyPage = class {
|
|
292
292
|
constructor(forceSameTabNavigation) {
|
|
293
293
|
this.pageType = "chrome-extension-proxy";
|
|
294
|
-
this.version = "0.16.
|
|
294
|
+
this.version = "0.16.7";
|
|
295
295
|
this.activeTabId = null;
|
|
296
296
|
this.tabIdOfDebuggerAttached = null;
|
|
297
297
|
this.attachingDebugger = null;
|
|
@@ -737,7 +737,7 @@ var BridgeClient = class {
|
|
|
737
737
|
this.socket = (0, import_socket.io)(this.endpoint, {
|
|
738
738
|
reconnection: false,
|
|
739
739
|
query: {
|
|
740
|
-
version: "0.16.
|
|
740
|
+
version: "0.16.7"
|
|
741
741
|
}
|
|
742
742
|
});
|
|
743
743
|
const timeout = setTimeout(() => {
|
|
@@ -878,7 +878,7 @@ var ExtensionBridgePageBrowserSide = class extends ChromeExtensionProxyPage {
|
|
|
878
878
|
);
|
|
879
879
|
await this.bridgeClient.connect();
|
|
880
880
|
this.onLogMessage(
|
|
881
|
-
`Bridge connected, cli-side version v${this.bridgeClient.serverVersion}, browser-side version v${"0.16.
|
|
881
|
+
`Bridge connected, cli-side version v${this.bridgeClient.serverVersion}, browser-side version v${"0.16.7"}`,
|
|
882
882
|
"log"
|
|
883
883
|
);
|
|
884
884
|
}
|
package/dist/lib/bridge-mode.js
CHANGED
|
@@ -145,6 +145,46 @@ var ScriptPlayer = class {
|
|
|
145
145
|
);
|
|
146
146
|
const queryResult = await agent.aiQuery(prompt);
|
|
147
147
|
this.setResult(queryTask.name, queryResult);
|
|
148
|
+
} else if (flowItem.aiNumber) {
|
|
149
|
+
const numberTask = flowItem;
|
|
150
|
+
const prompt = numberTask.aiNumber;
|
|
151
|
+
(0, import_utils.assert)(prompt, "missing prompt for number");
|
|
152
|
+
(0, import_utils.assert)(
|
|
153
|
+
typeof prompt === "string",
|
|
154
|
+
"prompt for number must be a string"
|
|
155
|
+
);
|
|
156
|
+
const numberResult = await agent.aiNumber(prompt);
|
|
157
|
+
this.setResult(numberTask.name, numberResult);
|
|
158
|
+
} else if (flowItem.aiString) {
|
|
159
|
+
const stringTask = flowItem;
|
|
160
|
+
const prompt = stringTask.aiString;
|
|
161
|
+
(0, import_utils.assert)(prompt, "missing prompt for string");
|
|
162
|
+
(0, import_utils.assert)(
|
|
163
|
+
typeof prompt === "string",
|
|
164
|
+
"prompt for string must be a string"
|
|
165
|
+
);
|
|
166
|
+
const stringResult = await agent.aiString(prompt);
|
|
167
|
+
this.setResult(stringTask.name, stringResult);
|
|
168
|
+
} else if (flowItem.aiBoolean) {
|
|
169
|
+
const booleanTask = flowItem;
|
|
170
|
+
const prompt = booleanTask.aiBoolean;
|
|
171
|
+
(0, import_utils.assert)(prompt, "missing prompt for boolean");
|
|
172
|
+
(0, import_utils.assert)(
|
|
173
|
+
typeof prompt === "string",
|
|
174
|
+
"prompt for boolean must be a string"
|
|
175
|
+
);
|
|
176
|
+
const booleanResult = await agent.aiBoolean(prompt);
|
|
177
|
+
this.setResult(booleanTask.name, booleanResult);
|
|
178
|
+
} else if (flowItem.aiLocate) {
|
|
179
|
+
const locateTask = flowItem;
|
|
180
|
+
const prompt = locateTask.aiLocate;
|
|
181
|
+
(0, import_utils.assert)(prompt, "missing prompt for aiLocate");
|
|
182
|
+
(0, import_utils.assert)(
|
|
183
|
+
typeof prompt === "string",
|
|
184
|
+
"prompt for aiLocate must be a string"
|
|
185
|
+
);
|
|
186
|
+
const locateResult = await agent.aiLocate(prompt);
|
|
187
|
+
this.setResult(locateTask.name, locateResult);
|
|
148
188
|
} else if (flowItem.aiWaitFor) {
|
|
149
189
|
const waitForTask = flowItem;
|
|
150
190
|
const prompt = waitForTask.aiWaitFor;
|
|
@@ -2146,7 +2186,7 @@ var BridgeServer = class {
|
|
|
2146
2186
|
this.socket = socket;
|
|
2147
2187
|
const clientVersion = socket.handshake.query.version;
|
|
2148
2188
|
(0, import_utils15.logMsg)(
|
|
2149
|
-
`Bridge connected, cli-side version v${"0.16.
|
|
2189
|
+
`Bridge connected, cli-side version v${"0.16.7"}, browser-side version v${clientVersion}`
|
|
2150
2190
|
);
|
|
2151
2191
|
socket.on("bridge-call-response" /* CallResponse */, (params) => {
|
|
2152
2192
|
const id = params.id;
|
|
@@ -2177,7 +2217,7 @@ var BridgeServer = class {
|
|
|
2177
2217
|
setTimeout(() => {
|
|
2178
2218
|
this.onConnect?.();
|
|
2179
2219
|
const payload = {
|
|
2180
|
-
version: "0.16.
|
|
2220
|
+
version: "0.16.7"
|
|
2181
2221
|
};
|
|
2182
2222
|
socket.emit("bridge-connected" /* Connected */, payload);
|
|
2183
2223
|
Promise.resolve().then(() => {
|