@midscene/core 0.24.1 → 0.24.2-beta-20250730081235.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.
Files changed (32) hide show
  1. package/dist/es/ai-model.d.ts +3 -3
  2. package/dist/es/ai-model.js +1 -1
  3. package/dist/es/{chunk-HUEQURIG.js → chunk-KGBLKK6O.js} +3 -3
  4. package/dist/es/{chunk-TV47VKQ7.js → chunk-NAMQEUK6.js} +26 -7
  5. package/dist/es/chunk-NAMQEUK6.js.map +1 -0
  6. package/dist/es/index.d.ts +4 -4
  7. package/dist/es/index.js +2 -2
  8. package/dist/es/{llm-planning-3407bd42.d.ts → llm-planning-6575ef56.d.ts} +1 -1
  9. package/dist/es/{types-4d9c9a85.d.ts → types-7b554c6a.d.ts} +7 -2
  10. package/dist/es/utils.d.ts +1 -1
  11. package/dist/es/utils.js +1 -1
  12. package/dist/lib/ai-model.d.ts +3 -3
  13. package/dist/lib/ai-model.js +2 -2
  14. package/dist/lib/{chunk-HUEQURIG.js → chunk-KGBLKK6O.js} +3 -3
  15. package/dist/lib/{chunk-TV47VKQ7.js → chunk-NAMQEUK6.js} +26 -7
  16. package/dist/lib/chunk-NAMQEUK6.js.map +1 -0
  17. package/dist/lib/index.d.ts +4 -4
  18. package/dist/lib/index.js +12 -12
  19. package/dist/lib/{llm-planning-3407bd42.d.ts → llm-planning-6575ef56.d.ts} +1 -1
  20. package/dist/{types/types-4d9c9a85.d.ts → lib/types-7b554c6a.d.ts} +7 -2
  21. package/dist/lib/utils.d.ts +1 -1
  22. package/dist/lib/utils.js +2 -2
  23. package/dist/types/ai-model.d.ts +3 -3
  24. package/dist/types/index.d.ts +4 -4
  25. package/dist/types/{llm-planning-3407bd42.d.ts → llm-planning-6575ef56.d.ts} +1 -1
  26. package/dist/{lib/types-4d9c9a85.d.ts → types/types-7b554c6a.d.ts} +7 -2
  27. package/dist/types/utils.d.ts +1 -1
  28. package/package.json +3 -3
  29. package/dist/es/chunk-TV47VKQ7.js.map +0 -1
  30. package/dist/lib/chunk-TV47VKQ7.js.map +0 -1
  31. /package/dist/es/{chunk-HUEQURIG.js.map → chunk-KGBLKK6O.js.map} +0 -0
  32. /package/dist/lib/{chunk-HUEQURIG.js.map → chunk-KGBLKK6O.js.map} +0 -0
@@ -354,7 +354,7 @@ interface PlanningLocateParam extends DetailedLocateParam {
354
354
  }
355
355
  interface PlanningAction<ParamType = any> {
356
356
  thought?: string;
357
- type: 'Locate' | 'Tap' | 'RightClick' | 'Hover' | 'Drag' | 'Input' | 'KeyboardPress' | 'Scroll' | 'Error' | 'ExpectedFalsyCondition' | 'Assert' | 'AssertWithoutThrow' | 'Sleep' | 'Finished' | 'AndroidBackButton' | 'AndroidHomeButton' | 'AndroidRecentAppsButton';
357
+ type: 'Locate' | 'Tap' | 'RightClick' | 'Hover' | 'Drag' | 'Input' | 'KeyboardPress' | 'Scroll' | 'Error' | 'ExpectedFalsyCondition' | 'Assert' | 'AssertWithoutThrow' | 'Sleep' | 'Finished' | 'AndroidBackButton' | 'AndroidHomeButton' | 'AndroidRecentAppsButton' | 'AndroidLongPress';
358
358
  param: ParamType;
359
359
  locate?: PlanningLocateParam | null;
360
360
  }
@@ -390,6 +390,11 @@ interface PlanningActionParamError {
390
390
  type PlanningActionParamWaitFor = AgentWaitForOpt & {
391
391
  assertion: string;
392
392
  };
393
+ interface PlanningActionParamAndroidLongPress {
394
+ x: number;
395
+ y: number;
396
+ duration?: number;
397
+ }
393
398
  /**
394
399
  * misc
395
400
  */
@@ -525,4 +530,4 @@ interface StreamingAIResponse {
525
530
  isStreamed: boolean;
526
531
  }
527
532
 
528
- export { type PlanningActionParamScroll as $, type AIDescribeElementResponse as A, type EnsureObject as B, type CallAIFn as C, type DumpSubscriber as D, type ExecutionTask as E, type InsightExtractParam as F, type LocateResultElement as G, type DumpMeta as H, type InsightAction as I, type InsightDump as J, type LiteUISection as K, type LocateResult as L, type MidsceneYamlScript as M, type ElementById as N, type OnTaskStartTip as O, type PartialInsightDumpFromSDK as P, type AgentWaitForOpt as Q, type ReportDumpWithAttributes as R, type AgentAssertOpt as S, type PlanningLocateParam as T, UIContext as U, type PlanningAction as V, type PlanningAIResponse as W, type PlanningActionParamTap as X, type PlanningActionParamHover as Y, type PlanningActionParamRightClick as Z, type PlanningActionParamInputOrKeyPress as _, type ExecutionTaskProgressOptions as a, type ScriptPlayerStatusValue as a$, type PlanningActionParamAssert as a0, type PlanningActionParamSleep as a1, type PlanningActionParamError as a2, type PlanningActionParamWaitFor as a3, type Color as a4, type BaseAgentParserOpt as a5, type PuppeteerParserOpt as a6, type PlaywrightParserOpt as a7, type ExecutionRecorderItem as a8, type ExecutionTaskType as a9, type StreamingAIResponse as aA, type LocateOption as aB, type ReferenceImage as aC, type scrollParam as aD, type MidsceneYamlScriptEnvBase as aE, type MidsceneYamlScriptWebEnv as aF, type MidsceneYamlScriptAndroidEnv as aG, type MidsceneYamlScriptEnv as aH, type MidsceneYamlFlowItemAIAction as aI, type MidsceneYamlFlowItemAIAssert as aJ, type MidsceneYamlFlowItemAIQuery as aK, type MidsceneYamlFlowItemAINumber as aL, type MidsceneYamlFlowItemAIString as aM, type MidsceneYamlFlowItemAIAsk as aN, type MidsceneYamlFlowItemAIBoolean as aO, type MidsceneYamlFlowItemAILocate as aP, type MidsceneYamlFlowItemAIWaitFor as aQ, type MidsceneYamlFlowItemAITap as aR, type MidsceneYamlFlowItemAIHover as aS, type MidsceneYamlFlowItemAIInput as aT, type MidsceneYamlFlowItemAIKeyboardPress as aU, type MidsceneYamlFlowItemAIScroll as aV, type MidsceneYamlFlowItemEvaluateJavaScript as aW, type MidsceneYamlFlowItemSleep as aX, type MidsceneYamlFlowItemLogScreenshot as aY, type FreeFn as aZ, type ScriptPlayerTaskStatus as a_, type ExecutorContext as aa, type ExecutionTaskHitBy as ab, type ExecutionTaskReturn as ac, type ExecutionTaskInsightLocateParam as ad, type ExecutionTaskInsightLocateOutput as ae, type ExecutionTaskInsightDumpLog as af, type ExecutionTaskInsightLocateApply as ag, type ExecutionTaskInsightLocate as ah, type ExecutionTaskInsightQueryParam as ai, type ExecutionTaskInsightQueryOutput as aj, type ExecutionTaskInsightQueryApply as ak, type ExecutionTaskInsightQuery as al, type ExecutionTaskInsightAssertionParam as am, type ExecutionTaskInsightAssertionApply as an, type ExecutionTaskInsightAssertion as ao, type ExecutionTaskActionApply as ap, type ExecutionTaskAction as aq, type ExecutionTaskLogApply as ar, type ExecutionTaskLog as as, type ExecutionTaskPlanningApply as at, type ExecutionTaskPlanning as au, type GroupedActionDump as av, type PageType as aw, type StreamingCodeGenerationOptions as ax, type StreamingCallback as ay, type CodeGenerationChunk as az, type ExecutionTaskApply as b, type MidsceneYamlConfig as b0, type MidsceneYamlConfigOutput as b1, type ExecutionDump as c, type InsightTaskInfo as d, type InsightOptions as e, type DetailedLocateParam as f, type InsightExtractOption as g, type InsightAssertionResponse as h, type MidsceneYamlTask as i, type MidsceneYamlFlowItem as j, type MidsceneYamlFlowItemAIRightClick as k, type MidsceneYamlConfigResult as l, type AIUsageInfo as m, AIResponseFormat as n, type AISingleElementResponseById as o, type AISingleElementResponseByPosition as p, type AISingleElementResponse as q, type AIElementLocatorResponse as r, type AIElementCoordinatesResponse as s, type AIElementResponse as t, type AIDataExtractionResponse as u, type AISectionLocatorResponse as v, type AIAssertionResponse as w, type LocatorValidatorOption as x, type LocateValidatorResult as y, type AgentDescribeElementAtPointResult as z };
533
+ export { type PlanningActionParamScroll as $, type AIDescribeElementResponse as A, type EnsureObject as B, type CallAIFn as C, type DumpSubscriber as D, type ExecutionTask as E, type InsightExtractParam as F, type LocateResultElement as G, type DumpMeta as H, type InsightAction as I, type InsightDump as J, type LiteUISection as K, type LocateResult as L, type MidsceneYamlScript as M, type ElementById as N, type OnTaskStartTip as O, type PartialInsightDumpFromSDK as P, type AgentWaitForOpt as Q, type ReportDumpWithAttributes as R, type AgentAssertOpt as S, type PlanningLocateParam as T, UIContext as U, type PlanningAction as V, type PlanningAIResponse as W, type PlanningActionParamTap as X, type PlanningActionParamHover as Y, type PlanningActionParamRightClick as Z, type PlanningActionParamInputOrKeyPress as _, type ExecutionTaskProgressOptions as a, type ScriptPlayerTaskStatus as a$, type PlanningActionParamAssert as a0, type PlanningActionParamSleep as a1, type PlanningActionParamError as a2, type PlanningActionParamWaitFor as a3, type PlanningActionParamAndroidLongPress as a4, type Color as a5, type BaseAgentParserOpt as a6, type PuppeteerParserOpt as a7, type PlaywrightParserOpt as a8, type ExecutionRecorderItem as a9, type CodeGenerationChunk as aA, type StreamingAIResponse as aB, type LocateOption as aC, type ReferenceImage as aD, type scrollParam as aE, type MidsceneYamlScriptEnvBase as aF, type MidsceneYamlScriptWebEnv as aG, type MidsceneYamlScriptAndroidEnv as aH, type MidsceneYamlScriptEnv as aI, type MidsceneYamlFlowItemAIAction as aJ, type MidsceneYamlFlowItemAIAssert as aK, type MidsceneYamlFlowItemAIQuery as aL, type MidsceneYamlFlowItemAINumber as aM, type MidsceneYamlFlowItemAIString as aN, type MidsceneYamlFlowItemAIAsk as aO, type MidsceneYamlFlowItemAIBoolean as aP, type MidsceneYamlFlowItemAILocate as aQ, type MidsceneYamlFlowItemAIWaitFor as aR, type MidsceneYamlFlowItemAITap as aS, type MidsceneYamlFlowItemAIHover as aT, type MidsceneYamlFlowItemAIInput as aU, type MidsceneYamlFlowItemAIKeyboardPress as aV, type MidsceneYamlFlowItemAIScroll as aW, type MidsceneYamlFlowItemEvaluateJavaScript as aX, type MidsceneYamlFlowItemSleep as aY, type MidsceneYamlFlowItemLogScreenshot as aZ, type FreeFn as a_, type ExecutionTaskType as aa, type ExecutorContext as ab, type ExecutionTaskHitBy as ac, type ExecutionTaskReturn as ad, type ExecutionTaskInsightLocateParam as ae, type ExecutionTaskInsightLocateOutput as af, type ExecutionTaskInsightDumpLog as ag, type ExecutionTaskInsightLocateApply as ah, type ExecutionTaskInsightLocate as ai, type ExecutionTaskInsightQueryParam as aj, type ExecutionTaskInsightQueryOutput as ak, type ExecutionTaskInsightQueryApply as al, type ExecutionTaskInsightQuery as am, type ExecutionTaskInsightAssertionParam as an, type ExecutionTaskInsightAssertionApply as ao, type ExecutionTaskInsightAssertion as ap, type ExecutionTaskActionApply as aq, type ExecutionTaskAction as ar, type ExecutionTaskLogApply as as, type ExecutionTaskLog as at, type ExecutionTaskPlanningApply as au, type ExecutionTaskPlanning as av, type GroupedActionDump as aw, type PageType as ax, type StreamingCodeGenerationOptions as ay, type StreamingCallback as az, type ExecutionTaskApply as b, type ScriptPlayerStatusValue as b0, type MidsceneYamlConfig as b1, type MidsceneYamlConfigOutput as b2, type ExecutionDump as c, type InsightTaskInfo as d, type InsightOptions as e, type DetailedLocateParam as f, type InsightExtractOption as g, type InsightAssertionResponse as h, type MidsceneYamlTask as i, type MidsceneYamlFlowItem as j, type MidsceneYamlFlowItemAIRightClick as k, type MidsceneYamlConfigResult as l, type AIUsageInfo as m, AIResponseFormat as n, type AISingleElementResponseById as o, type AISingleElementResponseByPosition as p, type AISingleElementResponse as q, type AIElementLocatorResponse as r, type AIElementCoordinatesResponse as s, type AIElementResponse as t, type AIDataExtractionResponse as u, type AISectionLocatorResponse as v, type AIAssertionResponse as w, type LocatorValidatorOption as x, type LocateValidatorResult as y, type AgentDescribeElementAtPointResult as z };
@@ -1,4 +1,4 @@
1
- import { R as ReportDumpWithAttributes } from './types-4d9c9a85.js';
1
+ import { R as ReportDumpWithAttributes } from './types-7b554c6a.js';
2
2
  import { Rect } from '@midscene/shared/types';
3
3
  import '@midscene/shared/constants';
4
4
  import 'openai/resources';
package/dist/es/utils.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  uploadTestInfoToServer,
13
13
  writeDumpReport,
14
14
  writeLogFile
15
- } from "./chunk-HUEQURIG.js";
15
+ } from "./chunk-KGBLKK6O.js";
16
16
  export {
17
17
  getTmpDir,
18
18
  getTmpFile,
@@ -1,9 +1,9 @@
1
- import { ay as StreamingCallback, m as AIUsageInfo, ax as StreamingCodeGenerationOptions, aA as StreamingAIResponse, V as PlanningAction, j as MidsceneYamlFlowItem } from './types-4d9c9a85.js';
1
+ import { az as StreamingCallback, m as AIUsageInfo, ay as StreamingCodeGenerationOptions, aB as StreamingAIResponse, V as PlanningAction, j as MidsceneYamlFlowItem } from './types-7b554c6a.js';
2
2
  import OpenAI from 'openai';
3
3
  import { ChatCompletionMessageParam } from 'openai/resources';
4
4
  export { ChatCompletionMessageParam } from 'openai/resources';
5
- import { b as AIActionType } from './llm-planning-3407bd42.js';
6
- export { a as AiAssert, f as AiExtractElementInfo, A as AiLocateElement, g as AiLocateSection, h as adaptBboxToRect, c as callAiFn, d as describeUserPage, e as elementByPositionWithElementInfo, p as plan } from './llm-planning-3407bd42.js';
5
+ import { b as AIActionType } from './llm-planning-6575ef56.js';
6
+ export { a as AiAssert, f as AiExtractElementInfo, A as AiLocateElement, g as AiLocateSection, h as adaptBboxToRect, c as callAiFn, d as describeUserPage, e as elementByPositionWithElementInfo, p as plan } from './llm-planning-6575ef56.js';
7
7
  import { vlLocateMode } from '@midscene/shared/env';
8
8
  import { actionParser } from '@ui-tars/action-parser';
9
9
  import { Size } from '@midscene/shared/types';
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- var _chunkTV47VKQ7js = require('./chunk-TV47VKQ7.js');
21
+ var _chunkNAMQEUK6js = require('./chunk-NAMQEUK6.js');
22
22
 
23
23
 
24
24
 
@@ -39,4 +39,4 @@ var _chunkTV47VKQ7js = require('./chunk-TV47VKQ7.js');
39
39
 
40
40
 
41
41
 
42
- exports.AIActionType = _chunkTV47VKQ7js.AIActionType; exports.AiAssert = _chunkTV47VKQ7js.AiAssert; exports.AiExtractElementInfo = _chunkTV47VKQ7js.AiExtractElementInfo; exports.AiLocateElement = _chunkTV47VKQ7js.AiLocateElement; exports.AiLocateSection = _chunkTV47VKQ7js.AiLocateSection; exports.adaptBboxToRect = _chunkTV47VKQ7js.adaptBboxToRect; exports.callAi = _chunkTV47VKQ7js.call; exports.callAiFn = _chunkTV47VKQ7js.callAiFn; exports.callToGetJSONObject = _chunkTV47VKQ7js.callToGetJSONObject; exports.describeUserPage = _chunkTV47VKQ7js.describeUserPage; exports.elementByPositionWithElementInfo = _chunkTV47VKQ7js.elementByPositionWithElementInfo; exports.generatePlaywrightTest = _chunkTV47VKQ7js.generatePlaywrightTest; exports.generatePlaywrightTestStream = _chunkTV47VKQ7js.generatePlaywrightTestStream; exports.generateYamlTest = _chunkTV47VKQ7js.generateYamlTest; exports.generateYamlTestStream = _chunkTV47VKQ7js.generateYamlTestStream; exports.plan = _chunkTV47VKQ7js.plan; exports.resizeImageForUiTars = _chunkTV47VKQ7js.resizeImageForUiTars; exports.systemPromptToLocateElement = _chunkTV47VKQ7js.systemPromptToLocateElement; exports.vlmPlanning = _chunkTV47VKQ7js.vlmPlanning;
42
+ exports.AIActionType = _chunkNAMQEUK6js.AIActionType; exports.AiAssert = _chunkNAMQEUK6js.AiAssert; exports.AiExtractElementInfo = _chunkNAMQEUK6js.AiExtractElementInfo; exports.AiLocateElement = _chunkNAMQEUK6js.AiLocateElement; exports.AiLocateSection = _chunkNAMQEUK6js.AiLocateSection; exports.adaptBboxToRect = _chunkNAMQEUK6js.adaptBboxToRect; exports.callAi = _chunkNAMQEUK6js.call; exports.callAiFn = _chunkNAMQEUK6js.callAiFn; exports.callToGetJSONObject = _chunkNAMQEUK6js.callToGetJSONObject; exports.describeUserPage = _chunkNAMQEUK6js.describeUserPage; exports.elementByPositionWithElementInfo = _chunkNAMQEUK6js.elementByPositionWithElementInfo; exports.generatePlaywrightTest = _chunkNAMQEUK6js.generatePlaywrightTest; exports.generatePlaywrightTestStream = _chunkNAMQEUK6js.generatePlaywrightTestStream; exports.generateYamlTest = _chunkNAMQEUK6js.generateYamlTest; exports.generateYamlTestStream = _chunkNAMQEUK6js.generateYamlTestStream; exports.plan = _chunkNAMQEUK6js.plan; exports.resizeImageForUiTars = _chunkNAMQEUK6js.resizeImageForUiTars; exports.systemPromptToLocateElement = _chunkNAMQEUK6js.systemPromptToLocateElement; exports.vlmPlanning = _chunkNAMQEUK6js.vlmPlanning;