@hmharness/cli 0.19.2 → 0.19.3

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 +30 -1
  2. package/package.json +12 -12
package/dist/main.js CHANGED
@@ -955,8 +955,37 @@ flags:
955
955
  stdout.write(` 规划门: 可信[${wm.plannerGate.trusted.join(',')}] 存疑[${wm.plannerGate.untrusted.join(',')}] 未知[${wm.plannerGate.unknown.join(',')}]\n`);
956
956
  return;
957
957
  }
958
+ if (sub === 'drift') {
959
+ // GOAL-005 on live data: did recorded runs actually serve their goals?
960
+ const { analyzeGoalDrift } = await import('@hmharness/cognitive');
961
+ const views = await analyzeGoalDrift(homeDir());
962
+ if (views.length === 0) {
963
+ stdout.write('(尚无带目标的轨迹——设置会话目标后再跑任务)\n');
964
+ return;
965
+ }
966
+ for (const v of views.slice(0, 10)) {
967
+ stdout.write(` ${v.driftScore.toFixed(2).padEnd(5)} ${v.recommendation.padEnd(22)} ${v.goalDescription.slice(0, 60)}\n`);
968
+ for (const s of v.signals.slice(0, 2))
969
+ stdout.write(DIM(` ${s}\n`));
970
+ }
971
+ return;
972
+ }
973
+ if (sub === 'skills') {
974
+ // SK-002 on live data: repeated successful action runs as candidates
975
+ const { skillCandidatesFromHistory } = await import('@hmharness/cognitive');
976
+ const candidates = await skillCandidatesFromHistory(homeDir());
977
+ if (candidates.length === 0) {
978
+ stdout.write('(暂无技能候选——需要≥2 条含≥2 步成功动作序列的轨迹)\n');
979
+ return;
980
+ }
981
+ for (const c of candidates) {
982
+ stdout.write(` [${c.status}] ${c.name}\n`);
983
+ stdout.write(` 流程: ${c.procedure.join(' → ')} · 证据 ${c.evidenceTrajectories} 条轨迹(晋升仍需过基准门禁)\n`);
984
+ }
985
+ return;
986
+ }
958
987
  if (sub !== 'status') {
959
- stdout.write('用法: hmh cognitive status|world-model|diagnose|bench — 认知子系统状态与世界模型\n');
988
+ stdout.write('用法: hmh cognitive status|world-model|diagnose|bench|drift|skills — 认知子系统与世界模型\n');
960
989
  return;
961
990
  }
962
991
  const { cognitiveStatus, formatCognitiveStatus } = await import('@hmharness/cognitive');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmharness/cli",
3
- "version": "0.19.2",
3
+ "version": "0.19.3",
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.19.2",
47
- "@hmharness/cognitive": "0.19.2",
48
- "@hmharness/domain-harmony": "0.19.2",
49
- "@hmharness/domain-ops": "0.19.2",
50
- "@hmharness/environments": "0.19.2",
51
- "@hmharness/evaluation": "0.19.2",
52
- "@hmharness/evolution": "0.19.2",
53
- "@hmharness/kernel": "0.19.2",
54
- "@hmharness/observability": "0.19.2",
55
- "@hmharness/sandbox": "0.19.2",
56
- "@hmharness/web": "0.19.2",
46
+ "@hmharness/agent": "0.19.3",
47
+ "@hmharness/cognitive": "0.19.3",
48
+ "@hmharness/domain-harmony": "0.19.3",
49
+ "@hmharness/domain-ops": "0.19.3",
50
+ "@hmharness/environments": "0.19.3",
51
+ "@hmharness/evaluation": "0.19.3",
52
+ "@hmharness/evolution": "0.19.3",
53
+ "@hmharness/kernel": "0.19.3",
54
+ "@hmharness/observability": "0.19.3",
55
+ "@hmharness/sandbox": "0.19.3",
56
+ "@hmharness/web": "0.19.3",
57
57
  "qrcode": "^1.5.4"
58
58
  }
59
59
  }