@rpascene/shared 0.30.8 → 0.30.9
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/README.md +2 -2
- package/dist/es/common.mjs +9 -9
- package/dist/es/constants/example-code.mjs +10 -10
- package/dist/es/constants/index.mjs +1 -1
- package/dist/es/env/constants.mjs +77 -77
- package/dist/es/env/global-config-manager.mjs +1 -1
- package/dist/es/env/init-debug.mjs +5 -5
- package/dist/es/env/model-config-manager.mjs +1 -1
- package/dist/es/env/parse.mjs +11 -11
- package/dist/es/env/types.mjs +191 -191
- package/dist/es/env/utils.mjs +2 -2
- package/dist/es/extractor/debug.mjs +2 -2
- package/dist/es/extractor/util.mjs +11 -11
- package/dist/es/extractor/web-extractor.mjs +7 -7
- package/dist/es/logger.mjs +3 -3
- package/dist/es/node/fs.mjs +6 -6
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/common.js +16 -16
- package/dist/lib/constants/example-code.js +10 -10
- package/dist/lib/constants/index.js +1 -1
- package/dist/lib/env/constants.js +76 -76
- package/dist/lib/env/global-config-manager.js +1 -1
- package/dist/lib/env/init-debug.js +4 -4
- package/dist/lib/env/model-config-manager.js +1 -1
- package/dist/lib/env/parse.js +10 -10
- package/dist/lib/env/types.js +478 -478
- package/dist/lib/env/utils.js +1 -1
- package/dist/lib/extractor/debug.js +1 -1
- package/dist/lib/extractor/util.js +16 -16
- package/dist/lib/extractor/web-extractor.js +6 -6
- package/dist/lib/logger.js +2 -2
- package/dist/lib/node/fs.js +6 -6
- package/dist/lib/utils.js +2 -2
- package/dist/types/common.d.ts +5 -5
- package/dist/types/constants/example-code.d.ts +2 -2
- package/dist/types/env/types.d.ts +180 -180
- package/dist/types/extractor/util.d.ts +2 -2
- package/dist/types/node/fs.d.ts +1 -1
- package/package.json +8 -3
- package/src/common.ts +10 -10
- package/src/constants/example-code.ts +10 -10
- package/src/constants/index.ts +1 -1
- package/src/env/constants.ts +144 -144
- package/src/env/decide-model-config.ts +1 -1
- package/src/env/global-config-manager.ts +1 -1
- package/src/env/init-debug.ts +5 -5
- package/src/env/model-config-manager.ts +1 -1
- package/src/env/parse.ts +15 -15
- package/src/env/types.ts +315 -315
- package/src/env/utils.ts +2 -2
- package/src/extractor/debug.ts +2 -2
- package/src/extractor/util.ts +15 -15
- package/src/extractor/web-extractor.ts +7 -7
- package/src/logger.ts +3 -3
- package/src/node/fs.ts +5 -5
- package/src/utils.ts +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PLAYWRIGHT_EXAMPLE_CODE = "\n// Reference the following code to generate
|
|
2
|
-
export declare const YAML_EXAMPLE_CODE = "\n1. Format:\n\nweb:\n url: \"starting_url\"\n viewportWidth: 1280\n viewportHeight: 960\n\ntasks:\n - name: \"descriptive task name\"\n flow:\n - aiTap: \"element description\"\n - aiInput: 'text value'\n locate: 'input field description'\n - aiScroll:\n direction: down/up\n scrollType: untilBottom/untilTop/page\n - aiAssert: \"expected state\"\n - sleep: milliseconds\n\n2. Action Types:\n- aiTap: for clicks (natural language targeting)\n- aiInput: for text input with 'locate' field\n- aiScroll: with direction and scrollType\n- aiAssert: for validations\n- sleep: for delays (milliseconds)\n\n3. Best Practices:\n- Group related actions into logical tasks\n- Use natural language descriptions\n- Add deepThink: true for complex interactions\n- Keep task names concise but descriptive\n\n\n\nYAML type\ntasks:\n - name: <name>\n continueOnError: <boolean> # Optional, whether to continue to the next task on error, defaults to false.\n flow:\n # Auto Planning (.ai)\n # ----------------\n\n # Perform an interaction. `ai` is a shorthand for `aiAction`.\n - ai: <prompt>\n cacheable: <boolean> # Optional, whether to cache the result of this API call when the [caching feature](./caching.mdx) is enabled. Defaults to True.\n\n # This usage is the same as `ai`.\n - aiAction: <prompt>\n cacheable: <boolean> # Optional, whether to cache the result of this API call when the [caching feature](./caching.mdx) is enabled. Defaults to True.\n\n # Instant Action (.aiTap, .aiDoubleClick, .aiHover, .aiInput, .aiKeyboardPress, .aiScroll)\n # ----------------\n\n # Tap an element described by a prompt.\n - aiTap: <prompt>\n deepThink: <boolean> # Optional, whether to use deepThink to precisely locate the element. Defaults to False.\n xpath: <xpath> # Optional, the xpath of the target element for the operation. If provided,
|
|
1
|
+
export declare const PLAYWRIGHT_EXAMPLE_CODE = "\n// Reference the following code to generate Midscene test cases\n// The following is test code for Midscene AI, for reference\n// The following is Playwright syntax, you can use Playwright to assist in test generation\nIMPORTANT: Follow these exact type signatures for AI functions:\n\n// Type signatures for AI functions:\naiInput(value: string, locator: string): Promise<void>\naiTap(locator: string): Promise<void>\naiDoubleClick(locator: string): Promise<void>\naiScroll(scrollParam: {\n direction: 'up' | 'down' | 'left' | 'right',\n scrollType: 'once' | 'untilBottom' | 'untilTop' | 'untilRight' | 'untilLeft',\n distance: number - scroll distance, px is the unit\n}): Promise<void>\naiAssert(assertion: string): Promise<void>\naiQuery<T>(queryObject: Record<string, string>): Promise<T> // Extracts data from page based on descriptions\n\n// examples:\n// Reference the following code to generate Midscene test cases\n// The following is test code for Midscene AI, for reference\n// The following is Playwright syntax, you can use Playwright to assist in test generation\nimport { test as base } from '@playwright/test';\nimport type { PlayWrightAiFixtureType } from '@rpascene/web/playwright';\nimport { PlaywrightAiFixture } from '@rpascene/web/playwright';\n\nconst test = base.extend<PlayWrightAiFixtureType>(PlaywrightAiFixture({\n waitForNetworkIdleTimeout: 2000, // optional, the timeout for waiting for network idle between each action, default is 2000ms\n}));\n\n\ntest.beforeEach(async ({ page }) => {\n await page.goto('https://www.xxx.com/');\n await page.setViewportSize({ width: 1920, height: 1080 });\n});\n\ntest('ai shop', async ({\n aiInput,\n aiAssert,\n aiQuery,\n aiKeyboardPress,\n aiHover,\n aiTap,\n agentForPage,\n page,\n}) => {\n // login\n await aiAssert('The page shows the login interface');\n await aiInput('user_name', 'in user name input');\n await aiInput('password', 'in password input');\n await aiKeyboardPress('Enter', 'Login Button');\n\n // check the login success\n await aiWaitFor('The page shows that the loading is complete');\n await aiAssert('The current page shows the product detail page');\n\n // check the product info\n const dataA = await aiQuery({\n userInfo: 'User information in the format {name: string}',\n theFirstProductInfo: 'The first product info in the format {name: string, price: number}',\n });\n expect(dataA.theFirstProductInfo.name).toBe('xxx');\n expect(dataA.theFirstProductInfo.price).toBe(100);\n\n\n // add to cart\n await aiTap('click add to cart button');\n \n await aiTap('click right top cart icon');\n await aiAssert('The cart icon shows the number 1');\n});\n";
|
|
2
|
+
export declare const YAML_EXAMPLE_CODE = "\n1. Format:\n\nweb:\n url: \"starting_url\"\n viewportWidth: 1280\n viewportHeight: 960\n\ntasks:\n - name: \"descriptive task name\"\n flow:\n - aiTap: \"element description\"\n - aiInput: 'text value'\n locate: 'input field description'\n - aiScroll:\n direction: down/up\n scrollType: untilBottom/untilTop/page\n - aiAssert: \"expected state\"\n - sleep: milliseconds\n\n2. Action Types:\n- aiTap: for clicks (natural language targeting)\n- aiInput: for text input with 'locate' field\n- aiScroll: with direction and scrollType\n- aiAssert: for validations\n- sleep: for delays (milliseconds)\n\n3. Best Practices:\n- Group related actions into logical tasks\n- Use natural language descriptions\n- Add deepThink: true for complex interactions\n- Keep task names concise but descriptive\n\n\n\nYAML type\ntasks:\n - name: <name>\n continueOnError: <boolean> # Optional, whether to continue to the next task on error, defaults to false.\n flow:\n # Auto Planning (.ai)\n # ----------------\n\n # Perform an interaction. `ai` is a shorthand for `aiAction`.\n - ai: <prompt>\n cacheable: <boolean> # Optional, whether to cache the result of this API call when the [caching feature](./caching.mdx) is enabled. Defaults to True.\n\n # This usage is the same as `ai`.\n - aiAction: <prompt>\n cacheable: <boolean> # Optional, whether to cache the result of this API call when the [caching feature](./caching.mdx) is enabled. Defaults to True.\n\n # Instant Action (.aiTap, .aiDoubleClick, .aiHover, .aiInput, .aiKeyboardPress, .aiScroll)\n # ----------------\n\n # Tap an element described by a prompt.\n - aiTap: <prompt>\n deepThink: <boolean> # Optional, whether to use deepThink to precisely locate the element. Defaults to False.\n xpath: <xpath> # Optional, the xpath of the target element for the operation. If provided, Midscene will prioritize this xpath to find the element before using the cache and the AI model. Defaults to empty.\n cacheable: <boolean> # Optional, whether to cache the result of this API call when the [caching feature](./caching.mdx) is enabled. Defaults to True.\n\n # Double click an element described by a prompt.\n - aiDoubleClick: <prompt>\n deepThink: <boolean> # Optional, whether to use deepThink to precisely locate the element. Defaults to False.\n xpath: <xpath> # Optional, the xpath of the target element for the operation. If provided, Midscene will prioritize this xpath to find the element before using the cache and the AI model. Defaults to empty.\n cacheable: <boolean> # Optional, whether to cache the result of this API call when the [caching feature](./caching.mdx) is enabled. Defaults to True.\n\n # Hover over an element described by a prompt.\n - aiHover: <prompt>\n deepThink: <boolean> # Optional, whether to use deepThink to precisely locate the element. Defaults to False.\n xpath: <xpath> # Optional, the xpath of the target element for the operation. If provided, Midscene will prioritize this xpath to find the element before using the cache and the AI model. Defaults to empty.\n cacheable: <boolean> # Optional, whether to cache the result of this API call when the [caching feature](./caching.mdx) is enabled. Defaults to True.\n\n # Input text into an element described by a prompt.\n - aiInput: <final text content of the input>\n locate: <prompt>\n deepThink: <boolean> # Optional, whether to use deepThink to precisely locate the element. Defaults to False.\n xpath: <xpath> # Optional, the xpath of the target element for the operation. If provided, Midscene will prioritize this xpath to find the element before using the cache and the AI model. Defaults to empty.\n cacheable: <boolean> # Optional, whether to cache the result of this API call when the [caching feature](./caching.mdx) is enabled. Defaults to True.\n\n # Press a key (e.g., Enter, Tab, Escape) on an element described by a prompt.\n - aiKeyboardPress: <key>\n locate: <prompt>\n deepThink: <boolean> # Optional, whether to use deepThink to precisely locate the element. Defaults to False.\n xpath: <xpath> # Optional, the xpath of the target element for the operation. If provided, Midscene will prioritize this xpath to find the element before using the cache and the AI model. Defaults to empty.\n cacheable: <boolean> # Optional, whether to cache the result of this API call when the [caching feature](./caching.mdx) is enabled. Defaults to True.\n\n # Scroll globally or on an element described by a prompt.\n - aiScroll:\n direction: 'up' # or 'down' | 'left' | 'right'\n scrollType: 'once' # or 'untilTop' | 'untilBottom' | 'untilLeft' | 'untilRight'\n distance: <number> # Optional, the scroll distance in pixels.\n locate: <prompt> # Optional, the element to scroll on.\n deepThink: <boolean> # Optional, whether to use deepThink to precisely locate the element. Defaults to False.\n xpath: <xpath> # Optional, the xpath of the target element for the operation. If provided, Midscene will prioritize this xpath to find the element before using the cache and the AI model. Defaults to empty.\n cacheable: <boolean> # Optional, whether to cache the result of this API call when the [caching feature](./caching.mdx) is enabled. Defaults to True.\n\n # Log the current screenshot with a description in the report file.\n - logScreenshot: <title> # Optional, the title of the screenshot. If not provided, the title will be 'untitled'.\n content: <content> # Optional, the description of the screenshot.\n\n # Data Extraction\n # ----------------\n\n # Perform a query that returns a JSON object.\n - aiQuery: <prompt> # Remember to describe the format of the result in the prompt.\n name: <name> # The key for the query result in the JSON output.\n\n # More APIs\n # ----------------\n\n # Wait for a condition to be met, with a timeout (in ms, optional, defaults to 30000).\n - aiWaitFor: <prompt>\n timeout: <ms>\n\n # Perform an assertion.\n - aiAssert: <prompt>\n errorMessage: <error-message> # Optional, the error message to print if the assertion fails.\n\n # Wait for a specified amount of time.\n - sleep: <ms>\n\n # Execute a piece of JavaScript code in the web page context.\n - javascript: <javascript>\n name: <name> # Optional, assign a name to the return value, which will be used as a key in the JSON output.\n\n - name: <name>\n flow:\n # ...\n";
|
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
1
|
+
export declare const MIDSCENE_OPENAI_INIT_CONFIG_JSON = "MIDSCENE_OPENAI_INIT_CONFIG_JSON";
|
|
2
|
+
export declare const MIDSCENE_MODEL_NAME = "MIDSCENE_MODEL_NAME";
|
|
3
|
+
export declare const MIDSCENE_LANGSMITH_DEBUG = "MIDSCENE_LANGSMITH_DEBUG";
|
|
4
|
+
export declare const MIDSCENE_DEBUG_AI_PROFILE = "MIDSCENE_DEBUG_AI_PROFILE";
|
|
5
|
+
export declare const MIDSCENE_DEBUG_AI_RESPONSE = "MIDSCENE_DEBUG_AI_RESPONSE";
|
|
6
|
+
export declare const MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG = "MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG";
|
|
7
|
+
export declare const MIDSCENE_DEBUG_MODE = "MIDSCENE_DEBUG_MODE";
|
|
8
|
+
export declare const MIDSCENE_MCP_USE_PUPPETEER_MODE = "MIDSCENE_MCP_USE_PUPPETEER_MODE";
|
|
9
|
+
export declare const MIDSCENE_MCP_CHROME_PATH = "MIDSCENE_MCP_CHROME_PATH";
|
|
10
|
+
export declare const MIDSCENE_MCP_ANDROID_MODE = "MIDSCENE_MCP_ANDROID_MODE";
|
|
11
11
|
export declare const DOCKER_CONTAINER = "DOCKER_CONTAINER";
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
12
|
+
export declare const MIDSCENE_FORCE_DEEP_THINK = "MIDSCENE_FORCE_DEEP_THINK";
|
|
13
|
+
export declare const MIDSCENE_OPENAI_SOCKS_PROXY = "MIDSCENE_OPENAI_SOCKS_PROXY";
|
|
14
|
+
export declare const MIDSCENE_OPENAI_HTTP_PROXY = "MIDSCENE_OPENAI_HTTP_PROXY";
|
|
15
15
|
export declare const OPENAI_API_KEY = "OPENAI_API_KEY";
|
|
16
16
|
export declare const OPENAI_BASE_URL = "OPENAI_BASE_URL";
|
|
17
17
|
export declare const OPENAI_MAX_TOKENS = "OPENAI_MAX_TOKENS";
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
18
|
+
export declare const MIDSCENE_ADB_PATH = "MIDSCENE_ADB_PATH";
|
|
19
|
+
export declare const MIDSCENE_ADB_REMOTE_HOST = "MIDSCENE_ADB_REMOTE_HOST";
|
|
20
|
+
export declare const MIDSCENE_ADB_REMOTE_PORT = "MIDSCENE_ADB_REMOTE_PORT";
|
|
21
|
+
export declare const MIDSCENE_ANDROID_IME_STRATEGY = "MIDSCENE_ANDROID_IME_STRATEGY";
|
|
22
|
+
export declare const MIDSCENE_IOS_DEVICE_UDID = "MIDSCENE_IOS_DEVICE_UDID";
|
|
23
|
+
export declare const MIDSCENE_IOS_SIMULATOR_UDID = "MIDSCENE_IOS_SIMULATOR_UDID";
|
|
24
|
+
export declare const MIDSCENE_CACHE = "MIDSCENE_CACHE";
|
|
25
|
+
export declare const MIDSCENE_USE_VLM_UI_TARS = "MIDSCENE_USE_VLM_UI_TARS";
|
|
26
|
+
export declare const MIDSCENE_USE_QWEN_VL = "MIDSCENE_USE_QWEN_VL";
|
|
27
|
+
export declare const MIDSCENE_USE_QWEN3_VL = "MIDSCENE_USE_QWEN3_VL";
|
|
28
|
+
export declare const MIDSCENE_USE_DOUBAO_VISION = "MIDSCENE_USE_DOUBAO_VISION";
|
|
29
|
+
export declare const MIDSCENE_USE_GEMINI = "MIDSCENE_USE_GEMINI";
|
|
30
|
+
export declare const MIDSCENE_USE_VL_MODEL = "MIDSCENE_USE_VL_MODEL";
|
|
31
31
|
export declare const MATCH_BY_POSITION = "MATCH_BY_POSITION";
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
35
|
-
export declare const
|
|
36
|
-
export declare const
|
|
37
|
-
export declare const
|
|
38
|
-
export declare const
|
|
39
|
-
export declare const
|
|
32
|
+
export declare const MIDSCENE_API_TYPE = "MIDSCENE-API-TYPE";
|
|
33
|
+
export declare const MIDSCENE_REPORT_TAG_NAME = "MIDSCENE_REPORT_TAG_NAME";
|
|
34
|
+
export declare const MIDSCENE_REPLANNING_CYCLE_LIMIT = "MIDSCENE_REPLANNING_CYCLE_LIMIT";
|
|
35
|
+
export declare const MIDSCENE_PREFERRED_LANGUAGE = "MIDSCENE_PREFERRED_LANGUAGE";
|
|
36
|
+
export declare const MIDSCENE_USE_AZURE_OPENAI = "MIDSCENE_USE_AZURE_OPENAI";
|
|
37
|
+
export declare const MIDSCENE_AZURE_OPENAI_SCOPE = "MIDSCENE_AZURE_OPENAI_SCOPE";
|
|
38
|
+
export declare const MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON = "MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON";
|
|
39
|
+
export declare const MIDSCENE_CACHE_MAX_FILENAME_LENGTH = "MIDSCENE_CACHE_MAX_FILENAME_LENGTH";
|
|
40
40
|
export declare const AZURE_OPENAI_ENDPOINT = "AZURE_OPENAI_ENDPOINT";
|
|
41
41
|
export declare const AZURE_OPENAI_KEY = "AZURE_OPENAI_KEY";
|
|
42
42
|
export declare const AZURE_OPENAI_API_VERSION = "AZURE_OPENAI_API_VERSION";
|
|
43
43
|
export declare const AZURE_OPENAI_DEPLOYMENT = "AZURE_OPENAI_DEPLOYMENT";
|
|
44
|
-
export declare const
|
|
44
|
+
export declare const MIDSCENE_USE_ANTHROPIC_SDK = "MIDSCENE_USE_ANTHROPIC_SDK";
|
|
45
45
|
export declare const ANTHROPIC_API_KEY = "ANTHROPIC_API_KEY";
|
|
46
|
-
export declare const
|
|
47
|
-
export declare const
|
|
48
|
-
export declare const
|
|
49
|
-
export declare const
|
|
50
|
-
export declare const
|
|
51
|
-
export declare const
|
|
52
|
-
export declare const
|
|
53
|
-
export declare const
|
|
54
|
-
export declare const
|
|
55
|
-
export declare const
|
|
56
|
-
export declare const
|
|
57
|
-
export declare const
|
|
58
|
-
export declare const
|
|
59
|
-
export declare const
|
|
60
|
-
export declare const
|
|
61
|
-
export declare const
|
|
62
|
-
export declare const
|
|
63
|
-
export declare const
|
|
64
|
-
export declare const
|
|
65
|
-
export declare const
|
|
66
|
-
export declare const
|
|
67
|
-
export declare const
|
|
68
|
-
export declare const
|
|
69
|
-
export declare const
|
|
70
|
-
export declare const
|
|
71
|
-
export declare const
|
|
72
|
-
export declare const
|
|
73
|
-
export declare const
|
|
74
|
-
export declare const
|
|
75
|
-
export declare const
|
|
76
|
-
export declare const
|
|
77
|
-
export declare const
|
|
78
|
-
export declare const
|
|
79
|
-
export declare const
|
|
80
|
-
export declare const
|
|
81
|
-
export declare const
|
|
82
|
-
export declare const
|
|
83
|
-
export declare const
|
|
84
|
-
export declare const
|
|
85
|
-
export declare const
|
|
86
|
-
export declare const
|
|
87
|
-
export declare const
|
|
88
|
-
export declare const
|
|
89
|
-
export declare const
|
|
90
|
-
export declare const
|
|
91
|
-
export declare const
|
|
92
|
-
export declare const
|
|
93
|
-
export declare const
|
|
94
|
-
export declare const
|
|
95
|
-
export declare const
|
|
96
|
-
export declare const
|
|
97
|
-
export declare const
|
|
98
|
-
export declare const
|
|
99
|
-
export declare const
|
|
100
|
-
export declare const
|
|
101
|
-
export declare const
|
|
102
|
-
export declare const
|
|
103
|
-
export declare const
|
|
104
|
-
export declare const
|
|
105
|
-
export declare const
|
|
106
|
-
export declare const
|
|
46
|
+
export declare const MIDSCENE_RUN_DIR = "MIDSCENE_RUN_DIR";
|
|
47
|
+
export declare const MIDSCENE_OPENAI_BASE_URL = "MIDSCENE_OPENAI_BASE_URL";
|
|
48
|
+
export declare const MIDSCENE_OPENAI_API_KEY = "MIDSCENE_OPENAI_API_KEY";
|
|
49
|
+
export declare const MIDSCENE_OPENAI_USE_AZURE = "MIDSCENE_OPENAI_USE_AZURE";
|
|
50
|
+
export declare const MIDSCENE_AZURE_OPENAI_KEY = "MIDSCENE_AZURE_OPENAI_KEY";
|
|
51
|
+
export declare const MIDSCENE_AZURE_OPENAI_ENDPOINT = "MIDSCENE_AZURE_OPENAI_ENDPOINT";
|
|
52
|
+
export declare const MIDSCENE_AZURE_OPENAI_API_VERSION = "MIDSCENE_AZURE_OPENAI_API_VERSION";
|
|
53
|
+
export declare const MIDSCENE_AZURE_OPENAI_DEPLOYMENT = "MIDSCENE_AZURE_OPENAI_DEPLOYMENT";
|
|
54
|
+
export declare const MIDSCENE_ANTHROPIC_API_KEY = "MIDSCENE_ANTHROPIC_API_KEY";
|
|
55
|
+
export declare const MIDSCENE_VL_MODE = "MIDSCENE_VL_MODE";
|
|
56
|
+
export declare const MIDSCENE_VQA_MODEL_NAME = "MIDSCENE_VQA_MODEL_NAME";
|
|
57
|
+
export declare const MIDSCENE_VQA_OPENAI_SOCKS_PROXY = "MIDSCENE_VQA_OPENAI_SOCKS_PROXY";
|
|
58
|
+
export declare const MIDSCENE_VQA_OPENAI_HTTP_PROXY = "MIDSCENE_VQA_OPENAI_HTTP_PROXY";
|
|
59
|
+
export declare const MIDSCENE_VQA_OPENAI_BASE_URL = "MIDSCENE_VQA_OPENAI_BASE_URL";
|
|
60
|
+
export declare const MIDSCENE_VQA_OPENAI_API_KEY = "MIDSCENE_VQA_OPENAI_API_KEY";
|
|
61
|
+
export declare const MIDSCENE_VQA_OPENAI_INIT_CONFIG_JSON = "MIDSCENE_VQA_OPENAI_INIT_CONFIG_JSON";
|
|
62
|
+
export declare const MIDSCENE_VQA_OPENAI_USE_AZURE = "MIDSCENE_VQA_OPENAI_USE_AZURE";
|
|
63
|
+
export declare const MIDSCENE_VQA_USE_AZURE_OPENAI = "MIDSCENE_VQA_USE_AZURE_OPENAI";
|
|
64
|
+
export declare const MIDSCENE_VQA_AZURE_OPENAI_SCOPE = "MIDSCENE_VQA_AZURE_OPENAI_SCOPE";
|
|
65
|
+
export declare const MIDSCENE_VQA_AZURE_OPENAI_KEY = "MIDSCENE_VQA_AZURE_OPENAI_KEY";
|
|
66
|
+
export declare const MIDSCENE_VQA_AZURE_OPENAI_ENDPOINT = "MIDSCENE_VQA_AZURE_OPENAI_ENDPOINT";
|
|
67
|
+
export declare const MIDSCENE_VQA_AZURE_OPENAI_API_VERSION = "MIDSCENE_VQA_AZURE_OPENAI_API_VERSION";
|
|
68
|
+
export declare const MIDSCENE_VQA_AZURE_OPENAI_DEPLOYMENT = "MIDSCENE_VQA_AZURE_OPENAI_DEPLOYMENT";
|
|
69
|
+
export declare const MIDSCENE_VQA_AZURE_OPENAI_INIT_CONFIG_JSON = "MIDSCENE_VQA_AZURE_OPENAI_INIT_CONFIG_JSON";
|
|
70
|
+
export declare const MIDSCENE_VQA_USE_ANTHROPIC_SDK = "MIDSCENE_VQA_USE_ANTHROPIC_SDK";
|
|
71
|
+
export declare const MIDSCENE_VQA_ANTHROPIC_API_KEY = "MIDSCENE_VQA_ANTHROPIC_API_KEY";
|
|
72
|
+
export declare const MIDSCENE_VQA_VL_MODE = "MIDSCENE_VQA_VL_MODE";
|
|
73
|
+
export declare const MIDSCENE_PLANNING_MODEL_NAME = "MIDSCENE_PLANNING_MODEL_NAME";
|
|
74
|
+
export declare const MIDSCENE_PLANNING_OPENAI_SOCKS_PROXY = "MIDSCENE_PLANNING_OPENAI_SOCKS_PROXY";
|
|
75
|
+
export declare const MIDSCENE_PLANNING_OPENAI_HTTP_PROXY = "MIDSCENE_PLANNING_OPENAI_HTTP_PROXY";
|
|
76
|
+
export declare const MIDSCENE_PLANNING_OPENAI_BASE_URL = "MIDSCENE_PLANNING_OPENAI_BASE_URL";
|
|
77
|
+
export declare const MIDSCENE_PLANNING_OPENAI_API_KEY = "MIDSCENE_PLANNING_OPENAI_API_KEY";
|
|
78
|
+
export declare const MIDSCENE_PLANNING_OPENAI_INIT_CONFIG_JSON = "MIDSCENE_PLANNING_OPENAI_INIT_CONFIG_JSON";
|
|
79
|
+
export declare const MIDSCENE_PLANNING_OPENAI_USE_AZURE = "MIDSCENE_PLANNING_OPENAI_USE_AZURE";
|
|
80
|
+
export declare const MIDSCENE_PLANNING_USE_AZURE_OPENAI = "MIDSCENE_PLANNING_USE_AZURE_OPENAI";
|
|
81
|
+
export declare const MIDSCENE_PLANNING_AZURE_OPENAI_SCOPE = "MIDSCENE_PLANNING_AZURE_OPENAI_SCOPE";
|
|
82
|
+
export declare const MIDSCENE_PLANNING_AZURE_OPENAI_KEY = "MIDSCENE_PLANNING_AZURE_OPENAI_KEY";
|
|
83
|
+
export declare const MIDSCENE_PLANNING_AZURE_OPENAI_ENDPOINT = "MIDSCENE_PLANNING_AZURE_OPENAI_ENDPOINT";
|
|
84
|
+
export declare const MIDSCENE_PLANNING_AZURE_OPENAI_API_VERSION = "MIDSCENE_PLANNING_AZURE_OPENAI_API_VERSION";
|
|
85
|
+
export declare const MIDSCENE_PLANNING_AZURE_OPENAI_DEPLOYMENT = "MIDSCENE_PLANNING_AZURE_OPENAI_DEPLOYMENT";
|
|
86
|
+
export declare const MIDSCENE_PLANNING_AZURE_OPENAI_INIT_CONFIG_JSON = "MIDSCENE_PLANNING_AZURE_OPENAI_INIT_CONFIG_JSON";
|
|
87
|
+
export declare const MIDSCENE_PLANNING_USE_ANTHROPIC_SDK = "MIDSCENE_PLANNING_USE_ANTHROPIC_SDK";
|
|
88
|
+
export declare const MIDSCENE_PLANNING_ANTHROPIC_API_KEY = "MIDSCENE_PLANNING_ANTHROPIC_API_KEY";
|
|
89
|
+
export declare const MIDSCENE_PLANNING_VL_MODE = "MIDSCENE_PLANNING_VL_MODE";
|
|
90
|
+
export declare const MIDSCENE_GROUNDING_MODEL_NAME = "MIDSCENE_GROUNDING_MODEL_NAME";
|
|
91
|
+
export declare const MIDSCENE_GROUNDING_OPENAI_SOCKS_PROXY = "MIDSCENE_GROUNDING_OPENAI_SOCKS_PROXY";
|
|
92
|
+
export declare const MIDSCENE_GROUNDING_OPENAI_HTTP_PROXY = "MIDSCENE_GROUNDING_OPENAI_HTTP_PROXY";
|
|
93
|
+
export declare const MIDSCENE_GROUNDING_OPENAI_BASE_URL = "MIDSCENE_GROUNDING_OPENAI_BASE_URL";
|
|
94
|
+
export declare const MIDSCENE_GROUNDING_OPENAI_API_KEY = "MIDSCENE_GROUNDING_OPENAI_API_KEY";
|
|
95
|
+
export declare const MIDSCENE_GROUNDING_OPENAI_INIT_CONFIG_JSON = "MIDSCENE_GROUNDING_OPENAI_INIT_CONFIG_JSON";
|
|
96
|
+
export declare const MIDSCENE_GROUNDING_OPENAI_USE_AZURE = "MIDSCENE_GROUNDING_OPENAI_USE_AZURE";
|
|
97
|
+
export declare const MIDSCENE_GROUNDING_USE_AZURE_OPENAI = "MIDSCENE_GROUNDING_USE_AZURE_OPENAI";
|
|
98
|
+
export declare const MIDSCENE_GROUNDING_AZURE_OPENAI_SCOPE = "MIDSCENE_GROUNDING_AZURE_OPENAI_SCOPE";
|
|
99
|
+
export declare const MIDSCENE_GROUNDING_AZURE_OPENAI_KEY = "MIDSCENE_GROUNDING_AZURE_OPENAI_KEY";
|
|
100
|
+
export declare const MIDSCENE_GROUNDING_AZURE_OPENAI_ENDPOINT = "MIDSCENE_GROUNDING_AZURE_OPENAI_ENDPOINT";
|
|
101
|
+
export declare const MIDSCENE_GROUNDING_AZURE_OPENAI_API_VERSION = "MIDSCENE_GROUNDING_AZURE_OPENAI_API_VERSION";
|
|
102
|
+
export declare const MIDSCENE_GROUNDING_AZURE_OPENAI_DEPLOYMENT = "MIDSCENE_GROUNDING_AZURE_OPENAI_DEPLOYMENT";
|
|
103
|
+
export declare const MIDSCENE_GROUNDING_AZURE_OPENAI_INIT_CONFIG_JSON = "MIDSCENE_GROUNDING_AZURE_OPENAI_INIT_CONFIG_JSON";
|
|
104
|
+
export declare const MIDSCENE_GROUNDING_USE_ANTHROPIC_SDK = "MIDSCENE_GROUNDING_USE_ANTHROPIC_SDK";
|
|
105
|
+
export declare const MIDSCENE_GROUNDING_ANTHROPIC_API_KEY = "MIDSCENE_GROUNDING_ANTHROPIC_API_KEY";
|
|
106
|
+
export declare const MIDSCENE_GROUNDING_VL_MODE = "MIDSCENE_GROUNDING_VL_MODE";
|
|
107
107
|
export declare const OPENAI_USE_AZURE = "OPENAI_USE_AZURE";
|
|
108
108
|
/**
|
|
109
109
|
* env keys declared but unused
|
|
@@ -113,22 +113,22 @@ export declare const UNUSED_ENV_KEYS: string[];
|
|
|
113
113
|
* env keys for debug or basic run
|
|
114
114
|
* can not be override by overrideAIConfig
|
|
115
115
|
*/
|
|
116
|
-
export declare const BASIC_ENV_KEYS: readonly ["
|
|
117
|
-
export declare const BOOLEAN_ENV_KEYS: readonly ["
|
|
118
|
-
export declare const NUMBER_ENV_KEYS: readonly ["
|
|
119
|
-
export declare const STRING_ENV_KEYS: readonly ["OPENAI_MAX_TOKENS", "
|
|
116
|
+
export declare const BASIC_ENV_KEYS: readonly ["MIDSCENE_DEBUG_MODE", "MIDSCENE_DEBUG_AI_PROFILE", "MIDSCENE_DEBUG_AI_RESPONSE", "MIDSCENE_RUN_DIR"];
|
|
117
|
+
export declare const BOOLEAN_ENV_KEYS: readonly ["MIDSCENE_CACHE", "MIDSCENE_LANGSMITH_DEBUG", "MIDSCENE_FORCE_DEEP_THINK", "MIDSCENE_MCP_USE_PUPPETEER_MODE", "MIDSCENE_MCP_ANDROID_MODE"];
|
|
118
|
+
export declare const NUMBER_ENV_KEYS: readonly ["MIDSCENE_CACHE_MAX_FILENAME_LENGTH", "MIDSCENE_REPLANNING_CYCLE_LIMIT"];
|
|
119
|
+
export declare const STRING_ENV_KEYS: readonly ["OPENAI_MAX_TOKENS", "MIDSCENE_ADB_PATH", "MIDSCENE_ADB_REMOTE_HOST", "MIDSCENE_ADB_REMOTE_PORT", "MIDSCENE_ANDROID_IME_STRATEGY", "MIDSCENE_IOS_DEVICE_UDID", "MIDSCENE_IOS_SIMULATOR_UDID", "MIDSCENE_REPORT_TAG_NAME", "MIDSCENE_PREFERRED_LANGUAGE", "MATCH_BY_POSITION", "MIDSCENE_MCP_CHROME_PATH", "DOCKER_CONTAINER"];
|
|
120
120
|
/**
|
|
121
|
-
* Non model related env keys, used for globally controlling the behavior of
|
|
121
|
+
* Non model related env keys, used for globally controlling the behavior of midscene
|
|
122
122
|
* Can not be override by agent.modelConfig but can be override by overrideAIConfig
|
|
123
123
|
* Can be access at any time
|
|
124
124
|
*/
|
|
125
|
-
export declare const GLOBAL_ENV_KEYS: readonly ["
|
|
125
|
+
export declare const GLOBAL_ENV_KEYS: readonly ["MIDSCENE_CACHE", "MIDSCENE_LANGSMITH_DEBUG", "MIDSCENE_FORCE_DEEP_THINK", "MIDSCENE_MCP_USE_PUPPETEER_MODE", "MIDSCENE_MCP_ANDROID_MODE", "MIDSCENE_CACHE_MAX_FILENAME_LENGTH", "MIDSCENE_REPLANNING_CYCLE_LIMIT", "OPENAI_MAX_TOKENS", "MIDSCENE_ADB_PATH", "MIDSCENE_ADB_REMOTE_HOST", "MIDSCENE_ADB_REMOTE_PORT", "MIDSCENE_ANDROID_IME_STRATEGY", "MIDSCENE_IOS_DEVICE_UDID", "MIDSCENE_IOS_SIMULATOR_UDID", "MIDSCENE_REPORT_TAG_NAME", "MIDSCENE_PREFERRED_LANGUAGE", "MATCH_BY_POSITION", "MIDSCENE_MCP_CHROME_PATH", "DOCKER_CONTAINER"];
|
|
126
126
|
/**
|
|
127
127
|
* Model related eve keys, used for declare which model to use.
|
|
128
128
|
* Can be override by both agent.modelConfig and overrideAIConfig
|
|
129
129
|
* Can only be access after agent.constructor
|
|
130
130
|
*/
|
|
131
|
-
export declare const MODEL_ENV_KEYS: readonly ["
|
|
131
|
+
export declare const MODEL_ENV_KEYS: readonly ["MIDSCENE_MODEL_NAME", "MIDSCENE_OPENAI_INIT_CONFIG_JSON", "MIDSCENE_OPENAI_API_KEY", "MIDSCENE_OPENAI_BASE_URL", "MIDSCENE_OPENAI_USE_AZURE", "MIDSCENE_OPENAI_SOCKS_PROXY", "MIDSCENE_OPENAI_HTTP_PROXY", "MIDSCENE_USE_AZURE_OPENAI", "MIDSCENE_AZURE_OPENAI_SCOPE", "MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON", "MIDSCENE_USE_ANTHROPIC_SDK", "MIDSCENE_USE_VLM_UI_TARS", "MIDSCENE_USE_QWEN_VL", "MIDSCENE_USE_QWEN3_VL", "MIDSCENE_USE_DOUBAO_VISION", "MIDSCENE_USE_GEMINI", "MIDSCENE_USE_VL_MODEL", "ANTHROPIC_API_KEY", "MIDSCENE_AZURE_OPENAI_ENDPOINT", "MIDSCENE_AZURE_OPENAI_KEY", "MIDSCENE_AZURE_OPENAI_API_VERSION", "MIDSCENE_AZURE_OPENAI_DEPLOYMENT", "MIDSCENE_VL_MODE", "OPENAI_API_KEY", "OPENAI_BASE_URL", "OPENAI_USE_AZURE", "ANTHROPIC_API_KEY", "AZURE_OPENAI_ENDPOINT", "AZURE_OPENAI_KEY", "AZURE_OPENAI_API_VERSION", "AZURE_OPENAI_DEPLOYMENT", "MIDSCENE_VQA_MODEL_NAME", "MIDSCENE_VQA_OPENAI_SOCKS_PROXY", "MIDSCENE_VQA_OPENAI_HTTP_PROXY", "MIDSCENE_VQA_OPENAI_BASE_URL", "MIDSCENE_VQA_OPENAI_API_KEY", "MIDSCENE_VQA_OPENAI_INIT_CONFIG_JSON", "MIDSCENE_VQA_OPENAI_USE_AZURE", "MIDSCENE_VQA_USE_AZURE_OPENAI", "MIDSCENE_VQA_AZURE_OPENAI_SCOPE", "MIDSCENE_VQA_AZURE_OPENAI_KEY", "MIDSCENE_VQA_AZURE_OPENAI_ENDPOINT", "MIDSCENE_VQA_AZURE_OPENAI_API_VERSION", "MIDSCENE_VQA_AZURE_OPENAI_DEPLOYMENT", "MIDSCENE_VQA_AZURE_OPENAI_INIT_CONFIG_JSON", "MIDSCENE_VQA_USE_ANTHROPIC_SDK", "MIDSCENE_VQA_ANTHROPIC_API_KEY", "MIDSCENE_VQA_VL_MODE", "MIDSCENE_PLANNING_MODEL_NAME", "MIDSCENE_PLANNING_OPENAI_SOCKS_PROXY", "MIDSCENE_PLANNING_OPENAI_HTTP_PROXY", "MIDSCENE_PLANNING_OPENAI_BASE_URL", "MIDSCENE_PLANNING_OPENAI_API_KEY", "MIDSCENE_PLANNING_OPENAI_INIT_CONFIG_JSON", "MIDSCENE_PLANNING_OPENAI_USE_AZURE", "MIDSCENE_PLANNING_USE_AZURE_OPENAI", "MIDSCENE_PLANNING_AZURE_OPENAI_SCOPE", "MIDSCENE_PLANNING_AZURE_OPENAI_KEY", "MIDSCENE_PLANNING_AZURE_OPENAI_ENDPOINT", "MIDSCENE_PLANNING_AZURE_OPENAI_API_VERSION", "MIDSCENE_PLANNING_AZURE_OPENAI_DEPLOYMENT", "MIDSCENE_PLANNING_AZURE_OPENAI_INIT_CONFIG_JSON", "MIDSCENE_PLANNING_USE_ANTHROPIC_SDK", "MIDSCENE_PLANNING_ANTHROPIC_API_KEY", "MIDSCENE_PLANNING_VL_MODE", "MIDSCENE_GROUNDING_MODEL_NAME", "MIDSCENE_GROUNDING_OPENAI_SOCKS_PROXY", "MIDSCENE_GROUNDING_OPENAI_HTTP_PROXY", "MIDSCENE_GROUNDING_OPENAI_BASE_URL", "MIDSCENE_GROUNDING_OPENAI_API_KEY", "MIDSCENE_GROUNDING_OPENAI_INIT_CONFIG_JSON", "MIDSCENE_GROUNDING_OPENAI_USE_AZURE", "MIDSCENE_GROUNDING_USE_AZURE_OPENAI", "MIDSCENE_GROUNDING_AZURE_OPENAI_SCOPE", "MIDSCENE_GROUNDING_AZURE_OPENAI_KEY", "MIDSCENE_GROUNDING_AZURE_OPENAI_ENDPOINT", "MIDSCENE_GROUNDING_AZURE_OPENAI_API_VERSION", "MIDSCENE_GROUNDING_AZURE_OPENAI_DEPLOYMENT", "MIDSCENE_GROUNDING_AZURE_OPENAI_INIT_CONFIG_JSON", "MIDSCENE_GROUNDING_USE_ANTHROPIC_SDK", "MIDSCENE_GROUNDING_ANTHROPIC_API_KEY", "MIDSCENE_GROUNDING_VL_MODE"];
|
|
132
132
|
export declare const Yht_ENV_KEYS: string[];
|
|
133
133
|
export declare const ALL_ENV_KEYS: readonly string[];
|
|
134
134
|
export type TEnvKeys = (typeof ALL_ENV_KEYS)[number];
|
|
@@ -136,99 +136,99 @@ export type TGlobalConfig = Record<TEnvKeys, string | undefined>;
|
|
|
136
136
|
export type TVlModeValues = 'qwen-vl' | 'qwen3-vl' | 'doubao-vision' | 'gemini' | 'vlm-ui-tars' | 'vlm-ui-tars-doubao' | 'vlm-ui-tars-doubao-1.5';
|
|
137
137
|
export type TVlModeTypes = 'qwen-vl' | 'qwen3-vl' | 'doubao-vision' | 'gemini' | 'vlm-ui-tars';
|
|
138
138
|
export interface IModelConfigForVQA {
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
[
|
|
142
|
-
[
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[
|
|
146
|
-
[
|
|
147
|
-
[
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
151
|
-
[
|
|
152
|
-
[
|
|
153
|
-
[
|
|
154
|
-
[
|
|
155
|
-
[
|
|
139
|
+
[MIDSCENE_VQA_MODEL_NAME]: string;
|
|
140
|
+
[MIDSCENE_VQA_OPENAI_SOCKS_PROXY]?: string;
|
|
141
|
+
[MIDSCENE_VQA_OPENAI_HTTP_PROXY]?: string;
|
|
142
|
+
[MIDSCENE_VQA_OPENAI_BASE_URL]?: string;
|
|
143
|
+
[MIDSCENE_VQA_OPENAI_API_KEY]?: string;
|
|
144
|
+
[MIDSCENE_VQA_OPENAI_INIT_CONFIG_JSON]?: string;
|
|
145
|
+
[MIDSCENE_VQA_OPENAI_USE_AZURE]?: string;
|
|
146
|
+
[MIDSCENE_VQA_USE_AZURE_OPENAI]?: string;
|
|
147
|
+
[MIDSCENE_VQA_AZURE_OPENAI_SCOPE]?: string;
|
|
148
|
+
[MIDSCENE_VQA_AZURE_OPENAI_KEY]?: string;
|
|
149
|
+
[MIDSCENE_VQA_AZURE_OPENAI_ENDPOINT]?: string;
|
|
150
|
+
[MIDSCENE_VQA_AZURE_OPENAI_API_VERSION]?: string;
|
|
151
|
+
[MIDSCENE_VQA_AZURE_OPENAI_DEPLOYMENT]?: string;
|
|
152
|
+
[MIDSCENE_VQA_AZURE_OPENAI_INIT_CONFIG_JSON]?: string;
|
|
153
|
+
[MIDSCENE_VQA_USE_ANTHROPIC_SDK]?: string;
|
|
154
|
+
[MIDSCENE_VQA_ANTHROPIC_API_KEY]?: string;
|
|
155
|
+
[MIDSCENE_VQA_VL_MODE]?: TVlModeValues;
|
|
156
156
|
}
|
|
157
157
|
export interface IModelConfigForPlanning {
|
|
158
|
-
[
|
|
159
|
-
[
|
|
160
|
-
[
|
|
161
|
-
[
|
|
162
|
-
[
|
|
163
|
-
[
|
|
164
|
-
[
|
|
165
|
-
[
|
|
166
|
-
[
|
|
167
|
-
[
|
|
168
|
-
[
|
|
169
|
-
[
|
|
170
|
-
[
|
|
171
|
-
[
|
|
172
|
-
[
|
|
173
|
-
[
|
|
174
|
-
[
|
|
158
|
+
[MIDSCENE_PLANNING_MODEL_NAME]: string;
|
|
159
|
+
[MIDSCENE_PLANNING_OPENAI_SOCKS_PROXY]?: string;
|
|
160
|
+
[MIDSCENE_PLANNING_OPENAI_HTTP_PROXY]?: string;
|
|
161
|
+
[MIDSCENE_PLANNING_OPENAI_BASE_URL]?: string;
|
|
162
|
+
[MIDSCENE_PLANNING_OPENAI_API_KEY]?: string;
|
|
163
|
+
[MIDSCENE_PLANNING_OPENAI_INIT_CONFIG_JSON]?: string;
|
|
164
|
+
[MIDSCENE_PLANNING_OPENAI_USE_AZURE]?: string;
|
|
165
|
+
[MIDSCENE_PLANNING_USE_AZURE_OPENAI]?: string;
|
|
166
|
+
[MIDSCENE_PLANNING_AZURE_OPENAI_SCOPE]?: string;
|
|
167
|
+
[MIDSCENE_PLANNING_AZURE_OPENAI_KEY]?: string;
|
|
168
|
+
[MIDSCENE_PLANNING_AZURE_OPENAI_ENDPOINT]?: string;
|
|
169
|
+
[MIDSCENE_PLANNING_AZURE_OPENAI_API_VERSION]?: string;
|
|
170
|
+
[MIDSCENE_PLANNING_AZURE_OPENAI_DEPLOYMENT]?: string;
|
|
171
|
+
[MIDSCENE_PLANNING_AZURE_OPENAI_INIT_CONFIG_JSON]?: string;
|
|
172
|
+
[MIDSCENE_PLANNING_USE_ANTHROPIC_SDK]?: string;
|
|
173
|
+
[MIDSCENE_PLANNING_ANTHROPIC_API_KEY]?: string;
|
|
174
|
+
[MIDSCENE_PLANNING_VL_MODE]?: TVlModeValues;
|
|
175
175
|
}
|
|
176
176
|
export interface IModeConfigForGrounding {
|
|
177
|
-
[
|
|
178
|
-
[
|
|
179
|
-
[
|
|
180
|
-
[
|
|
181
|
-
[
|
|
182
|
-
[
|
|
183
|
-
[
|
|
184
|
-
[
|
|
185
|
-
[
|
|
186
|
-
[
|
|
187
|
-
[
|
|
188
|
-
[
|
|
189
|
-
[
|
|
190
|
-
[
|
|
191
|
-
[
|
|
192
|
-
[
|
|
193
|
-
[
|
|
177
|
+
[MIDSCENE_GROUNDING_MODEL_NAME]: string;
|
|
178
|
+
[MIDSCENE_GROUNDING_OPENAI_SOCKS_PROXY]?: string;
|
|
179
|
+
[MIDSCENE_GROUNDING_OPENAI_HTTP_PROXY]?: string;
|
|
180
|
+
[MIDSCENE_GROUNDING_OPENAI_BASE_URL]?: string;
|
|
181
|
+
[MIDSCENE_GROUNDING_OPENAI_API_KEY]?: string;
|
|
182
|
+
[MIDSCENE_GROUNDING_OPENAI_INIT_CONFIG_JSON]?: string;
|
|
183
|
+
[MIDSCENE_GROUNDING_OPENAI_USE_AZURE]?: string;
|
|
184
|
+
[MIDSCENE_GROUNDING_USE_AZURE_OPENAI]?: string;
|
|
185
|
+
[MIDSCENE_GROUNDING_AZURE_OPENAI_SCOPE]?: string;
|
|
186
|
+
[MIDSCENE_GROUNDING_AZURE_OPENAI_KEY]?: string;
|
|
187
|
+
[MIDSCENE_GROUNDING_AZURE_OPENAI_ENDPOINT]?: string;
|
|
188
|
+
[MIDSCENE_GROUNDING_AZURE_OPENAI_API_VERSION]?: string;
|
|
189
|
+
[MIDSCENE_GROUNDING_AZURE_OPENAI_DEPLOYMENT]?: string;
|
|
190
|
+
[MIDSCENE_GROUNDING_AZURE_OPENAI_INIT_CONFIG_JSON]?: string;
|
|
191
|
+
[MIDSCENE_GROUNDING_USE_ANTHROPIC_SDK]?: string;
|
|
192
|
+
[MIDSCENE_GROUNDING_ANTHROPIC_API_KEY]?: string;
|
|
193
|
+
[MIDSCENE_GROUNDING_VL_MODE]?: TVlModeValues;
|
|
194
194
|
}
|
|
195
195
|
export interface IModelConfigForDefault {
|
|
196
|
-
[
|
|
197
|
-
[
|
|
198
|
-
[
|
|
199
|
-
[
|
|
200
|
-
[
|
|
201
|
-
[
|
|
202
|
-
[
|
|
203
|
-
[
|
|
204
|
-
[
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
[
|
|
208
|
-
[
|
|
209
|
-
[
|
|
210
|
-
[
|
|
211
|
-
[
|
|
212
|
-
[
|
|
196
|
+
[MIDSCENE_MODEL_NAME]: string;
|
|
197
|
+
[MIDSCENE_OPENAI_SOCKS_PROXY]?: string;
|
|
198
|
+
[MIDSCENE_OPENAI_HTTP_PROXY]?: string;
|
|
199
|
+
[MIDSCENE_OPENAI_BASE_URL]?: string;
|
|
200
|
+
[MIDSCENE_OPENAI_API_KEY]?: string;
|
|
201
|
+
[MIDSCENE_OPENAI_INIT_CONFIG_JSON]?: string;
|
|
202
|
+
[MIDSCENE_OPENAI_USE_AZURE]?: string;
|
|
203
|
+
[MIDSCENE_USE_AZURE_OPENAI]?: string;
|
|
204
|
+
[MIDSCENE_AZURE_OPENAI_SCOPE]?: string;
|
|
205
|
+
[MIDSCENE_AZURE_OPENAI_KEY]?: string;
|
|
206
|
+
[MIDSCENE_AZURE_OPENAI_ENDPOINT]?: string;
|
|
207
|
+
[MIDSCENE_AZURE_OPENAI_API_VERSION]?: string;
|
|
208
|
+
[MIDSCENE_AZURE_OPENAI_DEPLOYMENT]?: string;
|
|
209
|
+
[MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON]?: string;
|
|
210
|
+
[MIDSCENE_USE_ANTHROPIC_SDK]?: string;
|
|
211
|
+
[MIDSCENE_ANTHROPIC_API_KEY]?: string;
|
|
212
|
+
[MIDSCENE_VL_MODE]?: TVlModeValues;
|
|
213
213
|
}
|
|
214
214
|
export interface IModelConfigForDefaultLegacy {
|
|
215
|
-
[
|
|
216
|
-
[
|
|
217
|
-
[
|
|
215
|
+
[MIDSCENE_MODEL_NAME]: string;
|
|
216
|
+
[MIDSCENE_OPENAI_SOCKS_PROXY]?: string;
|
|
217
|
+
[MIDSCENE_OPENAI_HTTP_PROXY]?: string;
|
|
218
218
|
[OPENAI_BASE_URL]?: string;
|
|
219
219
|
[OPENAI_API_KEY]?: string;
|
|
220
|
-
[
|
|
220
|
+
[MIDSCENE_OPENAI_INIT_CONFIG_JSON]?: string;
|
|
221
221
|
[OPENAI_USE_AZURE]?: string;
|
|
222
|
-
[
|
|
223
|
-
[
|
|
222
|
+
[MIDSCENE_USE_AZURE_OPENAI]?: string;
|
|
223
|
+
[MIDSCENE_AZURE_OPENAI_SCOPE]?: string;
|
|
224
224
|
[AZURE_OPENAI_KEY]?: string;
|
|
225
225
|
[AZURE_OPENAI_ENDPOINT]?: string;
|
|
226
226
|
[AZURE_OPENAI_API_VERSION]?: string;
|
|
227
227
|
[AZURE_OPENAI_DEPLOYMENT]?: string;
|
|
228
|
-
[
|
|
229
|
-
[
|
|
228
|
+
[MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON]?: string;
|
|
229
|
+
[MIDSCENE_USE_ANTHROPIC_SDK]?: string;
|
|
230
230
|
[ANTHROPIC_API_KEY]?: string;
|
|
231
|
-
[
|
|
231
|
+
[MIDSCENE_VL_MODE]?: TVlModeValues;
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
234
234
|
* - VQA: Visual Question Answering
|
|
@@ -32,12 +32,12 @@ export declare function elementRect(el: globalThis.HTMLElement | globalThis.Node
|
|
|
32
32
|
} | false;
|
|
33
33
|
export declare function validTextNodeContent(node: globalThis.Node): string | false;
|
|
34
34
|
export declare function getNodeAttributes(node: globalThis.HTMLElement | globalThis.Node, currentWindow: typeof globalThis.window): Record<string, string>;
|
|
35
|
-
export declare function
|
|
35
|
+
export declare function midsceneGenerateHash(node: globalThis.Node | null, content: string, rect: Rect): string;
|
|
36
36
|
export declare function setNodeHashCacheListOnWindow(): void;
|
|
37
37
|
export declare function setNodeToCacheList(node: globalThis.Node, id: string): void;
|
|
38
38
|
export declare function getNodeFromCacheList(id: string): any;
|
|
39
39
|
export declare function generateId(numberId: number): string;
|
|
40
40
|
export declare function setGenerateHashOnWindow(): void;
|
|
41
|
-
export declare function
|
|
41
|
+
export declare function setMidsceneVisibleRectOnWindow(): void;
|
|
42
42
|
export declare function setExtractTextWithPositionOnWindow(): void;
|
|
43
43
|
export declare function getTopDocument(): globalThis.HTMLElement;
|
package/dist/types/node/fs.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ export declare function getRunningPkgInfo(dir?: string): PkgInfo | null;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function findNearestPackageJson(dir: string): string | null;
|
|
13
13
|
export declare function getElementInfosScriptContent(): string;
|
|
14
|
-
export declare function getExtraReturnLogic(tree?: boolean): Promise<";
|
|
14
|
+
export declare function getExtraReturnLogic(tree?: boolean): Promise<";midscene_element_inspector.setNodeHashCacheListOnWindow();;midscene_element_inspector.webExtractNodeTree()" | ";midscene_element_inspector.setNodeHashCacheListOnWindow();;midscene_element_inspector.webExtractTextWithPosition()" | null>;
|
|
15
15
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpascene/shared",
|
|
3
|
-
"
|
|
3
|
+
"description": "RPA shared",
|
|
4
|
+
"version": "0.30.9",
|
|
4
5
|
"repository": "",
|
|
5
6
|
"homepage": "",
|
|
6
7
|
"types": "./dist/types/index.d.ts",
|
|
@@ -63,7 +64,11 @@
|
|
|
63
64
|
"require": "./dist/lib/*.js"
|
|
64
65
|
}
|
|
65
66
|
},
|
|
66
|
-
"files": [
|
|
67
|
+
"files": [
|
|
68
|
+
"dist",
|
|
69
|
+
"src",
|
|
70
|
+
"README.md"
|
|
71
|
+
],
|
|
67
72
|
"scripts": {
|
|
68
73
|
"dev": "npm run build:watch",
|
|
69
74
|
"build": "npm run build:script && npm run build:pkg",
|
|
@@ -99,4 +104,4 @@
|
|
|
99
104
|
"registry": "https://registry.npmjs.org/"
|
|
100
105
|
},
|
|
101
106
|
"license": "MIT"
|
|
102
|
-
}
|
|
107
|
+
}
|