@midscene/core 1.12.10-beta-20260920031616.0 → 1.13.0
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/agent.mjs +103 -6
- package/dist/es/agent/agent.mjs.map +1 -1
- package/dist/es/agent/index.mjs +4 -3
- package/dist/es/agent/tasks.mjs +2 -2
- package/dist/es/agent/tasks.mjs.map +1 -1
- package/dist/es/agent/test-runner-nodes.mjs +291 -40
- package/dist/es/agent/test-runner-nodes.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +1 -1
- package/dist/es/device/index.mjs +15 -2
- package/dist/es/device/index.mjs.map +1 -1
- package/dist/es/dump/html-utils.mjs +37 -4
- package/dist/es/dump/html-utils.mjs.map +1 -1
- package/dist/es/dump/screenshot-store.mjs +8 -1
- package/dist/es/dump/screenshot-store.mjs.map +1 -1
- package/dist/es/report-cli.mjs +9 -4
- package/dist/es/report-cli.mjs.map +1 -1
- package/dist/es/report-generator.mjs +117 -4
- package/dist/es/report-generator.mjs.map +1 -1
- package/dist/es/report-html-template.mjs +1 -1
- package/dist/es/report.mjs +190 -41
- package/dist/es/report.mjs.map +1 -1
- package/dist/es/test-run-report.mjs.map +1 -1
- package/dist/es/test-runner/engine/case-runner.mjs +52 -0
- package/dist/es/test-runner/engine/case-runner.mjs.map +1 -0
- package/dist/es/test-runner/engine/document-runtime.mjs +273 -0
- package/dist/es/test-runner/engine/document-runtime.mjs.map +1 -0
- package/dist/es/test-runner/engine/execute-step.mjs +177 -0
- package/dist/es/test-runner/engine/execute-step.mjs.map +1 -0
- package/dist/es/test-runner/engine/execution-failure.mjs +39 -0
- package/dist/es/test-runner/engine/execution-failure.mjs.map +1 -0
- package/dist/es/test-runner/engine/index.mjs +12 -0
- package/dist/es/test-runner/engine/project-runtime.mjs +142 -0
- package/dist/es/test-runner/engine/project-runtime.mjs.map +1 -0
- package/dist/es/test-runner/engine/registry.mjs +61 -0
- package/dist/es/test-runner/engine/registry.mjs.map +1 -0
- package/dist/es/test-runner/engine/resource-operations.mjs +211 -0
- package/dist/es/test-runner/engine/resource-operations.mjs.map +1 -0
- package/dist/es/test-runner/engine/run-collected-case.mjs +193 -0
- package/dist/es/test-runner/engine/run-collected-case.mjs.map +1 -0
- package/dist/es/test-runner/engine/run-workflow-document.mjs +155 -0
- package/dist/es/test-runner/engine/run-workflow-document.mjs.map +1 -0
- package/dist/es/test-runner/engine/scheduler.mjs +27 -0
- package/dist/es/test-runner/engine/scheduler.mjs.map +1 -0
- package/dist/es/test-runner/engine/scope-teardown.mjs +16 -0
- package/dist/es/test-runner/engine/scope-teardown.mjs.map +1 -0
- package/dist/es/test-runner/engine/types.mjs +0 -0
- package/dist/es/test-runner/errors.mjs +201 -0
- package/dist/es/test-runner/errors.mjs.map +1 -0
- package/dist/es/test-runner/execution-record.mjs +83 -0
- package/dist/es/test-runner/execution-record.mjs.map +1 -0
- package/dist/es/test-runner/index.mjs +12 -0
- package/dist/es/test-runner/node/define-node.mjs +44 -0
- package/dist/es/test-runner/node/define-node.mjs.map +1 -0
- package/dist/es/test-runner/node/index.mjs +2 -0
- package/dist/es/test-runner/node/types.mjs +0 -0
- package/dist/es/test-runner/parser/document-format.mjs +21 -0
- package/dist/es/test-runner/parser/document-format.mjs.map +1 -0
- package/dist/es/test-runner/parser/normalize.mjs +87 -0
- package/dist/es/test-runner/parser/normalize.mjs.map +1 -0
- package/dist/es/test-runner/parser/types.mjs +0 -0
- package/dist/es/test-runner/project.mjs +0 -0
- package/dist/es/test-runner/reporting/agent-report.mjs +23 -0
- package/dist/es/test-runner/reporting/agent-report.mjs.map +1 -0
- package/dist/es/test-runner/reporting/execution-record.mjs +73 -0
- package/dist/es/test-runner/reporting/execution-record.mjs.map +1 -0
- package/dist/es/test-runner/reporting/merge-report.mjs +231 -0
- package/dist/es/test-runner/reporting/merge-report.mjs.map +1 -0
- package/dist/es/test-runner/reporting/sanitize.mjs +162 -0
- package/dist/es/test-runner/reporting/sanitize.mjs.map +1 -0
- package/dist/es/test-runner/reporting/test-run-report.mjs +327 -0
- package/dist/es/test-runner/reporting/test-run-report.mjs.map +1 -0
- package/dist/es/test-runner/reporting/types.mjs +0 -0
- package/dist/es/utils.mjs +1 -1
- package/dist/es/yaml/execution-context.node.mjs +6 -0
- package/dist/es/yaml/execution-context.node.mjs.map +1 -0
- package/dist/es/yaml/execution-context.stub.mjs +8 -0
- package/dist/es/yaml/execution-context.stub.mjs.map +1 -0
- package/dist/es/yaml/execution-session.mjs +90 -0
- package/dist/es/yaml/execution-session.mjs.map +1 -0
- package/dist/es/yaml/index.mjs +2 -1
- package/dist/es/yaml/legacy-yaml-execution-record.mjs +47 -0
- package/dist/es/yaml/legacy-yaml-execution-record.mjs.map +1 -0
- package/dist/es/yaml/legacy-yaml-report.mjs +52 -0
- package/dist/es/yaml/legacy-yaml-report.mjs.map +1 -0
- package/dist/es/yaml/legacy-yaml-runtime.mjs +119 -0
- package/dist/es/yaml/legacy-yaml-runtime.mjs.map +1 -0
- package/dist/es/yaml/player-state.mjs +15 -0
- package/dist/es/yaml/player-state.mjs.map +1 -0
- package/dist/es/yaml/player.mjs +214 -348
- package/dist/es/yaml/player.mjs.map +1 -1
- package/dist/es/yaml/report-policy.mjs +7 -0
- package/dist/es/yaml/report-policy.mjs.map +1 -0
- package/dist/es/yaml/test-runner-compat.mjs +301 -0
- package/dist/es/yaml/test-runner-compat.mjs.map +1 -0
- package/dist/es/yaml/test-runner-nodes.mjs +147 -0
- package/dist/es/yaml/test-runner-nodes.mjs.map +1 -0
- package/dist/es/yaml/utils.mjs +12 -1
- package/dist/es/yaml/utils.mjs.map +1 -1
- package/dist/es/yaml-runtime.mjs +7 -0
- package/dist/es/yaml.mjs.map +1 -1
- package/dist/lib/agent/agent.js +103 -6
- package/dist/lib/agent/agent.js.map +1 -1
- package/dist/lib/agent/index.js +37 -3
- package/dist/lib/agent/tasks.js +2 -2
- package/dist/lib/agent/tasks.js.map +1 -1
- package/dist/lib/agent/test-runner-nodes.js +329 -45
- package/dist/lib/agent/test-runner-nodes.js.map +1 -1
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/device/index.js +15 -2
- package/dist/lib/device/index.js.map +1 -1
- package/dist/lib/dump/html-utils.js +43 -4
- package/dist/lib/dump/html-utils.js.map +1 -1
- package/dist/lib/dump/screenshot-store.js +8 -1
- package/dist/lib/dump/screenshot-store.js.map +1 -1
- package/dist/lib/report-cli.js +8 -3
- package/dist/lib/report-cli.js.map +1 -1
- package/dist/lib/report-generator.js +114 -1
- package/dist/lib/report-generator.js.map +1 -1
- package/dist/lib/report-html-template.js +1 -1
- package/dist/lib/report.js +187 -38
- package/dist/lib/report.js.map +1 -1
- package/dist/lib/test-run-report.js.map +1 -1
- package/dist/lib/test-runner/engine/case-runner.js +89 -0
- package/dist/lib/test-runner/engine/case-runner.js.map +1 -0
- package/dist/lib/test-runner/engine/document-runtime.js +307 -0
- package/dist/lib/test-runner/engine/document-runtime.js.map +1 -0
- package/dist/lib/test-runner/engine/execute-step.js +211 -0
- package/dist/lib/test-runner/engine/execute-step.js.map +1 -0
- package/dist/lib/test-runner/engine/execution-failure.js +79 -0
- package/dist/lib/test-runner/engine/execution-failure.js.map +1 -0
- package/dist/lib/test-runner/engine/index.js +137 -0
- package/dist/lib/test-runner/engine/index.js.map +1 -0
- package/dist/lib/test-runner/engine/project-runtime.js +176 -0
- package/dist/lib/test-runner/engine/project-runtime.js.map +1 -0
- package/dist/lib/test-runner/engine/registry.js +95 -0
- package/dist/lib/test-runner/engine/registry.js.map +1 -0
- package/dist/lib/test-runner/engine/resource-operations.js +272 -0
- package/dist/lib/test-runner/engine/resource-operations.js.map +1 -0
- package/dist/lib/test-runner/engine/run-collected-case.js +227 -0
- package/dist/lib/test-runner/engine/run-collected-case.js.map +1 -0
- package/dist/lib/test-runner/engine/run-workflow-document.js +189 -0
- package/dist/lib/test-runner/engine/run-workflow-document.js.map +1 -0
- package/dist/lib/test-runner/engine/scheduler.js +64 -0
- package/dist/lib/test-runner/engine/scheduler.js.map +1 -0
- package/dist/lib/test-runner/engine/scope-teardown.js +50 -0
- package/dist/lib/test-runner/engine/scope-teardown.js.map +1 -0
- package/dist/lib/test-runner/engine/types.js +20 -0
- package/dist/lib/test-runner/engine/types.js.map +1 -0
- package/dist/lib/test-runner/errors.js +283 -0
- package/dist/lib/test-runner/errors.js.map +1 -0
- package/dist/lib/test-runner/execution-record.js +123 -0
- package/dist/lib/test-runner/execution-record.js.map +1 -0
- package/dist/lib/test-runner/index.js +137 -0
- package/dist/lib/test-runner/index.js.map +1 -0
- package/dist/lib/test-runner/node/define-node.js +78 -0
- package/dist/lib/test-runner/node/define-node.js.map +1 -0
- package/dist/lib/test-runner/node/index.js +67 -0
- package/dist/lib/test-runner/node/index.js.map +1 -0
- package/dist/lib/test-runner/node/types.js +20 -0
- package/dist/lib/test-runner/node/types.js.map +1 -0
- package/dist/lib/test-runner/parser/document-format.js +58 -0
- package/dist/lib/test-runner/parser/document-format.js.map +1 -0
- package/dist/lib/test-runner/parser/normalize.js +124 -0
- package/dist/lib/test-runner/parser/normalize.js.map +1 -0
- package/dist/lib/test-runner/parser/types.js +20 -0
- package/dist/lib/test-runner/parser/types.js.map +1 -0
- package/dist/lib/test-runner/project.js +20 -0
- package/dist/lib/test-runner/project.js.map +1 -0
- package/dist/lib/test-runner/reporting/agent-report.js +57 -0
- package/dist/lib/test-runner/reporting/agent-report.js.map +1 -0
- package/dist/lib/test-runner/reporting/execution-record.js +107 -0
- package/dist/lib/test-runner/reporting/execution-record.js.map +1 -0
- package/dist/lib/test-runner/reporting/merge-report.js +265 -0
- package/dist/lib/test-runner/reporting/merge-report.js.map +1 -0
- package/dist/lib/test-runner/reporting/sanitize.js +202 -0
- package/dist/lib/test-runner/reporting/sanitize.js.map +1 -0
- package/dist/lib/test-runner/reporting/test-run-report.js +364 -0
- package/dist/lib/test-runner/reporting/test-run-report.js.map +1 -0
- package/dist/lib/test-runner/reporting/types.js +20 -0
- package/dist/lib/test-runner/reporting/types.js.map +1 -0
- package/dist/lib/utils.js +1 -1
- package/dist/lib/yaml/execution-context.node.js +43 -0
- package/dist/lib/yaml/execution-context.node.js.map +1 -0
- package/dist/lib/yaml/execution-context.stub.js +45 -0
- package/dist/lib/yaml/execution-context.stub.js.map +1 -0
- package/dist/lib/yaml/execution-session.js +136 -0
- package/dist/lib/yaml/execution-session.js.map +1 -0
- package/dist/lib/yaml/index.js +49 -7
- package/dist/lib/yaml/legacy-yaml-execution-record.js +81 -0
- package/dist/lib/yaml/legacy-yaml-execution-record.js.map +1 -0
- package/dist/lib/yaml/legacy-yaml-report.js +86 -0
- package/dist/lib/yaml/legacy-yaml-report.js.map +1 -0
- package/dist/lib/yaml/legacy-yaml-runtime.js +156 -0
- package/dist/lib/yaml/legacy-yaml-runtime.js.map +1 -0
- package/dist/lib/yaml/player-state.js +52 -0
- package/dist/lib/yaml/player-state.js.map +1 -0
- package/dist/lib/yaml/player.js +213 -347
- package/dist/lib/yaml/player.js.map +1 -1
- package/dist/lib/yaml/report-policy.js +41 -0
- package/dist/lib/yaml/report-policy.js.map +1 -0
- package/dist/lib/yaml/test-runner-compat.js +344 -0
- package/dist/lib/yaml/test-runner-compat.js.map +1 -0
- package/dist/lib/yaml/test-runner-nodes.js +184 -0
- package/dist/lib/yaml/test-runner-nodes.js.map +1 -0
- package/dist/lib/yaml/utils.js +18 -1
- package/dist/lib/yaml/utils.js.map +1 -1
- package/dist/lib/yaml-runtime.js +67 -0
- package/dist/lib/yaml-runtime.js.map +1 -0
- package/dist/lib/yaml.js.map +1 -1
- package/dist/types/agent/agent.d.ts +14 -1
- package/dist/types/agent/agent.d.ts.map +1 -1
- package/dist/types/agent/index.d.ts +4 -3
- package/dist/types/agent/index.d.ts.map +1 -1
- package/dist/types/agent/tasks.d.ts +1 -1
- package/dist/types/agent/tasks.d.ts.map +1 -1
- package/dist/types/agent/test-runner-nodes.d.ts +226 -0
- package/dist/types/agent/test-runner-nodes.d.ts.map +1 -1
- package/dist/types/device/index.d.ts +1 -1
- package/dist/types/device/index.d.ts.map +1 -1
- package/dist/types/dump/html-utils.d.ts +4 -0
- package/dist/types/dump/html-utils.d.ts.map +1 -1
- package/dist/types/dump/screenshot-store.d.ts +2 -1
- package/dist/types/dump/screenshot-store.d.ts.map +1 -1
- package/dist/types/report-cli.d.ts.map +1 -1
- package/dist/types/report-generator.d.ts +10 -0
- package/dist/types/report-generator.d.ts.map +1 -1
- package/dist/types/report.d.ts +3 -1
- package/dist/types/report.d.ts.map +1 -1
- package/dist/types/test-run-report.d.ts +18 -2
- package/dist/types/test-run-report.d.ts.map +1 -1
- package/dist/types/test-runner/engine/case-runner.d.ts +13 -0
- package/dist/types/test-runner/engine/case-runner.d.ts.map +1 -0
- package/dist/types/test-runner/engine/document-runtime.d.ts +4 -0
- package/dist/types/test-runner/engine/document-runtime.d.ts.map +1 -0
- package/dist/types/test-runner/engine/execute-step.d.ts +17 -0
- package/dist/types/test-runner/engine/execute-step.d.ts.map +1 -0
- package/dist/types/test-runner/engine/execution-failure.d.ts +13 -0
- package/dist/types/test-runner/engine/execution-failure.d.ts.map +1 -0
- package/dist/types/test-runner/engine/index.d.ts +13 -0
- package/dist/types/test-runner/engine/index.d.ts.map +1 -0
- package/dist/types/test-runner/engine/project-runtime.d.ts +3 -0
- package/dist/types/test-runner/engine/project-runtime.d.ts.map +1 -0
- package/dist/types/test-runner/engine/registry.d.ts +12 -0
- package/dist/types/test-runner/engine/registry.d.ts.map +1 -0
- package/dist/types/test-runner/engine/resource-operations.d.ts +32 -0
- package/dist/types/test-runner/engine/resource-operations.d.ts.map +1 -0
- package/dist/types/test-runner/engine/run-collected-case.d.ts +4 -0
- package/dist/types/test-runner/engine/run-collected-case.d.ts.map +1 -0
- package/dist/types/test-runner/engine/run-workflow-document.d.ts +4 -0
- package/dist/types/test-runner/engine/run-workflow-document.d.ts.map +1 -0
- package/dist/types/test-runner/engine/scheduler.d.ts +12 -0
- package/dist/types/test-runner/engine/scheduler.d.ts.map +1 -0
- package/dist/types/test-runner/engine/scope-teardown.d.ts +3 -0
- package/dist/types/test-runner/engine/scope-teardown.d.ts.map +1 -0
- package/dist/types/test-runner/engine/types.d.ts +226 -0
- package/dist/types/test-runner/engine/types.d.ts.map +1 -0
- package/dist/types/test-runner/errors.d.ts +79 -0
- package/dist/types/test-runner/errors.d.ts.map +1 -0
- package/dist/types/test-runner/execution-record.d.ts +43 -0
- package/dist/types/test-runner/execution-record.d.ts.map +1 -0
- package/dist/types/test-runner/index.d.ts +20 -0
- package/dist/types/test-runner/index.d.ts.map +1 -0
- package/dist/types/test-runner/node/define-node.d.ts +4 -0
- package/dist/types/test-runner/node/define-node.d.ts.map +1 -0
- package/dist/types/test-runner/node/index.d.ts +3 -0
- package/dist/types/test-runner/node/index.d.ts.map +1 -0
- package/dist/types/test-runner/node/types.d.ts +66 -0
- package/dist/types/test-runner/node/types.d.ts.map +1 -0
- package/dist/types/test-runner/parser/document-format.d.ts +8 -0
- package/dist/types/test-runner/parser/document-format.d.ts.map +1 -0
- package/dist/types/test-runner/parser/normalize.d.ts +9 -0
- package/dist/types/test-runner/parser/normalize.d.ts.map +1 -0
- package/dist/types/test-runner/parser/types.d.ts +69 -0
- package/dist/types/test-runner/parser/types.d.ts.map +1 -0
- package/dist/types/test-runner/project.d.ts +75 -0
- package/dist/types/test-runner/project.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/agent-report.d.ts +9 -0
- package/dist/types/test-runner/reporting/agent-report.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/execution-record.d.ts +9 -0
- package/dist/types/test-runner/reporting/execution-record.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/merge-report.d.ts +15 -0
- package/dist/types/test-runner/reporting/merge-report.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/sanitize.d.ts +6 -0
- package/dist/types/test-runner/reporting/sanitize.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/test-run-report.d.ts +5 -0
- package/dist/types/test-runner/reporting/test-run-report.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/types.d.ts +34 -0
- package/dist/types/test-runner/reporting/types.d.ts.map +1 -0
- package/dist/types/yaml/execution-context.node.d.ts +4 -0
- package/dist/types/yaml/execution-context.node.d.ts.map +1 -0
- package/dist/types/yaml/execution-context.stub.d.ts +6 -0
- package/dist/types/yaml/execution-context.stub.d.ts.map +1 -0
- package/dist/types/yaml/execution-session.d.ts +17 -0
- package/dist/types/yaml/execution-session.d.ts.map +1 -0
- package/dist/types/yaml/index.d.ts +1 -1
- package/dist/types/yaml/index.d.ts.map +1 -1
- package/dist/types/yaml/legacy-yaml-execution-record.d.ts +24 -0
- package/dist/types/yaml/legacy-yaml-execution-record.d.ts.map +1 -0
- package/dist/types/yaml/legacy-yaml-report.d.ts +19 -0
- package/dist/types/yaml/legacy-yaml-report.d.ts.map +1 -0
- package/dist/types/yaml/legacy-yaml-runtime.d.ts +23 -0
- package/dist/types/yaml/legacy-yaml-runtime.d.ts.map +1 -0
- package/dist/types/yaml/player-state.d.ts +11 -0
- package/dist/types/yaml/player-state.d.ts.map +1 -0
- package/dist/types/yaml/player.d.ts +11 -3
- package/dist/types/yaml/player.d.ts.map +1 -1
- package/dist/types/yaml/report-policy.d.ts +4 -0
- package/dist/types/yaml/report-policy.d.ts.map +1 -0
- package/dist/types/yaml/test-runner-compat.d.ts +17 -0
- package/dist/types/yaml/test-runner-compat.d.ts.map +1 -0
- package/dist/types/yaml/test-runner-nodes.d.ts +6 -0
- package/dist/types/yaml/test-runner-nodes.d.ts.map +1 -0
- package/dist/types/yaml/utils.d.ts +9 -0
- package/dist/types/yaml/utils.d.ts.map +1 -1
- package/dist/types/yaml-runtime.d.ts +13 -0
- package/dist/types/yaml-runtime.d.ts.map +1 -0
- package/dist/types/yaml.d.ts +25 -7
- package/dist/types/yaml.d.ts.map +1 -1
- package/package.json +28 -2
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
getLegacyYamlResultData: ()=>getLegacyYamlResultData,
|
|
28
|
+
legacyAgentTestRunnerNodeDefinitions: ()=>legacyAgentTestRunnerNodeDefinitions
|
|
29
|
+
});
|
|
30
|
+
const utils_namespaceObject = require("@midscene/shared/utils");
|
|
31
|
+
const v4_namespaceObject = require("zod/v4");
|
|
32
|
+
const test_runner_nodes_js_namespaceObject = require("../agent/test-runner-nodes.js");
|
|
33
|
+
const external_test_runner_compat_js_namespaceObject = require("./test-runner-compat.js");
|
|
34
|
+
const legacyFinalizeNodeDefinition = {
|
|
35
|
+
name: 'Finalize',
|
|
36
|
+
inputSchema: v4_namespaceObject.z.strictObject({}),
|
|
37
|
+
execute: ()=>void 0
|
|
38
|
+
};
|
|
39
|
+
const legacyRunAdbShellNodeDefinition = {
|
|
40
|
+
name: 'runAdbShell',
|
|
41
|
+
inputSchema: v4_namespaceObject.z.strictObject({
|
|
42
|
+
command: v4_namespaceObject.z.string(),
|
|
43
|
+
timeout: v4_namespaceObject.z.number()
|
|
44
|
+
}),
|
|
45
|
+
async execute (agent, input) {
|
|
46
|
+
const androidAgent = agent;
|
|
47
|
+
const command = input.command;
|
|
48
|
+
const timeout = input.timeout;
|
|
49
|
+
const value = androidAgent.runAdbShell ? await androidAgent.runAdbShell(command, {
|
|
50
|
+
timeout
|
|
51
|
+
}) : await androidAgent.callActionInActionSpace('RunAdbShell', {
|
|
52
|
+
command,
|
|
53
|
+
timeout
|
|
54
|
+
});
|
|
55
|
+
return void 0 === value ? void 0 : {
|
|
56
|
+
data: value
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const legacyActionNodeDefinition = {
|
|
61
|
+
name: 'legacyAction',
|
|
62
|
+
inputSchema: v4_namespaceObject.z.strictObject({
|
|
63
|
+
flow: v4_namespaceObject.z.record(v4_namespaceObject.z.string(), v4_namespaceObject.z.unknown())
|
|
64
|
+
}),
|
|
65
|
+
async execute (agent, input, context) {
|
|
66
|
+
context.signal.throwIfAborted();
|
|
67
|
+
const actionSpace = await agent.getActionSpace();
|
|
68
|
+
context.signal.throwIfAborted();
|
|
69
|
+
const step = (0, external_test_runner_compat_js_namespaceObject.compileLegacyFlowItem)(input.flow, actionSpace);
|
|
70
|
+
(0, utils_namespaceObject.assert)('legacyAction' !== step.node, `unknown flowItem in yaml: ${JSON.stringify(input.flow)}`);
|
|
71
|
+
const definition = legacyAgentTestRunnerNodeDefinitions.find((node)=>node.name === step.node);
|
|
72
|
+
(0, utils_namespaceObject.assert)(definition, `Unknown Agent Node: ${step.node}`);
|
|
73
|
+
const parsed = await definition.inputSchema.parseAsync(step.input);
|
|
74
|
+
context.signal.throwIfAborted();
|
|
75
|
+
return definition.execute(agent, parsed, context);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const legacyValidationErrorNodeDefinition = {
|
|
79
|
+
name: 'legacyValidationError',
|
|
80
|
+
inputSchema: v4_namespaceObject.z.strictObject({
|
|
81
|
+
message: v4_namespaceObject.z.string()
|
|
82
|
+
}),
|
|
83
|
+
execute (_agent, input) {
|
|
84
|
+
throw new Error(input.message);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const legacyPromptInputSchema = v4_namespaceObject.z.strictObject({
|
|
88
|
+
prompt: v4_namespaceObject.z.unknown(),
|
|
89
|
+
options: v4_namespaceObject.z.record(v4_namespaceObject.z.string(), v4_namespaceObject.z.unknown()).optional()
|
|
90
|
+
});
|
|
91
|
+
const legacyInputSchemas = new Map([
|
|
92
|
+
...[
|
|
93
|
+
'aiAct',
|
|
94
|
+
'aiTap',
|
|
95
|
+
'aiLocate',
|
|
96
|
+
'aiQuery',
|
|
97
|
+
'aiNumber',
|
|
98
|
+
'aiString',
|
|
99
|
+
'aiBoolean',
|
|
100
|
+
'aiAsk',
|
|
101
|
+
'aiWaitFor',
|
|
102
|
+
'aiScroll'
|
|
103
|
+
].map((name)=>[
|
|
104
|
+
name,
|
|
105
|
+
legacyPromptInputSchema
|
|
106
|
+
]),
|
|
107
|
+
[
|
|
108
|
+
'aiAssert',
|
|
109
|
+
legacyPromptInputSchema.extend({
|
|
110
|
+
message: v4_namespaceObject.z.unknown()
|
|
111
|
+
})
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
"javascript",
|
|
115
|
+
v4_namespaceObject.z.strictObject({
|
|
116
|
+
script: v4_namespaceObject.z.unknown()
|
|
117
|
+
})
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
'runGherkinScenario',
|
|
121
|
+
v4_namespaceObject.z.strictObject({
|
|
122
|
+
scenario: v4_namespaceObject.z.unknown(),
|
|
123
|
+
options: v4_namespaceObject.z.record(v4_namespaceObject.z.string(), v4_namespaceObject.z.unknown()).optional()
|
|
124
|
+
})
|
|
125
|
+
],
|
|
126
|
+
[
|
|
127
|
+
'sleep',
|
|
128
|
+
v4_namespaceObject.z.strictObject({
|
|
129
|
+
ms: v4_namespaceObject.z.number().positive()
|
|
130
|
+
})
|
|
131
|
+
],
|
|
132
|
+
[
|
|
133
|
+
'action',
|
|
134
|
+
v4_namespaceObject.z.strictObject({
|
|
135
|
+
name: v4_namespaceObject.z.string(),
|
|
136
|
+
params: v4_namespaceObject.z.unknown()
|
|
137
|
+
})
|
|
138
|
+
],
|
|
139
|
+
[
|
|
140
|
+
'recordToReport',
|
|
141
|
+
v4_namespaceObject.z.strictObject({
|
|
142
|
+
title: v4_namespaceObject.z.unknown(),
|
|
143
|
+
options: v4_namespaceObject.z.record(v4_namespaceObject.z.string(), v4_namespaceObject.z.unknown()).optional()
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
]);
|
|
147
|
+
const sharedDefinitions = new Map(test_runner_nodes_js_namespaceObject.commonAgentTestRunnerNodeDefinitions.map((definition)=>[
|
|
148
|
+
definition.name,
|
|
149
|
+
definition
|
|
150
|
+
]));
|
|
151
|
+
const legacyAgentTestRunnerNodeDefinitions = [
|
|
152
|
+
...Array.from(legacyInputSchemas, ([name, inputSchema])=>{
|
|
153
|
+
const definition = sharedDefinitions.get(name);
|
|
154
|
+
(0, utils_namespaceObject.assert)(definition, `Missing shared Agent Node for legacy YAML: ${name}`);
|
|
155
|
+
return {
|
|
156
|
+
...definition,
|
|
157
|
+
inputSchema
|
|
158
|
+
};
|
|
159
|
+
}),
|
|
160
|
+
legacyFinalizeNodeDefinition,
|
|
161
|
+
legacyRunAdbShellNodeDefinition,
|
|
162
|
+
legacyActionNodeDefinition,
|
|
163
|
+
legacyValidationErrorNodeDefinition
|
|
164
|
+
];
|
|
165
|
+
const insightNodes = new Set([
|
|
166
|
+
'aiBoolean',
|
|
167
|
+
'aiNumber',
|
|
168
|
+
'aiString',
|
|
169
|
+
'aiAsk'
|
|
170
|
+
]);
|
|
171
|
+
function getLegacyYamlResultData(node, output) {
|
|
172
|
+
return insightNodes.has(node) ? output.data.value : output.data;
|
|
173
|
+
}
|
|
174
|
+
exports.getLegacyYamlResultData = __webpack_exports__.getLegacyYamlResultData;
|
|
175
|
+
exports.legacyAgentTestRunnerNodeDefinitions = __webpack_exports__.legacyAgentTestRunnerNodeDefinitions;
|
|
176
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
177
|
+
"getLegacyYamlResultData",
|
|
178
|
+
"legacyAgentTestRunnerNodeDefinitions"
|
|
179
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
180
|
+
Object.defineProperty(exports, '__esModule', {
|
|
181
|
+
value: true
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
//# sourceMappingURL=test-runner-nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml/test-runner-nodes.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/yaml/test-runner-nodes.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { assert } from '@midscene/shared/utils';\nimport { z } from 'zod/v4';\nimport {\n type AgentTestRunnerNodeDefinition,\n commonAgentTestRunnerNodeDefinitions,\n} from '../agent/test-runner-nodes';\nimport type { NodeResult } from '../test-runner/node/types';\nimport type { DeviceAction, MidsceneYamlFlowItem } from '../types';\nimport { compileLegacyFlowItem } from './test-runner-compat';\n\n/** Planning-only marker accepted by the old YAML grammar, not a native Test Node. */\nconst legacyFinalizeNodeDefinition: AgentTestRunnerNodeDefinition = {\n name: 'Finalize',\n inputSchema: z.strictObject({}),\n execute: () => undefined,\n};\n\nconst legacyRunAdbShellNodeDefinition: AgentTestRunnerNodeDefinition = {\n name: 'runAdbShell',\n inputSchema: z.strictObject({ command: z.string(), timeout: z.number() }),\n async execute(agent, input) {\n const androidAgent = agent as {\n runAdbShell?: (\n command: string,\n options: { timeout: number },\n ) => Promise<unknown>;\n callActionInActionSpace(\n name: string,\n params: Record<string, unknown>,\n ): Promise<unknown>;\n };\n const command = input.command as string;\n const timeout = input.timeout as number;\n const value = androidAgent.runAdbShell\n ? await androidAgent.runAdbShell(command, { timeout })\n : await androidAgent.callActionInActionSpace('RunAdbShell', {\n command,\n timeout,\n });\n return value === undefined ? undefined : { data: value };\n },\n};\n\n/** Only YAML hosts resolve shorthand; the shared Agent receives canonical params. */\nconst legacyActionNodeDefinition: AgentTestRunnerNodeDefinition = {\n name: 'legacyAction',\n inputSchema: z.strictObject({ flow: z.record(z.string(), z.unknown()) }),\n async execute(agent, input, context) {\n context.signal.throwIfAborted();\n const actionSpace = await (\n agent as {\n getActionSpace(): Promise<DeviceAction[]>;\n }\n ).getActionSpace();\n context.signal.throwIfAborted();\n const step = compileLegacyFlowItem(\n input.flow as MidsceneYamlFlowItem,\n actionSpace,\n );\n assert(\n step.node !== 'legacyAction',\n `unknown flowItem in yaml: ${JSON.stringify(input.flow)}`,\n );\n const definition = legacyAgentTestRunnerNodeDefinitions.find(\n (node) => node.name === step.node,\n );\n assert(definition, `Unknown Agent Node: ${step.node}`);\n const parsed = await definition.inputSchema.parseAsync(step.input);\n context.signal.throwIfAborted();\n return definition.execute(agent, parsed, context);\n },\n};\n\n/** Preserve the old task failure phase without adding native parser controls. */\nconst legacyValidationErrorNodeDefinition: AgentTestRunnerNodeDefinition = {\n name: 'legacyValidationError',\n inputSchema: z.strictObject({ message: z.string() }),\n execute(_agent, input) {\n throw new Error(input.message as string);\n },\n};\n\n// The old player checked YAML grammar, then passed options through to Agent.\n// Validate only the compiled envelope here: native field whitelists, positive\n// wait durations and nonempty image arrays must not narrow the legacy grammar.\n// compileLegacyFlowItem preserves the old checks at their task execution phase;\n// Agent/ActionSpace remain responsible for validating the business parameters.\nconst legacyPromptInputSchema = z.strictObject({\n prompt: z.unknown(),\n options: z.record(z.string(), z.unknown()).optional(),\n});\nconst legacyInputSchemas = new Map<string, z.ZodObject>([\n ...[\n 'aiAct',\n 'aiTap',\n 'aiLocate',\n 'aiQuery',\n 'aiNumber',\n 'aiString',\n 'aiBoolean',\n 'aiAsk',\n 'aiWaitFor',\n 'aiScroll',\n ].map((name): [string, z.ZodObject] => [name, legacyPromptInputSchema]),\n ['aiAssert', legacyPromptInputSchema.extend({ message: z.unknown() })],\n ['javascript', z.strictObject({ script: z.unknown() })],\n [\n 'runGherkinScenario',\n z.strictObject({\n scenario: z.unknown(),\n options: z.record(z.string(), z.unknown()).optional(),\n }),\n ],\n ['sleep', z.strictObject({ ms: z.number().positive() })],\n ['action', z.strictObject({ name: z.string(), params: z.unknown() })],\n [\n 'recordToReport',\n z.strictObject({\n title: z.unknown(),\n options: z.record(z.string(), z.unknown()).optional(),\n }),\n ],\n]);\nconst sharedDefinitions = new Map(\n commonAgentTestRunnerNodeDefinitions.map((definition) => [\n definition.name,\n definition,\n ]),\n);\nexport const legacyAgentTestRunnerNodeDefinitions: readonly AgentTestRunnerNodeDefinition[] =\n [\n ...Array.from(legacyInputSchemas, ([name, inputSchema]) => {\n const definition = sharedDefinitions.get(name);\n assert(definition, `Missing shared Agent Node for legacy YAML: ${name}`);\n return { ...definition, inputSchema };\n }),\n legacyFinalizeNodeDefinition,\n legacyRunAdbShellNodeDefinition,\n legacyActionNodeDefinition,\n legacyValidationErrorNodeDefinition,\n ];\n\nconst insightNodes = new Set(['aiBoolean', 'aiNumber', 'aiString', 'aiAsk']);\n\n/** Keep Test's { value } contract; only the legacy output view unwraps insights. */\nexport function getLegacyYamlResultData(\n node: string,\n output: NodeResult,\n): unknown {\n return insightNodes.has(node)\n ? (output.data as { value: unknown }).value\n : output.data;\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","legacyFinalizeNodeDefinition","z","undefined","legacyRunAdbShellNodeDefinition","agent","input","androidAgent","command","timeout","value","legacyActionNodeDefinition","context","actionSpace","step","compileLegacyFlowItem","assert","JSON","legacyAgentTestRunnerNodeDefinitions","node","parsed","legacyValidationErrorNodeDefinition","_agent","Error","legacyPromptInputSchema","legacyInputSchemas","Map","name","sharedDefinitions","commonAgentTestRunnerNodeDefinitions","Array","inputSchema","insightNodes","Set","getLegacyYamlResultData","output"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;ACKA,MAAMI,+BAA8D;IAClE,MAAM;IACN,aAAaC,mBAAAA,CAAAA,CAAAA,YAAc,CAAC,CAAC;IAC7B,SAAS,IAAMC;AACjB;AAEA,MAAMC,kCAAiE;IACrE,MAAM;IACN,aAAaF,mBAAAA,CAAAA,CAAAA,YAAc,CAAC;QAAE,SAASA,mBAAAA,CAAAA,CAAAA,MAAQ;QAAI,SAASA,mBAAAA,CAAAA,CAAAA,MAA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,YAAc,CAAC;YAAE,MAAMA,mBAAAA,CAAAA,CAAAA,MAAQ;YAAI,QAAQA,mBAAAA,CAAAA,CAAAA,OAAS;QAAG;KAAG;IACrE;QACE;QACAA,mBAAAA,CAAAA,CAAAA,YAAc,CAAC;YACb,OAAOA,mBAAAA,CAAAA,CAAAA,OAAS;YAChB,SAASA,mBAAAA,CAAAA,CAAAA,MAAQ,CAACA,mBAAAA,CAAAA,CAAAA,MAAQ,IAAIA,mBAAAA,CAAAA,CAAAA,OAAS,IAAI,QAAQ;QACrD;KACD;CACF;AACD,MAAM0B,oBAAoB,IAAIF,IAC5BG,qCAAAA,oCAAAA,CAAAA,GAAwC,CAAC,CAAClC,aAAe;QACvDA,WAAW,IAAI;QACfA;KACD;AAEI,MAAMuB,uCACX;OACKY,MAAM,IAAI,CAACL,oBAAoB,CAAC,CAACE,MAAMI,YAAY;QACpD,MAAMpC,aAAaiC,kBAAkB,GAAG,CAACD;QACzCX,IAAAA,sBAAAA,MAAAA,AAAAA,EAAOrB,YAAY,CAAC,2CAA2C,EAAEgC,MAAM;QACvE,OAAO;YAAE,GAAGhC,UAAU;YAAEoC;QAAY;IACtC;IACA9B;IACAG;IACAO;IACAU;CACD;AAEH,MAAMW,eAAe,IAAIC,IAAI;IAAC;IAAa;IAAY;IAAY;CAAQ;AAGpE,SAASC,wBACdf,IAAY,EACZgB,MAAkB;IAElB,OAAOH,aAAa,GAAG,CAACb,QACnBgB,OAAO,IAAI,CAAwB,KAAK,GACzCA,OAAO,IAAI;AACjB"}
|
package/dist/lib/yaml/utils.js
CHANGED
|
@@ -33,8 +33,10 @@ var __webpack_require__ = {};
|
|
|
33
33
|
var __webpack_exports__ = {};
|
|
34
34
|
__webpack_require__.r(__webpack_exports__);
|
|
35
35
|
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
resolveYamlOutputConfig: ()=>resolveYamlOutputConfig,
|
|
36
37
|
buildDetailedLocateParam: ()=>buildDetailedLocateParam,
|
|
37
38
|
buildDetailedLocateParamAndRestParams: ()=>buildDetailedLocateParamAndRestParams,
|
|
39
|
+
parseLegacyYamlScript: ()=>parseLegacyYamlScript,
|
|
38
40
|
parseYamlScript: ()=>parseYamlScript,
|
|
39
41
|
resolveWebTarget: ()=>resolveWebTarget,
|
|
40
42
|
interpolateEnvVars: ()=>interpolateEnvVars
|
|
@@ -80,6 +82,13 @@ function resolveWebTarget(config) {
|
|
|
80
82
|
}
|
|
81
83
|
};
|
|
82
84
|
}
|
|
85
|
+
function resolveYamlOutputConfig(script) {
|
|
86
|
+
const target = resolveWebTarget(script)?.target ?? script.android ?? script.ios ?? script.harmony ?? script.computer;
|
|
87
|
+
return {
|
|
88
|
+
output: target?.output ?? script.config?.output,
|
|
89
|
+
unstableLogContent: target?.unstableLogContent ?? script.config?.unstableLogContent
|
|
90
|
+
};
|
|
91
|
+
}
|
|
83
92
|
function interpolateEnvVarRefs(value, keepUnresolvedRefs = false) {
|
|
84
93
|
let result = '';
|
|
85
94
|
let lastIndex = 0;
|
|
@@ -144,6 +153,9 @@ function interpolateYamlScriptEnvVars(content) {
|
|
|
144
153
|
}).join('\n');
|
|
145
154
|
}
|
|
146
155
|
function parseYamlScript(content, filePath) {
|
|
156
|
+
return parseLegacyYamlScript(content, filePath);
|
|
157
|
+
}
|
|
158
|
+
function parseLegacyYamlScript(content, filePath, onConfig) {
|
|
147
159
|
let processedContent = content;
|
|
148
160
|
if (-1 !== content.indexOf('android') && content.match(/deviceId:\s*(\d+)/)) {
|
|
149
161
|
let matchedDeviceId;
|
|
@@ -157,6 +169,7 @@ function parseYamlScript(content, filePath) {
|
|
|
157
169
|
const obj = external_js_yaml_default().load(interpolatedContent, {
|
|
158
170
|
schema: external_js_yaml_default().JSON_SCHEMA
|
|
159
171
|
});
|
|
172
|
+
if (obj && 'object' == typeof obj && !Array.isArray(obj)) onConfig?.(obj);
|
|
160
173
|
const pathTip = filePath ? `, failed to load ${filePath}` : '';
|
|
161
174
|
resolveWebTarget(obj);
|
|
162
175
|
(0, utils_namespaceObject.assert)(obj.tasks, `property "tasks" is required in yaml script ${pathTip}`);
|
|
@@ -223,14 +236,18 @@ function buildDetailedLocateParamAndRestParams(locatePrompt, opt, excludeKeys =
|
|
|
223
236
|
exports.buildDetailedLocateParam = __webpack_exports__.buildDetailedLocateParam;
|
|
224
237
|
exports.buildDetailedLocateParamAndRestParams = __webpack_exports__.buildDetailedLocateParamAndRestParams;
|
|
225
238
|
exports.interpolateEnvVars = __webpack_exports__.interpolateEnvVars;
|
|
239
|
+
exports.parseLegacyYamlScript = __webpack_exports__.parseLegacyYamlScript;
|
|
226
240
|
exports.parseYamlScript = __webpack_exports__.parseYamlScript;
|
|
227
241
|
exports.resolveWebTarget = __webpack_exports__.resolveWebTarget;
|
|
242
|
+
exports.resolveYamlOutputConfig = __webpack_exports__.resolveYamlOutputConfig;
|
|
228
243
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
229
244
|
"buildDetailedLocateParam",
|
|
230
245
|
"buildDetailedLocateParamAndRestParams",
|
|
231
246
|
"interpolateEnvVars",
|
|
247
|
+
"parseLegacyYamlScript",
|
|
232
248
|
"parseYamlScript",
|
|
233
|
-
"resolveWebTarget"
|
|
249
|
+
"resolveWebTarget",
|
|
250
|
+
"resolveYamlOutputConfig"
|
|
234
251
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
235
252
|
Object.defineProperty(exports, '__esModule', {
|
|
236
253
|
value: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml/utils.js","sources":["webpack/runtime/compat_get_default_export","webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/yaml/utils.ts"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type { TMultimodalPrompt, TUserPrompt } from '@/common';\nimport type {\n DetailedLocateParam,\n LocateOption,\n MidsceneYamlScript,\n MidsceneYamlScriptWebEnv,\n} from '@/types';\nimport { getDebug } from '@midscene/shared/logger';\nimport { assert } from '@midscene/shared/utils';\nimport yaml from 'js-yaml';\nimport { buildLocatePromptWithContext } from '../agent/prompt-context';\n\nconst debugUtils = getDebug('yaml:utils');\n\nconst topLevelTasksPattern = /^tasks\\s*:/;\nconst topLevelYamlKeyPattern = /^[^\\s#][^:]*:/;\n\nexport type WebTargetSource = 'page' | 'browser' | 'web' | 'target';\n\nexport type ResolvedWebTarget = {\n source: WebTargetSource;\n target: Partial<MidsceneYamlScriptWebEnv> & { mode: 'page' | 'browser' };\n mode: 'page' | 'browser';\n};\n\nexport type WebTargetConfig = Partial<\n Record<WebTargetSource, Partial<MidsceneYamlScriptWebEnv>>\n>;\n\nconst webTargetSources: WebTargetSource[] = [\n 'page',\n 'browser',\n 'web',\n 'target',\n];\n\nexport function resolveWebTarget(\n config: WebTargetConfig,\n): ResolvedWebTarget | undefined {\n const entries = webTargetSources\n .map((source) => [source, config[source]] as const)\n .filter(\n (\n entry,\n ): entry is readonly [\n WebTargetSource,\n Partial<MidsceneYamlScriptWebEnv>,\n ] => typeof entry[1] !== 'undefined',\n );\n\n if (entries.length === 0) {\n return undefined;\n }\n\n if (entries.length > 1) {\n const specifiedTargets = entries.map(([source]) => source);\n throw new Error(\n `[midscene] Only one web target can be specified, but found multiple: ${specifiedTargets.join(\n ', ',\n )}. Please specify only one of: page, browser, web, or target.`,\n );\n }\n\n const [source, target] = entries[0];\n const explicitMode = target.mode;\n if (\n typeof explicitMode !== 'undefined' &&\n explicitMode !== 'page' &&\n explicitMode !== 'browser'\n ) {\n throw new Error(\n `[midscene] web target mode must be either \"page\" or \"browser\", but got \"${explicitMode}\".`,\n );\n }\n\n if (source === 'page' && explicitMode === 'browser') {\n throw new Error(\n '[midscene] page target cannot use mode: browser. Use browser: instead.',\n );\n }\n\n if (source === 'browser' && explicitMode === 'page') {\n throw new Error(\n '[midscene] browser target cannot use mode: page. Use page: instead.',\n );\n }\n\n const mode =\n source === 'page'\n ? 'page'\n : source === 'browser'\n ? 'browser'\n : (explicitMode ?? 'page');\n\n if (mode === 'page' && target.autoFollowNewPage) {\n throw new Error(\n '[midscene] autoFollowNewPage requires browser mode. Use browser: or web.mode: browser.',\n );\n }\n\n if (\n mode === 'browser' &&\n typeof target.forceSameTabNavigation !== 'undefined'\n ) {\n throw new Error(\n '[midscene] forceSameTabNavigation cannot be used in browser mode. Use page: or web.mode: page when same-tab navigation is required.',\n );\n }\n\n return {\n source,\n mode,\n target: {\n ...target,\n mode,\n },\n };\n}\n\nfunction interpolateEnvVarRefs(\n value: string,\n keepUnresolvedRefs = false,\n): string {\n let result = '';\n let lastIndex = 0;\n let searchFrom = 0;\n\n while (searchFrom < value.length) {\n const start = value.indexOf('${', searchFrom);\n if (start === -1) {\n break;\n }\n\n const end = value.indexOf('}', start + 2);\n if (end === -1) {\n break;\n }\n\n const rawName = value.slice(start + 2, end);\n if (!rawName) {\n searchFrom = end + 1;\n continue;\n }\n\n result += value.slice(lastIndex, start);\n const envVar = rawName.trim();\n const envValue = process.env[envVar];\n if (envValue === undefined) {\n if (keepUnresolvedRefs) {\n result += value.slice(start, end + 1);\n } else {\n throw new Error(`Environment variable \"${envVar}\" is not defined`);\n }\n } else {\n result += envValue;\n }\n lastIndex = end + 1;\n searchFrom = end + 1;\n }\n\n return result + value.slice(lastIndex);\n}\n\nconst multimodalLocateOptionFieldMap: Record<keyof TMultimodalPrompt, true> = {\n images: true,\n convertHttpImage2Base64: true,\n};\n\nconst multimodalLocateOptionKeys = Object.keys(\n multimodalLocateOptionFieldMap,\n) as Array<keyof TMultimodalPrompt>;\n\nfunction extractMultimodalPrompt(\n opt?: LocateOption,\n): Partial<TMultimodalPrompt> | undefined {\n if (typeof opt !== 'object' || opt === null) {\n return undefined;\n }\n\n const entries = multimodalLocateOptionKeys\n .map((key) => [key, opt[key]] as const)\n .filter(([, value]) => value !== undefined);\n\n return entries.length\n ? (Object.fromEntries(entries) as Partial<TMultimodalPrompt>)\n : undefined;\n}\n\nexport function interpolateEnvVars(content: string): string {\n // Process line by line to skip commented lines\n const lines = content.split('\\n');\n const processedLines = lines.map((line) => {\n // Check if the line is a YAML comment (starts with # after optional whitespace)\n const trimmedLine = line.trimStart();\n if (trimmedLine.startsWith('#')) {\n // Skip interpolation for comment lines\n return line;\n }\n\n // Process environment variables for non-comment lines\n return interpolateEnvVarRefs(line);\n });\n\n return processedLines.join('\\n');\n}\n\nfunction interpolateYamlScriptEnvVars(content: string): string {\n let inTopLevelTasksBlock = false;\n\n return content\n .split('\\n')\n .map((line) => {\n const trimmedLine = line.trimStart();\n if (!trimmedLine || trimmedLine.startsWith('#')) {\n return line;\n }\n\n const indentSize = line.length - trimmedLine.length;\n if (indentSize === 0) {\n if (topLevelTasksPattern.test(trimmedLine)) {\n inTopLevelTasksBlock = true;\n return line;\n }\n\n if (topLevelYamlKeyPattern.test(trimmedLine)) {\n inTopLevelTasksBlock = false;\n }\n }\n\n return interpolateEnvVarRefs(line, inTopLevelTasksBlock);\n })\n .join('\\n');\n}\n\nexport function parseYamlScript(\n content: string,\n filePath?: string,\n): MidsceneYamlScript {\n let processedContent = content;\n if (content.indexOf('android') !== -1 && content.match(/deviceId:\\s*(\\d+)/)) {\n let matchedDeviceId;\n processedContent = content.replace(\n /deviceId:\\s*(\\d+)/g,\n (match, deviceId) => {\n matchedDeviceId = deviceId;\n return `deviceId: '${deviceId}'`;\n },\n );\n console.warn(\n `please use string-style deviceId in yaml script, for example: deviceId: \"${matchedDeviceId}\"`,\n );\n }\n const interpolatedContent = interpolateYamlScriptEnvVars(processedContent);\n const obj = yaml.load(interpolatedContent, {\n schema: yaml.JSON_SCHEMA,\n }) as MidsceneYamlScript;\n\n const pathTip = filePath ? `, failed to load ${filePath}` : '';\n resolveWebTarget(obj);\n assert(obj.tasks, `property \"tasks\" is required in yaml script ${pathTip}`);\n assert(\n Array.isArray(obj.tasks),\n `property \"tasks\" must be an array in yaml script, but got ${obj.tasks}`,\n );\n return obj;\n}\n\nexport function buildDetailedLocateParam(\n locatePrompt: TUserPrompt,\n opt?: LocateOption,\n): DetailedLocateParam | undefined {\n debugUtils('will call buildDetailedLocateParam', locatePrompt, opt);\n // Normalize object-form TUserPrompt: when the object only contains a\n // `prompt` string (no multimodal fields like `images`), unwrap it to\n // avoid double nesting like { prompt: { prompt: '...' } }.\n let normalizedLocatePrompt: TUserPrompt = locatePrompt;\n if (\n typeof locatePrompt === 'object' &&\n locatePrompt !== null &&\n 'prompt' in locatePrompt\n ) {\n const { prompt: innerPrompt, ...rest } = locatePrompt;\n const hasMultimodalFields = Object.keys(rest).length > 0;\n normalizedLocatePrompt = hasMultimodalFields ? locatePrompt : innerPrompt;\n }\n\n let prompt = normalizedLocatePrompt || opt?.prompt || (opt as any)?.locate; // as a shortcut\n let deepLocate = false;\n let cacheable = true;\n let xpath = undefined;\n\n if (typeof opt === 'object' && opt !== null) {\n // Backward-compatible: accept `deepThink` as a deprecated alias for `deepLocate`.\n // All downstream code works on `deepLocate` only; the compatibility resolution\n // is intentionally kept here at the entry point so it does not bleed through\n // the rest of the call stack.\n deepLocate = opt.deepLocate ?? opt.deepThink ?? false;\n cacheable = opt.cacheable ?? true;\n xpath = opt.xpath;\n if (locatePrompt && opt.prompt && locatePrompt !== opt.prompt) {\n console.warn(\n 'conflict prompt for item',\n locatePrompt,\n opt,\n 'maybe you put the prompt in the wrong place',\n );\n }\n prompt = prompt || opt.prompt;\n }\n\n if (!prompt) {\n debugUtils(\n 'no prompt, will return undefined in buildDetailedLocateParam',\n opt,\n );\n return undefined;\n }\n\n const promptDisplay = typeof prompt === 'string' ? prompt : prompt.prompt;\n const context = opt?.context?.trim() || undefined;\n prompt = buildLocatePromptWithContext(prompt, opt?.context);\n\n const multimodalPrompt = extractMultimodalPrompt(opt);\n if (multimodalPrompt) {\n prompt =\n typeof prompt === 'string'\n ? {\n prompt,\n ...multimodalPrompt,\n }\n : {\n ...prompt,\n ...multimodalPrompt,\n };\n }\n\n return {\n prompt,\n ...(context ? { promptDisplay, context } : {}),\n deepLocate,\n cacheable,\n xpath,\n };\n}\n\nexport function buildDetailedLocateParamAndRestParams(\n locatePrompt: TUserPrompt,\n opt: LocateOption | undefined,\n excludeKeys: string[] = [],\n): {\n locateParam: DetailedLocateParam | undefined;\n restParams: Record<string, any>;\n} {\n const multimodalPrompt = extractMultimodalPrompt(opt);\n const locateParam = buildDetailedLocateParam(locatePrompt, opt);\n\n // Extract all keys from opt except the ones already included in locateParam\n const restParams: Record<string, any> = {};\n\n if (typeof opt === 'object' && opt !== null) {\n // Get all keys from opt\n const allKeys = Object.keys(opt);\n\n // `context` has already been merged into the locate prompt.\n const locateParamKeys = Object.keys(locateParam || {});\n const multimodalPromptKeys =\n typeof locateParam?.prompt === 'object' && locateParam?.prompt !== null\n ? Object.keys(multimodalPrompt || {})\n : [];\n\n // Extract all other keys\n for (const key of allKeys) {\n if (\n !locateParamKeys.includes(key) &&\n key !== 'context' &&\n key !== 'deepThink' &&\n !multimodalPromptKeys.includes(key) &&\n !excludeKeys.includes(key) &&\n key !== 'locate'\n ) {\n restParams[key] = opt[key as keyof LocateOption];\n }\n }\n }\n\n return {\n locateParam,\n restParams,\n };\n}\n"],"names":["__webpack_require__","module","getter","definition","key","Object","obj","prop","Symbol","debugUtils","getDebug","topLevelTasksPattern","topLevelYamlKeyPattern","webTargetSources","resolveWebTarget","config","entries","source","entry","specifiedTargets","Error","target","explicitMode","mode","interpolateEnvVarRefs","value","keepUnresolvedRefs","result","lastIndex","searchFrom","start","end","rawName","envVar","envValue","process","undefined","multimodalLocateOptionFieldMap","multimodalLocateOptionKeys","extractMultimodalPrompt","opt","interpolateEnvVars","content","lines","processedLines","line","trimmedLine","interpolateYamlScriptEnvVars","inTopLevelTasksBlock","indentSize","parseYamlScript","filePath","processedContent","matchedDeviceId","match","deviceId","console","interpolatedContent","yaml","pathTip","assert","Array","buildDetailedLocateParam","locatePrompt","normalizedLocatePrompt","innerPrompt","rest","hasMultimodalFields","prompt","deepLocate","cacheable","xpath","promptDisplay","context","buildLocatePromptWithContext","multimodalPrompt","buildDetailedLocateParamAndRestParams","excludeKeys","locateParam","restParams","allKeys","locateParamKeys","multimodalPromptKeys"],"mappings":";;;IACAA,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAIC,SAASD,UAAUA,OAAO,UAAU,GACvC,IAAOA,MAAM,CAAC,UAAU,GACxB,IAAOA;QACRD,oBAAoB,CAAC,CAACE,QAAQ;YAAE,GAAGA;QAAO;QAC1C,OAAOA;IACR;;;ICPAF,oBAAoB,CAAC,GAAG,CAAC,UAASG;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGH,oBAAoB,CAAC,CAACG,YAAYC,QAAQ,CAACJ,oBAAoB,CAAC,CAAC,UAASI,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAJ,oBAAoB,CAAC,GAAG,CAACM,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFP,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOQ,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAA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OAAO;QACL0E;QACAC;IACF;AACF"}
|
|
1
|
+
{"version":3,"file":"yaml/utils.js","sources":["webpack/runtime/compat_get_default_export","webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/yaml/utils.ts"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type { TMultimodalPrompt, TUserPrompt } from '@/common';\nimport type {\n DetailedLocateParam,\n LocateOption,\n MidsceneYamlScript,\n MidsceneYamlScriptWebEnv,\n} from '@/types';\nimport { getDebug } from '@midscene/shared/logger';\nimport { assert } from '@midscene/shared/utils';\nimport yaml from 'js-yaml';\nimport { buildLocatePromptWithContext } from '../agent/prompt-context';\n\nconst debugUtils = getDebug('yaml:utils');\n\nconst topLevelTasksPattern = /^tasks\\s*:/;\nconst topLevelYamlKeyPattern = /^[^\\s#][^:]*:/;\n\nexport type WebTargetSource = 'page' | 'browser' | 'web' | 'target';\n\nexport type ResolvedWebTarget = {\n source: WebTargetSource;\n target: Partial<MidsceneYamlScriptWebEnv> & { mode: 'page' | 'browser' };\n mode: 'page' | 'browser';\n};\n\nexport type WebTargetConfig = Partial<\n Record<WebTargetSource, Partial<MidsceneYamlScriptWebEnv>>\n>;\n\nconst webTargetSources: WebTargetSource[] = [\n 'page',\n 'browser',\n 'web',\n 'target',\n];\n\nexport function resolveWebTarget(\n config: WebTargetConfig,\n): ResolvedWebTarget | undefined {\n const entries = webTargetSources\n .map((source) => [source, config[source]] as const)\n .filter(\n (\n entry,\n ): entry is readonly [\n WebTargetSource,\n Partial<MidsceneYamlScriptWebEnv>,\n ] => typeof entry[1] !== 'undefined',\n );\n\n if (entries.length === 0) {\n return undefined;\n }\n\n if (entries.length > 1) {\n const specifiedTargets = entries.map(([source]) => source);\n throw new Error(\n `[midscene] Only one web target can be specified, but found multiple: ${specifiedTargets.join(\n ', ',\n )}. Please specify only one of: page, browser, web, or target.`,\n );\n }\n\n const [source, target] = entries[0];\n const explicitMode = target.mode;\n if (\n typeof explicitMode !== 'undefined' &&\n explicitMode !== 'page' &&\n explicitMode !== 'browser'\n ) {\n throw new Error(\n `[midscene] web target mode must be either \"page\" or \"browser\", but got \"${explicitMode}\".`,\n );\n }\n\n if (source === 'page' && explicitMode === 'browser') {\n throw new Error(\n '[midscene] page target cannot use mode: browser. Use browser: instead.',\n );\n }\n\n if (source === 'browser' && explicitMode === 'page') {\n throw new Error(\n '[midscene] browser target cannot use mode: page. Use page: instead.',\n );\n }\n\n const mode =\n source === 'page'\n ? 'page'\n : source === 'browser'\n ? 'browser'\n : (explicitMode ?? 'page');\n\n if (mode === 'page' && target.autoFollowNewPage) {\n throw new Error(\n '[midscene] autoFollowNewPage requires browser mode. Use browser: or web.mode: browser.',\n );\n }\n\n if (\n mode === 'browser' &&\n typeof target.forceSameTabNavigation !== 'undefined'\n ) {\n throw new Error(\n '[midscene] forceSameTabNavigation cannot be used in browser mode. Use page: or web.mode: page when same-tab navigation is required.',\n );\n }\n\n return {\n source,\n mode,\n target: {\n ...target,\n mode,\n },\n };\n}\n\n/** Legacy output settings apply to every host, including native Test setup.\n * Target-local values keep their original priority; config supplies defaults.\n */\nexport function resolveYamlOutputConfig(\n script: Omit<MidsceneYamlScript, 'tasks'>,\n): {\n output?: string;\n unstableLogContent?: boolean | string;\n} {\n const target =\n resolveWebTarget(script)?.target ??\n script.android ??\n script.ios ??\n script.harmony ??\n script.computer;\n return {\n output: target?.output ?? script.config?.output,\n unstableLogContent:\n target?.unstableLogContent ?? script.config?.unstableLogContent,\n };\n}\n\nfunction interpolateEnvVarRefs(\n value: string,\n keepUnresolvedRefs = false,\n): string {\n let result = '';\n let lastIndex = 0;\n let searchFrom = 0;\n\n while (searchFrom < value.length) {\n const start = value.indexOf('${', searchFrom);\n if (start === -1) {\n break;\n }\n\n const end = value.indexOf('}', start + 2);\n if (end === -1) {\n break;\n }\n\n const rawName = value.slice(start + 2, end);\n if (!rawName) {\n searchFrom = end + 1;\n continue;\n }\n\n result += value.slice(lastIndex, start);\n const envVar = rawName.trim();\n const envValue = process.env[envVar];\n if (envValue === undefined) {\n if (keepUnresolvedRefs) {\n result += value.slice(start, end + 1);\n } else {\n throw new Error(`Environment variable \"${envVar}\" is not defined`);\n }\n } else {\n result += envValue;\n }\n lastIndex = end + 1;\n searchFrom = end + 1;\n }\n\n return result + value.slice(lastIndex);\n}\n\nconst multimodalLocateOptionFieldMap: Record<keyof TMultimodalPrompt, true> = {\n images: true,\n convertHttpImage2Base64: true,\n};\n\nconst multimodalLocateOptionKeys = Object.keys(\n multimodalLocateOptionFieldMap,\n) as Array<keyof TMultimodalPrompt>;\n\nfunction extractMultimodalPrompt(\n opt?: LocateOption,\n): Partial<TMultimodalPrompt> | undefined {\n if (typeof opt !== 'object' || opt === null) {\n return undefined;\n }\n\n const entries = multimodalLocateOptionKeys\n .map((key) => [key, opt[key]] as const)\n .filter(([, value]) => value !== undefined);\n\n return entries.length\n ? (Object.fromEntries(entries) as Partial<TMultimodalPrompt>)\n : undefined;\n}\n\nexport function interpolateEnvVars(content: string): string {\n // Process line by line to skip commented lines\n const lines = content.split('\\n');\n const processedLines = lines.map((line) => {\n // Check if the line is a YAML comment (starts with # after optional whitespace)\n const trimmedLine = line.trimStart();\n if (trimmedLine.startsWith('#')) {\n // Skip interpolation for comment lines\n return line;\n }\n\n // Process environment variables for non-comment lines\n return interpolateEnvVarRefs(line);\n });\n\n return processedLines.join('\\n');\n}\n\nfunction interpolateYamlScriptEnvVars(content: string): string {\n let inTopLevelTasksBlock = false;\n\n return content\n .split('\\n')\n .map((line) => {\n const trimmedLine = line.trimStart();\n if (!trimmedLine || trimmedLine.startsWith('#')) {\n return line;\n }\n\n const indentSize = line.length - trimmedLine.length;\n if (indentSize === 0) {\n if (topLevelTasksPattern.test(trimmedLine)) {\n inTopLevelTasksBlock = true;\n return line;\n }\n\n if (topLevelYamlKeyPattern.test(trimmedLine)) {\n inTopLevelTasksBlock = false;\n }\n }\n\n return interpolateEnvVarRefs(line, inTopLevelTasksBlock);\n })\n .join('\\n');\n}\n\nexport function parseYamlScript(\n content: string,\n filePath?: string,\n): MidsceneYamlScript {\n return parseLegacyYamlScript(content, filePath);\n}\n\n/** Internal collection observer; the public parser keeps its original signature. */\nexport function parseLegacyYamlScript(\n content: string,\n filePath?: string,\n onConfig?: (config: Omit<MidsceneYamlScript, 'tasks'>) => void,\n): MidsceneYamlScript {\n let processedContent = content;\n if (content.indexOf('android') !== -1 && content.match(/deviceId:\\s*(\\d+)/)) {\n let matchedDeviceId;\n processedContent = content.replace(\n /deviceId:\\s*(\\d+)/g,\n (match, deviceId) => {\n matchedDeviceId = deviceId;\n return `deviceId: '${deviceId}'`;\n },\n );\n console.warn(\n `please use string-style deviceId in yaml script, for example: deviceId: \"${matchedDeviceId}\"`,\n );\n }\n const interpolatedContent = interpolateYamlScriptEnvVars(processedContent);\n const obj = yaml.load(interpolatedContent, {\n schema: yaml.JSON_SCHEMA,\n }) as MidsceneYamlScript;\n\n if (obj && typeof obj === 'object' && !Array.isArray(obj)) onConfig?.(obj);\n const pathTip = filePath ? `, failed to load ${filePath}` : '';\n resolveWebTarget(obj);\n assert(obj.tasks, `property \"tasks\" is required in yaml script ${pathTip}`);\n assert(\n Array.isArray(obj.tasks),\n `property \"tasks\" must be an array in yaml script, but got ${obj.tasks}`,\n );\n return obj;\n}\n\nexport function buildDetailedLocateParam(\n locatePrompt: TUserPrompt,\n opt?: LocateOption,\n): DetailedLocateParam | undefined {\n debugUtils('will call buildDetailedLocateParam', locatePrompt, opt);\n // Normalize object-form TUserPrompt: when the object only contains a\n // `prompt` string (no multimodal fields like `images`), unwrap it to\n // avoid double nesting like { prompt: { prompt: '...' } }.\n let normalizedLocatePrompt: TUserPrompt = locatePrompt;\n if (\n typeof locatePrompt === 'object' &&\n locatePrompt !== null &&\n 'prompt' in locatePrompt\n ) {\n const { prompt: innerPrompt, ...rest } = locatePrompt;\n const hasMultimodalFields = Object.keys(rest).length > 0;\n normalizedLocatePrompt = hasMultimodalFields ? locatePrompt : innerPrompt;\n }\n\n let prompt = normalizedLocatePrompt || opt?.prompt || (opt as any)?.locate; // as a shortcut\n let deepLocate = false;\n let cacheable = true;\n let xpath = undefined;\n\n if (typeof opt === 'object' && opt !== null) {\n // Backward-compatible: accept `deepThink` as a deprecated alias for `deepLocate`.\n // All downstream code works on `deepLocate` only; the compatibility resolution\n // is intentionally kept here at the entry point so it does not bleed through\n // the rest of the call stack.\n deepLocate = opt.deepLocate ?? opt.deepThink ?? false;\n cacheable = opt.cacheable ?? true;\n xpath = opt.xpath;\n if (locatePrompt && opt.prompt && locatePrompt !== opt.prompt) {\n console.warn(\n 'conflict prompt for item',\n locatePrompt,\n opt,\n 'maybe you put the prompt in the wrong place',\n );\n }\n prompt = prompt || opt.prompt;\n }\n\n if (!prompt) {\n debugUtils(\n 'no prompt, will return undefined in buildDetailedLocateParam',\n opt,\n );\n return undefined;\n }\n\n const promptDisplay = typeof prompt === 'string' ? prompt : prompt.prompt;\n const context = opt?.context?.trim() || undefined;\n prompt = buildLocatePromptWithContext(prompt, opt?.context);\n\n const multimodalPrompt = extractMultimodalPrompt(opt);\n if (multimodalPrompt) {\n prompt =\n typeof prompt === 'string'\n ? {\n prompt,\n ...multimodalPrompt,\n }\n : {\n ...prompt,\n ...multimodalPrompt,\n };\n }\n\n return {\n prompt,\n ...(context ? { promptDisplay, context } : {}),\n deepLocate,\n cacheable,\n xpath,\n };\n}\n\nexport function buildDetailedLocateParamAndRestParams(\n locatePrompt: TUserPrompt,\n opt: LocateOption | undefined,\n excludeKeys: string[] = [],\n): {\n locateParam: DetailedLocateParam | undefined;\n restParams: Record<string, any>;\n} {\n const multimodalPrompt = extractMultimodalPrompt(opt);\n const locateParam = buildDetailedLocateParam(locatePrompt, opt);\n\n // Extract all keys from opt except the ones already included in locateParam\n const restParams: Record<string, any> = {};\n\n if (typeof opt === 'object' && opt !== null) {\n // Get all keys from opt\n const allKeys = Object.keys(opt);\n\n // `context` has already been merged into the locate prompt.\n const locateParamKeys = Object.keys(locateParam || {});\n const multimodalPromptKeys =\n typeof locateParam?.prompt === 'object' && locateParam?.prompt !== null\n ? Object.keys(multimodalPrompt || {})\n : [];\n\n // Extract all other keys\n for (const key of allKeys) {\n if (\n !locateParamKeys.includes(key) &&\n key !== 'context' &&\n key !== 'deepThink' &&\n !multimodalPromptKeys.includes(key) &&\n !excludeKeys.includes(key) &&\n key !== 'locate'\n ) {\n restParams[key] = opt[key as keyof LocateOption];\n }\n }\n }\n\n return {\n locateParam,\n restParams,\n };\n}\n"],"names":["__webpack_require__","module","getter","definition","key","Object","obj","prop","Symbol","debugUtils","getDebug","topLevelTasksPattern","topLevelYamlKeyPattern","webTargetSources","resolveWebTarget","config","entries","source","entry","specifiedTargets","Error","target","explicitMode","mode","resolveYamlOutputConfig","script","interpolateEnvVarRefs","value","keepUnresolvedRefs","result","lastIndex","searchFrom","start","end","rawName","envVar","envValue","process","undefined","multimodalLocateOptionFieldMap","multimodalLocateOptionKeys","extractMultimodalPrompt","opt","interpolateEnvVars","content","lines","processedLines","line","trimmedLine","interpolateYamlScriptEnvVars","inTopLevelTasksBlock","indentSize","parseYamlScript","filePath","parseLegacyYamlScript","onConfig","processedContent","matchedDeviceId","match","deviceId","console","interpolatedContent","yaml","Array","pathTip","assert","buildDetailedLocateParam","locatePrompt","normalizedLocatePrompt","innerPrompt","rest","hasMultimodalFields","prompt","deepLocate","cacheable","xpath","promptDisplay","context","buildLocatePromptWithContext","multimodalPrompt","buildDetailedLocateParamAndRestParams","excludeKeys","locateParam","restParams","allKeys","locateParamKeys","multimodalPromptKeys"],"mappings":";;;IACAA,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAIC,SAASD,UAAUA,OAAO,UAAU,GACvC,IAAOA,MAAM,CAAC,UAAU,GACxB,IAAOA;QACRD,oBAAoB,CAAC,CAACE,QAAQ;YAAE,GAAGA;QAAO;QAC1C,OAAOA;IACR;;;ICPAF,oBAAoB,CAAC,GAAG,CAAC,UAASG;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGH,oBAAoB,CAAC,CAACG,YAAYC,QAAQ,CAACJ,oBAAoB,CAAC,CAAC,UAASI,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAJ,oBAAoB,CAAC,GAAG,CAACM,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFP,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOQ,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;;;;;;;ACMA,MAAMI,aAAaC,AAAAA,IAAAA,uBAAAA,QAAAA,AAAAA,EAAS;AAE5B,MAAMC,uBAAuB;AAC7B,MAAMC,yBAAyB;AAc/B,MAAMC,mBAAsC;IAC1C;IACA;IACA;IACA;CACD;AAEM,SAASC,iBACdC,MAAuB;IAEvB,MAAMC,UAAUH,iBACb,GAAG,CAAC,CAACI,SAAW;YAAC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QACtBA,AAAQ,aAARA,KAEA+E,UAAU,CAAC/E,IAAI,GAAGsC,GAAG,CAACtC,IAA0B;IAGtD;IAEA,OAAO;QACL8E;QACAC;IACF;AACF"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
enterYamlAction: ()=>execution_session_js_namespaceObject.enterYamlAction,
|
|
28
|
+
runInYamlExecutionContext: ()=>execution_session_js_namespaceObject.runInYamlExecutionContext,
|
|
29
|
+
collectLegacyYamlDocument: ()=>test_runner_compat_js_namespaceObject.collectLegacyYamlDocument,
|
|
30
|
+
enterYamlExecution: ()=>execution_session_js_namespaceObject.enterYamlExecution,
|
|
31
|
+
getLegacyYamlPlayerState: ()=>player_state_js_namespaceObject.getLegacyYamlPlayerState,
|
|
32
|
+
parseLegacyYamlScript: ()=>utils_js_namespaceObject.parseLegacyYamlScript,
|
|
33
|
+
legacyAgentTestRunnerNodeDefinitions: ()=>test_runner_nodes_js_namespaceObject.legacyAgentTestRunnerNodeDefinitions,
|
|
34
|
+
isYamlReportEnabled: ()=>report_policy_js_namespaceObject.isYamlReportEnabled,
|
|
35
|
+
getLegacyYamlResultData: ()=>test_runner_nodes_js_namespaceObject.getLegacyYamlResultData
|
|
36
|
+
});
|
|
37
|
+
const execution_session_js_namespaceObject = require("./yaml/execution-session.js");
|
|
38
|
+
const player_state_js_namespaceObject = require("./yaml/player-state.js");
|
|
39
|
+
const report_policy_js_namespaceObject = require("./yaml/report-policy.js");
|
|
40
|
+
const test_runner_compat_js_namespaceObject = require("./yaml/test-runner-compat.js");
|
|
41
|
+
const utils_js_namespaceObject = require("./yaml/utils.js");
|
|
42
|
+
const test_runner_nodes_js_namespaceObject = require("./yaml/test-runner-nodes.js");
|
|
43
|
+
exports.collectLegacyYamlDocument = __webpack_exports__.collectLegacyYamlDocument;
|
|
44
|
+
exports.enterYamlAction = __webpack_exports__.enterYamlAction;
|
|
45
|
+
exports.enterYamlExecution = __webpack_exports__.enterYamlExecution;
|
|
46
|
+
exports.getLegacyYamlPlayerState = __webpack_exports__.getLegacyYamlPlayerState;
|
|
47
|
+
exports.getLegacyYamlResultData = __webpack_exports__.getLegacyYamlResultData;
|
|
48
|
+
exports.isYamlReportEnabled = __webpack_exports__.isYamlReportEnabled;
|
|
49
|
+
exports.legacyAgentTestRunnerNodeDefinitions = __webpack_exports__.legacyAgentTestRunnerNodeDefinitions;
|
|
50
|
+
exports.parseLegacyYamlScript = __webpack_exports__.parseLegacyYamlScript;
|
|
51
|
+
exports.runInYamlExecutionContext = __webpack_exports__.runInYamlExecutionContext;
|
|
52
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
53
|
+
"collectLegacyYamlDocument",
|
|
54
|
+
"enterYamlAction",
|
|
55
|
+
"enterYamlExecution",
|
|
56
|
+
"getLegacyYamlPlayerState",
|
|
57
|
+
"getLegacyYamlResultData",
|
|
58
|
+
"isYamlReportEnabled",
|
|
59
|
+
"legacyAgentTestRunnerNodeDefinitions",
|
|
60
|
+
"parseLegacyYamlScript",
|
|
61
|
+
"runInYamlExecutionContext"
|
|
62
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
63
|
+
Object.defineProperty(exports, '__esModule', {
|
|
64
|
+
value: true
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=yaml-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml-runtime.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D"}
|
package/dist/lib/yaml.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../src/yaml.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type { TMultimodalPrompt, TUserPrompt } from './common';\nimport type {\n AndroidDeviceOpt,\n HarmonyDeviceOpt,\n IOSDeviceOpt,\n} from './device';\nimport type { AgentOpt, LocateResultElement, Rect } from './types';\nimport type { UIContext } from './types';\n\nexport interface LocateOption extends Partial<TMultimodalPrompt> {\n prompt?: TUserPrompt;\n /**\n * Additional facts, rules, or constraints for this AI call. It overrides\n * the matching API context and `aiContexts.default`; `''` disables inherited\n * user context for this call.\n */\n context?: string;\n deepLocate?: boolean; // only available in vl model\n /** @deprecated Use `deepLocate` instead. Kept for backward compatibility. */\n deepThink?: boolean; // alias for deepLocate\n cacheable?: boolean; // user can set this param to false to disable the cache for a single agent api\n xpath?: string; // only available in web\n uiContext?: UIContext;\n fileChooserAccept?: string | string[]; // file path(s) to upload when tapping triggers a file chooser\n}\n\nexport interface ServiceExtractOption {\n /**\n * Additional facts, decision rules, constraints, or output requirements for\n * this AI call. It overrides the matching API context and\n * `aiContexts.default`; `''` disables inherited user context for this call.\n */\n context?: string;\n domIncluded?: boolean | 'visible-only';\n screenshotIncluded?: boolean;\n [key: string]: unknown;\n}\n\nexport interface DetailedLocateParam\n extends Omit<\n LocateOption,\n 'context' | 'deepThink' | keyof TMultimodalPrompt\n > {\n prompt: TUserPrompt;\n /** Original prompt text used for user-facing reports. */\n promptDisplay?: string;\n /** Per-call AI guidance recorded in user-facing reports. */\n context?: string;\n}\n\nexport type ScrollType =\n | 'singleAction'\n | 'scrollToBottom'\n | 'scrollToTop'\n | 'scrollToRight'\n | 'scrollToLeft'\n // Legacy aliases kept for backward compatibility\n | 'once'\n | 'untilBottom'\n | 'untilTop'\n | 'untilRight'\n | 'untilLeft';\n\nexport type ActionScrollParam = {\n direction?: 'down' | 'up' | 'right' | 'left';\n scrollType?: ScrollType;\n distance?: number | null;\n locate?: LocateResultElement;\n};\n\nexport type ScrollParam = Omit<ActionScrollParam, 'locate'>;\n\nexport interface MidsceneYamlScript {\n // @deprecated\n target?: MidsceneYamlScriptWebEnv;\n\n page?: MidsceneYamlScriptWebEnv;\n browser?: MidsceneYamlScriptWebEnv;\n web?: MidsceneYamlScriptWebEnv;\n android?: MidsceneYamlScriptAndroidEnv;\n ios?: MidsceneYamlScriptIOSEnv;\n harmony?: MidsceneYamlScriptHarmonyEnv;\n computer?: MidsceneYamlScriptComputerEnv;\n\n interface?: MidsceneYamlScriptEnvGeneralInterface;\n config?: MidsceneYamlScriptConfig;\n agent?: MidsceneYamlScriptAgentOpt;\n\n tasks: MidsceneYamlTask[];\n}\n\nexport interface MidsceneYamlTask {\n name: string;\n flow: MidsceneYamlFlowItem[];\n continueOnError?: boolean;\n}\n\n/**\n * Agent configuration options that can be specified in YAML scripts.\n *\n * This type includes serializable fields from AgentOpt, excluding non-serializable\n * fields like functions and complex objects. All fields are optional.\n *\n * @remarks\n * - testId is deprecated; prefer reportFileName and cache.id\n * - These settings apply to all platforms (Web, Android, iOS, Generic Interface)\n * - modelConfig is configured through environment variables, not in YAML\n *\n * @example\n * ```yaml\n * agent:\n * reportFileName: \"checkout-report\"\n * groupName: \"E2E Test Suite\"\n * generateReport: true\n * replanningCycleLimit: 30\n * cache:\n * id: \"checkout-cache\"\n * strategy: \"read-write\"\n * ```\n */\nexport type MidsceneYamlScriptAgentOpt = Pick<\n AgentOpt,\n | 'testId' // deprecated, kept for backward compatibility\n | 'groupName'\n | 'groupDescription'\n | 'generateReport'\n | 'persistExecutionDump'\n | 'autoPrintReportMsg'\n | 'reportFileName'\n | 'replanningCycleLimit'\n | 'aiContexts'\n | 'aiActContext'\n | 'aiActionContext'\n | 'cache'\n | 'screenshotShrinkFactor'\n>;\n\nexport interface MidsceneYamlScriptConfig {\n output?: string;\n unstableLogContent?: boolean | string;\n}\n\nexport interface MidsceneYamlScriptEnvGeneralInterface {\n // this will work as `const {...} = import('...'); const interface = new ...(param)`\n module: string;\n export?: string;\n param?: Record<string, any>;\n}\n\nexport interface MidsceneYamlScriptWebEnv\n extends MidsceneYamlScriptConfig,\n MidsceneYamlScriptAgentOpt {\n mode?: 'page' | 'browser';\n\n // for web only\n serve?: string;\n url: string;\n\n // puppeteer only\n userAgent?: string;\n acceptInsecureCerts?: boolean;\n viewportWidth?: number;\n viewportHeight?: number;\n deviceScaleFactor?: number;\n waitForNetworkIdle?: {\n timeout?: number;\n continueOnNetworkIdleError?: boolean; // should continue if failed to wait for network idle, true for default\n };\n cookie?: string;\n\n /**\n * Extra HTTP headers sent with every request (Puppeteer only, not supported\n * in bridge mode). Useful when the server validates custom request headers.\n *\n * Header values must be strings. Quote values that YAML would otherwise parse\n * as a boolean or number (e.g. `true`, `false`, `123`), such as `\"true\"`.\n *\n * @example\n * ```yaml\n * web:\n * url: https://example.com\n * extraHTTPHeaders:\n * X-Custom-Token: my-token\n * Accept-Language: en-US\n * ```\n */\n extraHTTPHeaders?: Record<string, string>;\n\n forceSameTabNavigation?: boolean; // if limit the new tab to the current page, true for default in yaml script\n autoFollowNewPage?: boolean; // if use BrowserAgent to follow newly opened pages, false for default\n\n /**\n * Chrome download directory (Puppeteer only, not supported in bridge mode).\n *\n * Relative paths are resolved from the current working directory.\n *\n * @example\n * ```yaml\n * web:\n * url: https://example.com\n * downloadPath: ./downloads\n * ```\n */\n downloadPath?: string;\n\n /**\n * Custom Chrome launch arguments (Puppeteer only, not supported in bridge mode).\n *\n * Allows passing custom command-line arguments to Chrome/Chromium when launching the browser.\n * This is useful for testing scenarios that require specific browser configurations.\n *\n * ⚠️ Security Warning: Some arguments (e.g., --no-sandbox, --disable-web-security) may\n * reduce browser security. Use only in controlled testing environments.\n *\n * @example\n * ```yaml\n * web:\n * url: https://example.com\n * chromeArgs:\n * - '--disable-features=ThirdPartyCookiePhaseout'\n * - '--disable-features=SameSiteByDefaultCookies'\n * - '--window-size=1920,1080'\n * ```\n */\n chromeArgs?: string[];\n\n // bridge mode config\n bridgeMode?: false | 'newTabWithUrl' | 'currentTab';\n closeNewTabsAfterDisconnect?: boolean;\n\n /**\n * CDP (Chrome DevTools Protocol) endpoint URL.\n * When specified, connects to an existing Chrome browser via CDP instead of launching a new one.\n *\n * @example\n * ```yaml\n * web:\n * url: https://example.com\n * cdpEndpoint: ws://localhost:9222/devtools/browser/xxxx\n * ```\n */\n cdpEndpoint?: string;\n}\n\nexport interface MidsceneYamlScriptAndroidEnv\n extends MidsceneYamlScriptConfig,\n Omit<AndroidDeviceOpt, 'customActions'> {\n // The Android device ID to connect to, optional, will use the first device if not specified\n deviceId?: string;\n\n // The URL or app package to launch, optional, will use the current screen if not specified\n launch?: string;\n}\n\nexport interface MidsceneYamlScriptIOSEnv\n extends MidsceneYamlScriptConfig,\n Omit<IOSDeviceOpt, 'customActions'> {\n // The URL or app bundle ID to launch, optional, will use the current screen if not specified\n launch?: string;\n}\n\nexport interface MidsceneYamlScriptHarmonyEnv\n extends MidsceneYamlScriptConfig,\n Omit<HarmonyDeviceOpt, 'customActions'> {\n // The HarmonyOS device ID to connect to, optional, will use the first device if not specified\n deviceId?: string;\n\n // The bundle name, bundle/Ability target, or mapped app name to launch, optional,\n // will use the current screen if not specified\n launch?: string;\n\n // Custom mapping of app names to bundle names or explicit bundle/Ability targets;\n // user-provided mappings take precedence over defaults\n appNameMapping?: Record<string, string>;\n}\n\nexport interface MidsceneYamlScriptComputerEnv\n extends MidsceneYamlScriptConfig {\n // The display ID to use, optional, will use the primary display if not specified\n displayId?: string;\n}\n\nexport type MidsceneYamlScriptEnv =\n | MidsceneYamlScriptWebEnv\n | MidsceneYamlScriptAndroidEnv\n | MidsceneYamlScriptIOSEnv\n | MidsceneYamlScriptHarmonyEnv\n | MidsceneYamlScriptComputerEnv;\n\n/** Target sections that can be supplied as batch-wide YAML overrides. */\nexport type MidsceneYamlTargetKey = Exclude<\n keyof MidsceneYamlScript,\n 'config' | 'agent' | 'tasks'\n>;\n\nconst midsceneYamlTargetKeyMap = {\n target: true,\n page: true,\n browser: true,\n web: true,\n android: true,\n ios: true,\n harmony: true,\n computer: true,\n interface: true,\n} as const satisfies Record<MidsceneYamlTargetKey, true>;\n\nexport const midsceneYamlTargetKeys = Object.keys(\n midsceneYamlTargetKeyMap,\n) as MidsceneYamlTargetKey[];\n\n/**\n * Partial target settings applied to every script in a YAML batch.\n *\n * Batch settings are deep-merged over each script's target section, so every\n * nested target field is optional here even when a standalone script requires\n * it.\n */\nexport type MidsceneYamlTargetConfig = {\n [Target in MidsceneYamlTargetKey]?: Partial<\n NonNullable<MidsceneYamlScript[Target]>\n >;\n};\n\nexport interface MidsceneYamlFlowItemAIAction {\n // defined as aiAction for backward compatibility\n aiAction?: TUserPrompt | null;\n ai?: TUserPrompt | null; // this is the shortcut for aiAct\n aiAct?: TUserPrompt | null;\n instruction?: TUserPrompt;\n aiActionProgressTips?: string[];\n cacheable?: boolean;\n [key: string]: unknown;\n}\n\nexport interface MidsceneYamlFlowItemAIAssert extends ServiceExtractOption {\n aiAssert: string;\n errorMessage?: string;\n name?: string;\n}\n\nexport interface MidsceneYamlFlowItemAIWaitFor extends ServiceExtractOption {\n aiWaitFor: string;\n timeout?: number;\n}\n\nexport interface MidsceneYamlFlowItemRunGherkinScenario {\n runGherkinScenario: string;\n}\n\nexport interface MidsceneYamlFlowItemEvaluateJavaScript {\n javascript: string;\n name?: string;\n}\n\nexport interface MidsceneYamlFlowItemSleep {\n sleep: number;\n}\n\nexport interface MidsceneYamlFlowItemLogScreenshot {\n logScreenshot?: string; // optional, the title of the screenshot\n recordToReport?: string; // preferred key for record title\n content?: string;\n}\n\nexport type MidsceneYamlFlowItem =\n | MidsceneYamlFlowItemAIAction\n | MidsceneYamlFlowItemAIAssert\n | MidsceneYamlFlowItemAIWaitFor\n | MidsceneYamlFlowItemRunGherkinScenario\n | MidsceneYamlFlowItemEvaluateJavaScript\n | MidsceneYamlFlowItemSleep\n | MidsceneYamlFlowItemLogScreenshot;\n\nexport interface FreeFn {\n name: string;\n fn: () => void | Promise<void>;\n}\n\nexport interface ScriptPlayerTaskStatus extends MidsceneYamlTask {\n status: ScriptPlayerStatusValue;\n currentStep?: number;\n totalSteps: number;\n error?: Error;\n}\n\nexport type ScriptPlayerStatusValue = 'init' | 'running' | 'done' | 'error';\n\n// Index YAML file types for batch execution\nexport interface MidsceneYamlConfig extends MidsceneYamlTargetConfig {\n /** @deprecated Use `web`, `page`, or `browser` instead. */\n target?: Partial<MidsceneYamlScriptWebEnv>;\n concurrent?: number;\n continueOnError?: boolean;\n /**\n * Number of times to retry a failed yaml file before marking it as failed.\n * A value of 2 means each failing case is re-executed up to 2 extra times\n * (3 attempts in total). Only the cases that failed in the previous attempt\n * are retried. Defaults to 0 (no retry).\n */\n retry?: number;\n summary?: string;\n /**\n * Share one BrowserContext and Page across Puppeteer Web yaml files. This is\n * not supported by bridge mode or non-Web targets.\n */\n shareBrowserContext?: boolean;\n /**\n * A setup yaml file that runs before the main `files`. A setup failure aborts\n * the whole batch and the main files are marked as not executed. Puppeteer\n * Web setup requires `shareBrowserContext: true` to pass browser state to the\n * main files. Other targets run setup without browser-context sharing.\n */\n setup?: string;\n files: string[];\n headed?: boolean;\n keepWindow?: boolean;\n dotenvOverride?: boolean;\n dotenvDebug?: boolean;\n}\n\nexport interface MidsceneYamlConfigOutput {\n format?: 'json';\n path?: string;\n}\n\nexport type MidsceneYamlConfigResultType =\n | 'success'\n | 'failed'\n | 'partialFailed'\n | 'notExecuted';\n\nexport interface MidsceneYamlConfigAttempt {\n attempt: number;\n success: boolean;\n output?: string | null;\n report?: string | null;\n error?: string;\n duration?: number;\n resultType?: MidsceneYamlConfigResultType;\n}\n\nexport interface MidsceneYamlConfigResult {\n file: string;\n success: boolean;\n executed: boolean;\n output?: string | null;\n report?: string | null;\n retryReport?: string | null;\n attempts?: MidsceneYamlConfigAttempt[];\n error?: string;\n duration?: number;\n /**\n * Type of result:\n * - 'success': All tasks completed successfully\n * - 'failed': Execution failed (player error)\n * - 'partialFailed': Some tasks failed but execution continued (continueOnError)\n * - 'notExecuted': Not executed due to previous failures\n */\n resultType?: MidsceneYamlConfigResultType;\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","midsceneYamlTargetKeyMap","midsceneYamlTargetKeys"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;ACiSA,MAAMI,2BAA2B;IAC/B,QAAQ;IACR,MAAM;IACN,SAAS;IACT,KAAK;IACL,SAAS;IACT,KAAK;IACL,SAAS;IACT,UAAU;IACV,WAAW;AACb;AAEO,MAAMC,yBAAyBL,OAAO,IAAI,CAC/CI"}
|
|
1
|
+
{"version":3,"file":"yaml.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../src/yaml.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type { TMultimodalPrompt, TUserPrompt } from './common';\nimport type {\n AndroidDeviceOpt,\n HarmonyDeviceOpt,\n IOSDeviceOpt,\n} from './device';\nimport type { WorkflowExecutionRecord } from './test-runner/execution-record';\nimport type { AgentOpt, LocateResultElement, Rect } from './types';\nimport type { UIContext } from './types';\n\nexport interface LocateOption extends Partial<TMultimodalPrompt> {\n prompt?: TUserPrompt;\n /**\n * Additional facts, rules, or constraints for this AI call. It overrides\n * the matching API context and `aiContexts.default`; `''` disables inherited\n * user context for this call.\n */\n context?: string;\n deepLocate?: boolean; // only available in vl model\n /** @deprecated Use `deepLocate` instead. Kept for backward compatibility. */\n deepThink?: boolean; // alias for deepLocate\n cacheable?: boolean; // user can set this param to false to disable the cache for a single agent api\n xpath?: string; // only available in web\n uiContext?: UIContext;\n fileChooserAccept?: string | string[]; // file path(s) to upload when tapping triggers a file chooser\n}\n\nexport interface ServiceExtractOption {\n /**\n * Additional facts, decision rules, constraints, or output requirements for\n * this AI call. It overrides the matching API context and\n * `aiContexts.default`; `''` disables inherited user context for this call.\n */\n context?: string;\n domIncluded?: boolean | 'visible-only';\n screenshotIncluded?: boolean;\n [key: string]: unknown;\n}\n\nexport interface DetailedLocateParam\n extends Omit<\n LocateOption,\n 'context' | 'deepThink' | keyof TMultimodalPrompt\n > {\n prompt: TUserPrompt;\n /** Original prompt text used for user-facing reports. */\n promptDisplay?: string;\n /** Per-call AI guidance recorded in user-facing reports. */\n context?: string;\n}\n\nexport type ScrollType =\n | 'singleAction'\n | 'scrollToBottom'\n | 'scrollToTop'\n | 'scrollToRight'\n | 'scrollToLeft'\n // Legacy aliases kept for backward compatibility\n | 'once'\n | 'untilBottom'\n | 'untilTop'\n | 'untilRight'\n | 'untilLeft';\n\nexport type ActionScrollParam = {\n direction?: 'down' | 'up' | 'right' | 'left';\n scrollType?: ScrollType;\n distance?: number | null;\n locate?: LocateResultElement;\n};\n\nexport type ScrollParam = Omit<ActionScrollParam, 'locate'>;\n\nexport interface MidsceneYamlScript {\n // @deprecated\n target?: MidsceneYamlScriptWebEnv;\n\n page?: MidsceneYamlScriptWebEnv;\n browser?: MidsceneYamlScriptWebEnv;\n web?: MidsceneYamlScriptWebEnv;\n android?: MidsceneYamlScriptAndroidEnv;\n ios?: MidsceneYamlScriptIOSEnv;\n harmony?: MidsceneYamlScriptHarmonyEnv;\n computer?: MidsceneYamlScriptComputerEnv;\n\n interface?: MidsceneYamlScriptEnvGeneralInterface;\n config?: MidsceneYamlScriptConfig;\n agent?: MidsceneYamlScriptAgentOpt;\n\n tasks: MidsceneYamlTask[];\n}\n\nexport interface MidsceneYamlTask {\n name: string;\n flow: MidsceneYamlFlowItem[];\n continueOnError?: boolean;\n}\n\n/**\n * Agent configuration options that can be specified in YAML scripts.\n *\n * This type includes serializable fields from AgentOpt, excluding non-serializable\n * fields like functions and complex objects. All fields are optional.\n *\n * @remarks\n * - testId is deprecated; prefer reportFileName and cache.id\n * - These settings apply to all platforms (Web, Android, iOS, Generic Interface)\n * - modelConfig is configured through environment variables, not in YAML\n *\n * @example\n * ```yaml\n * agent:\n * reportFileName: \"checkout-report\"\n * groupName: \"E2E Test Suite\"\n * generateReport: true\n * replanningCycleLimit: 30\n * cache:\n * id: \"checkout-cache\"\n * strategy: \"read-write\"\n * ```\n */\nexport type MidsceneYamlScriptAgentOpt = Pick<\n AgentOpt,\n | 'testId' // deprecated, kept for backward compatibility\n | 'groupName'\n | 'groupDescription'\n | 'generateReport'\n | 'outputFormat'\n | 'persistExecutionDump'\n | 'autoPrintReportMsg'\n | 'reportFileName'\n | 'replanningCycleLimit'\n | 'aiContexts'\n | 'aiActContext'\n | 'aiActionContext'\n | 'cache'\n | 'screenshotShrinkFactor'\n>;\n\nexport interface MidsceneYamlScriptConfig {\n output?: string;\n unstableLogContent?: boolean | string;\n}\n\nexport interface MidsceneYamlScriptEnvGeneralInterface {\n // this will work as `const {...} = import('...'); const interface = new ...(param)`\n module: string;\n export?: string;\n param?: Record<string, any>;\n}\n\nexport interface MidsceneYamlScriptWebEnv\n extends MidsceneYamlScriptConfig,\n MidsceneYamlScriptAgentOpt {\n mode?: 'page' | 'browser';\n\n // for web only\n serve?: string;\n url: string;\n\n // puppeteer only\n userAgent?: string;\n acceptInsecureCerts?: boolean;\n viewportWidth?: number;\n viewportHeight?: number;\n deviceScaleFactor?: number;\n waitForNetworkIdle?: {\n timeout?: number;\n continueOnNetworkIdleError?: boolean; // should continue if failed to wait for network idle, true for default\n };\n cookie?: string;\n\n /**\n * Extra HTTP headers sent with every request (Puppeteer only, not supported\n * in bridge mode). Useful when the server validates custom request headers.\n *\n * Header values must be strings. Quote values that YAML would otherwise parse\n * as a boolean or number (e.g. `true`, `false`, `123`), such as `\"true\"`.\n *\n * @example\n * ```yaml\n * web:\n * url: https://example.com\n * extraHTTPHeaders:\n * X-Custom-Token: my-token\n * Accept-Language: en-US\n * ```\n */\n extraHTTPHeaders?: Record<string, string>;\n\n forceSameTabNavigation?: boolean; // if limit the new tab to the current page, true for default in yaml script\n autoFollowNewPage?: boolean; // if use BrowserAgent to follow newly opened pages, false for default\n\n /**\n * Chrome download directory (Puppeteer only, not supported in bridge mode).\n *\n * Relative paths are resolved from the current working directory.\n *\n * @example\n * ```yaml\n * web:\n * url: https://example.com\n * downloadPath: ./downloads\n * ```\n */\n downloadPath?: string;\n\n /**\n * Custom Chrome launch arguments (Puppeteer only, not supported in bridge mode).\n *\n * Allows passing custom command-line arguments to Chrome/Chromium when launching the browser.\n * This is useful for testing scenarios that require specific browser configurations.\n *\n * ⚠️ Security Warning: Some arguments (e.g., --no-sandbox, --disable-web-security) may\n * reduce browser security. Use only in controlled testing environments.\n *\n * @example\n * ```yaml\n * web:\n * url: https://example.com\n * chromeArgs:\n * - '--disable-features=ThirdPartyCookiePhaseout'\n * - '--disable-features=SameSiteByDefaultCookies'\n * - '--window-size=1920,1080'\n * ```\n */\n chromeArgs?: string[];\n\n // bridge mode config\n bridgeMode?: false | 'newTabWithUrl' | 'currentTab';\n closeNewTabsAfterDisconnect?: boolean;\n\n /**\n * CDP (Chrome DevTools Protocol) endpoint URL.\n * When specified, connects to an existing Chrome browser via CDP instead of launching a new one.\n *\n * @example\n * ```yaml\n * web:\n * url: https://example.com\n * cdpEndpoint: ws://localhost:9222/devtools/browser/xxxx\n * ```\n */\n cdpEndpoint?: string;\n}\n\nexport interface MidsceneYamlScriptAndroidEnv\n extends MidsceneYamlScriptConfig,\n Omit<AndroidDeviceOpt, 'customActions'> {\n // The Android device ID to connect to, optional, will use the first device if not specified\n deviceId?: string;\n\n // The URL or app package to launch, optional, will use the current screen if not specified\n launch?: string;\n}\n\nexport interface MidsceneYamlScriptIOSEnv\n extends MidsceneYamlScriptConfig,\n Omit<IOSDeviceOpt, 'customActions'> {\n // The URL or app bundle ID to launch, optional, will use the current screen if not specified\n launch?: string;\n}\n\nexport interface MidsceneYamlScriptHarmonyEnv\n extends MidsceneYamlScriptConfig,\n Omit<HarmonyDeviceOpt, 'customActions'> {\n // The HarmonyOS device ID to connect to, optional, will use the first device if not specified\n deviceId?: string;\n\n // The bundle name, bundle/Ability target, or mapped app name to launch, optional,\n // will use the current screen if not specified\n launch?: string;\n\n // Custom mapping of app names to bundle names or explicit bundle/Ability targets;\n // user-provided mappings take precedence over defaults\n appNameMapping?: Record<string, string>;\n}\n\nexport interface MidsceneYamlScriptComputerEnv\n extends MidsceneYamlScriptConfig {\n // The display ID to use, optional, will use the primary display if not specified\n displayId?: string;\n}\n\nexport type MidsceneYamlScriptEnv =\n | MidsceneYamlScriptWebEnv\n | MidsceneYamlScriptAndroidEnv\n | MidsceneYamlScriptIOSEnv\n | MidsceneYamlScriptHarmonyEnv\n | MidsceneYamlScriptComputerEnv;\n\n/** Target sections that can be supplied as batch-wide YAML overrides. */\nexport type MidsceneYamlTargetKey = Exclude<\n keyof MidsceneYamlScript,\n 'config' | 'agent' | 'tasks'\n>;\n\nconst midsceneYamlTargetKeyMap = {\n target: true,\n page: true,\n browser: true,\n web: true,\n android: true,\n ios: true,\n harmony: true,\n computer: true,\n interface: true,\n} as const satisfies Record<MidsceneYamlTargetKey, true>;\n\nexport const midsceneYamlTargetKeys = Object.keys(\n midsceneYamlTargetKeyMap,\n) as MidsceneYamlTargetKey[];\n\n/**\n * Partial target settings applied to every script in a YAML batch.\n *\n * Batch settings are deep-merged over each script's target section, so every\n * nested target field is optional here even when a standalone script requires\n * it.\n */\nexport type MidsceneYamlTargetConfig = {\n [Target in MidsceneYamlTargetKey]?: Partial<\n NonNullable<MidsceneYamlScript[Target]>\n >;\n};\n\nexport interface MidsceneYamlFlowItemAIAction {\n // defined as aiAction for backward compatibility\n aiAction?: TUserPrompt | null;\n ai?: TUserPrompt | null; // this is the shortcut for aiAct\n aiAct?: TUserPrompt | null;\n instruction?: TUserPrompt;\n aiActionProgressTips?: string[];\n cacheable?: boolean;\n [key: string]: unknown;\n}\n\nexport interface MidsceneYamlFlowItemAIAssert extends ServiceExtractOption {\n aiAssert: string;\n errorMessage?: string;\n name?: string;\n}\n\nexport interface MidsceneYamlFlowItemAIWaitFor extends ServiceExtractOption {\n aiWaitFor: string;\n timeout?: number;\n}\n\nexport interface MidsceneYamlFlowItemRunGherkinScenario {\n runGherkinScenario: string;\n}\n\nexport interface MidsceneYamlFlowItemEvaluateJavaScript {\n javascript: string;\n name?: string;\n}\n\nexport interface MidsceneYamlFlowItemSleep {\n sleep: number;\n}\n\nexport interface MidsceneYamlFlowItemLogScreenshot {\n logScreenshot?: string; // optional, the title of the screenshot\n recordToReport?: string; // preferred key for record title\n content?: string;\n}\n\nexport type MidsceneYamlFlowItem =\n | MidsceneYamlFlowItemAIAction\n | MidsceneYamlFlowItemAIAssert\n | MidsceneYamlFlowItemAIWaitFor\n | MidsceneYamlFlowItemRunGherkinScenario\n | MidsceneYamlFlowItemEvaluateJavaScript\n | MidsceneYamlFlowItemSleep\n | MidsceneYamlFlowItemLogScreenshot;\n\nexport interface FreeFn {\n name: string;\n fn: () => void | Promise<void>;\n}\n\nexport interface ScriptPlayerTaskStatus extends MidsceneYamlTask {\n status: ScriptPlayerStatusValue;\n currentStep?: number;\n totalSteps: number;\n error?: Error;\n}\n\nexport type ScriptPlayerStatusValue = 'init' | 'running' | 'done' | 'error';\n\n// Index YAML file types for batch execution\nexport interface MidsceneYamlConfig extends MidsceneYamlTargetConfig {\n /** @deprecated Use `web`, `page`, or `browser` instead. */\n target?: Partial<MidsceneYamlScriptWebEnv>;\n concurrent?: number;\n continueOnError?: boolean;\n /**\n * Number of times to retry the complete YAML file after an execution\n * failure, including tasks that already passed. Defaults to 0 (no retry).\n */\n retry?: number;\n summary?: string;\n /**\n * Share one BrowserContext across Puppeteer Web YAML files, with a separate\n * Page per file. This is not supported by bridge mode or non-Web targets.\n */\n shareBrowserContext?: boolean;\n /**\n * A setup yaml file that runs before the main `files`. A setup failure aborts\n * the whole batch and the main files are marked as not executed. Puppeteer\n * Web setup requires `shareBrowserContext: true` to pass browser state to the\n * main files. Other targets run setup without browser-context sharing.\n */\n setup?: string;\n files: string[];\n headed?: boolean;\n keepWindow?: boolean;\n dotenvOverride?: boolean;\n dotenvDebug?: boolean;\n}\n\nexport interface MidsceneYamlConfigOutput {\n format?: 'json';\n path?: string;\n}\n\nexport type MidsceneYamlConfigResultType =\n | 'success'\n | 'failed'\n | 'partialFailed'\n | 'notExecuted';\n\nexport interface MidsceneYamlConfigAttempt {\n attempt: number;\n success: boolean;\n output?: string | null;\n report?: string | null;\n error?: string;\n duration?: number;\n resultType?: MidsceneYamlConfigResultType;\n /** Complete execution facts, persisted separately from the legacy summary. */\n executionRecordPath?: string;\n /** @internal Complete facts retained when the sidecar could not be published. */\n executionRecordFallback?: WorkflowExecutionRecord;\n /** @internal Infrastructure failures, separate from legacy execution status. */\n publicationErrors?: readonly unknown[];\n /** @internal Entry observation failed; action success remains unchanged. */\n observerErrors?: readonly unknown[];\n /** @internal Agent report generation or cleanup failed after execution. */\n infrastructureErrors?: readonly unknown[];\n}\n\nexport interface MidsceneYamlConfigResult {\n file: string;\n success: boolean;\n executed: boolean;\n output?: string | null;\n report?: string | null;\n retryReport?: string | null;\n attempts?: MidsceneYamlConfigAttempt[];\n executionRecordPath?: string;\n /** @internal Complete facts retained when the sidecar could not be published. */\n executionRecordFallback?: WorkflowExecutionRecord;\n /** @internal Infrastructure failures, separate from legacy execution status. */\n publicationErrors?: readonly unknown[];\n /** @internal Entry observation failed; action success remains unchanged. */\n observerErrors?: readonly unknown[];\n /** @internal Agent report generation or cleanup failed after execution. */\n infrastructureErrors?: readonly unknown[];\n error?: string;\n duration?: number;\n /**\n * Type of result:\n * - 'success': All tasks completed successfully\n * - 'failed': Execution failed (player error)\n * - 'partialFailed': Some tasks failed but execution continued (continueOnError)\n * - 'notExecuted': Not executed due to previous failures\n */\n resultType?: MidsceneYamlConfigResultType;\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","midsceneYamlTargetKeyMap","midsceneYamlTargetKeys"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;ACmSA,MAAMI,2BAA2B;IAC/B,QAAQ;IACR,MAAM;IACN,SAAS;IACT,KAAK;IACL,SAAS;IACT,KAAK;IACL,SAAS;IACT,UAAU;IACV,WAAW;AACb;AAEO,MAAMC,yBAAyBL,OAAO,IAAI,CAC/CI"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TUserPrompt } from '../ai-model/index';
|
|
2
2
|
import Service from '../service/index';
|
|
3
|
+
import type { WorkflowExecutionRecord } from '../test-runner/execution-record';
|
|
3
4
|
import { type ActionParam, type ActionReturn, type AgentAIContextKey, type AgentAssertResult, type AgentOpt, type AgentProgressListener, type AgentWaitForOpt, type AiActEffort, type AssertOptions, type DeepThinkOption, type DeviceAction, ExecutionDump, type InsightAPI, type LocateOption, type LocateResultElement, type OnTaskStartTip, type QueryOptions, type RecordToReportOptions, type Rect, ReportActionDump, type ScrollParam, type ServiceAction, type ServiceExtractParam, type UIContext } from '../types';
|
|
4
5
|
import type { AbstractInterface, InputStrategy } from '../device';
|
|
5
6
|
import type { TaskRunner } from '../task-runner';
|
|
@@ -43,6 +44,14 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
43
44
|
dump: ReportActionDump;
|
|
44
45
|
reportFile?: string | null;
|
|
45
46
|
reportFileName?: string;
|
|
47
|
+
private readonly yamlReportScopeId;
|
|
48
|
+
private readonly yamlExecutionRecords;
|
|
49
|
+
/** @internal Runner snapshots retain immutable data and shared image files. */
|
|
50
|
+
_prepareForTestRunner(): void;
|
|
51
|
+
_createReportSource(scopeId: string): Promise<import("../test-runner").WorkflowReportSource | undefined>;
|
|
52
|
+
/** @internal The Agent owns one report stream across root YAML invocations. */
|
|
53
|
+
_writeYamlExecutionReport(record: WorkflowExecutionRecord): Promise<string | undefined>;
|
|
54
|
+
private buildYamlReportInput;
|
|
46
55
|
taskExecutor: TaskExecutor;
|
|
47
56
|
opts: AgentOpt;
|
|
48
57
|
/**
|
|
@@ -171,6 +180,8 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
171
180
|
}): string;
|
|
172
181
|
private lastExecutionDump?;
|
|
173
182
|
writeOutActionDumps(executionDump?: ExecutionDump): void;
|
|
183
|
+
/** Persist current report data without disposing this Agent or its device. */
|
|
184
|
+
flushReport(): Promise<string | undefined>;
|
|
174
185
|
private getReportMeta;
|
|
175
186
|
private callbackOnTaskStartTip;
|
|
176
187
|
wrapActionInActionSpace<T extends DeviceAction>(name: string): (param: ActionParam<T>) => Promise<ActionReturn<T>>;
|
|
@@ -277,7 +288,9 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
277
288
|
* Initial UI capture failure rejects before waiting; a failed final
|
|
278
289
|
* screenshot does not fail an otherwise completed wait.
|
|
279
290
|
*/
|
|
280
|
-
sleep(ms: number
|
|
291
|
+
sleep(ms: number, options?: {
|
|
292
|
+
abortSignal?: AbortSignal;
|
|
293
|
+
}): Promise<void>;
|
|
281
294
|
recordToReport(title?: string, opt?: RecordToReportOptions): Promise<void>;
|
|
282
295
|
recordErrorToReport(title: string, opt: {
|
|
283
296
|
/** Any thrown value; normalized before it is stored in the report. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/agent/agent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/agent/agent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAM/E,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,WAAW,EAEhB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,aAAa,EAIb,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EAEnB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAE1B,KAAK,IAAI,EACT,gBAAgB,EAEhB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EAExB,KAAK,SAAS,EACf,MAAM,UAAU,CAAC;AAwBlB,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAOhD,OAAO,EAIL,kBAAkB,EAInB,MAAM,sBAAsB,CAAC;AAU9B,OAAO,EAAoB,KA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