@hmharness/cli 0.20.0 → 0.20.1
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/main.js +15 -10
- package/package.json +12 -12
package/dist/main.js
CHANGED
|
@@ -997,13 +997,16 @@ flags:
|
|
|
997
997
|
await mkdir(scratch, { recursive: true });
|
|
998
998
|
try {
|
|
999
999
|
const { runExploration } = await import('@hmharness/cognitive');
|
|
1000
|
-
const { TerminalEnvironment, HarmonyOsEnvironment } = await import('@hmharness/environments');
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1000
|
+
const { TerminalEnvironment, HarmonyOsEnvironment, Arc3Environment, Arc3RestBridge } = await import('@hmharness/environments');
|
|
1001
|
+
let env;
|
|
1002
|
+
if (envId === 'harmonyos')
|
|
1003
|
+
env = new HarmonyOsEnvironment({ timeoutMs: 20_000 });
|
|
1004
|
+
else if (envId === 'arc3')
|
|
1005
|
+
env = new Arc3Environment({ bridge: new Arc3RestBridge() });
|
|
1006
|
+
else if (envId === 'terminal')
|
|
1007
|
+
env = new TerminalEnvironment({ workspaceDir: scratch, timeoutMs: 15_000 });
|
|
1005
1008
|
if (!env) {
|
|
1006
|
-
stdout.write(`环境 '${envId}' 暂不支持 headless 探索(terminal | harmonyos)\n`);
|
|
1009
|
+
stdout.write(`环境 '${envId}' 暂不支持 headless 探索(terminal | harmonyos | arc3)\n`);
|
|
1007
1010
|
return;
|
|
1008
1011
|
}
|
|
1009
1012
|
const summary = await runExploration(home, {
|
|
@@ -1044,13 +1047,15 @@ flags:
|
|
|
1044
1047
|
await mkdir(scratch, { recursive: true });
|
|
1045
1048
|
try {
|
|
1046
1049
|
const { runTransferExperiment } = await import('@hmharness/cognitive');
|
|
1047
|
-
const { TerminalEnvironment, HarmonyOsEnvironment } = await import('@hmharness/environments');
|
|
1050
|
+
const { TerminalEnvironment, HarmonyOsEnvironment, Arc3Environment, Arc3RestBridge } = await import('@hmharness/environments');
|
|
1048
1051
|
const makeEnv = target === 'harmonyos'
|
|
1049
1052
|
? () => new HarmonyOsEnvironment({ timeoutMs: 20_000 })
|
|
1050
|
-
: target === '
|
|
1051
|
-
:
|
|
1053
|
+
: target === 'arc3'
|
|
1054
|
+
? () => new Arc3Environment({ bridge: new Arc3RestBridge() })
|
|
1055
|
+
: target === 'terminal' ? () => new TerminalEnvironment({ workspaceDir: join(scratch, `t-${Date.now().toString(36)}`), timeoutMs: 15_000 })
|
|
1056
|
+
: null;
|
|
1052
1057
|
if (!makeEnv) {
|
|
1053
|
-
stdout.write(`目标环境 '${target}' 暂不支持(terminal | harmonyos)\n`);
|
|
1058
|
+
stdout.write(`目标环境 '${target}' 暂不支持(terminal | harmonyos | arc3)\n`);
|
|
1054
1059
|
return;
|
|
1055
1060
|
}
|
|
1056
1061
|
const report = await runTransferExperiment(home, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/cli",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "hmharness command line: one-shot tasks, an interactive REPL, a fullscreen TUI, the web frontend, and direct tool invocation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"build": "tsc -p tsconfig.build.json"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@hmharness/agent": "0.20.
|
|
47
|
-
"@hmharness/cognitive": "0.20.
|
|
48
|
-
"@hmharness/domain-harmony": "0.20.
|
|
49
|
-
"@hmharness/domain-ops": "0.20.
|
|
50
|
-
"@hmharness/environments": "0.20.
|
|
51
|
-
"@hmharness/evaluation": "0.20.
|
|
52
|
-
"@hmharness/evolution": "0.20.
|
|
53
|
-
"@hmharness/kernel": "0.20.
|
|
54
|
-
"@hmharness/observability": "0.20.
|
|
55
|
-
"@hmharness/sandbox": "0.20.
|
|
56
|
-
"@hmharness/web": "0.20.
|
|
46
|
+
"@hmharness/agent": "0.20.1",
|
|
47
|
+
"@hmharness/cognitive": "0.20.1",
|
|
48
|
+
"@hmharness/domain-harmony": "0.20.1",
|
|
49
|
+
"@hmharness/domain-ops": "0.20.1",
|
|
50
|
+
"@hmharness/environments": "0.20.1",
|
|
51
|
+
"@hmharness/evaluation": "0.20.1",
|
|
52
|
+
"@hmharness/evolution": "0.20.1",
|
|
53
|
+
"@hmharness/kernel": "0.20.1",
|
|
54
|
+
"@hmharness/observability": "0.20.1",
|
|
55
|
+
"@hmharness/sandbox": "0.20.1",
|
|
56
|
+
"@hmharness/web": "0.20.1",
|
|
57
57
|
"qrcode": "^1.5.4"
|
|
58
58
|
}
|
|
59
59
|
}
|