@midscene/core 1.6.3 → 1.6.4

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.
@@ -0,0 +1,20 @@
1
+ import type { IModelConfig, TIntent } from '@midscene/shared/env';
2
+ export interface ConnectivityCheckResultItem {
3
+ name: 'text' | 'vision' | 'aiLocate';
4
+ intent: TIntent;
5
+ modelName: string;
6
+ modelFamily?: string;
7
+ passed: boolean;
8
+ durationMs: number;
9
+ message: string;
10
+ }
11
+ export interface ConnectivityTestResult {
12
+ passed: boolean;
13
+ checks: ConnectivityCheckResultItem[];
14
+ }
15
+ export interface ConnectivityTestConfig {
16
+ defaultModelConfig: IModelConfig;
17
+ planningModelConfig: IModelConfig;
18
+ insightModelConfig: IModelConfig;
19
+ }
20
+ export declare function runConnectivityTest(config: ConnectivityTestConfig): Promise<ConnectivityTestResult>;
@@ -1,7 +1,9 @@
1
1
  export { AIResponseParseError, callAIWithStringResponse, callAIWithObjectResponse, callAI, } from './service-caller/index';
2
+ export { runConnectivityTest, type ConnectivityCheckResultItem, type ConnectivityTestConfig, type ConnectivityTestResult, } from './connectivity';
2
3
  export { systemPromptToLocateElement } from './prompt/llm-locator';
3
4
  export { generatePlaywrightTest, generatePlaywrightTestStream, } from './prompt/playwright-generator';
4
5
  export { generateYamlTest, generateYamlTestStream, } from './prompt/yaml-generator';
6
+ export type { YamlGenerationOptions } from './prompt/yaml-generator';
5
7
  export type { ChatCompletionMessageParam } from 'openai/resources/index';
6
8
  export { AiLocateElement, AiExtractElementInfo, AiLocateSection, AiJudgeOrderSensitive, } from './inspect';
7
9
  export { plan } from './llm-planning';
@@ -48,6 +48,8 @@ export interface YamlGenerationOptions {
48
48
  includeTimestamps?: boolean;
49
49
  maxScreenshots?: number;
50
50
  description?: string;
51
+ /** Language for human-readable YAML content (e.g. 'English', 'Chinese'). Keys and API names are kept as-is. */
52
+ language?: string;
51
53
  }
52
54
  export interface FilteredEvents {
53
55
  navigationEvents: ChromeRecordedEvent[];
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import Service from './service/index';
3
3
  import { TaskRunner } from './task-runner';
4
4
  import { getVersion } from './utils';
5
- export { plan, AiLocateElement, getMidsceneLocationSchema, PointSchema, SizeSchema, RectSchema, TMultimodalPromptSchema, TUserPromptSchema, type TMultimodalPrompt, type TUserPrompt, } from './ai-model/index';
5
+ export { plan, AiLocateElement, runConnectivityTest, getMidsceneLocationSchema, PointSchema, SizeSchema, RectSchema, TMultimodalPromptSchema, TUserPromptSchema, type TMultimodalPrompt, type TUserPrompt, type ConnectivityCheckResultItem, type ConnectivityTestConfig, type ConnectivityTestResult, } from './ai-model/index';
6
6
  export { MIDSCENE_MODEL_NAME, type CreateOpenAIClientFn, } from '@midscene/shared/env';
7
7
  export type * from './types';
8
8
  export { ServiceError, ExecutionDump, ReportActionDump, GroupedActionDump, type IExecutionDump, type IReportActionDump, type IGroupedActionDump, type ReportMeta, type GroupMeta, } from './types';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midscene/core",
3
3
  "description": "Automate browser actions, extract data, and perform assertions using AI. It offers JavaScript SDK, Chrome extension, and support for scripting in YAML. See https://midscenejs.com/ for details.",
4
- "version": "1.6.3",
4
+ "version": "1.6.4",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "main": "./dist/lib/index.js",
@@ -97,7 +97,7 @@
97
97
  "semver": "7.5.2",
98
98
  "undici": "^6.0.0",
99
99
  "zod": "3.24.3",
100
- "@midscene/shared": "1.6.3"
100
+ "@midscene/shared": "1.6.4"
101
101
  },
102
102
  "devDependencies": {
103
103
  "@rslib/core": "^0.18.3",