@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
|
@@ -260,6 +260,46 @@ var ScriptPlayer = class {
|
|
|
260
260
|
);
|
|
261
261
|
const queryResult = await agent.aiQuery(prompt);
|
|
262
262
|
this.setResult(queryTask.name, queryResult);
|
|
263
|
+
} else if (flowItem.aiNumber) {
|
|
264
|
+
const numberTask = flowItem;
|
|
265
|
+
const prompt = numberTask.aiNumber;
|
|
266
|
+
(0, import_utils3.assert)(prompt, "missing prompt for number");
|
|
267
|
+
(0, import_utils3.assert)(
|
|
268
|
+
typeof prompt === "string",
|
|
269
|
+
"prompt for number must be a string"
|
|
270
|
+
);
|
|
271
|
+
const numberResult = await agent.aiNumber(prompt);
|
|
272
|
+
this.setResult(numberTask.name, numberResult);
|
|
273
|
+
} else if (flowItem.aiString) {
|
|
274
|
+
const stringTask = flowItem;
|
|
275
|
+
const prompt = stringTask.aiString;
|
|
276
|
+
(0, import_utils3.assert)(prompt, "missing prompt for string");
|
|
277
|
+
(0, import_utils3.assert)(
|
|
278
|
+
typeof prompt === "string",
|
|
279
|
+
"prompt for string must be a string"
|
|
280
|
+
);
|
|
281
|
+
const stringResult = await agent.aiString(prompt);
|
|
282
|
+
this.setResult(stringTask.name, stringResult);
|
|
283
|
+
} else if (flowItem.aiBoolean) {
|
|
284
|
+
const booleanTask = flowItem;
|
|
285
|
+
const prompt = booleanTask.aiBoolean;
|
|
286
|
+
(0, import_utils3.assert)(prompt, "missing prompt for boolean");
|
|
287
|
+
(0, import_utils3.assert)(
|
|
288
|
+
typeof prompt === "string",
|
|
289
|
+
"prompt for boolean must be a string"
|
|
290
|
+
);
|
|
291
|
+
const booleanResult = await agent.aiBoolean(prompt);
|
|
292
|
+
this.setResult(booleanTask.name, booleanResult);
|
|
293
|
+
} else if (flowItem.aiLocate) {
|
|
294
|
+
const locateTask = flowItem;
|
|
295
|
+
const prompt = locateTask.aiLocate;
|
|
296
|
+
(0, import_utils3.assert)(prompt, "missing prompt for aiLocate");
|
|
297
|
+
(0, import_utils3.assert)(
|
|
298
|
+
typeof prompt === "string",
|
|
299
|
+
"prompt for aiLocate must be a string"
|
|
300
|
+
);
|
|
301
|
+
const locateResult = await agent.aiLocate(prompt);
|
|
302
|
+
this.setResult(locateTask.name, locateResult);
|
|
263
303
|
} else if (flowItem.aiWaitFor) {
|
|
264
304
|
const waitForTask = flowItem;
|
|
265
305
|
const prompt = waitForTask.aiWaitFor;
|
|
@@ -2325,7 +2365,7 @@ function sleep2(ms) {
|
|
|
2325
2365
|
var ChromeExtensionProxyPage = class {
|
|
2326
2366
|
constructor(forceSameTabNavigation) {
|
|
2327
2367
|
this.pageType = "chrome-extension-proxy";
|
|
2328
|
-
this.version = "0.16.
|
|
2368
|
+
this.version = "0.16.7";
|
|
2329
2369
|
this.activeTabId = null;
|
|
2330
2370
|
this.tabIdOfDebuggerAttached = null;
|
|
2331
2371
|
this.attachingDebugger = null;
|