@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
package/dist/lib/index.js
CHANGED
|
@@ -150,6 +150,46 @@ var ScriptPlayer = class {
|
|
|
150
150
|
);
|
|
151
151
|
const queryResult = await agent.aiQuery(prompt);
|
|
152
152
|
this.setResult(queryTask.name, queryResult);
|
|
153
|
+
} else if (flowItem.aiNumber) {
|
|
154
|
+
const numberTask = flowItem;
|
|
155
|
+
const prompt = numberTask.aiNumber;
|
|
156
|
+
(0, import_utils.assert)(prompt, "missing prompt for number");
|
|
157
|
+
(0, import_utils.assert)(
|
|
158
|
+
typeof prompt === "string",
|
|
159
|
+
"prompt for number must be a string"
|
|
160
|
+
);
|
|
161
|
+
const numberResult = await agent.aiNumber(prompt);
|
|
162
|
+
this.setResult(numberTask.name, numberResult);
|
|
163
|
+
} else if (flowItem.aiString) {
|
|
164
|
+
const stringTask = flowItem;
|
|
165
|
+
const prompt = stringTask.aiString;
|
|
166
|
+
(0, import_utils.assert)(prompt, "missing prompt for string");
|
|
167
|
+
(0, import_utils.assert)(
|
|
168
|
+
typeof prompt === "string",
|
|
169
|
+
"prompt for string must be a string"
|
|
170
|
+
);
|
|
171
|
+
const stringResult = await agent.aiString(prompt);
|
|
172
|
+
this.setResult(stringTask.name, stringResult);
|
|
173
|
+
} else if (flowItem.aiBoolean) {
|
|
174
|
+
const booleanTask = flowItem;
|
|
175
|
+
const prompt = booleanTask.aiBoolean;
|
|
176
|
+
(0, import_utils.assert)(prompt, "missing prompt for boolean");
|
|
177
|
+
(0, import_utils.assert)(
|
|
178
|
+
typeof prompt === "string",
|
|
179
|
+
"prompt for boolean must be a string"
|
|
180
|
+
);
|
|
181
|
+
const booleanResult = await agent.aiBoolean(prompt);
|
|
182
|
+
this.setResult(booleanTask.name, booleanResult);
|
|
183
|
+
} else if (flowItem.aiLocate) {
|
|
184
|
+
const locateTask = flowItem;
|
|
185
|
+
const prompt = locateTask.aiLocate;
|
|
186
|
+
(0, import_utils.assert)(prompt, "missing prompt for aiLocate");
|
|
187
|
+
(0, import_utils.assert)(
|
|
188
|
+
typeof prompt === "string",
|
|
189
|
+
"prompt for aiLocate must be a string"
|
|
190
|
+
);
|
|
191
|
+
const locateResult = await agent.aiLocate(prompt);
|
|
192
|
+
this.setResult(locateTask.name, locateResult);
|
|
153
193
|
} else if (flowItem.aiWaitFor) {
|
|
154
194
|
const waitForTask = flowItem;
|
|
155
195
|
const prompt = waitForTask.aiWaitFor;
|