@midscene/cli 1.8.9 → 1.8.10-beta-20260603081456.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.
@@ -3027,6 +3027,23 @@ async function createYamlPlayer(file, script, options) {
3027
3027
  freeFn
3028
3028
  };
3029
3029
  }
3030
+ if (void 0 !== clonedYamlScript.harmony) {
3031
+ const harmonyTarget = clonedYamlScript.harmony;
3032
+ const { agentFromHdcDevice } = await import("@midscene/harmony");
3033
+ const agent = await agentFromHdcDevice(harmonyTarget?.deviceId, {
3034
+ ...harmonyTarget,
3035
+ ...buildAgentOptions(clonedYamlScript.agent, preference.reportFileName, fileName)
3036
+ });
3037
+ if (harmonyTarget?.launch) await agent.launch(harmonyTarget.launch);
3038
+ freeFn.push({
3039
+ name: 'destroy_harmony_agent',
3040
+ fn: ()=>agent.destroy()
3041
+ });
3042
+ return {
3043
+ agent,
3044
+ freeFn
3045
+ };
3046
+ }
3030
3047
  if (void 0 !== clonedYamlScript.computer) {
3031
3048
  const computerTarget = clonedYamlScript.computer;
3032
3049
  const { agentForComputer } = await import("@midscene/computer");
@@ -3069,7 +3086,7 @@ async function createYamlPlayer(file, script, options) {
3069
3086
  freeFn
3070
3087
  };
3071
3088
  }
3072
- throw new Error('No valid interface configuration found in the yaml script, should be either "web", "android", "ios", "computer", or "interface"');
3089
+ throw new Error('No valid interface configuration found in the yaml script, should be either "web", "android", "ios", "harmony", "computer", or "interface"');
3073
3090
  }, void 0, file);
3074
3091
  return player;
3075
3092
  }