@midscene/core 0.14.3 → 0.14.4-beta-20250415065130.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 (45) hide show
  1. package/dist/es/ai-model.d.ts +3 -3
  2. package/dist/es/ai-model.js +2 -2
  3. package/dist/es/{chunk-SAXMKI7Z.js → chunk-6MPYG6WR.js} +3 -3
  4. package/dist/es/{chunk-UBGEKXK7.js → chunk-6SYVFZ6C.js} +4 -1
  5. package/dist/es/chunk-6SYVFZ6C.js.map +1 -0
  6. package/dist/es/{chunk-5EO33FHK.js → chunk-QX6K65KH.js} +2 -2
  7. package/dist/es/env.d.ts +1 -1
  8. package/dist/es/env.js +1 -1
  9. package/dist/es/index.d.ts +4 -4
  10. package/dist/es/index.js +3 -3
  11. package/dist/es/{llm-planning-bd80e99e.d.ts → llm-planning-d084250f.d.ts} +1 -1
  12. package/dist/es/tree.d.ts +1 -1
  13. package/dist/{lib/types-e2a418c3.d.ts → es/types-d2831105.d.ts} +12 -3
  14. package/dist/es/utils.d.ts +1 -1
  15. package/dist/es/utils.js +2 -2
  16. package/dist/lib/ai-model.d.ts +3 -3
  17. package/dist/lib/ai-model.js +3 -3
  18. package/dist/lib/{chunk-SAXMKI7Z.js → chunk-6MPYG6WR.js} +5 -5
  19. package/dist/lib/{chunk-UBGEKXK7.js → chunk-6SYVFZ6C.js} +4 -1
  20. package/dist/lib/chunk-6SYVFZ6C.js.map +1 -0
  21. package/dist/lib/{chunk-5EO33FHK.js → chunk-QX6K65KH.js} +48 -48
  22. package/dist/lib/env.d.ts +1 -1
  23. package/dist/lib/env.js +2 -2
  24. package/dist/lib/index.d.ts +4 -4
  25. package/dist/lib/index.js +20 -20
  26. package/dist/lib/{llm-planning-bd80e99e.d.ts → llm-planning-d084250f.d.ts} +1 -1
  27. package/dist/lib/tree.d.ts +1 -1
  28. package/dist/{es/types-e2a418c3.d.ts → lib/types-d2831105.d.ts} +12 -3
  29. package/dist/lib/utils.d.ts +1 -1
  30. package/dist/lib/utils.js +3 -3
  31. package/dist/types/ai-model.d.ts +3 -3
  32. package/dist/types/env.d.ts +1 -1
  33. package/dist/types/index.d.ts +4 -4
  34. package/dist/types/{llm-planning-bd80e99e.d.ts → llm-planning-d084250f.d.ts} +1 -1
  35. package/dist/types/tree.d.ts +1 -1
  36. package/dist/types/{types-e2a418c3.d.ts → types-d2831105.d.ts} +12 -3
  37. package/dist/types/utils.d.ts +1 -1
  38. package/package.json +2 -2
  39. package/report/index.html +19 -19
  40. package/dist/es/chunk-UBGEKXK7.js.map +0 -1
  41. package/dist/lib/chunk-UBGEKXK7.js.map +0 -1
  42. /package/dist/es/{chunk-SAXMKI7Z.js.map → chunk-6MPYG6WR.js.map} +0 -0
  43. /package/dist/es/{chunk-5EO33FHK.js.map → chunk-QX6K65KH.js.map} +0 -0
  44. /package/dist/lib/{chunk-SAXMKI7Z.js.map → chunk-6MPYG6WR.js.map} +0 -0
  45. /package/dist/lib/{chunk-5EO33FHK.js.map → chunk-QX6K65KH.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { k as AIUsageInfo, R as Rect, B as BaseElement, U as UIContext, A as AISingleElementResponse, n as AISingleElementResponseByPosition, o as AIElementLocatorResponse, H as ElementById, r as AIDataExtractionResponse, t as AIAssertionResponse, T as PlanningAIResponse } from './types-e2a418c3.js';
1
+ import { k as AIUsageInfo, R as Rect, B as BaseElement, U as UIContext, A as AISingleElementResponse, n as AISingleElementResponseByPosition, o as AIElementLocatorResponse, H as ElementById, r as AIDataExtractionResponse, t as AIAssertionResponse, T as PlanningAIResponse } from './types-d2831105.js';
2
2
  import { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources';
3
3
 
4
4
  type AIArgs = [
@@ -1,5 +1,5 @@
1
1
  import * as _midscene_shared_constants from '@midscene/shared/constants';
2
- import { B as BaseElement, j as ElementTreeNode } from './types-e2a418c3.js';
2
+ import { B as BaseElement, j as ElementTreeNode } from './types-d2831105.js';
3
3
  import 'openai/resources';
4
4
 
5
5
  declare function truncateText(text: string | number | object | undefined, maxLength?: number): string;
@@ -14,7 +14,9 @@ interface scrollParam {
14
14
  distance?: null | number;
15
15
  }
16
16
  interface MidsceneYamlScript {
17
- target: MidsceneYamlScriptEnv;
17
+ target?: MidsceneYamlScriptWebEnv;
18
+ web?: MidsceneYamlScriptWebEnv;
19
+ android?: MidsceneYamlScriptAndroidEnv;
18
20
  tasks: MidsceneYamlTask[];
19
21
  }
20
22
  interface MidsceneYamlTask {
@@ -22,9 +24,11 @@ interface MidsceneYamlTask {
22
24
  flow: MidsceneYamlFlowItem[];
23
25
  continueOnError?: boolean;
24
26
  }
25
- interface MidsceneYamlScriptEnv {
27
+ interface MidsceneYamlScriptEnvBase {
26
28
  output?: string;
27
29
  aiActionContext?: string;
30
+ }
31
+ interface MidsceneYamlScriptWebEnv extends MidsceneYamlScriptEnvBase {
28
32
  serve?: string;
29
33
  url: string;
30
34
  userAgent?: string;
@@ -41,6 +45,11 @@ interface MidsceneYamlScriptEnv {
41
45
  bridgeMode?: false | 'newTabWithUrl' | 'currentTab';
42
46
  closeNewTabsAfterDisconnect?: boolean;
43
47
  }
48
+ interface MidsceneYamlScriptAndroidEnv extends MidsceneYamlScriptEnvBase {
49
+ deviceId?: string;
50
+ launch?: string;
51
+ }
52
+ type MidsceneYamlScriptEnv = MidsceneYamlScriptWebEnv | MidsceneYamlScriptAndroidEnv;
44
53
  interface MidsceneYamlFlowItemAIAction {
45
54
  ai?: string;
46
55
  aiAction?: string;
@@ -410,4 +419,4 @@ interface GroupedActionDump {
410
419
  executions: ExecutionDump[];
411
420
  }
412
421
 
413
- export { type PlanningActionParamError as $, type AISingleElementResponse as A, BaseElement as B, type CallAIFn as C, type DumpSubscriber as D, type ExecutionTask as E, type PartialInsightDumpFromSDK as F, type LiteUISection as G, type ElementById as H, type InsightAction as I, type AgentWaitForOpt as J, type AgentAssertOpt as K, type LocateResult as L, type MidsceneYamlScript as M, type PlanningLocateParam as N, type OnTaskStartTip as O, type Point as P, type PlanningAction as Q, type Rect as R, type Size as S, type PlanningAIResponse as T, UIContext as U, type PlanningActionParamTap as V, type PlanningActionParamHover as W, type PlanningActionParamInputOrKeyPress as X, type PlanningActionParamScroll as Y, type PlanningActionParamAssert as Z, type PlanningActionParamSleep as _, type ExecutionTaskProgressOptions as a, type PlanningActionParamWaitFor as a0, type Color as a1, type BaseAgentParserOpt as a2, type PuppeteerParserOpt as a3, type PlaywrightParserOpt as a4, type ExecutionRecorderItem as a5, type ExecutionTaskType as a6, type ExecutorContext as a7, type TaskCacheInfo as a8, type ExecutionTaskReturn as a9, type MidsceneYamlFlowItemAIInput as aA, type MidsceneYamlFlowItemAIKeyboardPress as aB, type MidsceneYamlFlowItemAIScroll as aC, type MidsceneYamlFlowItemSleep as aD, type FreeFn as aE, type ScriptPlayerTaskStatus as aF, type ScriptPlayerStatusValue as aG, type ExecutionTaskInsightLocateParam as aa, type ExecutionTaskInsightLocateOutput as ab, type ExecutionTaskInsightDumpLog as ac, type ExecutionTaskInsightLocateApply as ad, type ExecutionTaskInsightLocate as ae, type ExecutionTaskInsightQueryParam as af, type ExecutionTaskInsightQueryOutput as ag, type ExecutionTaskInsightQueryApply as ah, type ExecutionTaskInsightQuery as ai, type ExecutionTaskInsightAssertionParam as aj, type ExecutionTaskInsightAssertionApply as ak, type ExecutionTaskInsightAssertion as al, type ExecutionTaskActionApply as am, type ExecutionTaskAction as an, type ExecutionTaskPlanningApply as ao, type ExecutionTaskPlanning as ap, type GroupedActionDump as aq, type LocateOption as ar, type scrollParam as as, type MidsceneYamlScriptEnv as at, type MidsceneYamlFlowItemAIAction as au, type MidsceneYamlFlowItemAIAssert as av, type MidsceneYamlFlowItemAIQuery as aw, type MidsceneYamlFlowItemAIWaitFor as ax, type MidsceneYamlFlowItemAITap as ay, type MidsceneYamlFlowItemAIHover as az, type ExecutionTaskApply as b, type ExecutionDump as c, type InsightTaskInfo as d, type InsightOptions as e, type DetailedLocateParam as f, type InsightAssertionResponse as g, type MidsceneYamlTask as h, type MidsceneYamlFlowItem as i, type ElementTreeNode as j, type AIUsageInfo as k, AIResponseFormat as l, type AISingleElementResponseById as m, type AISingleElementResponseByPosition as n, type AIElementLocatorResponse as o, type AIElementCoordinatesResponse as p, type AIElementResponse as q, type AIDataExtractionResponse as r, type AISectionLocatorResponse as s, type AIAssertionResponse as t, type EnsureObject as u, type InsightExtractParam as v, type LocateResultElement as w, type DumpMeta as x, type ReportDumpWithAttributes as y, type InsightDump as z };
422
+ export { type PlanningActionParamError as $, type AISingleElementResponse as A, BaseElement as B, type CallAIFn as C, type DumpSubscriber as D, type ExecutionTask as E, type PartialInsightDumpFromSDK as F, type LiteUISection as G, type ElementById as H, type InsightAction as I, type AgentWaitForOpt as J, type AgentAssertOpt as K, type LocateResult as L, type MidsceneYamlScript as M, type PlanningLocateParam as N, type OnTaskStartTip as O, type Point as P, type PlanningAction as Q, type Rect as R, type Size as S, type PlanningAIResponse as T, UIContext as U, type PlanningActionParamTap as V, type PlanningActionParamHover as W, type PlanningActionParamInputOrKeyPress as X, type PlanningActionParamScroll as Y, type PlanningActionParamAssert as Z, type PlanningActionParamSleep as _, type ExecutionTaskProgressOptions as a, type PlanningActionParamWaitFor as a0, type Color as a1, type BaseAgentParserOpt as a2, type PuppeteerParserOpt as a3, type PlaywrightParserOpt as a4, type ExecutionRecorderItem as a5, type ExecutionTaskType as a6, type ExecutorContext as a7, type TaskCacheInfo as a8, type ExecutionTaskReturn as a9, type MidsceneYamlFlowItemAIWaitFor as aA, type MidsceneYamlFlowItemAITap as aB, type MidsceneYamlFlowItemAIHover as aC, type MidsceneYamlFlowItemAIInput as aD, type MidsceneYamlFlowItemAIKeyboardPress as aE, type MidsceneYamlFlowItemAIScroll as aF, type MidsceneYamlFlowItemSleep as aG, type FreeFn as aH, type ScriptPlayerTaskStatus as aI, type ScriptPlayerStatusValue as aJ, type ExecutionTaskInsightLocateParam as aa, type ExecutionTaskInsightLocateOutput as ab, type ExecutionTaskInsightDumpLog as ac, type ExecutionTaskInsightLocateApply as ad, type ExecutionTaskInsightLocate as ae, type ExecutionTaskInsightQueryParam as af, type ExecutionTaskInsightQueryOutput as ag, type ExecutionTaskInsightQueryApply as ah, type ExecutionTaskInsightQuery as ai, type ExecutionTaskInsightAssertionParam as aj, type ExecutionTaskInsightAssertionApply as ak, type ExecutionTaskInsightAssertion as al, type ExecutionTaskActionApply as am, type ExecutionTaskAction as an, type ExecutionTaskPlanningApply as ao, type ExecutionTaskPlanning as ap, type GroupedActionDump as aq, type LocateOption as ar, type scrollParam as as, type MidsceneYamlScriptEnvBase as at, type MidsceneYamlScriptWebEnv as au, type MidsceneYamlScriptAndroidEnv as av, type MidsceneYamlScriptEnv as aw, type MidsceneYamlFlowItemAIAction as ax, type MidsceneYamlFlowItemAIAssert as ay, type MidsceneYamlFlowItemAIQuery as az, type ExecutionTaskApply as b, type ExecutionDump as c, type InsightTaskInfo as d, type InsightOptions as e, type DetailedLocateParam as f, type InsightAssertionResponse as g, type MidsceneYamlTask as h, type MidsceneYamlFlowItem as i, type ElementTreeNode as j, type AIUsageInfo as k, AIResponseFormat as l, type AISingleElementResponseById as m, type AISingleElementResponseByPosition as n, type AIElementLocatorResponse as o, type AIElementCoordinatesResponse as p, type AIElementResponse as q, type AIDataExtractionResponse as r, type AISectionLocatorResponse as s, type AIAssertionResponse as t, type EnsureObject as u, type InsightExtractParam as v, type LocateResultElement as w, type DumpMeta as x, type ReportDumpWithAttributes as y, type InsightDump as z };
@@ -1,4 +1,4 @@
1
- import { y as ReportDumpWithAttributes, R as Rect } from './types-e2a418c3.js';
1
+ import { y as ReportDumpWithAttributes, R as Rect } from './types-d2831105.js';
2
2
  import '@midscene/shared/constants';
3
3
  import 'openai/resources';
4
4
 
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": "0.14.3",
4
+ "version": "0.14.4-beta-20250415065130.0",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "jsnext:source": "./src/index.ts",
@@ -48,7 +48,7 @@
48
48
  "dirty-json": "0.9.2",
49
49
  "dotenv": "16.4.5",
50
50
  "langsmith": "0.3.7",
51
- "@midscene/shared": "0.14.3"
51
+ "@midscene/shared": "0.14.4-beta-20250415065130.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@modern-js/module-tools": "2.60.6",