@midscene/core 1.2.2-beta-20260119111553.0 → 1.2.2-beta-20260119114334.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.
@@ -86,7 +86,7 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
86
86
  } & {
87
87
  autoDismissKeyboard?: boolean;
88
88
  } & {
89
- mode?: 'replace' | 'clear' | 'typeOnly' | 'append';
89
+ mode?: 'replace' | 'clear' | 'append';
90
90
  }): Promise<any>;
91
91
  /**
92
92
  * @deprecated Use aiInput(locatePrompt, opt) instead where opt contains the value
@@ -94,7 +94,7 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
94
94
  aiInput(value: string | number, locatePrompt: TUserPrompt, opt?: LocateOption & {
95
95
  autoDismissKeyboard?: boolean;
96
96
  } & {
97
- mode?: 'replace' | 'clear' | 'typeOnly' | 'append';
97
+ mode?: 'replace' | 'clear' | 'append';
98
98
  }): Promise<any>;
99
99
  aiKeyboardPress(locatePrompt: TUserPrompt, opt: LocateOption & {
100
100
  keyName: string;
@@ -1,6 +1,10 @@
1
- import type { DeepThinkOption, DeviceAction, InterfaceType, PlanningAIResponse, UIContext } from '../types';
1
+ import type { DeepThinkOption, DeviceAction, InterfaceType, PlanningAIResponse, RawResponsePlanningAIResponse, UIContext } from '../types';
2
2
  import type { IModelConfig } from '@midscene/shared/env';
3
3
  import type { ConversationHistory } from './conversation-history';
4
+ /**
5
+ * Parse XML response from LLM and convert to RawResponsePlanningAIResponse
6
+ */
7
+ export declare function parseXMLPlanningResponse(xmlString: string): RawResponsePlanningAIResponse;
4
8
  export declare function plan(userInstruction: string, opts: {
5
9
  context: UIContext;
6
10
  interfaceType: InterfaceType;
@@ -728,7 +728,7 @@ export declare const actionInputParamSchema: z.ZodObject<{
728
728
  cacheable: z.ZodOptional<z.ZodBoolean>;
729
729
  xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
730
730
  }, z.ZodTypeAny, "passthrough">>>;
731
- mode: z.ZodEffects<z.ZodOptional<z.ZodDefault<z.ZodEnum<["replace", "clear", "typeOnly"]>>>, "replace" | "clear" | "typeOnly" | undefined, unknown>;
731
+ mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["replace", "clear", "append"]>>>;
732
732
  }, "strip", z.ZodTypeAny, {
733
733
  value: string;
734
734
  locate?: z.objectOutputType<{
@@ -767,7 +767,7 @@ export declare const actionInputParamSchema: z.ZodObject<{
767
767
  cacheable: z.ZodOptional<z.ZodBoolean>;
768
768
  xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
769
769
  }, z.ZodTypeAny, "passthrough"> | undefined;
770
- mode?: "replace" | "clear" | "typeOnly" | undefined;
770
+ mode?: "replace" | "clear" | "append" | undefined;
771
771
  }, {
772
772
  value: string | number;
773
773
  locate?: z.objectInputType<{
@@ -806,12 +806,12 @@ export declare const actionInputParamSchema: z.ZodObject<{
806
806
  cacheable: z.ZodOptional<z.ZodBoolean>;
807
807
  xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
808
808
  }, z.ZodTypeAny, "passthrough"> | undefined;
809
- mode?: unknown;
809
+ mode?: "replace" | "clear" | "append" | undefined;
810
810
  }>;
811
811
  export type ActionInputParam = {
812
812
  value: string;
813
813
  locate?: LocateResultElement;
814
- mode?: 'replace' | 'clear' | 'typeOnly' | 'append';
814
+ mode?: 'replace' | 'clear' | 'append';
815
815
  };
816
816
  export declare const defineActionInput: (call: (param: ActionInputParam) => Promise<void>) => DeviceAction<ActionInputParam>;
817
817
  export declare const actionKeyboardPressParamSchema: z.ZodObject<{
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-20260119111553.0",
4
+ "version": "1.2.2-beta-20260119114334.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-20260119111553.0"
92
+ "@midscene/shared": "1.2.2-beta-20260119114334.0"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@rslib/core": "^0.18.3",