@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
|
@@ -224,6 +224,46 @@ var ScriptPlayer = class {
|
|
|
224
224
|
);
|
|
225
225
|
const queryResult = await agent.aiQuery(prompt);
|
|
226
226
|
this.setResult(queryTask.name, queryResult);
|
|
227
|
+
} else if (flowItem.aiNumber) {
|
|
228
|
+
const numberTask = flowItem;
|
|
229
|
+
const prompt = numberTask.aiNumber;
|
|
230
|
+
assert2(prompt, "missing prompt for number");
|
|
231
|
+
assert2(
|
|
232
|
+
typeof prompt === "string",
|
|
233
|
+
"prompt for number must be a string"
|
|
234
|
+
);
|
|
235
|
+
const numberResult = await agent.aiNumber(prompt);
|
|
236
|
+
this.setResult(numberTask.name, numberResult);
|
|
237
|
+
} else if (flowItem.aiString) {
|
|
238
|
+
const stringTask = flowItem;
|
|
239
|
+
const prompt = stringTask.aiString;
|
|
240
|
+
assert2(prompt, "missing prompt for string");
|
|
241
|
+
assert2(
|
|
242
|
+
typeof prompt === "string",
|
|
243
|
+
"prompt for string must be a string"
|
|
244
|
+
);
|
|
245
|
+
const stringResult = await agent.aiString(prompt);
|
|
246
|
+
this.setResult(stringTask.name, stringResult);
|
|
247
|
+
} else if (flowItem.aiBoolean) {
|
|
248
|
+
const booleanTask = flowItem;
|
|
249
|
+
const prompt = booleanTask.aiBoolean;
|
|
250
|
+
assert2(prompt, "missing prompt for boolean");
|
|
251
|
+
assert2(
|
|
252
|
+
typeof prompt === "string",
|
|
253
|
+
"prompt for boolean must be a string"
|
|
254
|
+
);
|
|
255
|
+
const booleanResult = await agent.aiBoolean(prompt);
|
|
256
|
+
this.setResult(booleanTask.name, booleanResult);
|
|
257
|
+
} else if (flowItem.aiLocate) {
|
|
258
|
+
const locateTask = flowItem;
|
|
259
|
+
const prompt = locateTask.aiLocate;
|
|
260
|
+
assert2(prompt, "missing prompt for aiLocate");
|
|
261
|
+
assert2(
|
|
262
|
+
typeof prompt === "string",
|
|
263
|
+
"prompt for aiLocate must be a string"
|
|
264
|
+
);
|
|
265
|
+
const locateResult = await agent.aiLocate(prompt);
|
|
266
|
+
this.setResult(locateTask.name, locateResult);
|
|
227
267
|
} else if (flowItem.aiWaitFor) {
|
|
228
268
|
const waitForTask = flowItem;
|
|
229
269
|
const prompt = waitForTask.aiWaitFor;
|
|
@@ -2304,7 +2344,7 @@ function sleep2(ms) {
|
|
|
2304
2344
|
var ChromeExtensionProxyPage = class {
|
|
2305
2345
|
constructor(forceSameTabNavigation) {
|
|
2306
2346
|
this.pageType = "chrome-extension-proxy";
|
|
2307
|
-
this.version = "0.16.
|
|
2347
|
+
this.version = "0.16.7";
|
|
2308
2348
|
this.activeTabId = null;
|
|
2309
2349
|
this.tabIdOfDebuggerAttached = null;
|
|
2310
2350
|
this.attachingDebugger = null;
|