@midscene/core 1.3.8 → 1.3.9
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.
- package/dist/es/agent/agent.mjs +1 -1
- package/dist/es/agent/agent.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +1 -1
- package/dist/es/ai-model/conversation-history.mjs +46 -5
- package/dist/es/ai-model/conversation-history.mjs.map +1 -1
- package/dist/es/ai-model/llm-planning.mjs +52 -51
- package/dist/es/ai-model/llm-planning.mjs.map +1 -1
- package/dist/es/ai-model/prompt/llm-planning.mjs +13 -0
- package/dist/es/ai-model/prompt/llm-planning.mjs.map +1 -1
- package/dist/es/ai-model/service-caller/index.mjs +5 -1
- package/dist/es/ai-model/service-caller/index.mjs.map +1 -1
- package/dist/es/types.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/agent/agent.js +1 -1
- package/dist/lib/agent/agent.js.map +1 -1
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/ai-model/conversation-history.js +46 -5
- package/dist/lib/ai-model/conversation-history.js.map +1 -1
- package/dist/lib/ai-model/llm-planning.js +52 -51
- package/dist/lib/ai-model/llm-planning.js.map +1 -1
- package/dist/lib/ai-model/prompt/llm-planning.js +13 -0
- package/dist/lib/ai-model/prompt/llm-planning.js.map +1 -1
- package/dist/lib/ai-model/service-caller/index.js +5 -1
- package/dist/lib/ai-model/service-caller/index.js.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/ai-model/conversation-history.d.ts +24 -4
- package/dist/types/types.d.ts +1 -0
- package/package.json +2 -2
|
@@ -7,6 +7,7 @@ export declare class ConversationHistory {
|
|
|
7
7
|
private readonly messages;
|
|
8
8
|
private subGoals;
|
|
9
9
|
private memories;
|
|
10
|
+
private historicalLogs;
|
|
10
11
|
pendingFeedbackMessage: string;
|
|
11
12
|
constructor(options?: ConversationHistoryOptions);
|
|
12
13
|
resetPendingFeedbackMessageIfExists(): void;
|
|
@@ -28,12 +29,14 @@ export declare class ConversationHistory {
|
|
|
28
29
|
*/
|
|
29
30
|
setSubGoals(subGoals: SubGoal[]): void;
|
|
30
31
|
/**
|
|
31
|
-
* Update a single sub-goal by index
|
|
32
|
+
* Update a single sub-goal by index.
|
|
33
|
+
* Clears logs if status or description actually changes.
|
|
32
34
|
* @returns true if the sub-goal was found and updated, false otherwise
|
|
33
35
|
*/
|
|
34
36
|
updateSubGoal(index: number, updates: Partial<Omit<SubGoal, 'index'>>): boolean;
|
|
35
37
|
/**
|
|
36
|
-
* Mark the first pending sub-goal as running
|
|
38
|
+
* Mark the first pending sub-goal as running.
|
|
39
|
+
* Clears logs since status changes.
|
|
37
40
|
*/
|
|
38
41
|
markFirstPendingAsRunning(): void;
|
|
39
42
|
/**
|
|
@@ -43,13 +46,30 @@ export declare class ConversationHistory {
|
|
|
43
46
|
*/
|
|
44
47
|
markSubGoalFinished(index: number): boolean;
|
|
45
48
|
/**
|
|
46
|
-
* Mark all sub-goals as finished
|
|
49
|
+
* Mark all sub-goals as finished.
|
|
50
|
+
* Clears logs for any goal whose status actually changes.
|
|
47
51
|
*/
|
|
48
52
|
markAllSubGoalsFinished(): void;
|
|
49
53
|
/**
|
|
50
|
-
*
|
|
54
|
+
* Append a log entry to the currently running sub-goal.
|
|
55
|
+
* The log describes an action performed while working on the sub-goal.
|
|
56
|
+
*/
|
|
57
|
+
appendSubGoalLog(log: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Convert sub-goals to text representation.
|
|
60
|
+
* Includes actions performed (logs) for the current sub-goal.
|
|
51
61
|
*/
|
|
52
62
|
subGoalsToText(): string;
|
|
63
|
+
/**
|
|
64
|
+
* Append a log entry to the historical logs list.
|
|
65
|
+
* Used in non-deepThink mode to track executed steps across planning rounds.
|
|
66
|
+
*/
|
|
67
|
+
appendHistoricalLog(log: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* Convert historical logs to text representation.
|
|
70
|
+
* Provides context about previously executed steps to the model.
|
|
71
|
+
*/
|
|
72
|
+
historicalLogsToText(): string;
|
|
53
73
|
/**
|
|
54
74
|
* Append a memory to the memories list
|
|
55
75
|
*/
|
package/dist/types/types.d.ts
CHANGED
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.3.
|
|
4
|
+
"version": "1.3.9",
|
|
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.3.
|
|
92
|
+
"@midscene/shared": "1.3.9"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@rslib/core": "^0.18.3",
|