@midscene/core 0.9.1 → 0.9.2-beta-20250114083542.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/lib/ai-model.js +5 -6741
- package/dist/lib/chunk-G7A32JAG.js +36 -0
- package/dist/lib/chunk-SCNIHQKF.js +115 -0
- package/dist/lib/chunk-Z6Q56DTU.js +2790 -0
- package/dist/lib/chunk-ZRCWDGK2.js +251 -0
- package/dist/lib/env.js +65 -164
- package/dist/lib/index.js +189 -7135
- package/dist/lib/types/ai-model.d.ts +60 -4
- package/dist/lib/types/{automation-81d96430.d.ts → automation-d7e10a4e.d.ts} +6 -2
- package/dist/lib/types/env.d.ts +4 -1
- package/dist/lib/types/index.d.ts +11 -9
- package/dist/lib/types/{types-05c1f241.d.ts → types-c4bec333.d.ts} +5 -10
- package/dist/lib/types/utils.d.ts +2 -1
- package/dist/lib/utils.js +40 -370
- package/dist/lib/wrappers-KKGZQXJL.js +4086 -0
- package/package.json +3 -3
- package/report/index.html +23 -7
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkSCNIHQKFjs = require('./chunk-SCNIHQKF.js');
|
|
7
|
+
|
|
8
|
+
// src/utils.ts
|
|
9
|
+
var _assert = require('assert'); var _assert2 = _interopRequireDefault(_assert);
|
|
10
|
+
var _child_process = require('child_process');
|
|
11
|
+
var _fs = require('fs');
|
|
12
|
+
var _os = require('os');
|
|
13
|
+
var _path = require('path');
|
|
14
|
+
var _fs3 = require('@midscene/shared/fs');
|
|
15
|
+
var _utils = require('@midscene/shared/utils');
|
|
16
|
+
var logDir = _path.join.call(void 0, process.cwd(), "./midscene_run/");
|
|
17
|
+
var logEnvReady = false;
|
|
18
|
+
var insightDumpFileExt = "insight-dump.json";
|
|
19
|
+
var groupedActionDumpFileExt = "web-dump.json";
|
|
20
|
+
function getLogDir() {
|
|
21
|
+
return logDir;
|
|
22
|
+
}
|
|
23
|
+
function setLogDir(dir) {
|
|
24
|
+
logDir = dir;
|
|
25
|
+
}
|
|
26
|
+
function getLogDirByType(type) {
|
|
27
|
+
const dir = _path.join.call(void 0, getLogDir(), type);
|
|
28
|
+
if (!_fs.existsSync.call(void 0, dir)) {
|
|
29
|
+
_fs.mkdirSync.call(void 0, dir, { recursive: true });
|
|
30
|
+
}
|
|
31
|
+
return dir;
|
|
32
|
+
}
|
|
33
|
+
var reportTpl = null;
|
|
34
|
+
function getReportTpl() {
|
|
35
|
+
if (_utils.ifInBrowser) {
|
|
36
|
+
if (!reportTpl && window.get_midscene_report_tpl) {
|
|
37
|
+
reportTpl = window.get_midscene_report_tpl();
|
|
38
|
+
}
|
|
39
|
+
_assert2.default.call(void 0,
|
|
40
|
+
reportTpl,
|
|
41
|
+
"reportTpl should be set before writing report in browser"
|
|
42
|
+
);
|
|
43
|
+
return reportTpl;
|
|
44
|
+
}
|
|
45
|
+
if (!reportTpl) {
|
|
46
|
+
let reportPath = _path.join.call(void 0, __dirname, "../../report/index.html");
|
|
47
|
+
if (!_fs.existsSync.call(void 0, reportPath)) {
|
|
48
|
+
reportPath = _path.join.call(void 0, __dirname, "../report/index.html");
|
|
49
|
+
}
|
|
50
|
+
reportTpl = _fs.readFileSync.call(void 0, reportPath, "utf-8");
|
|
51
|
+
}
|
|
52
|
+
return reportTpl;
|
|
53
|
+
}
|
|
54
|
+
function replaceStringWithFirstAppearance(str, target, replacement) {
|
|
55
|
+
const index = str.indexOf(target);
|
|
56
|
+
return str.slice(0, index) + replacement + str.slice(index + target.length);
|
|
57
|
+
}
|
|
58
|
+
function reportHTMLContent(dumpData) {
|
|
59
|
+
const tpl = getReportTpl();
|
|
60
|
+
let reportContent;
|
|
61
|
+
if (Array.isArray(dumpData) && dumpData.length === 0 || typeof dumpData === "undefined") {
|
|
62
|
+
reportContent = replaceStringWithFirstAppearance(
|
|
63
|
+
tpl,
|
|
64
|
+
"{{dump}}",
|
|
65
|
+
`<script type="midscene_web_dump" type="application/json"></script>`
|
|
66
|
+
);
|
|
67
|
+
} else if (typeof dumpData === "string") {
|
|
68
|
+
reportContent = replaceStringWithFirstAppearance(
|
|
69
|
+
tpl,
|
|
70
|
+
"{{dump}}",
|
|
71
|
+
`<script type="midscene_web_dump" type="application/json">${dumpData}</script>`
|
|
72
|
+
);
|
|
73
|
+
} else {
|
|
74
|
+
const dumps = dumpData.map(({ dumpString, attributes }) => {
|
|
75
|
+
const attributesArr = Object.keys(attributes || {}).map((key) => {
|
|
76
|
+
return `${key}="${encodeURIComponent(attributes[key])}"`;
|
|
77
|
+
});
|
|
78
|
+
return `<script type="midscene_web_dump" type="application/json" ${attributesArr.join(
|
|
79
|
+
" "
|
|
80
|
+
)}
|
|
81
|
+
>${dumpString}
|
|
82
|
+
</script>`;
|
|
83
|
+
});
|
|
84
|
+
reportContent = replaceStringWithFirstAppearance(
|
|
85
|
+
tpl,
|
|
86
|
+
"{{dump}}",
|
|
87
|
+
dumps.join("\n")
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return reportContent;
|
|
91
|
+
}
|
|
92
|
+
function writeDumpReport(fileName, dumpData) {
|
|
93
|
+
if (_utils.ifInBrowser) {
|
|
94
|
+
console.log("will not write report in browser");
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
const midscenePkgInfo = _fs3.getRunningPkgInfo.call(void 0, __dirname);
|
|
98
|
+
if (!midscenePkgInfo) {
|
|
99
|
+
console.warn("midscenePkgInfo not found, will not write report");
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
const reportPath = _path.join.call(void 0, getLogDirByType("report"), `${fileName}.html`);
|
|
103
|
+
const reportContent = reportHTMLContent(dumpData);
|
|
104
|
+
_fs.writeFileSync.call(void 0, reportPath, reportContent);
|
|
105
|
+
return reportPath;
|
|
106
|
+
}
|
|
107
|
+
function writeLogFile(opts) {
|
|
108
|
+
if (_utils.ifInBrowser) {
|
|
109
|
+
return "/mock/report.html";
|
|
110
|
+
}
|
|
111
|
+
const { fileName, fileExt, fileContent, type = "dump" } = opts;
|
|
112
|
+
const targetDir = getLogDirByType(type);
|
|
113
|
+
if (!logEnvReady) {
|
|
114
|
+
_assert2.default.call(void 0, targetDir, "logDir should be set before writing dump file");
|
|
115
|
+
const gitIgnorePath = _path.join.call(void 0, targetDir, "../../.gitignore");
|
|
116
|
+
let gitIgnoreContent = "";
|
|
117
|
+
if (_fs.existsSync.call(void 0, gitIgnorePath)) {
|
|
118
|
+
gitIgnoreContent = _fs.readFileSync.call(void 0, gitIgnorePath, "utf-8");
|
|
119
|
+
}
|
|
120
|
+
const logDirName = _path.basename.call(void 0, logDir);
|
|
121
|
+
if (!gitIgnoreContent.includes(`${logDirName}/`)) {
|
|
122
|
+
_fs.writeFileSync.call(void 0,
|
|
123
|
+
gitIgnorePath,
|
|
124
|
+
`${gitIgnoreContent}
|
|
125
|
+
# Midscene.js dump files
|
|
126
|
+
${logDirName}/report
|
|
127
|
+
${logDirName}/dump
|
|
128
|
+
${logDirName}/tmp
|
|
129
|
+
`,
|
|
130
|
+
"utf-8"
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
logEnvReady = true;
|
|
134
|
+
}
|
|
135
|
+
const filePath = _path.join.call(void 0, targetDir, `${fileName}.${fileExt}`);
|
|
136
|
+
const outputResourceDir = _path.dirname.call(void 0, filePath);
|
|
137
|
+
if (!_fs.existsSync.call(void 0, outputResourceDir)) {
|
|
138
|
+
_fs.mkdirSync.call(void 0, outputResourceDir, { recursive: true });
|
|
139
|
+
}
|
|
140
|
+
_fs.writeFileSync.call(void 0, filePath, fileContent);
|
|
141
|
+
if (opts == null ? void 0 : opts.generateReport) {
|
|
142
|
+
return writeDumpReport(fileName, fileContent);
|
|
143
|
+
}
|
|
144
|
+
return filePath;
|
|
145
|
+
}
|
|
146
|
+
function getTmpDir() {
|
|
147
|
+
if (_utils.ifInBrowser) {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
const runningPkgInfo = _fs3.getRunningPkgInfo.call(void 0, );
|
|
151
|
+
if (!runningPkgInfo) {
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
const { name } = runningPkgInfo;
|
|
155
|
+
const path = _path.join.call(void 0, _os.tmpdir.call(void 0, ), name);
|
|
156
|
+
_fs.mkdirSync.call(void 0, path, { recursive: true });
|
|
157
|
+
return path;
|
|
158
|
+
}
|
|
159
|
+
function getTmpFile(fileExtWithoutDot) {
|
|
160
|
+
if (_utils.ifInBrowser) {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
const tmpDir = getTmpDir();
|
|
164
|
+
const filename = `${_utils.uuid.call(void 0, )}.${fileExtWithoutDot}`;
|
|
165
|
+
return _path.join.call(void 0, tmpDir, filename);
|
|
166
|
+
}
|
|
167
|
+
function overlapped(container, target) {
|
|
168
|
+
return container.left < target.left + target.width && container.left + container.width > target.left && container.top < target.top + target.height && container.top + container.height > target.top;
|
|
169
|
+
}
|
|
170
|
+
async function sleep(ms) {
|
|
171
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
172
|
+
}
|
|
173
|
+
function replacerForPageObject(key, value) {
|
|
174
|
+
var _a, _b;
|
|
175
|
+
if (value && ((_a = value.constructor) == null ? void 0 : _a.name) === "Page") {
|
|
176
|
+
return "[Page object]";
|
|
177
|
+
}
|
|
178
|
+
if (value && ((_b = value.constructor) == null ? void 0 : _b.name) === "Browser") {
|
|
179
|
+
return "[Browser object]";
|
|
180
|
+
}
|
|
181
|
+
return value;
|
|
182
|
+
}
|
|
183
|
+
function stringifyDumpData(data, indents) {
|
|
184
|
+
return JSON.stringify(data, replacerForPageObject, indents);
|
|
185
|
+
}
|
|
186
|
+
function getVersion() {
|
|
187
|
+
return "0.9.2-beta-20250114083542.0";
|
|
188
|
+
}
|
|
189
|
+
function debugLog(...message) {
|
|
190
|
+
const debugMode = _chunkSCNIHQKFjs.getAIConfig.call(void 0, _chunkSCNIHQKFjs.MIDSCENE_DEBUG_MODE);
|
|
191
|
+
if (debugMode) {
|
|
192
|
+
console.log("[Midscene]", ...message);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
var lastReportedRepoUrl = "";
|
|
196
|
+
function uploadTestInfoToServer({ testUrl }) {
|
|
197
|
+
let repoUrl = "";
|
|
198
|
+
let userEmail = "";
|
|
199
|
+
const extraConfig = _chunkSCNIHQKFjs.getAIConfigInJson.call(void 0, _chunkSCNIHQKFjs.MIDSCENE_OPENAI_INIT_CONFIG_JSON);
|
|
200
|
+
const serverUrl = extraConfig == null ? void 0 : extraConfig.REPORT_SERVER_URL;
|
|
201
|
+
try {
|
|
202
|
+
repoUrl = _child_process.execSync.call(void 0, "git config --get remote.origin.url").toString().trim();
|
|
203
|
+
userEmail = _child_process.execSync.call(void 0, "git config --get user.email").toString().trim();
|
|
204
|
+
} catch (error) {
|
|
205
|
+
debugLog("Failed to get git info:", error);
|
|
206
|
+
}
|
|
207
|
+
if (serverUrl && (repoUrl && repoUrl !== lastReportedRepoUrl || !repoUrl && testUrl)) {
|
|
208
|
+
debugLog("Uploading test info to server", {
|
|
209
|
+
serverUrl,
|
|
210
|
+
repoUrl,
|
|
211
|
+
testUrl,
|
|
212
|
+
userEmail
|
|
213
|
+
});
|
|
214
|
+
fetch(serverUrl, {
|
|
215
|
+
method: "POST",
|
|
216
|
+
headers: {
|
|
217
|
+
"Content-Type": "application/json"
|
|
218
|
+
},
|
|
219
|
+
body: JSON.stringify({
|
|
220
|
+
repo_url: repoUrl,
|
|
221
|
+
test_url: testUrl,
|
|
222
|
+
user_email: userEmail
|
|
223
|
+
})
|
|
224
|
+
}).then((response) => response.json()).then((data) => {
|
|
225
|
+
debugLog("Successfully uploaded test info to server:", data);
|
|
226
|
+
}).catch(
|
|
227
|
+
(error) => debugLog("Failed to upload test info to server:", error)
|
|
228
|
+
);
|
|
229
|
+
lastReportedRepoUrl = repoUrl;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
exports.insightDumpFileExt = insightDumpFileExt; exports.groupedActionDumpFileExt = groupedActionDumpFileExt; exports.getLogDir = getLogDir; exports.setLogDir = setLogDir; exports.getLogDirByType = getLogDirByType; exports.replaceStringWithFirstAppearance = replaceStringWithFirstAppearance; exports.reportHTMLContent = reportHTMLContent; exports.writeDumpReport = writeDumpReport; exports.writeLogFile = writeLogFile; exports.getTmpDir = getTmpDir; exports.getTmpFile = getTmpFile; exports.overlapped = overlapped; exports.sleep = sleep; exports.replacerForPageObject = replacerForPageObject; exports.stringifyDumpData = stringifyDumpData; exports.getVersion = getVersion; exports.uploadTestInfoToServer = uploadTestInfoToServer;
|
package/dist/lib/env.js
CHANGED
|
@@ -1,164 +1,65 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var MATCH_BY_POSITION = "MATCH_BY_POSITION";
|
|
67
|
-
var MIDSCENE_API_TYPE = "MIDSCENE-API-TYPE";
|
|
68
|
-
var MIDSCENE_REPORT_TAG_NAME = "MIDSCENE_REPORT_TAG_NAME";
|
|
69
|
-
var MIDSCENE_USE_AZURE_OPENAI = "MIDSCENE_USE_AZURE_OPENAI";
|
|
70
|
-
var MIDSCENE_AZURE_OPENAI_SCOPE = "MIDSCENE_AZURE_OPENAI_SCOPE";
|
|
71
|
-
var MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON = "MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON";
|
|
72
|
-
var AZURE_OPENAI_ENDPOINT = "AZURE_OPENAI_ENDPOINT";
|
|
73
|
-
var AZURE_OPENAI_KEY = "AZURE_OPENAI_KEY";
|
|
74
|
-
var AZURE_OPENAI_API_VERSION = "AZURE_OPENAI_API_VERSION";
|
|
75
|
-
var AZURE_OPENAI_DEPLOYMENT = "AZURE_OPENAI_DEPLOYMENT";
|
|
76
|
-
var MIDSCENE_USE_ANTHROPIC_SDK = "MIDSCENE_USE_ANTHROPIC_SDK";
|
|
77
|
-
var ANTHROPIC_API_KEY = "ANTHROPIC_API_KEY";
|
|
78
|
-
var OPENAI_USE_AZURE = "OPENAI_USE_AZURE";
|
|
79
|
-
var allConfigFromEnv = () => {
|
|
80
|
-
return {
|
|
81
|
-
[MIDSCENE_OPENAI_INIT_CONFIG_JSON]: process.env[MIDSCENE_OPENAI_INIT_CONFIG_JSON] || void 0,
|
|
82
|
-
[MIDSCENE_MODEL_NAME]: process.env[MIDSCENE_MODEL_NAME] || void 0,
|
|
83
|
-
[MIDSCENE_DEBUG_MODE]: process.env[MIDSCENE_DEBUG_MODE] || void 0,
|
|
84
|
-
[MIDSCENE_LANGSMITH_DEBUG]: process.env[MIDSCENE_LANGSMITH_DEBUG] || void 0,
|
|
85
|
-
[MIDSCENE_DEBUG_AI_PROFILE]: process.env[MIDSCENE_DEBUG_AI_PROFILE] || void 0,
|
|
86
|
-
[MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG]: process.env[MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG] || void 0,
|
|
87
|
-
[OPENAI_API_KEY]: process.env[OPENAI_API_KEY] || void 0,
|
|
88
|
-
[OPENAI_BASE_URL]: process.env[OPENAI_BASE_URL] || void 0,
|
|
89
|
-
[MIDSCENE_MODEL_TEXT_ONLY]: process.env[MIDSCENE_MODEL_TEXT_ONLY] || void 0,
|
|
90
|
-
[OPENAI_MAX_TOKENS]: process.env[OPENAI_MAX_TOKENS] || void 0,
|
|
91
|
-
[OPENAI_USE_AZURE]: process.env[OPENAI_USE_AZURE] || void 0,
|
|
92
|
-
[MIDSCENE_CACHE]: process.env[MIDSCENE_CACHE] || void 0,
|
|
93
|
-
[MATCH_BY_POSITION]: process.env[MATCH_BY_POSITION] || void 0,
|
|
94
|
-
[MIDSCENE_REPORT_TAG_NAME]: process.env[MIDSCENE_REPORT_TAG_NAME] || void 0,
|
|
95
|
-
[MIDSCENE_OPENAI_SOCKS_PROXY]: process.env[MIDSCENE_OPENAI_SOCKS_PROXY] || void 0,
|
|
96
|
-
[MIDSCENE_USE_AZURE_OPENAI]: process.env[MIDSCENE_USE_AZURE_OPENAI] || void 0,
|
|
97
|
-
[MIDSCENE_AZURE_OPENAI_SCOPE]: process.env[MIDSCENE_AZURE_OPENAI_SCOPE] || void 0,
|
|
98
|
-
[MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON]: process.env[MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON] || void 0,
|
|
99
|
-
[MIDSCENE_USE_ANTHROPIC_SDK]: process.env[MIDSCENE_USE_ANTHROPIC_SDK] || void 0,
|
|
100
|
-
[ANTHROPIC_API_KEY]: process.env[ANTHROPIC_API_KEY] || void 0,
|
|
101
|
-
[AZURE_OPENAI_ENDPOINT]: process.env[AZURE_OPENAI_ENDPOINT] || void 0,
|
|
102
|
-
[AZURE_OPENAI_KEY]: process.env[AZURE_OPENAI_KEY] || void 0,
|
|
103
|
-
[AZURE_OPENAI_API_VERSION]: process.env[AZURE_OPENAI_API_VERSION] || void 0,
|
|
104
|
-
[AZURE_OPENAI_DEPLOYMENT]: process.env[AZURE_OPENAI_DEPLOYMENT] || void 0
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
var userConfig = {};
|
|
108
|
-
var getAIConfig = (configKey) => {
|
|
109
|
-
if (typeof userConfig[configKey] !== "undefined") {
|
|
110
|
-
return userConfig[configKey];
|
|
111
|
-
}
|
|
112
|
-
return allConfigFromEnv()[configKey];
|
|
113
|
-
};
|
|
114
|
-
var getAIConfigInJson = (configKey) => {
|
|
115
|
-
const config = getAIConfig(configKey);
|
|
116
|
-
try {
|
|
117
|
-
return config ? JSON.parse(config) : void 0;
|
|
118
|
-
} catch (error) {
|
|
119
|
-
throw new Error(
|
|
120
|
-
`Failed to parse json config: ${configKey}. ${error.message}`,
|
|
121
|
-
{
|
|
122
|
-
cause: error
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
var allAIConfig = () => {
|
|
128
|
-
return { ...allConfigFromEnv(), ...userConfig };
|
|
129
|
-
};
|
|
130
|
-
var overrideAIConfig = (newConfig, extendMode) => {
|
|
131
|
-
userConfig = extendMode ? { ...userConfig, ...newConfig } : { ...newConfig };
|
|
132
|
-
};
|
|
133
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
134
|
-
0 && (module.exports = {
|
|
135
|
-
ANTHROPIC_API_KEY,
|
|
136
|
-
AZURE_OPENAI_API_VERSION,
|
|
137
|
-
AZURE_OPENAI_DEPLOYMENT,
|
|
138
|
-
AZURE_OPENAI_ENDPOINT,
|
|
139
|
-
AZURE_OPENAI_KEY,
|
|
140
|
-
MATCH_BY_POSITION,
|
|
141
|
-
MIDSCENE_API_TYPE,
|
|
142
|
-
MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON,
|
|
143
|
-
MIDSCENE_AZURE_OPENAI_SCOPE,
|
|
144
|
-
MIDSCENE_CACHE,
|
|
145
|
-
MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG,
|
|
146
|
-
MIDSCENE_DEBUG_AI_PROFILE,
|
|
147
|
-
MIDSCENE_DEBUG_MODE,
|
|
148
|
-
MIDSCENE_LANGSMITH_DEBUG,
|
|
149
|
-
MIDSCENE_MODEL_NAME,
|
|
150
|
-
MIDSCENE_MODEL_TEXT_ONLY,
|
|
151
|
-
MIDSCENE_OPENAI_INIT_CONFIG_JSON,
|
|
152
|
-
MIDSCENE_OPENAI_SOCKS_PROXY,
|
|
153
|
-
MIDSCENE_REPORT_TAG_NAME,
|
|
154
|
-
MIDSCENE_USE_ANTHROPIC_SDK,
|
|
155
|
-
MIDSCENE_USE_AZURE_OPENAI,
|
|
156
|
-
OPENAI_API_KEY,
|
|
157
|
-
OPENAI_BASE_URL,
|
|
158
|
-
OPENAI_MAX_TOKENS,
|
|
159
|
-
OPENAI_USE_AZURE,
|
|
160
|
-
allAIConfig,
|
|
161
|
-
getAIConfig,
|
|
162
|
-
getAIConfigInJson,
|
|
163
|
-
overrideAIConfig
|
|
164
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var _chunkSCNIHQKFjs = require('./chunk-SCNIHQKF.js');
|
|
33
|
+
require('./chunk-G7A32JAG.js');
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
exports.ANTHROPIC_API_KEY = _chunkSCNIHQKFjs.ANTHROPIC_API_KEY; exports.AZURE_OPENAI_API_VERSION = _chunkSCNIHQKFjs.AZURE_OPENAI_API_VERSION; exports.AZURE_OPENAI_DEPLOYMENT = _chunkSCNIHQKFjs.AZURE_OPENAI_DEPLOYMENT; exports.AZURE_OPENAI_ENDPOINT = _chunkSCNIHQKFjs.AZURE_OPENAI_ENDPOINT; exports.AZURE_OPENAI_KEY = _chunkSCNIHQKFjs.AZURE_OPENAI_KEY; exports.MATCH_BY_POSITION = _chunkSCNIHQKFjs.MATCH_BY_POSITION; exports.MIDSCENE_API_TYPE = _chunkSCNIHQKFjs.MIDSCENE_API_TYPE; exports.MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON = _chunkSCNIHQKFjs.MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON; exports.MIDSCENE_AZURE_OPENAI_SCOPE = _chunkSCNIHQKFjs.MIDSCENE_AZURE_OPENAI_SCOPE; exports.MIDSCENE_CACHE = _chunkSCNIHQKFjs.MIDSCENE_CACHE; exports.MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG = _chunkSCNIHQKFjs.MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG; exports.MIDSCENE_DEBUG_AI_PROFILE = _chunkSCNIHQKFjs.MIDSCENE_DEBUG_AI_PROFILE; exports.MIDSCENE_DEBUG_MODE = _chunkSCNIHQKFjs.MIDSCENE_DEBUG_MODE; exports.MIDSCENE_LANGSMITH_DEBUG = _chunkSCNIHQKFjs.MIDSCENE_LANGSMITH_DEBUG; exports.MIDSCENE_MODEL_NAME = _chunkSCNIHQKFjs.MIDSCENE_MODEL_NAME; exports.MIDSCENE_MODEL_TEXT_ONLY = _chunkSCNIHQKFjs.MIDSCENE_MODEL_TEXT_ONLY; exports.MIDSCENE_OPENAI_INIT_CONFIG_JSON = _chunkSCNIHQKFjs.MIDSCENE_OPENAI_INIT_CONFIG_JSON; exports.MIDSCENE_OPENAI_SOCKS_PROXY = _chunkSCNIHQKFjs.MIDSCENE_OPENAI_SOCKS_PROXY; exports.MIDSCENE_REPORT_TAG_NAME = _chunkSCNIHQKFjs.MIDSCENE_REPORT_TAG_NAME; exports.MIDSCENE_USE_ANTHROPIC_SDK = _chunkSCNIHQKFjs.MIDSCENE_USE_ANTHROPIC_SDK; exports.MIDSCENE_USE_AZURE_OPENAI = _chunkSCNIHQKFjs.MIDSCENE_USE_AZURE_OPENAI; exports.MIDSCENE_USE_VLM_UI_TARS = _chunkSCNIHQKFjs.MIDSCENE_USE_VLM_UI_TARS; exports.OPENAI_API_KEY = _chunkSCNIHQKFjs.OPENAI_API_KEY; exports.OPENAI_BASE_URL = _chunkSCNIHQKFjs.OPENAI_BASE_URL; exports.OPENAI_MAX_TOKENS = _chunkSCNIHQKFjs.OPENAI_MAX_TOKENS; exports.OPENAI_USE_AZURE = _chunkSCNIHQKFjs.OPENAI_USE_AZURE; exports.allAIConfig = _chunkSCNIHQKFjs.allAIConfig; exports.getAIConfig = _chunkSCNIHQKFjs.getAIConfig; exports.getAIConfigInJson = _chunkSCNIHQKFjs.getAIConfigInJson; exports.overrideAIConfig = _chunkSCNIHQKFjs.overrideAIConfig;
|