@midscene/core 1.0.5-beta-20251231065132.0 → 1.0.5-beta-20260104042628.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 (42) hide show
  1. package/dist/es/agent/agent.mjs +4 -3
  2. package/dist/es/agent/agent.mjs.map +1 -1
  3. package/dist/es/agent/task-builder.mjs +0 -1
  4. package/dist/es/agent/task-builder.mjs.map +1 -1
  5. package/dist/es/agent/tasks.mjs +4 -7
  6. package/dist/es/agent/tasks.mjs.map +1 -1
  7. package/dist/es/agent/utils.mjs +1 -1
  8. package/dist/es/ai-model/inspect.mjs +2 -4
  9. package/dist/es/ai-model/inspect.mjs.map +1 -1
  10. package/dist/es/ai-model/llm-planning.mjs +1 -4
  11. package/dist/es/ai-model/llm-planning.mjs.map +1 -1
  12. package/dist/es/ai-model/service-caller/index.mjs +7 -51
  13. package/dist/es/ai-model/service-caller/index.mjs.map +1 -1
  14. package/dist/es/service/index.mjs +4 -7
  15. package/dist/es/service/index.mjs.map +1 -1
  16. package/dist/es/types.mjs.map +1 -1
  17. package/dist/es/utils.mjs +2 -2
  18. package/dist/lib/agent/agent.js +4 -3
  19. package/dist/lib/agent/agent.js.map +1 -1
  20. package/dist/lib/agent/task-builder.js +0 -1
  21. package/dist/lib/agent/task-builder.js.map +1 -1
  22. package/dist/lib/agent/tasks.js +4 -7
  23. package/dist/lib/agent/tasks.js.map +1 -1
  24. package/dist/lib/agent/utils.js +1 -1
  25. package/dist/lib/ai-model/inspect.js +2 -4
  26. package/dist/lib/ai-model/inspect.js.map +1 -1
  27. package/dist/lib/ai-model/llm-planning.js +1 -4
  28. package/dist/lib/ai-model/llm-planning.js.map +1 -1
  29. package/dist/lib/ai-model/service-caller/index.js +6 -53
  30. package/dist/lib/ai-model/service-caller/index.js.map +1 -1
  31. package/dist/lib/service/index.js +4 -7
  32. package/dist/lib/service/index.js.map +1 -1
  33. package/dist/lib/types.js.map +1 -1
  34. package/dist/lib/utils.js +2 -2
  35. package/dist/types/agent/agent.d.ts +0 -1
  36. package/dist/types/agent/tasks.d.ts +1 -1
  37. package/dist/types/ai-model/inspect.d.ts +0 -2
  38. package/dist/types/ai-model/llm-planning.d.ts +0 -1
  39. package/dist/types/ai-model/service-caller/index.d.ts +1 -14
  40. package/dist/types/types.d.ts +0 -4
  41. package/dist/types/yaml.d.ts +1 -0
  42. package/package.json +2 -2
@@ -7,7 +7,6 @@ import { TaskCache } from './task-cache';
7
7
  import { TaskExecutor } from './tasks';
8
8
  export type AiActOptions = {
9
9
  cacheable?: boolean;
10
- deepThink?: boolean;
11
10
  };
12
11
  export declare class Agent<InterfaceType extends AbstractInterface = AbstractInterface> {
13
12
  interface: InterfaceType;
@@ -46,7 +46,7 @@ export declare class TaskExecutor {
46
46
  runner: TaskRunner;
47
47
  }>;
48
48
  runPlans(title: string, plans: PlanningAction[], modelConfigForPlanning: IModelConfig, modelConfigForDefaultIntent: IModelConfig): Promise<ExecutionResult>;
49
- action(userPrompt: string, modelConfigForPlanning: IModelConfig, modelConfigForDefaultIntent: IModelConfig, includeBboxInPlanning: boolean, aiActContext?: string, cacheable?: boolean, replanningCycleLimitOverride?: number, imagesIncludeCount?: number, deepThink?: boolean): Promise<ExecutionResult<{
49
+ action(userPrompt: string, modelConfigForPlanning: IModelConfig, modelConfigForDefaultIntent: IModelConfig, includeBboxInPlanning: boolean, aiActContext?: string, cacheable?: boolean, replanningCycleLimitOverride?: number, imagesIncludeCount?: number): Promise<ExecutionResult<{
50
50
  yamlFlow?: MidsceneYamlFlowItem[];
51
51
  } | undefined>>;
52
52
  private createTypeQueryTask;
@@ -23,7 +23,6 @@ export declare function AiLocateElement(options: {
23
23
  rect?: Rect;
24
24
  rawResponse: string;
25
25
  usage?: AIUsageInfo;
26
- reasoning_content?: string;
27
26
  }>;
28
27
  export declare function AiLocateSection(options: {
29
28
  context: UIContext;
@@ -46,7 +45,6 @@ export declare function AiExtractElementInfo<T>(options: {
46
45
  }): Promise<{
47
46
  parseResult: AIDataExtractionResponse<T>;
48
47
  usage: AIUsageInfo | undefined;
49
- reasoning_content: string | undefined;
50
48
  }>;
51
49
  export declare function AiJudgeOrderSensitive(description: string, callAIFn: typeof callAIWithObjectResponse<{
52
50
  isOrderSensitive: boolean;
@@ -10,5 +10,4 @@ export declare function plan(userInstruction: string, opts: {
10
10
  conversationHistory: ConversationHistory;
11
11
  includeBbox: boolean;
12
12
  imagesIncludeCount?: number;
13
- deepThink?: boolean;
14
13
  }): Promise<PlanningAIResponse>;
@@ -6,20 +6,15 @@ import type { AIActionType, AIArgs } from '../../common';
6
6
  export declare function callAI(messages: ChatCompletionMessageParam[], AIActionTypeValue: AIActionType, modelConfig: IModelConfig, options?: {
7
7
  stream?: boolean;
8
8
  onChunk?: StreamingCallback;
9
- deepThink?: boolean;
10
9
  }): Promise<{
11
10
  content: string;
12
- reasoning_content?: string;
13
11
  usage?: AIUsageInfo;
14
12
  isStreamed: boolean;
15
13
  }>;
16
- export declare function callAIWithObjectResponse<T>(messages: ChatCompletionMessageParam[], AIActionTypeValue: AIActionType, modelConfig: IModelConfig, options?: {
17
- deepThink?: boolean;
18
- }): Promise<{
14
+ export declare function callAIWithObjectResponse<T>(messages: ChatCompletionMessageParam[], AIActionTypeValue: AIActionType, modelConfig: IModelConfig): Promise<{
19
15
  content: T;
20
16
  contentString: string;
21
17
  usage?: AIUsageInfo;
22
- reasoning_content?: string;
23
18
  }>;
24
19
  export declare function callAIWithStringResponse(msgs: AIArgs, AIActionTypeValue: AIActionType, modelConfig: IModelConfig): Promise<{
25
20
  content: string;
@@ -27,12 +22,4 @@ export declare function callAIWithStringResponse(msgs: AIArgs, AIActionTypeValue
27
22
  }>;
28
23
  export declare function extractJSONFromCodeBlock(response: string): string;
29
24
  export declare function preprocessDoubaoBboxJson(input: string): string;
30
- export declare function resolveDeepThinkConfig({ deepThink, vlMode, }: {
31
- deepThink?: boolean;
32
- vlMode?: TVlModeTypes;
33
- }): {
34
- config: Record<string, unknown>;
35
- debugMessage?: string;
36
- warningMessage?: string;
37
- };
38
25
  export declare function safeParseJson(input: string, vlMode: TVlModeTypes | undefined): any;
@@ -105,7 +105,6 @@ export interface ServiceTaskInfo {
105
105
  searchArea?: Rect;
106
106
  searchAreaRawResponse?: string;
107
107
  searchAreaUsage?: AIUsageInfo;
108
- reasoning_content?: string;
109
108
  }
110
109
  export interface DumpMeta {
111
110
  logTime: number;
@@ -141,7 +140,6 @@ export interface ServiceExtractResult<T> extends ServiceResultBase {
141
140
  data: T;
142
141
  thought?: string;
143
142
  usage?: AIUsageInfo;
144
- reasoning_content?: string;
145
143
  }
146
144
  export declare class ServiceError extends Error {
147
145
  dump: ServiceDump;
@@ -195,7 +193,6 @@ export interface PlanningAIResponse extends Omit<RawResponsePlanningAIResponse,
195
193
  yamlFlow?: MidsceneYamlFlowItem[];
196
194
  yamlString?: string;
197
195
  error?: string;
198
- reasoning_content?: string;
199
196
  }
200
197
  export interface PlanningActionParamSleep {
201
198
  timeMs: number;
@@ -272,7 +269,6 @@ export type ExecutionTask<E extends ExecutionTaskApply<any, any, any> = Executio
272
269
  };
273
270
  usage?: AIUsageInfo;
274
271
  searchAreaUsage?: AIUsageInfo;
275
- reasoning_content?: string;
276
272
  };
277
273
  export interface ExecutionDump extends DumpMeta {
278
274
  name: string;
@@ -129,6 +129,7 @@ export interface MidsceneYamlFlowItemAIAction {
129
129
  aiAct?: string;
130
130
  aiActionProgressTips?: string[];
131
131
  cacheable?: boolean;
132
+ _deepThink?: boolean;
132
133
  [key: string]: unknown;
133
134
  }
134
135
  export interface MidsceneYamlFlowItemAIAssert {
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.0.5-beta-20251231065132.0",
4
+ "version": "1.0.5-beta-20260104042628.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
  "js-yaml": "4.1.0",
91
91
  "zod": "3.24.3",
92
- "@midscene/shared": "1.0.5-beta-20251231065132.0"
92
+ "@midscene/shared": "1.0.5-beta-20260104042628.0"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@rslib/core": "^0.18.3",