@skill-harness/cli 0.10.0 → 0.11.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/cli.js +12 -1
- package/dist/serve.js +7 -0
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,7 @@ import { readFileSync, existsSync, mkdirSync, writeFileSync, mkdtempSync, rmSync
|
|
|
3
3
|
import { load as yamlLoad } from "js-yaml";
|
|
4
4
|
import { basename, dirname, join, resolve, relative } from "node:path";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
|
-
import { discover, resolveSkill, loadSpec, parseSpec, appendScenario, parseModelRef, runSkillModel, formatScorecard, readResults, regradeRun, lintSkill, failsGate, renderTemplateSpec, isTemplateSpec, renderDraftSpec, buildSuggestPrompt, parseSuggestDraft, rescoreRun, regateRun, specPathForRunDir, collectLift, collectStability, boundaryCells, stabilityNote, PATH_LEGEND, restampSkill, resolveAdjudicationJudges, adjudicateRun, judgeResemblesSubject, computeCoverage, formatCoverage, selectAffected, formatAffected, gitDiff, exec, HARNESS_VERSION, defaultJudge, assertJudgeAllowed, assertNotDowngraded, downgradeWarning, isScoredMode, runTrajectoryMutationSelfTest, } from "@skill-harness/core";
|
|
6
|
+
import { discover, resolveSkill, loadSpec, parseSpec, appendScenario, parseModelRef, runSkillModel, formatScorecard, readResults, regradeRun, lintSkill, failsGate, renderTemplateSpec, isTemplateSpec, renderDraftSpec, buildSuggestPrompt, parseSuggestDraft, rescoreRun, regateRun, specPathForRunDir, collectLift, collectStability, boundaryCells, stabilityNote, PATH_LEGEND, restampSkill, resolveAdjudicationJudges, adjudicateRun, judgeResemblesSubject, computeCoverage, formatCoverage, selectAffected, formatAffected, gitDiff, exec, HARNESS_VERSION, defaultJudge, assertJudgeAllowed, assertNotDowngraded, downgradeWarning, isScoredMode, runTrajectoryMutationSelfTest, resolveArm, } from "@skill-harness/core";
|
|
7
7
|
import { getAdapter } from "@skill-harness/adapters";
|
|
8
8
|
import { serveReview } from "./serve.js";
|
|
9
9
|
import { runCompareCommand } from "./compare.js";
|
|
@@ -151,10 +151,15 @@ export async function cmdRun(args) {
|
|
|
151
151
|
throw new Error(`harness \`${harnessName}\` is not on PATH`);
|
|
152
152
|
const mode = flagStr(args, "mode", "green") || "green";
|
|
153
153
|
const canary = flagBool(args, "canary");
|
|
154
|
+
const structured = flagBool(args, "structured");
|
|
154
155
|
const label = flagStr(args, "label") || null;
|
|
155
156
|
const parallel = Math.max(1, Number(flagStr(args, "parallel", "1")) || 1);
|
|
156
157
|
const { reps, passThreshold } = parseRunTuning(args);
|
|
157
158
|
const modelTokens = resolveModels(args);
|
|
159
|
+
// Resolved ONCE, before the skill loop: a typo'd arm name fails before any
|
|
160
|
+
// token is spent on any skill.
|
|
161
|
+
const armName = flagStr(args, "arm") || null;
|
|
162
|
+
const arm = resolveArm(root, armName);
|
|
158
163
|
const skills = target === "all"
|
|
159
164
|
? discover(root).filter((s) => s.hasSpec)
|
|
160
165
|
: [resolveSkill(root, target)];
|
|
@@ -201,6 +206,9 @@ export async function cmdRun(args) {
|
|
|
201
206
|
passThreshold,
|
|
202
207
|
only,
|
|
203
208
|
canary,
|
|
209
|
+
structured,
|
|
210
|
+
arm,
|
|
211
|
+
skillsRoot: root,
|
|
204
212
|
onProgress: (m) => console.log(m),
|
|
205
213
|
});
|
|
206
214
|
summaries.push(summary);
|
|
@@ -858,6 +866,9 @@ export function help() {
|
|
|
858
866
|
[--affected --base <git-ref>] run only the scenarios a change could touch (partial; never SHIPs)
|
|
859
867
|
[--mode red|green|force] [--judge prov:model] [--harness pi] [--label name] [--parallel N] [--reps N] [--pass-threshold T]
|
|
860
868
|
[--canary] green only: spend ONE probe proving the skill reached the model, and abort the run if it did not
|
|
869
|
+
[--structured] record subject tokens, cost and wall time (needs pi --mode json)
|
|
870
|
+
[--arm <name>] measure under a named arm from <skills-root>/tests/arms.yaml
|
|
871
|
+
(loads its extensions, seeds pi-daddy definitions, tags the run dir)
|
|
861
872
|
compare <skill|all> --reference <git-ref-or-skills-root> --candidate <skills-root>
|
|
862
873
|
[--model prov:model ...] [--mode green|force] [--judge prov:model] [--reps N] [--only IDs | --affected --base ref]
|
|
863
874
|
[--output dir] [--max-subject-token-increase R] [--max-wall-time-increase R] [--max-tool-call-increase R]
|
package/dist/serve.js
CHANGED
|
@@ -144,6 +144,13 @@ export async function serveReview(opts) {
|
|
|
144
144
|
partial: results.partial,
|
|
145
145
|
// Provenance survives a UI re-judge, same as it does through `grade`.
|
|
146
146
|
harness_cli_version: results.harness_cli_version, delivery_canary: results.delivery_canary,
|
|
147
|
+
// The arm is provenance of the MEASUREMENT, not of this rewrite, and it is the
|
|
148
|
+
// only record that a `+<arm>` run actually delegated: rebuilding the draft
|
|
149
|
+
// field-by-field without it silently deleted `definitions`/`ledger_events`
|
|
150
|
+
// from any arm run that was ever re-graded, leaving a record
|
|
151
|
+
// indistinguishable from a vacuous arm. Same reason `harness_cli_version`,
|
|
152
|
+
// `delivery_canary` and `source_hashes` are carried here.
|
|
153
|
+
arm: results.arm,
|
|
147
154
|
// Recorded hashes were being dropped here entirely, which silently
|
|
148
155
|
// retired the staleness gate for any run re-judged from the UI. Carried,
|
|
149
156
|
// with the one `rubric:` key this re-judge actually applied refreshed —
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skill-harness/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.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": "rm -rf ./assets && mkdir -p ./assets && cp ../../assets/report.* ./assets/ && cp ../../LICENSE ./LICENSE"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@skill-harness/core": "0.
|
|
48
|
-
"@skill-harness/adapters": "0.
|
|
47
|
+
"@skill-harness/core": "0.11.0",
|
|
48
|
+
"@skill-harness/adapters": "0.11.0"
|
|
49
49
|
}
|
|
50
50
|
}
|