@hmharness/cli 0.23.40 → 0.23.42
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/board/install-kaihongos.cjs +3 -3
- package/dist/evolution-daemon.js +35 -35
- package/dist/extension-daemon.d.ts +14 -0
- package/dist/extension-daemon.js +84 -0
- package/dist/main.js +11 -5
- package/dist/tui.js +3 -3
- package/dist/web-daemon.js +14 -14
- package/package.json +64 -64
- package/release-notes.json +149 -139
|
@@ -63,9 +63,9 @@ let PACKAGES = ['cli', 'web', 'agent', 'kernel', 'sandbox', 'evolution',
|
|
|
63
63
|
// The release bot keeps versions synced; the NAMES must cover the full
|
|
64
64
|
// first-party set so the offline path cannot produce an incomplete tree.
|
|
65
65
|
const FALLBACK_PINS = {
|
|
66
|
-
cli: '0.23.
|
|
67
|
-
sandbox: '0.23.
|
|
68
|
-
evaluation: '0.23.
|
|
66
|
+
cli: '0.23.42', web: '0.23.42', agent: '0.23.42', kernel: '0.23.42',
|
|
67
|
+
sandbox: '0.23.42', evolution: '0.23.42', 'domain-ops': '0.23.42',
|
|
68
|
+
evaluation: '0.23.42', observability: '0.23.42', 'domain-harmony': '0.23.42',
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
// ---------- helpers ---------------------------------------------------------
|
package/dist/evolution-daemon.js
CHANGED
|
@@ -48,41 +48,41 @@ function daemonPid(home) {
|
|
|
48
48
|
* latent bug in the old runner). */
|
|
49
49
|
export function daemonRunnerSource(pidFile, entryAbs) {
|
|
50
50
|
const entryJson = JSON.stringify(entryAbs);
|
|
51
|
-
return `
|
|
52
|
-
const { execFile } = require('node:child_process');
|
|
53
|
-
const { writeFileSync, unlinkSync } = require('node:fs');
|
|
54
|
-
const { join } = require('node:path');
|
|
55
|
-
const home = process.env.HMH_HOME || join(require('node:os').homedir(), '.hmharness');
|
|
56
|
-
const hmhBin = process.execPath;
|
|
57
|
-
const hmhEntry = ${entryJson};
|
|
58
|
-
const HOURS = Number(process.env.HMH_EVOLVE_EVERY_HOURS || 6);
|
|
59
|
-
function stamp() { return new Date().toISOString(); }
|
|
60
|
-
function runHmh(args, timeoutMs) {
|
|
61
|
-
return new Promise((resolve) => {
|
|
62
|
-
execFile(hmhBin, [hmhEntry, ...args], { timeout: timeoutMs, windowsHide: true }, (err, stdout, stderr) => {
|
|
63
|
-
resolve({ err, out: String(stdout || '') + String(stderr || '') });
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
async function cycle() {
|
|
68
|
-
try {
|
|
69
|
-
const evo = await runHmh(['evolve'], 600000);
|
|
70
|
-
console.log(stamp(), 'evolve cycle done', evo.err ? ('err ' + String(evo.err).slice(0, 120)) : '');
|
|
71
|
-
} catch (e) { console.error(stamp(), 'evolve error:', String(e).slice(0, 200)); }
|
|
72
|
-
// finetune gate after every evolve cycle - the command itself decides
|
|
73
|
-
// (labels threshold, no running job, cooldown, kill-switch) so an
|
|
74
|
-
// unattended run is always safe and cheap when nothing is due
|
|
75
|
-
try {
|
|
76
|
-
const ft = await runHmh(['auto-finetune', '--submit'], 900000);
|
|
77
|
-
const interesting = ft.out.split('\\n').filter((l) => l.includes('\\u2713') || l.includes('\\u5fae\\u8c03') || l.includes('ERR')).slice(0, 3);
|
|
78
|
-
console.log(stamp(), 'finetune gate:', interesting.join(' | ') || 'not due');
|
|
79
|
-
} catch (e) { console.error(stamp(), 'finetune error:', String(e).slice(0, 200)); }
|
|
80
|
-
}
|
|
81
|
-
writeFileSync(join(home, '${pidFile}'), String(process.pid));
|
|
82
|
-
setTimeout(cycle, 30000);
|
|
83
|
-
setInterval(cycle, HOURS * 3600000);
|
|
84
|
-
process.on('SIGTERM', () => { try { unlinkSync(join(home, '${pidFile}')); } catch {} process.exit(0); });
|
|
85
|
-
process.on('SIGINT', () => { try { unlinkSync(join(home, '${pidFile}')); } catch {} process.exit(0); });
|
|
51
|
+
return `
|
|
52
|
+
const { execFile } = require('node:child_process');
|
|
53
|
+
const { writeFileSync, unlinkSync } = require('node:fs');
|
|
54
|
+
const { join } = require('node:path');
|
|
55
|
+
const home = process.env.HMH_HOME || join(require('node:os').homedir(), '.hmharness');
|
|
56
|
+
const hmhBin = process.execPath;
|
|
57
|
+
const hmhEntry = ${entryJson};
|
|
58
|
+
const HOURS = Number(process.env.HMH_EVOLVE_EVERY_HOURS || 6);
|
|
59
|
+
function stamp() { return new Date().toISOString(); }
|
|
60
|
+
function runHmh(args, timeoutMs) {
|
|
61
|
+
return new Promise((resolve) => {
|
|
62
|
+
execFile(hmhBin, [hmhEntry, ...args], { timeout: timeoutMs, windowsHide: true }, (err, stdout, stderr) => {
|
|
63
|
+
resolve({ err, out: String(stdout || '') + String(stderr || '') });
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
async function cycle() {
|
|
68
|
+
try {
|
|
69
|
+
const evo = await runHmh(['evolve'], 600000);
|
|
70
|
+
console.log(stamp(), 'evolve cycle done', evo.err ? ('err ' + String(evo.err).slice(0, 120)) : '');
|
|
71
|
+
} catch (e) { console.error(stamp(), 'evolve error:', String(e).slice(0, 200)); }
|
|
72
|
+
// finetune gate after every evolve cycle - the command itself decides
|
|
73
|
+
// (labels threshold, no running job, cooldown, kill-switch) so an
|
|
74
|
+
// unattended run is always safe and cheap when nothing is due
|
|
75
|
+
try {
|
|
76
|
+
const ft = await runHmh(['auto-finetune', '--submit'], 900000);
|
|
77
|
+
const interesting = ft.out.split('\\n').filter((l) => l.includes('\\u2713') || l.includes('\\u5fae\\u8c03') || l.includes('ERR')).slice(0, 3);
|
|
78
|
+
console.log(stamp(), 'finetune gate:', interesting.join(' | ') || 'not due');
|
|
79
|
+
} catch (e) { console.error(stamp(), 'finetune error:', String(e).slice(0, 200)); }
|
|
80
|
+
}
|
|
81
|
+
writeFileSync(join(home, '${pidFile}'), String(process.pid));
|
|
82
|
+
setTimeout(cycle, 30000);
|
|
83
|
+
setInterval(cycle, HOURS * 3600000);
|
|
84
|
+
process.on('SIGTERM', () => { try { unlinkSync(join(home, '${pidFile}')); } catch {} process.exit(0); });
|
|
85
|
+
process.on('SIGINT', () => { try { unlinkSync(join(home, '${pidFile}')); } catch {} process.exit(0); });
|
|
86
86
|
`;
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
@@ -21,3 +21,17 @@ export declare function startExtensionDaemon(port?: number, entry?: string): {
|
|
|
21
21
|
already: boolean;
|
|
22
22
|
pid: number;
|
|
23
23
|
};
|
|
24
|
+
/** Path of the watchdog pid file under HMH_HOME. */
|
|
25
|
+
export declare function watchdogPidPath(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Watchdog body (runs INSIDE the detached watchdog process): probe the
|
|
28
|
+
* bridge every 60s; dead or stale → respawn it. Idempotent by design —
|
|
29
|
+
* a second watchdog exits when the pid file already names a live process.
|
|
30
|
+
* The bridge dying must never be a state the user can observe (round 54:
|
|
31
|
+
* "插件又不能用了" = the daemon had silently died and nothing revived it).
|
|
32
|
+
*/
|
|
33
|
+
export declare function runWatchdogLoop(port: number, entry: string): Promise<never>;
|
|
34
|
+
/** Spawn the watchdog detached (no window). Safe to call repeatedly. */
|
|
35
|
+
export declare function startWatchdog(port?: number, entry?: string): number;
|
|
36
|
+
/** Stop the watchdog (used by `extension stop` — it must not resurrect). */
|
|
37
|
+
export declare function stopWatchdog(): boolean;
|
package/dist/extension-daemon.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { spawn, execSync } from 'node:child_process';
|
|
12
12
|
import { createRequire } from 'node:module';
|
|
13
|
+
import { pathToFileURL } from 'node:url';
|
|
13
14
|
import { openSync, readFileSync, unlinkSync, writeFileSync, closeSync } from 'node:fs';
|
|
14
15
|
import { join } from 'node:path';
|
|
15
16
|
import { homeDir } from '@hmharness/kernel';
|
|
@@ -172,3 +173,86 @@ export function startExtensionDaemon(port = DEFAULT_EXTENSION_PORT, entry = proc
|
|
|
172
173
|
return { already: true, pid };
|
|
173
174
|
return { already: false, pid: spawnExtensionDaemon(entry, port) };
|
|
174
175
|
}
|
|
176
|
+
// --------------------------------------------------------------- watchdog
|
|
177
|
+
/** Path of the watchdog pid file under HMH_HOME. */
|
|
178
|
+
export function watchdogPidPath() {
|
|
179
|
+
return join(homeDir(), 'extension-watchdog.pid');
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Watchdog body (runs INSIDE the detached watchdog process): probe the
|
|
183
|
+
* bridge every 60s; dead or stale → respawn it. Idempotent by design —
|
|
184
|
+
* a second watchdog exits when the pid file already names a live process.
|
|
185
|
+
* The bridge dying must never be a state the user can observe (round 54:
|
|
186
|
+
* "插件又不能用了" = the daemon had silently died and nothing revived it).
|
|
187
|
+
*/
|
|
188
|
+
export async function runWatchdogLoop(port, entry) {
|
|
189
|
+
const wp = watchdogPidPath();
|
|
190
|
+
try {
|
|
191
|
+
const existing = Number(readFileSync(wp, 'utf8').trim());
|
|
192
|
+
if (Number.isFinite(existing) && existing > 0 && existing !== process.pid && alive(existing)) {
|
|
193
|
+
process.exit(0); // another watchdog is on duty
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
catch { /* no pid file yet */ }
|
|
197
|
+
writeFileSync(wp, String(process.pid));
|
|
198
|
+
for (;;) {
|
|
199
|
+
try {
|
|
200
|
+
const served = await probeExtensionDaemon(port);
|
|
201
|
+
const pid = readExtensionPid();
|
|
202
|
+
const stale = pid > 0 && alive(pid) && recordedVersion() !== cliVersion();
|
|
203
|
+
if (!served.up || stale) {
|
|
204
|
+
if (stale)
|
|
205
|
+
stopExtensionDaemon(port);
|
|
206
|
+
await waitExtensionPortFree(port, 3000);
|
|
207
|
+
spawnExtensionDaemon(entry, port);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
catch { /* a watchdog that throws is a watchdog that dies — never */ }
|
|
211
|
+
await new Promise((r) => setTimeout(r, 60_000));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/** Spawn the watchdog detached (no window). Safe to call repeatedly. */
|
|
215
|
+
export function startWatchdog(port = DEFAULT_EXTENSION_PORT, entry = process.argv[1]) {
|
|
216
|
+
try {
|
|
217
|
+
const wp = watchdogPidPath();
|
|
218
|
+
const existing = Number(readFileSync(wp, 'utf8').trim());
|
|
219
|
+
if (Number.isFinite(existing) && existing > 0 && alive(existing))
|
|
220
|
+
return existing;
|
|
221
|
+
}
|
|
222
|
+
catch { /* none yet */ }
|
|
223
|
+
const log = openSync(join(homeDir(), 'extension-watchdog.log'), 'a');
|
|
224
|
+
const child = spawn(process.execPath, [
|
|
225
|
+
'-e',
|
|
226
|
+
`import('${pathToFileURL(entry).href.replace(/main\.js$/, 'extension-daemon.js')}').then(m => m.runWatchdogLoop(${port}, ${JSON.stringify(entry)}))`,
|
|
227
|
+
], { detached: true, stdio: ['ignore', log, log], windowsHide: true });
|
|
228
|
+
child.unref();
|
|
229
|
+
try {
|
|
230
|
+
closeSync(log);
|
|
231
|
+
}
|
|
232
|
+
catch { /* gone */ }
|
|
233
|
+
return child.pid ?? 0;
|
|
234
|
+
}
|
|
235
|
+
/** Stop the watchdog (used by `extension stop` — it must not resurrect). */
|
|
236
|
+
export function stopWatchdog() {
|
|
237
|
+
try {
|
|
238
|
+
const wp = watchdogPidPath();
|
|
239
|
+
const pid = Number(readFileSync(wp, 'utf8').trim());
|
|
240
|
+
if (Number.isFinite(pid) && pid > 0 && alive(pid)) {
|
|
241
|
+
if (process.platform === 'win32')
|
|
242
|
+
spawn('taskkill', ['/PID', String(pid), '/T', '/F'], { windowsHide: true });
|
|
243
|
+
else
|
|
244
|
+
process.kill(pid);
|
|
245
|
+
try {
|
|
246
|
+
unlinkSync(wp);
|
|
247
|
+
}
|
|
248
|
+
catch { /* absent */ }
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
try {
|
|
252
|
+
unlinkSync(wp);
|
|
253
|
+
}
|
|
254
|
+
catch { /* absent */ }
|
|
255
|
+
}
|
|
256
|
+
catch { /* none */ }
|
|
257
|
+
return false;
|
|
258
|
+
}
|
package/dist/main.js
CHANGED
|
@@ -695,7 +695,7 @@ flags:
|
|
|
695
695
|
const maxCycles = Number(rest.find((a) => a.startsWith('--cycles='))?.slice(9) ?? 0);
|
|
696
696
|
const t = await uiStrings();
|
|
697
697
|
const runCycle = async (n) => {
|
|
698
|
-
stdout.write(CYAN('evolve') + DIM(` · ${t.evolveCycle(cfg.
|
|
698
|
+
stdout.write(CYAN('evolve') + DIM(` · ${t.evolveCycle(resolveProvider(cfg, 'evolve').model, n)}${everyMin ? '' : ' (one-shot)'}\n`));
|
|
699
699
|
const report = await runEvolution({
|
|
700
700
|
home: homeDir(),
|
|
701
701
|
provider: resolveProvider(cfg, 'evolve'),
|
|
@@ -1181,11 +1181,12 @@ flags:
|
|
|
1181
1181
|
const port = pArg ? Number(pArg.slice(7)) : undefined;
|
|
1182
1182
|
const ed = await import("./extension-daemon.js");
|
|
1183
1183
|
if (sub === 'stop') {
|
|
1184
|
+
const w = ed.stopWatchdog();
|
|
1184
1185
|
const killed = ed.stopExtensionDaemon(port);
|
|
1185
|
-
stdout.write(killed ? '
|
|
1186
|
+
stdout.write(w || killed ? '已停止扩展桥守护(含看门狗)\n' : '守护本就未运行\n');
|
|
1186
1187
|
return;
|
|
1187
1188
|
}
|
|
1188
|
-
const { probeExtensionDaemon, ensureExtensionDaemon, DEFAULT_EXTENSION_PORT } = ed;
|
|
1189
|
+
const { probeExtensionDaemon, ensureExtensionDaemon, startWatchdog, DEFAULT_EXTENSION_PORT } = ed;
|
|
1189
1190
|
const p = port ?? DEFAULT_EXTENSION_PORT;
|
|
1190
1191
|
const already = await probeExtensionDaemon(p);
|
|
1191
1192
|
if (already.up) {
|
|
@@ -1197,7 +1198,10 @@ flags:
|
|
|
1197
1198
|
stdout.write(`✗ 守护启动失败(详见 ${homeDir()}/extension.log)\n`);
|
|
1198
1199
|
return;
|
|
1199
1200
|
}
|
|
1201
|
+
const wpid = startWatchdog(p);
|
|
1200
1202
|
stdout.write(`✓ 扩展桥守护已启动(后台,PID 文件 ${homeDir()}/extension.pid)\n`);
|
|
1203
|
+
if (wpid)
|
|
1204
|
+
stdout.write(`✓ 看门狗已就位(每 60s 自检,桥意外死亡自动复活)\n`);
|
|
1201
1205
|
stdout.write(r.connected ? ' 浏览器扩展已连接 — 智能体 extension_* 工具可用\n' : ' 装有扩展的浏览器 30 秒内自动连接(浏览器先开也行)\n');
|
|
1202
1206
|
stdout.write(DIM(' 停止: hmh extension stop;前台调试: hmh extension serve;状态: hmh extension status\n'));
|
|
1203
1207
|
return;
|
|
@@ -1250,10 +1254,12 @@ flags:
|
|
|
1250
1254
|
stdout.write(DIM(' 生效时机: 浏览器重启后常驻;撤销: hmh extension uninstall\n'));
|
|
1251
1255
|
// 装完即用:终端侧零操作 —— 直接把桥守护拉起(幂等,已在跑则跳过)
|
|
1252
1256
|
try {
|
|
1253
|
-
const { ensureExtensionDaemon } = await import("./extension-daemon.js");
|
|
1257
|
+
const { ensureExtensionDaemon, startWatchdog } = await import("./extension-daemon.js");
|
|
1254
1258
|
const p = await ensureExtensionDaemon(pArg ? Number(pArg.slice(7)) : undefined);
|
|
1259
|
+
if (p.up)
|
|
1260
|
+
startWatchdog(pArg ? Number(pArg.slice(7)) : undefined);
|
|
1255
1261
|
stdout.write(p.up
|
|
1256
|
-
? `✓ 扩展桥守护已启动(
|
|
1262
|
+
? `✓ 扩展桥守护已启动(后台+看门狗) — 浏览器打开后 30 秒内自动连接\n`
|
|
1257
1263
|
: DIM(' · 桥守护未能启动 — 手动: hmh extension start\n'));
|
|
1258
1264
|
}
|
|
1259
1265
|
catch { /* 守护是锦上添花,不阻塞安装报告 */ }
|
package/dist/tui.js
CHANGED
|
@@ -3079,7 +3079,7 @@ export async function tui(yes, noWeb = false, opts = {}) {
|
|
|
3079
3079
|
// to the dedicated `hmh bench` command
|
|
3080
3080
|
if (c.tools)
|
|
3081
3081
|
return "(skipped in tui; run 'hmh bench')";
|
|
3082
|
-
const r = await chat(cfg
|
|
3082
|
+
const r = await chat(resolveProvider(cfg, 'bench'), [{ role: 'user', content: c.prompt }]);
|
|
3083
3083
|
return r.message.content ?? '';
|
|
3084
3084
|
});
|
|
3085
3085
|
for (const r of results)
|
|
@@ -3100,11 +3100,11 @@ export async function tui(yes, noWeb = false, opts = {}) {
|
|
|
3100
3100
|
const { chat } = await import('@hmharness/kernel');
|
|
3101
3101
|
const report = await runEvolution({
|
|
3102
3102
|
home,
|
|
3103
|
-
provider: cfg
|
|
3103
|
+
provider: resolveProvider(cfg, 'evolve'),
|
|
3104
3104
|
runCase: async (c) => {
|
|
3105
3105
|
if (c.tools)
|
|
3106
3106
|
return t.cmdEvolveHint;
|
|
3107
|
-
const r = await chat(cfg
|
|
3107
|
+
const r = await chat(resolveProvider(cfg, 'evolve'), [{ role: 'user', content: c.prompt }]);
|
|
3108
3108
|
return r.message.content ?? '';
|
|
3109
3109
|
},
|
|
3110
3110
|
log: (l) => rt.addText(l, 'dim'),
|
package/dist/web-daemon.js
CHANGED
|
@@ -291,20 +291,20 @@ export function installWebDaemonAutostart(port = DEFAULT_WEB_PORT, entry = proce
|
|
|
291
291
|
if (process.platform === 'darwin') {
|
|
292
292
|
mkdirSync(dir, { recursive: true });
|
|
293
293
|
const plist = join(dir, `${autostartLabel()}.plist`);
|
|
294
|
-
const xml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
295
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
296
|
-
<plist version="1.0"><dict>
|
|
297
|
-
<key>Label</key><string>${autostartLabel()}</string>
|
|
298
|
-
<key>ProgramArguments</key><array>
|
|
299
|
-
<string>${process.execPath}</string>
|
|
300
|
-
<string>${entry}</string>
|
|
301
|
-
<string>web</string>
|
|
302
|
-
<string>start</string>
|
|
303
|
-
<string>--port=${port}</string>
|
|
304
|
-
</array>
|
|
305
|
-
<key>RunAtLoad</key><true/>
|
|
306
|
-
<key>StandardOutPath</key><string>${join(homeDir(), 'web.log')}</string>
|
|
307
|
-
<key>StandardErrorPath</key><string>${join(homeDir(), 'web.log')}</string>
|
|
294
|
+
const xml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
295
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
296
|
+
<plist version="1.0"><dict>
|
|
297
|
+
<key>Label</key><string>${autostartLabel()}</string>
|
|
298
|
+
<key>ProgramArguments</key><array>
|
|
299
|
+
<string>${process.execPath}</string>
|
|
300
|
+
<string>${entry}</string>
|
|
301
|
+
<string>web</string>
|
|
302
|
+
<string>start</string>
|
|
303
|
+
<string>--port=${port}</string>
|
|
304
|
+
</array>
|
|
305
|
+
<key>RunAtLoad</key><true/>
|
|
306
|
+
<key>StandardOutPath</key><string>${join(homeDir(), 'web.log')}</string>
|
|
307
|
+
<key>StandardErrorPath</key><string>${join(homeDir(), 'web.log')}</string>
|
|
308
308
|
</dict></plist>`;
|
|
309
309
|
writeFileSync(plist, xml, 'utf8');
|
|
310
310
|
return plist;
|
package/package.json
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@hmharness/cli",
|
|
3
|
-
"version": "0.23.
|
|
4
|
-
"description": "hmharness command line: one-shot tasks, an interactive REPL, a fullscreen TUI, the web frontend, and direct tool invocation.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/main.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/main.d.ts",
|
|
10
|
-
"default": "./dist/main.js"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"types": "dist/main.d.ts",
|
|
14
|
-
"bin": {
|
|
15
|
-
"hmh": "dist/main.js"
|
|
16
|
-
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist",
|
|
19
|
-
"board",
|
|
20
|
-
"release-notes.json"
|
|
21
|
-
],
|
|
22
|
-
"engines": {
|
|
23
|
-
"node": ">=22"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"harmonyos",
|
|
27
|
-
"openharmony",
|
|
28
|
-
"ohos",
|
|
29
|
-
"agent",
|
|
30
|
-
"ai",
|
|
31
|
-
"cli",
|
|
32
|
-
"coding-agent",
|
|
33
|
-
"arkts",
|
|
34
|
-
"self-evolving",
|
|
35
|
-
"mcp"
|
|
36
|
-
],
|
|
37
|
-
"repository": {
|
|
38
|
-
"type": "git",
|
|
39
|
-
"url": "git+https://github.com/swsgbl/hmharness.git"
|
|
40
|
-
},
|
|
41
|
-
"homepage": "https://swsgbl.github.io/hmharness/",
|
|
42
|
-
"bugs": "https://github.com/swsgbl/hmharness/issues",
|
|
43
|
-
"license": "MIT",
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "tsc -p tsconfig.build.json"
|
|
46
|
-
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"@hmharness/agent": "0.23.
|
|
49
|
-
"@hmharness/browser": "0.23.
|
|
50
|
-
"@hmharness/cognitive": "0.23.
|
|
51
|
-
"@hmharness/domain-harmony": "0.23.
|
|
52
|
-
"@hmharness/domain-ops": "0.23.
|
|
53
|
-
"@hmharness/environments": "0.23.
|
|
54
|
-
"@hmharness/evaluation": "0.23.
|
|
55
|
-
"@hmharness/evolution": "0.23.
|
|
56
|
-
"@hmharness/extension": "0.23.
|
|
57
|
-
"@hmharness/kernel": "0.23.
|
|
58
|
-
"@hmharness/observability": "0.23.
|
|
59
|
-
"@hmharness/sandbox": "0.23.
|
|
60
|
-
"@hmharness/web": "0.23.
|
|
61
|
-
"qrcode": "^1.5.4",
|
|
62
|
-
"@hmharness/lsp": "0.23.
|
|
63
|
-
}
|
|
64
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@hmharness/cli",
|
|
3
|
+
"version": "0.23.42",
|
|
4
|
+
"description": "hmharness command line: one-shot tasks, an interactive REPL, a fullscreen TUI, the web frontend, and direct tool invocation.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/main.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/main.d.ts",
|
|
10
|
+
"default": "./dist/main.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"types": "dist/main.d.ts",
|
|
14
|
+
"bin": {
|
|
15
|
+
"hmh": "dist/main.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"board",
|
|
20
|
+
"release-notes.json"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=22"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"harmonyos",
|
|
27
|
+
"openharmony",
|
|
28
|
+
"ohos",
|
|
29
|
+
"agent",
|
|
30
|
+
"ai",
|
|
31
|
+
"cli",
|
|
32
|
+
"coding-agent",
|
|
33
|
+
"arkts",
|
|
34
|
+
"self-evolving",
|
|
35
|
+
"mcp"
|
|
36
|
+
],
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/swsgbl/hmharness.git"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://swsgbl.github.io/hmharness/",
|
|
42
|
+
"bugs": "https://github.com/swsgbl/hmharness/issues",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -p tsconfig.build.json"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@hmharness/agent": "0.23.42",
|
|
49
|
+
"@hmharness/browser": "0.23.42",
|
|
50
|
+
"@hmharness/cognitive": "0.23.42",
|
|
51
|
+
"@hmharness/domain-harmony": "0.23.42",
|
|
52
|
+
"@hmharness/domain-ops": "0.23.42",
|
|
53
|
+
"@hmharness/environments": "0.23.42",
|
|
54
|
+
"@hmharness/evaluation": "0.23.42",
|
|
55
|
+
"@hmharness/evolution": "0.23.42",
|
|
56
|
+
"@hmharness/extension": "0.23.42",
|
|
57
|
+
"@hmharness/kernel": "0.23.42",
|
|
58
|
+
"@hmharness/observability": "0.23.42",
|
|
59
|
+
"@hmharness/sandbox": "0.23.42",
|
|
60
|
+
"@hmharness/web": "0.23.42",
|
|
61
|
+
"qrcode": "^1.5.4",
|
|
62
|
+
"@hmharness/lsp": "0.23.42"
|
|
63
|
+
}
|
|
64
|
+
}
|
package/release-notes.json
CHANGED
|
@@ -1,139 +1,149 @@
|
|
|
1
|
-
{
|
|
2
|
-
"notes": [
|
|
3
|
-
{
|
|
4
|
-
"v": "0.23.
|
|
5
|
-
"date": "2026-10-
|
|
6
|
-
"note": "
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"v": "0.23.
|
|
10
|
-
"date": "2026-10-
|
|
11
|
-
"note": "
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"v": "0.23.
|
|
15
|
-
"date": "2026-10-
|
|
16
|
-
"note": "
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"v": "0.23.
|
|
20
|
-
"date": "2026-10-
|
|
21
|
-
"note": "
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"v": "0.23.
|
|
25
|
-
"date": "2026-10-
|
|
26
|
-
"note": "
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"v": "0.23.
|
|
30
|
-
"date": "2026-10-
|
|
31
|
-
"note": "
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"v": "0.23.
|
|
35
|
-
"date": "2026-10-
|
|
36
|
-
"note": "
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"v": "0.23.
|
|
40
|
-
"date": "2026-10-
|
|
41
|
-
"note": "
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"v": "0.23.
|
|
45
|
-
"date": "2026-10-
|
|
46
|
-
"note": "
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"v": "0.23.
|
|
50
|
-
"date": "2026-10-
|
|
51
|
-
"note": "
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"v": "0.23.
|
|
55
|
-
"date": "2026-10-
|
|
56
|
-
"note": "
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"v": "0.23.
|
|
60
|
-
"date": "2026-10-07",
|
|
61
|
-
"note": "
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"v": "0.23.
|
|
65
|
-
"date": "2026-10-
|
|
66
|
-
"note": "
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"v": "0.23.
|
|
70
|
-
"date": "2026-10-
|
|
71
|
-
"note": "
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"v": "0.23.
|
|
75
|
-
"date": "2026-10-06",
|
|
76
|
-
"note": "
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"v": "0.23.
|
|
80
|
-
"date": "2026-10-06",
|
|
81
|
-
"note": "
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"v": "0.23.
|
|
85
|
-
"date": "2026-10-
|
|
86
|
-
"note": "
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"v": "0.23.
|
|
90
|
-
"date": "2026-10-
|
|
91
|
-
"note": "
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"v": "0.23.
|
|
95
|
-
"date": "2026-10-
|
|
96
|
-
"note": "
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"v": "0.23.
|
|
100
|
-
"date": "2026-10-04",
|
|
101
|
-
"note": "
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"v": "0.23.
|
|
105
|
-
"date": "2026-10-04",
|
|
106
|
-
"note": "
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"v": "0.23.
|
|
110
|
-
"date": "2026-10-04",
|
|
111
|
-
"note": "
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"v": "0.23.
|
|
115
|
-
"date": "2026-10-04",
|
|
116
|
-
"note": "
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"v": "0.23.
|
|
120
|
-
"date": "2026-10-04",
|
|
121
|
-
"note": "
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"v": "0.23.
|
|
125
|
-
"date": "2026-10-
|
|
126
|
-
"note": "
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"v": "0.23.
|
|
130
|
-
"date": "2026-10-
|
|
131
|
-
"note": "
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"v": "0.23.
|
|
135
|
-
"date": "2026-10-
|
|
136
|
-
"note": "
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
1
|
+
{
|
|
2
|
+
"notes": [
|
|
3
|
+
{
|
|
4
|
+
"v": "0.23.42",
|
|
5
|
+
"date": "2026-10-27",
|
|
6
|
+
"note": "发版管线钉版事故修复(0.23.40/0.23.41 混合版本出厂——44 钉同步 0.23.42+一致性门禁硬检查;两轮根修首次真正到达用户)"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"v": "0.23.41",
|
|
10
|
+
"date": "2026-10-27",
|
|
11
|
+
"note": "/evolve 401 根修(密钥轮换后化石 provider 字段击穿 TUI 快路径——loadConfig 派生治愈全部 legacy 消费方 + /bench /evolve 目的路由解析;附扩展真机测试僵尸进程根除;954/954 零回退)"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"v": "0.23.40",
|
|
15
|
+
"date": "2026-10-26",
|
|
16
|
+
"note": "执行器挂死根修(interrupt 信号贯穿飞行中的模型调用 + 5s kill 兜底 + 竞态锁存——空壳会话永久 busy 不再;953/953 零回退,复现实证 busy 0s 清除)"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"v": "0.23.39",
|
|
20
|
+
"date": "2026-10-24",
|
|
21
|
+
"note": "鼠标点击假死根修(按下序列被当 Esc 的 bug)+ /config 一键密钥配置(可视化编辑 provider/模型/密钥,鼠标可点)"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"v": "0.23.38",
|
|
25
|
+
"date": "2026-10-23",
|
|
26
|
+
"note": "默认多模态(发图给多模态模型直接看原图,仅纯文本模型走辅助识别);TUI 鼠标点击(命令面板/审批/会话选择/滚轮);远程控制永久生效+开机自启(hmh web install-daemon)"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"v": "0.23.37",
|
|
30
|
+
"date": "2026-10-21",
|
|
31
|
+
"note": "ARC-AGI-3 证据链完备(随机六档+时间曲线 1.0→0.008+迁移 +0.4166 三形态一致:harness 层校准净贡献终局定论);墙钟压测仪器(2h 全过/8h 两轴判定);AGENTS.md 仓库指引"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"v": "0.23.36",
|
|
35
|
+
"date": "2026-10-18",
|
|
36
|
+
"note": "Web server 按路由域拆分为六模块(44 条中 38 条出仓,server.ts 减 44%,逐字搬运+每域真服务器冒烟锁定合约);MCP 面暴露浏览器扩展只读工具族(操作类需显式 opt-in)"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"v": "0.23.35",
|
|
40
|
+
"date": "2026-10-16",
|
|
41
|
+
"note": "P0-C 桌面桥契约闭环(单实例守卫:拒绝启动绝不误杀);执行前动作门生产化(v0.24 研究 66 真跑交付:opt-in 条件化门控+轨迹遥测,默认关);长时运行压测(崩溃恢复游标契约,重复执行陷阱实锤并修复)"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"v": "0.23.34",
|
|
45
|
+
"date": "2026-10-15",
|
|
46
|
+
"note": "安全与外部可验证双主线:XSS 残留 sink 全关+非对象坏参硬化;Sandbox 2.1 九种真实攻击载荷全阻;Desktop 宿主桥(独立生命周期+事件信封+diff+交付物流);研究可复现性打包器(外部可重跑)"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"v": "0.23.33",
|
|
50
|
+
"date": "2026-10-08",
|
|
51
|
+
"note": "弱模型防崩双修:坏参工具调用零死刑(一次格式失误不再 400 杀会话,对话可续);报错后会话不散绑(/export 立即可用、下一条消息续写同一会话)"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"v": "0.23.32",
|
|
55
|
+
"date": "2026-10-08",
|
|
56
|
+
"note": "Web 工作台 UX 三主件齐:Turn 卡(每轮 Request→计划→动作→验证→回答五段一眼可答)、Context Dock(右栏证据+日志:认知谱系事实与工具日志尾)、Cognitive HUD(顶栏操作认知投影:相位/验证数/恢复数);内核弱模型增强随版"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"v": "0.23.31",
|
|
60
|
+
"date": "2026-10-07",
|
|
61
|
+
"note": "0.26-0.28 三线齐进:反例生成闭环(泛化归因反填技能 schema);Transfer OS 2.0(环境无关技能 IR+五环境 State/Observation/Verification 映射+迁移就绪判定——就绪是算出来的);Sandbox 2.0(网络出口允许表+文件系统挂载策略+秘密经纪人——秘密全场只见不透明引用)"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"v": "0.23.30",
|
|
65
|
+
"date": "2026-10-07",
|
|
66
|
+
"note": "0.24 研究里程碑:学习改变行动的跨环境证据(规划门判别力随动作词表丰富度上升,harmonyos 达 0.71-0.97);认知账本 2.0 可回放 DAG;Skill 2.0 schema;泛化实验室把 0.39 拒绝归因为触发/前置条件轴;Web 驾驶舱升八态(规划/验证/恢复/终态可见)"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"v": "0.23.29",
|
|
70
|
+
"date": "2026-10-07",
|
|
71
|
+
"note": "学习 OS 真实数据里程碑:world_model 目标在本机 365 条真实轨迹上以 86.3% 相对校准改进通过 holdout 门禁,5/5 种子分割鲁棒(符号检验 p=0.031);技能目标同轮诚实拒绝(挖掘不泛化);多种子统计强化仪器随版"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"v": "0.23.28",
|
|
75
|
+
"date": "2026-10-06",
|
|
76
|
+
"note": "评测四层分层守卫(Hidden 只有 evaluator 可写,自进化训练料永不进 Hidden)+ 首个真实学习目标(技能挖掘→holdout 重放→门禁晋升全链)+ 轨迹记录器排空契约(finish 可等待=完成即落盘)"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"v": "0.23.27",
|
|
80
|
+
"date": "2026-10-06",
|
|
81
|
+
"note": "Cognitive OS 升级包 P0+P1 九件上线:认知账本(认知事件只增记录+谱系链)、Prediction OS 三预测族统一、认知归因(观察 lift)、学习目标注册表(六要素契约)、统一评测 12 指标、Capability Broker(拒认默认+RLM 零继承)、Transfer 5×5 矩阵(重叠≠证据)、Evidence Ledger 统一谱系、版本一致性机检接入发布门禁"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"v": "0.23.26",
|
|
85
|
+
"date": "2026-10-06",
|
|
86
|
+
"note": "会话独立运行(对标 dsh 3080):多会话真并行——每会话独立子进程/队列/审批/中断,输入区跟随当前会话;端口收复只驱逐自家族守护(extension serve 等不再被误杀);侧栏各会话显示运行状态点"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"v": "0.23.25",
|
|
90
|
+
"date": "2026-10-06",
|
|
91
|
+
"note": "浏览器扩展对话面板:侧栏直接和助手对话(你的 provider 当大脑,page_read/page_act 工具环当面执行留审计),桥守护 install 完即自动拉起;零配对装载即连;Code World Model 三传感器族生产接线(LSP 符号/诊断 + 浏览器观察 + 构建判定)"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"v": "0.23.24",
|
|
95
|
+
"date": "2026-10-05",
|
|
96
|
+
"note": "七浏览器真装验证:Chrome/Edge/Brave/Opera/夸克/Firefox/BrowserOS 两连跑全绿;Firefox 走 Marionette 临时装载 + 演示页同源配对;MV3 主机权限边界如实上报,只读命令可重放"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"v": "0.23.23",
|
|
100
|
+
"date": "2026-10-04",
|
|
101
|
+
"note": "更新体验:后台更新时 TUI 内轻提示(开始/完成),升级后首次启动显示一行更新简报——无弹窗但不再失联"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"v": "0.23.22",
|
|
105
|
+
"date": "2026-10-04",
|
|
106
|
+
"note": "审计研究基建池全量:COG-MEA 长任务循环、版本化评测任务集(数据集指纹+种子+留出)、沙箱红队加固、WM-2 观测因果挖掘、Code World Model"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"v": "0.23.21",
|
|
110
|
+
"date": "2026-10-04",
|
|
111
|
+
"note": "BrowserOS AI 浏览器包(第 15 包)+ ACP 服务器(BrowserOS 助手面板可直接驱动 hmh)+ flaky 根因修复"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"v": "0.23.20",
|
|
115
|
+
"date": "2026-10-04",
|
|
116
|
+
"note": "认知消融三臂阶梯仪器(ablate --task --ladder3,支持 --difficulty=hard)"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"v": "0.23.19",
|
|
120
|
+
"date": "2026-10-04",
|
|
121
|
+
"note": "能力 OS 首片:LSP 源信任 + sha256 钉扎(DevEco 本地 clangd 自动发现并钉扎,PATH 源一次性信任)"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"v": "0.23.18",
|
|
125
|
+
"date": "2026-10-04",
|
|
126
|
+
"note": "群体循环远程吸收:absorb --from=<url>(协议墙+大小上限+免内容校验)"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"v": "0.23.17",
|
|
130
|
+
"date": "2026-10-04",
|
|
131
|
+
"note": "12 周计划收官特性:DevEco 本地 LSP 服务器发现(官方 clangd 全链路)"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"v": "0.23.16",
|
|
135
|
+
"date": "2026-10-03",
|
|
136
|
+
"note": "发布链三防线(private 包/依赖覆盖预检/板级兜底钉随版);@hmharness/lsp 首发修复全新安装;KaihongOS 板级自动更新通道生效"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"v": "0.23.15",
|
|
140
|
+
"date": "2026-10-03",
|
|
141
|
+
"note": "热修:补上 0.23.14 缺失的 lsp 依赖发布;发布预检加入依赖覆盖与 private 检查"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"v": "0.23.14",
|
|
145
|
+
"date": "2026-10-02",
|
|
146
|
+
"note": "无垫片更新链(更新弹窗根因修复,node 直跑 npm-cli.js);KaihongOS 板端随包安装器;长会话队列断路器与崩溃断点召回"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|