@hmharness/cli 0.23.11 → 0.23.12
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 +35 -0
- package/package.json +12 -12
package/dist/main.js
CHANGED
|
@@ -1171,6 +1171,41 @@ flags:
|
|
|
1171
1171
|
stdout.write(` 轨迹 ${exp.trajectoryCount} 条 · 记忆 ${exp.memoryLineCount} 行 · 进化审计 ${exp.auditLineCount} 行 · 多智能体日志 ${exp.multiAgentJsonl.split('\n').filter((l) => l.trim()).length} 行\n`);
|
|
1172
1172
|
return;
|
|
1173
1173
|
}
|
|
1174
|
+
if (sub === 'summary') {
|
|
1175
|
+
// crowd loop: anonymous, content-free aggregate for sharing (opt-in;
|
|
1176
|
+
// no task text/paths/args — only per-action stats + coarse fingerprint)
|
|
1177
|
+
const { writeCrowdSummary } = await import('@hmharness/cognitive');
|
|
1178
|
+
const out = rest.find((a) => a.startsWith('--out='))?.slice(6);
|
|
1179
|
+
const { file, summary } = await writeCrowdSummary(homeDir(), out);
|
|
1180
|
+
const fp = summary.fingerprint;
|
|
1181
|
+
stdout.write(`匿名经验摘要 → ${file}\n`);
|
|
1182
|
+
stdout.write(` 指纹 ${fp.os}/${fp.arch}/node${fp.nodeMajor}/${fp.shell} · ${summary.trajectoryCount} 条轨迹 · ${summary.stats.length} 个动作统计\n`);
|
|
1183
|
+
stdout.write(DIM(' 内容零泄露:仅动作类型×成功率×耗时统计,无任务文本/路径/参数;可安全分享到社区或 issue\n'));
|
|
1184
|
+
return;
|
|
1185
|
+
}
|
|
1186
|
+
if (sub === 'absorb') {
|
|
1187
|
+
// crowd loop: merge someone else's summary into local priors
|
|
1188
|
+
// (fingerprint-matched, deduped; local evidence always dominates)
|
|
1189
|
+
// sub stays in rest for this command family: the file is the first
|
|
1190
|
+
// non-flag argument AFTER the subcommand word itself
|
|
1191
|
+
const file = rest.slice(1).find((a) => !a.startsWith('-'));
|
|
1192
|
+
if (!file) {
|
|
1193
|
+
stdout.write('用法: hmh cognitive absorb <crowd-summary.json> — 吸收他人匿名经验为本机先验(指纹须匹配)\n');
|
|
1194
|
+
return;
|
|
1195
|
+
}
|
|
1196
|
+
const { absorbCrowdSummary } = await import('@hmharness/cognitive');
|
|
1197
|
+
const r = await absorbCrowdSummary(homeDir(), file);
|
|
1198
|
+
if (!r.ok) {
|
|
1199
|
+
stdout.write(`吸收失败: ${r.error}\n`);
|
|
1200
|
+
return;
|
|
1201
|
+
}
|
|
1202
|
+
if (r.skipped) {
|
|
1203
|
+
stdout.write(`跳过: ${r.skipped}\n`);
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1206
|
+
stdout.write(`已吸收 ${r.absorbed} 条动作统计为本机先验(本地经验始终优先;见 cognitive/summary 的 Crowd experience 行)\n`);
|
|
1207
|
+
return;
|
|
1208
|
+
}
|
|
1174
1209
|
if (sub === 'purge') {
|
|
1175
1210
|
// §18 data governance: delete ONLY the cognitive store, explicit token
|
|
1176
1211
|
const confirm = rest.find((a) => a.startsWith('--confirm='))?.slice(10) ?? '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/cli",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.12",
|
|
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",
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
"build": "tsc -p tsconfig.build.json"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@hmharness/agent": "0.23.
|
|
48
|
-
"@hmharness/cognitive": "0.23.
|
|
49
|
-
"@hmharness/domain-harmony": "0.23.
|
|
50
|
-
"@hmharness/domain-ops": "0.23.
|
|
51
|
-
"@hmharness/environments": "0.23.
|
|
52
|
-
"@hmharness/evaluation": "0.23.
|
|
53
|
-
"@hmharness/evolution": "0.23.
|
|
54
|
-
"@hmharness/kernel": "0.23.
|
|
55
|
-
"@hmharness/observability": "0.23.
|
|
56
|
-
"@hmharness/sandbox": "0.23.
|
|
57
|
-
"@hmharness/web": "0.23.
|
|
47
|
+
"@hmharness/agent": "0.23.12",
|
|
48
|
+
"@hmharness/cognitive": "0.23.12",
|
|
49
|
+
"@hmharness/domain-harmony": "0.23.12",
|
|
50
|
+
"@hmharness/domain-ops": "0.23.12",
|
|
51
|
+
"@hmharness/environments": "0.23.12",
|
|
52
|
+
"@hmharness/evaluation": "0.23.12",
|
|
53
|
+
"@hmharness/evolution": "0.23.12",
|
|
54
|
+
"@hmharness/kernel": "0.23.12",
|
|
55
|
+
"@hmharness/observability": "0.23.12",
|
|
56
|
+
"@hmharness/sandbox": "0.23.12",
|
|
57
|
+
"@hmharness/web": "0.23.12",
|
|
58
58
|
"qrcode": "^1.5.4"
|
|
59
59
|
}
|
|
60
60
|
}
|