@midscene/core 1.2.2-beta-20260116092125.0 → 1.2.2-beta-20260116114131.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.
@@ -11,4 +11,4 @@ export { adaptBboxToRect } from '../common';
11
11
  export { uiTarsPlanning, resizeImageForUiTars } from './ui-tars-planning';
12
12
  export { ConversationHistory, type ConversationHistoryOptions, } from './conversation-history';
13
13
  export type { AIArgs } from '../common';
14
- export { getMidsceneLocationSchema, type MidsceneLocationResultType, PointSchema, SizeSchema, RectSchema, TMultimodalPromptSchema, TUserPromptSchema, type TMultimodalPrompt, type TUserPrompt, findAllMidsceneLocatorField, dumpActionParam, loadActionParam, parseActionParam, } from '../common';
14
+ export { getMidsceneLocationSchema, type MidsceneLocationResultType, PointSchema, SizeSchema, RectSchema, TMultimodalPromptSchema, TUserPromptSchema, type TMultimodalPrompt, type TUserPrompt, findAllMidsceneLocatorField, dumpActionParam, parseActionParam, } from '../common';
@@ -1,4 +1,4 @@
1
- import type { AIDataExtractionResponse, AIElementResponse, AIUsageInfo, Rect, ReferenceImage, ServiceExtractOption, UIContext } from '../types';
1
+ import type { AIDataExtractionResponse, AIElementResponse, AIUsageInfo, Rect, ServiceExtractOption, UIContext } from '../types';
2
2
  import type { IModelConfig } from '@midscene/shared/env';
3
3
  import type { LocateResultElement } from '@midscene/shared/types';
4
4
  import type { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources/index';
@@ -11,7 +11,6 @@ export type AIArgs = [
11
11
  export declare function AiLocateElement(options: {
12
12
  context: UIContext;
13
13
  targetElementDescription: TUserPrompt;
14
- referenceImage?: ReferenceImage;
15
14
  callAIFn: typeof callAIWithObjectResponse<AIElementResponse | [number, number]>;
16
15
  searchConfig?: Awaited<ReturnType<typeof AiLocateSection>>;
17
16
  modelConfig: IModelConfig;
@@ -1,4 +1,4 @@
1
- import { type AIUsageInfo, type DeepThinkOption } from '../../types';
1
+ import type { AIUsageInfo, DeepThinkOption } from '../../types';
2
2
  import type { StreamingCallback } from '../../types';
3
3
  import { type IModelConfig, type TModelFamily, type TVlModeTypes } from '@midscene/shared/env';
4
4
  import type { ChatCompletionMessageParam } from 'openai/resources/index';
@@ -558,7 +558,6 @@ export declare const ifMidsceneLocatorField: (field: any) => boolean;
558
558
  export declare const dumpMidsceneLocatorField: (field: any) => string;
559
559
  export declare const findAllMidsceneLocatorField: (zodType?: z.ZodType<any>, requiredOnly?: boolean) => string[];
560
560
  export declare const dumpActionParam: (jsonObject: Record<string, any>, zodSchema: z.ZodType<any>) => Record<string, any>;
561
- export declare const loadActionParam: (jsonObject: Record<string, any>, zodSchema: z.ZodType<any>) => Record<string, any>;
562
561
  /**
563
562
  * Parse and validate action parameters using Zod schema.
564
563
  * All fields are validated through Zod, EXCEPT locator fields which are skipped.
@@ -18,14 +18,6 @@ export type AIUsageInfo = Record<string, any> & {
18
18
  intent: string | undefined;
19
19
  };
20
20
  export type { LocateResultElement };
21
- /**
22
- * openai
23
- *
24
- */
25
- export declare enum AIResponseFormat {
26
- JSON = "json_object",
27
- TEXT = "text"
28
- }
29
21
  export type AISingleElementResponseByPosition = {
30
22
  position?: {
31
23
  x: number;
@@ -21,7 +21,6 @@ export interface ReferenceImage {
21
21
  }
22
22
  export interface DetailedLocateParam extends LocateOption {
23
23
  prompt: TUserPrompt;
24
- referenceImage?: ReferenceImage;
25
24
  }
26
25
  export type ScrollType = 'singleAction' | 'scrollToBottom' | 'scrollToTop' | 'scrollToRight' | 'scrollToLeft' | 'once' | 'untilBottom' | 'untilTop' | 'untilRight' | 'untilLeft';
27
26
  export type ActionScrollParam = {
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.2.2-beta-20260116092125.0",
4
+ "version": "1.2.2-beta-20260116114131.0",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "main": "./dist/lib/index.js",
@@ -89,7 +89,7 @@
89
89
  "semver": "7.5.2",
90
90
  "undici": "^6.0.0",
91
91
  "zod": "3.24.3",
92
- "@midscene/shared": "1.2.2-beta-20260116092125.0"
92
+ "@midscene/shared": "1.2.2-beta-20260116114131.0"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@rslib/core": "^0.18.3",