@hmharness/cli 0.13.5 → 0.14.1
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 +37 -1
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
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
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)
|
|
13
14
|
* hmh devices|check direct tool run, no model
|
|
14
15
|
* hmh tools list all registered tools (native + MCP)
|
|
15
16
|
* hmh mcp show configured MCP servers and their tools
|
|
@@ -359,6 +360,7 @@ usage:
|
|
|
359
360
|
also starts the web UI in the background (--no-web skips)
|
|
360
361
|
hmh ops [scan|brief|stats|status] ops keeper: radar / npm download stats
|
|
361
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)
|
|
362
364
|
hmh mcp-serve run as an MCP stdio SERVER: expose harmony_* tools to
|
|
363
365
|
Claude Code / Codex / any MCP host
|
|
364
366
|
(host config: npx -y @hmharness/cli mcp-serve)
|
|
@@ -597,6 +599,35 @@ flags:
|
|
|
597
599
|
void PROVIDER_PRESETS;
|
|
598
600
|
return;
|
|
599
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
|
+
}
|
|
600
631
|
if (cmd === 'knowledge') {
|
|
601
632
|
// day-29 SELFFEED: refreshKnowledge existed but was test-only dead code -
|
|
602
633
|
// wire the knowledge refresh into a real command (offline-safe by design:
|
|
@@ -1059,10 +1090,15 @@ flags:
|
|
|
1059
1090
|
stdout.write('no bench cases - run scripts/bench-cases-v2.cjs or seed first\n');
|
|
1060
1091
|
return;
|
|
1061
1092
|
}
|
|
1093
|
+
// treatment injects the skill CONTENT, never the bare name string
|
|
1094
|
+
// (day-49 fix: the first real experiment measured the instrument)
|
|
1095
|
+
const treatmentPrompt = cand.target === 'skill' && cand.payload
|
|
1096
|
+
? await E.loadSkillPayload(home, cand.payload)
|
|
1097
|
+
: (cand.payload ?? '');
|
|
1062
1098
|
stdout.write(DIM(`running ${Math.min(maxCases, cases.length)} gate cases x2 arms (bench route)…\n`));
|
|
1063
1099
|
const armRun = async (c, arm) => {
|
|
1064
1100
|
const runner = makeCaseRunner();
|
|
1065
|
-
const out = await runner(c, arm === 'treatment' ?
|
|
1101
|
+
const out = await runner(c, arm === 'treatment' ? treatmentPrompt : '');
|
|
1066
1102
|
return { pass: E.matchCase(out, c).pass, tokens: E.estTokens(c.prompt + out) };
|
|
1067
1103
|
};
|
|
1068
1104
|
const rep = await E.runCandidateExperiment(home, cand.id, { runCase: armRun, cases, maxCases });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
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,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@hmharness/kernel": "0.9.0",
|
|
47
47
|
"@hmharness/observability": "0.7.0",
|
|
48
|
-
"@hmharness/evolution": "0.
|
|
48
|
+
"@hmharness/evolution": "0.14.1",
|
|
49
49
|
"@hmharness/domain-harmony": "0.13.5",
|
|
50
50
|
"@hmharness/domain-ops": "0.8.0",
|
|
51
51
|
"@hmharness/agent": "0.11.0",
|