@hmharness/cli 0.14.0 → 0.14.2

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 +13 -2
  2. package/package.json +2 -2
package/dist/main.js CHANGED
@@ -289,7 +289,13 @@ function makeCaseRunner() {
289
289
  return async (c, skillsPrompt) => {
290
290
  const cfg = await loadConfig();
291
291
  if (!c.tools) {
292
- const r = await chat(resolveProvider(cfg, 'bench'), [{ role: 'user', content: c.prompt }]);
292
+ // day-50 instrument fix: non-tools cases MUST see the skills prompt as
293
+ // a system message - the old user-only call meant every skill candidate
294
+ // measured nothing (control tokens恒268, zero information)
295
+ const msgs = skillsPrompt
296
+ ? [{ role: 'system', content: skillsPrompt }, { role: 'user', content: c.prompt }]
297
+ : [{ role: 'user', content: c.prompt }];
298
+ const r = await chat(resolveProvider(cfg, 'bench'), msgs);
293
299
  return r.message.content ?? '';
294
300
  }
295
301
  const reg = new Registry();
@@ -1090,10 +1096,15 @@ flags:
1090
1096
  stdout.write('no bench cases - run scripts/bench-cases-v2.cjs or seed first\n');
1091
1097
  return;
1092
1098
  }
1099
+ // treatment injects the skill CONTENT, never the bare name string
1100
+ // (day-49 fix: the first real experiment measured the instrument)
1101
+ const treatmentPrompt = cand.target === 'skill' && cand.payload
1102
+ ? await E.loadSkillPayload(home, cand.payload)
1103
+ : (cand.payload ?? '');
1093
1104
  stdout.write(DIM(`running ${Math.min(maxCases, cases.length)} gate cases x2 arms (bench route)…\n`));
1094
1105
  const armRun = async (c, arm) => {
1095
1106
  const runner = makeCaseRunner();
1096
- const out = await runner(c, arm === 'treatment' ? (cand.payload ?? '') : '');
1107
+ const out = await runner(c, arm === 'treatment' ? treatmentPrompt : '');
1097
1108
  return { pass: E.matchCase(out, c).pass, tokens: E.estTokens(c.prompt + out) };
1098
1109
  };
1099
1110
  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.14.0",
3
+ "version": "0.14.2",
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.14.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",