@hmharness/cli 0.23.17 → 0.23.18

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.
Files changed (2) hide show
  1. package/dist/main.js +9 -7
  2. package/package.json +12 -12
package/dist/main.js CHANGED
@@ -1236,16 +1236,18 @@ flags:
1236
1236
  }
1237
1237
  if (sub === 'absorb') {
1238
1238
  // crowd loop: merge someone else's summary into local priors
1239
- // (fingerprint-matched, deduped; local evidence always dominates)
1240
- // sub stays in rest for this command family: the file is the first
1241
- // non-flag argument AFTER the subcommand word itself
1239
+ // (fingerprint-matched, deduped; local evidence always dominates).
1240
+ // Sources: a local file OR --from=<https-url> (e.g. the repo's crowd/
1241
+ // directory — the one-command collective-loop entry).
1242
1242
  const file = rest.slice(1).find((a) => !a.startsWith('-'));
1243
- if (!file) {
1244
- stdout.write('用法: hmh cognitive absorb <crowd-summary.json> — 吸收他人匿名经验为本机先验(指纹须匹配)\n');
1243
+ const from = rest.find((a) => a.startsWith('--from='))?.slice(7);
1244
+ if (!file && !from) {
1245
+ stdout.write('用法: hmh cognitive absorb <pack.json> | --from=<https-url> — 吸收他人匿名经验为本机先验(指纹须匹配)\n');
1246
+ stdout.write(DIM(' --from 示例: --from=https://raw.githubusercontent.com/swsgbl/hmharness/main/crowd/win32-x64.json\n'));
1245
1247
  return;
1246
1248
  }
1247
- const { absorbCrowdSummary } = await import('@hmharness/cognitive');
1248
- const r = await absorbCrowdSummary(homeDir(), file);
1249
+ const { absorbCrowdSummary, absorbCrowdUrl } = await import('@hmharness/cognitive');
1250
+ const r = from ? await absorbCrowdUrl(homeDir(), from) : await absorbCrowdSummary(homeDir(), file);
1249
1251
  if (!r.ok) {
1250
1252
  stdout.write(`吸收失败: ${r.error}\n`);
1251
1253
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmharness/cli",
3
- "version": "0.23.17",
3
+ "version": "0.23.18",
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.17",
48
- "@hmharness/cognitive": "0.23.17",
49
- "@hmharness/domain-harmony": "0.23.17",
50
- "@hmharness/domain-ops": "0.23.17",
51
- "@hmharness/environments": "0.23.17",
52
- "@hmharness/evaluation": "0.23.17",
53
- "@hmharness/evolution": "0.23.17",
54
- "@hmharness/kernel": "0.23.17",
55
- "@hmharness/observability": "0.23.17",
56
- "@hmharness/sandbox": "0.23.17",
57
- "@hmharness/web": "0.23.17",
47
+ "@hmharness/agent": "0.23.18",
48
+ "@hmharness/cognitive": "0.23.18",
49
+ "@hmharness/domain-harmony": "0.23.18",
50
+ "@hmharness/domain-ops": "0.23.18",
51
+ "@hmharness/environments": "0.23.18",
52
+ "@hmharness/evaluation": "0.23.18",
53
+ "@hmharness/evolution": "0.23.18",
54
+ "@hmharness/kernel": "0.23.18",
55
+ "@hmharness/observability": "0.23.18",
56
+ "@hmharness/sandbox": "0.23.18",
57
+ "@hmharness/web": "0.23.18",
58
58
  "qrcode": "^1.5.4"
59
59
  }
60
60
  }