@skill-harness/cli 0.28.0 → 0.30.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.
package/dist/serve.js CHANGED
@@ -3,7 +3,7 @@ import { readFileSync, existsSync } from "node:fs";
3
3
  import { join, dirname } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { spawn } from "node:child_process";
6
- import { collectReport, renderReport, collectTrends, readResults, writeResults, applyOverride, preserveTranscript, findTranscriptFiles, ensureResultsGitignore, appendJournal, loadSpec, regradeScenario, refreshRubricHashes, findJudgeRawFiles, effectiveThreshold, scoreContextFor, isScoredMode, rebuildScenarioResult, mergeScenarioMetrics, carryRepObjectives, envFlag, recordedJudgeOrDefault, assertJudgeAllowed, } from "@skill-harness/core";
6
+ import { collectReport, renderReport, collectTrends, readResults, writeResults, applyOverride, preserveTranscript, findTranscriptFiles, ensureResultsGitignore, appendJournal, loadSpec, regradeScenario, refreshRubricHashes, findJudgeRawFiles, effectiveThreshold, scoreContextFor, isScoredMode, rebuildScenarioResult, mergeScenarioMetrics, carryRepObjectives, envFlag, recordedJudgeOrDefault, assertJudgeAllowed, parseModelRef, resolveJudgeReferences, } from "@skill-harness/core";
7
7
  import { getAdapter } from "@skill-harness/adapters";
8
8
  const __dirname = dirname(fileURLToPath(import.meta.url));
9
9
  /** Locate assets/report.template.html relative to dist/ or src/. */
@@ -145,10 +145,16 @@ export async function serveReview(opts) {
145
145
  }
146
146
  const threshold = effectiveThreshold(prev, scenario);
147
147
  try {
148
+ // The prompt and refreshed rubric must name the same selected bytes,
149
+ // even when a reference is edited while a multi-repetition judge runs.
150
+ const specDir = dirname(specPath);
151
+ const references = resolveJudgeReferences(scenario, specDir);
148
152
  const rr = await regradeScenario({
149
153
  runDir: column.runDir, spec, scenario, adapter, judge: resolvedRecordedJudge.judge,
150
- specDir: dirname(specPath), threshold, mode: results.mode,
154
+ specDir, threshold, mode: results.mode, references,
151
155
  expectedReps: prev.reps ?? 1,
156
+ prior: prev, piVersion: results.harness_cli_version,
157
+ ...(results.model.includes(":") ? { subject: parseModelRef(results.model) } : {}),
152
158
  });
153
159
  const merged = results.scenarios.map((s) => {
154
160
  if (s.id !== body.scenarioId)
@@ -174,7 +180,7 @@ export async function serveReview(opts) {
174
180
  // retired the staleness gate for any run re-judged from the UI. Carried,
175
181
  // with the one `rubric:` key this re-judge actually applied refreshed —
176
182
  // the same doctrine `grade` follows (see refreshRubricHashes).
177
- source_hashes: refreshRubricHashes(results.source_hashes, spec, [body.scenarioId]),
183
+ source_hashes: refreshRubricHashes(results.source_hashes, spec, [body.scenarioId], specDir, { [body.scenarioId]: references }),
178
184
  source_hash_roots: results.source_hash_roots,
179
185
  }, scoreContextFor(results, spec));
180
186
  ensureResultsGitignore(join(opts.skillDir, "tests", "results"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skill-harness/cli",
3
- "version": "0.28.0",
3
+ "version": "0.30.0",
4
4
  "description": "skill-harness CLI — run, grade, review, and lint agent-skill scenarios on the pi harness",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "prepack": "node ../../scripts/release-pack.mjs --guard"
45
45
  },
46
46
  "dependencies": {
47
- "@skill-harness/core": "0.28.0",
48
- "@skill-harness/adapters": "0.28.0"
47
+ "@skill-harness/core": "0.30.0",
48
+ "@skill-harness/adapters": "0.30.0"
49
49
  }
50
50
  }