skill-harness 0.26.0 → 0.26.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.
- package/dist/index.js +93 -8
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8684,6 +8684,9 @@ function validateNumber(schema2, value, path) {
|
|
|
8684
8684
|
if (typeof schema2.minimum === "number" && value < schema2.minimum) {
|
|
8685
8685
|
return [{ path, message: `must be >= ${schema2.minimum}` }];
|
|
8686
8686
|
}
|
|
8687
|
+
if (typeof schema2.maximum === "number" && value > schema2.maximum) {
|
|
8688
|
+
return [{ path, message: `must be <= ${schema2.maximum}` }];
|
|
8689
|
+
}
|
|
8687
8690
|
return [];
|
|
8688
8691
|
}
|
|
8689
8692
|
function bestBranch(root, schemas, branches, value, path) {
|
|
@@ -8805,7 +8808,8 @@ var init_closed_schema = __esm({
|
|
|
8805
8808
|
"minItems",
|
|
8806
8809
|
"maxItems",
|
|
8807
8810
|
"uniqueItems",
|
|
8808
|
-
"exclusiveMinimum"
|
|
8811
|
+
"exclusiveMinimum",
|
|
8812
|
+
"maximum"
|
|
8809
8813
|
]);
|
|
8810
8814
|
KEYWORD_SHAPES = {
|
|
8811
8815
|
$ref: { check: (value) => typeof value === "string", expected: "a string" },
|
|
@@ -8826,6 +8830,7 @@ var init_closed_schema = __esm({
|
|
|
8826
8830
|
maxLength: { check: (value) => typeof value === "number", expected: "a number" },
|
|
8827
8831
|
exclusiveMinimum: { check: (value) => typeof value === "number" && Number.isFinite(value), expected: "a finite number" },
|
|
8828
8832
|
minimum: { check: (value) => typeof value === "number", expected: "a number" },
|
|
8833
|
+
maximum: { check: (value) => typeof value === "number" && Number.isFinite(value), expected: "a finite number" },
|
|
8829
8834
|
uniqueItems: { check: (value) => typeof value === "boolean", expected: "a boolean" },
|
|
8830
8835
|
minItems: { check: (value) => Number.isInteger(value) && Number(value) >= 0, expected: "a non-negative integer" },
|
|
8831
8836
|
maxItems: { check: (value) => Number.isInteger(value) && Number(value) >= 0, expected: "a non-negative integer" },
|
|
@@ -8843,7 +8848,7 @@ var PI_DADDY_RECORD_V1_COMMIT2, PI_DADDY_RECORD_V1_SCHEMA2, PI_DADDY_RECORD_V1_G
|
|
|
8843
8848
|
var init_pi_daddy_record_v1_contract = __esm({
|
|
8844
8849
|
"packages/adapters/src/pi-daddy-record-v1-contract.ts"() {
|
|
8845
8850
|
"use strict";
|
|
8846
|
-
PI_DADDY_RECORD_V1_COMMIT2 = "
|
|
8851
|
+
PI_DADDY_RECORD_V1_COMMIT2 = "ce7ea2e00f371f74fe3119e3f9de7aef672462a1";
|
|
8847
8852
|
PI_DADDY_RECORD_V1_SCHEMA2 = {
|
|
8848
8853
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
8849
8854
|
"$id": "https://github.com/mojomanyana/pi-daddy/contracts/ledger-record/v1/record.schema.json",
|
|
@@ -9172,7 +9177,8 @@ var init_pi_daddy_record_v1_contract = __esm({
|
|
|
9172
9177
|
"prompt",
|
|
9173
9178
|
"session",
|
|
9174
9179
|
"persisted",
|
|
9175
|
-
"inherited"
|
|
9180
|
+
"inherited",
|
|
9181
|
+
"auto"
|
|
9176
9182
|
]
|
|
9177
9183
|
},
|
|
9178
9184
|
"approvalScope": {
|
|
@@ -9348,6 +9354,8 @@ var init_pi_daddy_record_v1_contract = __esm({
|
|
|
9348
9354
|
"enum": [
|
|
9349
9355
|
"declined",
|
|
9350
9356
|
"dismissed",
|
|
9357
|
+
"expired",
|
|
9358
|
+
"aborted",
|
|
9351
9359
|
"no-ui",
|
|
9352
9360
|
"error"
|
|
9353
9361
|
]
|
|
@@ -10088,7 +10096,8 @@ var init_pi_daddy_record_v1_contract = __esm({
|
|
|
10088
10096
|
"trigger": {
|
|
10089
10097
|
"enum": [
|
|
10090
10098
|
"first-delegation",
|
|
10091
|
-
"grants-models"
|
|
10099
|
+
"grants-models",
|
|
10100
|
+
"auto-mode"
|
|
10092
10101
|
]
|
|
10093
10102
|
},
|
|
10094
10103
|
"overrides": {
|
|
@@ -10111,6 +10120,32 @@ var init_pi_daddy_record_v1_contract = __esm({
|
|
|
10111
10120
|
],
|
|
10112
10121
|
"additionalProperties": false
|
|
10113
10122
|
}
|
|
10123
|
+
},
|
|
10124
|
+
"autoMode": {
|
|
10125
|
+
"type": "object",
|
|
10126
|
+
"properties": {
|
|
10127
|
+
"enabled": {
|
|
10128
|
+
"type": "boolean"
|
|
10129
|
+
},
|
|
10130
|
+
"source": {
|
|
10131
|
+
"enum": [
|
|
10132
|
+
"default",
|
|
10133
|
+
"environment",
|
|
10134
|
+
"session"
|
|
10135
|
+
]
|
|
10136
|
+
},
|
|
10137
|
+
"revision": {
|
|
10138
|
+
"type": "integer",
|
|
10139
|
+
"minimum": 0,
|
|
10140
|
+
"maximum": 9007199254740991
|
|
10141
|
+
}
|
|
10142
|
+
},
|
|
10143
|
+
"required": [
|
|
10144
|
+
"enabled",
|
|
10145
|
+
"source",
|
|
10146
|
+
"revision"
|
|
10147
|
+
],
|
|
10148
|
+
"additionalProperties": false
|
|
10114
10149
|
}
|
|
10115
10150
|
},
|
|
10116
10151
|
"required": [
|
|
@@ -10122,7 +10157,41 @@ var init_pi_daddy_record_v1_contract = __esm({
|
|
|
10122
10157
|
"trigger",
|
|
10123
10158
|
"overrides"
|
|
10124
10159
|
],
|
|
10125
|
-
"additionalProperties": false
|
|
10160
|
+
"additionalProperties": false,
|
|
10161
|
+
"oneOf": [
|
|
10162
|
+
{
|
|
10163
|
+
"properties": {
|
|
10164
|
+
"trigger": {
|
|
10165
|
+
"const": "auto-mode"
|
|
10166
|
+
},
|
|
10167
|
+
"outcome": {
|
|
10168
|
+
"const": "changed"
|
|
10169
|
+
},
|
|
10170
|
+
"overrides": {
|
|
10171
|
+
"type": "object",
|
|
10172
|
+
"additionalProperties": false
|
|
10173
|
+
}
|
|
10174
|
+
},
|
|
10175
|
+
"required": [
|
|
10176
|
+
"autoMode"
|
|
10177
|
+
]
|
|
10178
|
+
},
|
|
10179
|
+
{
|
|
10180
|
+
"properties": {
|
|
10181
|
+
"trigger": {
|
|
10182
|
+
"enum": [
|
|
10183
|
+
"first-delegation",
|
|
10184
|
+
"grants-models"
|
|
10185
|
+
]
|
|
10186
|
+
}
|
|
10187
|
+
},
|
|
10188
|
+
"not": {
|
|
10189
|
+
"required": [
|
|
10190
|
+
"autoMode"
|
|
10191
|
+
]
|
|
10192
|
+
}
|
|
10193
|
+
}
|
|
10194
|
+
]
|
|
10126
10195
|
},
|
|
10127
10196
|
"episodeOutcome": {
|
|
10128
10197
|
"type": "object",
|
|
@@ -13569,6 +13638,7 @@ var init_src = __esm({
|
|
|
13569
13638
|
});
|
|
13570
13639
|
|
|
13571
13640
|
// packages/pi-extension/src/index.ts
|
|
13641
|
+
import { readFileSync as readFileSync20 } from "node:fs";
|
|
13572
13642
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
13573
13643
|
import { basename as basename4, dirname as dirname10, join as join35 } from "node:path";
|
|
13574
13644
|
|
|
@@ -13962,7 +14032,8 @@ var V3_SUPPORTED_KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
13962
14032
|
"minItems",
|
|
13963
14033
|
"maxItems",
|
|
13964
14034
|
"uniqueItems",
|
|
13965
|
-
"exclusiveMinimum"
|
|
14035
|
+
"exclusiveMinimum",
|
|
14036
|
+
"maximum"
|
|
13966
14037
|
]);
|
|
13967
14038
|
|
|
13968
14039
|
// packages/adapters/dist/pi-daddy-record-v1.js
|
|
@@ -18754,6 +18825,7 @@ var unmeasuredProvider = () => ({
|
|
|
18754
18825
|
usage: { inputTokens: null, outputTokens: null, costUsd: null },
|
|
18755
18826
|
latencyMs: null
|
|
18756
18827
|
});
|
|
18828
|
+
var missingKeyRemedy = "Set OPENROUTER_API_KEY in the environment that launches Pi, restart Pi, then enable JEV again with fresh session consent.";
|
|
18757
18829
|
function createJevController(pi, options = {}) {
|
|
18758
18830
|
const run = options.run ?? main;
|
|
18759
18831
|
let epoch = 0;
|
|
@@ -18780,6 +18852,7 @@ function createJevController(pi, options = {}) {
|
|
|
18780
18852
|
storage: active?.consent.decision ?? null,
|
|
18781
18853
|
remaining: active?.mode === "workflow" ? JEV_WORKFLOW_LIMIT - active.used : 0,
|
|
18782
18854
|
availability,
|
|
18855
|
+
providerReadiness: hasKey() ? "key-present" : "missing-key",
|
|
18783
18856
|
advisory: true
|
|
18784
18857
|
};
|
|
18785
18858
|
};
|
|
@@ -18808,7 +18881,7 @@ function createJevController(pi, options = {}) {
|
|
|
18808
18881
|
if (bound.blocked) return unavailable("Workflow advice is suppressed after an error; explicit new activation is required.");
|
|
18809
18882
|
if (bound.busy) return unavailable("An advisory request is already in flight; no additional call was made.");
|
|
18810
18883
|
if (bound.used >= JEV_WORKFLOW_LIMIT) return unavailable("This activation's advisory call limit is reached.");
|
|
18811
|
-
if (!hasKey()) return unavailable(
|
|
18884
|
+
if (!hasKey()) return unavailable(`OPENROUTER_API_KEY is unavailable; no call was made. ${missingKeyRemedy}`);
|
|
18812
18885
|
const abort = new AbortController();
|
|
18813
18886
|
const cancel = () => abort.abort();
|
|
18814
18887
|
const signals = [bound.abort.signal, signal].filter((s) => s !== void 0);
|
|
@@ -18959,7 +19032,7 @@ function createJevController(pi, options = {}) {
|
|
|
18959
19032
|
cache: /* @__PURE__ */ new Map()
|
|
18960
19033
|
};
|
|
18961
19034
|
ctx.ui.notify(
|
|
18962
|
-
(workflow ? `JEV workflow
|
|
19035
|
+
(workflow ? `JEV workflow calls authorized for this session (up to ${JEV_WORKFLOW_LIMIT} paid calls). LoRA storage ` : "JEV manual mode activated; each selected paid call still requires confirmation. LoRA storage ") + consent.decision + " for this session only. " + (hasKey() ? "Provider readiness: OPENROUTER_API_KEY is present; credentials and provider access have not been verified. No provider call was made." : `Provider unavailable: OPENROUTER_API_KEY is missing or blank in this Pi process. No provider call was made. ${missingKeyRemedy}`)
|
|
18963
19036
|
);
|
|
18964
19037
|
return;
|
|
18965
19038
|
}
|
|
@@ -19104,11 +19177,23 @@ function registerJevAdvice(pi, controller) {
|
|
|
19104
19177
|
function index_default(pi) {
|
|
19105
19178
|
const moduleDir = dirname10(fileURLToPath2(import.meta.url));
|
|
19106
19179
|
const assetsDir = basename4(dirname10(moduleDir)) === "skill-harness" ? join35(moduleDir, "..", "assets") : join35(moduleDir, "..", "..", "..", "assets");
|
|
19180
|
+
const packageRoot = basename4(dirname10(moduleDir)) === "skill-harness" ? join35(moduleDir, "..") : join35(moduleDir, "..", "..", "..");
|
|
19181
|
+
let loadedVersion;
|
|
19182
|
+
try {
|
|
19183
|
+
const manifest = JSON.parse(readFileSync20(join35(packageRoot, "package.json"), "utf8"));
|
|
19184
|
+
if (["skill-harness", "skill-harness-monorepo"].includes(manifest.name)) loadedVersion = manifest.version;
|
|
19185
|
+
} catch {
|
|
19186
|
+
}
|
|
19187
|
+
const removeVersionReporter = pi.events?.on("pi-daddy:ecosystem-versions:v1", (request) => {
|
|
19188
|
+
const report = request?.report;
|
|
19189
|
+
if (typeof report === "function" && typeof loadedVersion === "string") report({ id: "skill-harness", version: loadedVersion, root: packageRoot });
|
|
19190
|
+
});
|
|
19107
19191
|
const jev = createJevController(pi);
|
|
19108
19192
|
registerCommand(pi, assetsDir, jev.command);
|
|
19109
19193
|
registerJevAdvice(pi, jev);
|
|
19110
19194
|
registerTool(pi);
|
|
19111
19195
|
pi.on("session_shutdown", async () => {
|
|
19196
|
+
removeVersionReporter?.();
|
|
19112
19197
|
closeReview();
|
|
19113
19198
|
});
|
|
19114
19199
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skill-harness",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"description": "Test/optimize loop for agent skills \u2014 run spec'd scenarios on pi, LLM-judge, score, review, re-run",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@skill-harness/cli": "0.26.
|
|
34
|
+
"@skill-harness/cli": "0.26.2"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"typebox": "*"
|