@midscene/shared 1.7.6-beta-20260427023820.0 → 1.7.6

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.
@@ -74,6 +74,16 @@ class BaseMidsceneTools {
74
74
  if (!sessionName) return;
75
75
  return readCliReportSession(sessionName)?.reportFileName;
76
76
  }
77
+ readCliReportAgentOptions() {
78
+ const reportFileName = this.readCliReportFileName();
79
+ if (!reportFileName) return;
80
+ return {
81
+ reportFileName,
82
+ reportAttributes: {
83
+ 'data-group-id': reportFileName
84
+ }
85
+ };
86
+ }
77
87
  async initTools() {
78
88
  this.toolDefinitions = [];
79
89
  const platformTools = this.preparePlatformTools();
@@ -102,6 +102,16 @@ class BaseMidsceneTools {
102
102
  if (!sessionName) return;
103
103
  return (0, external_cli_report_session_js_namespaceObject.readCliReportSession)(sessionName)?.reportFileName;
104
104
  }
105
+ readCliReportAgentOptions() {
106
+ const reportFileName = this.readCliReportFileName();
107
+ if (!reportFileName) return;
108
+ return {
109
+ reportFileName,
110
+ reportAttributes: {
111
+ 'data-group-id': reportFileName
112
+ }
113
+ };
114
+ }
105
115
  async initTools() {
106
116
  this.toolDefinitions = [];
107
117
  const platformTools = this.preparePlatformTools();
@@ -85,6 +85,10 @@ export declare abstract class BaseMidsceneTools<TAgent extends BaseAgent = BaseA
85
85
  protected createNewCliReportSession(targetIdentity?: string): CliReportSession | undefined;
86
86
  protected commitCliReportSession(session?: CliReportSession): void;
87
87
  protected readCliReportFileName(): string | undefined;
88
+ protected readCliReportAgentOptions(): {
89
+ reportFileName: string;
90
+ reportAttributes: Record<string, string>;
91
+ } | undefined;
88
92
  /**
89
93
  * Must be implemented by subclasses to create a temporary device instance
90
94
  * This allows getting real actionSpace without connecting to device
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/shared",
3
- "version": "1.7.6-beta-20260427023820.0",
3
+ "version": "1.7.6",
4
4
  "repository": "https://github.com/web-infra-dev/midscene",
5
5
  "homepage": "https://midscenejs.com/",
6
6
  "types": "./dist/types/index.d.ts",
@@ -224,6 +224,24 @@ export abstract class BaseMidsceneTools<
224
224
  return readCliReportSession(sessionName)?.reportFileName;
225
225
  }
226
226
 
227
+ protected readCliReportAgentOptions():
228
+ | {
229
+ reportFileName: string;
230
+ reportAttributes: Record<string, string>;
231
+ }
232
+ | undefined {
233
+ const reportFileName = this.readCliReportFileName();
234
+ if (!reportFileName) {
235
+ return undefined;
236
+ }
237
+ return {
238
+ reportFileName,
239
+ reportAttributes: {
240
+ 'data-group-id': reportFileName,
241
+ },
242
+ };
243
+ }
244
+
227
245
  /**
228
246
  * Must be implemented by subclasses to create a temporary device instance
229
247
  * This allows getting real actionSpace without connecting to device