@hmharness/cli 0.13.4 → 0.14.0

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 +49 -0
  2. package/package.json +3 -3
package/dist/main.js CHANGED
@@ -9,6 +9,8 @@
9
9
  * hmh web [--port=7788] local web frontend (SSE streaming + approvals)
10
10
  * hmh tui lite terminal UI (status header + slash commands)
11
11
  * hmh ops [scan|brief|stats|status] ops keeper: radar / npm download stats
12
+ hmh knowledge refresh refresh static knowledge (fetch -> diff -> draft)
13
+ hmh label [list|<session-id> <1-5> [note]] human reward labeling (RL-gate condition 3)
12
14
  * hmh devices|check direct tool run, no model
13
15
  * hmh tools list all registered tools (native + MCP)
14
16
  * hmh mcp show configured MCP servers and their tools
@@ -357,6 +359,8 @@ usage:
357
359
  hmh tui [--no-web] fullscreen terminal UI (slash palette, mouse wheel);
358
360
  also starts the web UI in the background (--no-web skips)
359
361
  hmh ops [scan|brief|stats|status] ops keeper: radar / npm download stats
362
+ hmh knowledge refresh refresh static knowledge (fetch -> diff -> draft)
363
+ hmh label [list|<session-id> <1-5> [note]] human reward labeling (RL-gate condition 3)
360
364
  hmh mcp-serve run as an MCP stdio SERVER: expose harmony_* tools to
361
365
  Claude Code / Codex / any MCP host
362
366
  (host config: npx -y @hmharness/cli mcp-serve)
@@ -595,6 +599,51 @@ flags:
595
599
  void PROVIDER_PRESETS;
596
600
  return;
597
601
  }
602
+ if (cmd === 'label') {
603
+ // SELFFEED month-2: human reward-label channel (readiness condition 3).
604
+ // hmh label list pick sessions to score
605
+ // hmh label <session-id> <1-5> score one session [note]
606
+ await initHome();
607
+ const home = homeDir();
608
+ const { labelSession, labelableSessions, readLabels } = await import('@hmharness/evolution');
609
+ if (rest[0] === 'list' || rest.length === 0) {
610
+ const rows = await labelableSessions(home);
611
+ const labeled = (await readLabels(home)).length;
612
+ stdout.write(`${CYAN(String(labeled))} labeled · unlabeled pool below (first ${rows.length})\n`);
613
+ for (const r of rows) {
614
+ const tag = r.label ? `${GREEN('★' + r.label.score)} ` : DIM('· ');
615
+ stdout.write(` ${tag}${DIM(r.session.slice(0, 24))} ${r.task.slice(0, 60).replace(/\s+/g, ' ')}\n`);
616
+ }
617
+ stdout.write(DIM('score with: hmh label <session-id> <1-5> [note]\n'));
618
+ return;
619
+ }
620
+ const sid = rest[0] ?? '';
621
+ const score = Number(rest[1] ?? NaN);
622
+ const note = rest.slice(2).join(' ') || undefined;
623
+ const r = await labelSession(home, sid, score, note);
624
+ if (!r.ok) {
625
+ stdout.write(RED('✗ ') + (r.reason ?? '') + '\n');
626
+ return;
627
+ }
628
+ stdout.write(GREEN('✓') + ` labeled ${sid} = ${score}${note ? ` (${note})` : ''} · total ${r.count}/100 toward reward-human-correlation\n`);
629
+ return;
630
+ }
631
+ if (cmd === 'knowledge') {
632
+ // day-29 SELFFEED: refreshKnowledge existed but was test-only dead code -
633
+ // wire the knowledge refresh into a real command (offline-safe by design:
634
+ // a clean no-op summary when nothing is reachable).
635
+ await initHome();
636
+ const home = homeDir();
637
+ const cfgK = await loadConfig();
638
+ const { refreshKnowledge } = await import('@hmharness/evolution');
639
+ const r = await refreshKnowledge({
640
+ home,
641
+ provider: resolveProvider(cfgK, 'evolve'),
642
+ say: (l) => stdout.write(DIM(` ${l}\n`)),
643
+ });
644
+ stdout.write((r.draft ? GREEN('✓') + ' knowledge draft: ' + r.draft.name + ' — ' : '') + r.summary + '\n');
645
+ return;
646
+ }
598
647
  if (cmd === 'ops') {
599
648
  await initHome();
600
649
  const { harmonyOpsRadarScan, harmonyOpsRadarBrief, harmonyOpsStatus } = await import('@hmharness/domain-ops');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmharness/cli",
3
- "version": "0.13.4",
3
+ "version": "0.14.0",
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",
@@ -45,8 +45,8 @@
45
45
  "dependencies": {
46
46
  "@hmharness/kernel": "0.9.0",
47
47
  "@hmharness/observability": "0.7.0",
48
- "@hmharness/evolution": "0.13.3",
49
- "@hmharness/domain-harmony": "0.13.4",
48
+ "@hmharness/evolution": "0.14.0",
49
+ "@hmharness/domain-harmony": "0.13.5",
50
50
  "@hmharness/domain-ops": "0.8.0",
51
51
  "@hmharness/agent": "0.11.0",
52
52
  "@hmharness/evaluation": "0.8.0",