@skill-harness/adapters 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.
@@ -34,7 +34,7 @@ const SUPPORTED_KEYWORDS = new Set([
34
34
  /** Ledger v3/current record contracts add closed composition, conditionals, arrays and numeric bounds. */
35
35
  const V3_SUPPORTED_KEYWORDS = new Set([
36
36
  ...SUPPORTED_KEYWORDS,
37
- "allOf", "anyOf", "if", "then", "not", "propertyNames", "minItems", "maxItems", "uniqueItems", "exclusiveMinimum",
37
+ "allOf", "anyOf", "if", "then", "not", "propertyNames", "minItems", "maxItems", "uniqueItems", "exclusiveMinimum", "maximum",
38
38
  ]);
39
39
  /**
40
40
  * The shape each supported keyword must have. A keyword whose *name* is known but
@@ -61,6 +61,7 @@ const KEYWORD_SHAPES = {
61
61
  maxLength: { check: (value) => typeof value === "number", expected: "a number" },
62
62
  exclusiveMinimum: { check: (value) => typeof value === "number" && Number.isFinite(value), expected: "a finite number" },
63
63
  minimum: { check: (value) => typeof value === "number", expected: "a number" },
64
+ maximum: { check: (value) => typeof value === "number" && Number.isFinite(value), expected: "a finite number" },
64
65
  uniqueItems: { check: (value) => typeof value === "boolean", expected: "a boolean" },
65
66
  minItems: { check: (value) => Number.isInteger(value) && Number(value) >= 0, expected: "a non-negative integer" },
66
67
  maxItems: { check: (value) => Number.isInteger(value) && Number(value) >= 0, expected: "a non-negative integer" },
@@ -295,6 +296,9 @@ function validateNumber(schema, value, path) {
295
296
  if (typeof schema.minimum === "number" && value < schema.minimum) {
296
297
  return [{ path, message: `must be >= ${schema.minimum}` }];
297
298
  }
299
+ if (typeof schema.maximum === "number" && value > schema.maximum) {
300
+ return [{ path, message: `must be <= ${schema.maximum}` }];
301
+ }
298
302
  return [];
299
303
  }
300
304
  /**
@@ -1,5 +1,5 @@
1
- export declare const PI_DADDY_RECORD_V1_COMMIT = "38418793efb785bc582c4a233a18c40364ccd1be";
2
- export declare const PI_DADDY_RECORD_V1_VERSION = "0.44.3";
1
+ export declare const PI_DADDY_RECORD_V1_COMMIT = "ce7ea2e00f371f74fe3119e3f9de7aef672462a1";
2
+ export declare const PI_DADDY_RECORD_V1_VERSION = "0.47.0";
3
3
  export declare const PI_DADDY_RECORD_V1_SCHEMA: {
4
4
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
5
5
  readonly $id: "https://github.com/mojomanyana/pi-daddy/contracts/ledger-record/v1/record.schema.json";
@@ -239,7 +239,7 @@ export declare const PI_DADDY_RECORD_V1_GOVERNANCE_SCHEMA: {
239
239
  };
240
240
  readonly approvalSource: {
241
241
  readonly type: "string";
242
- readonly enum: readonly ["prompt", "session", "persisted", "inherited"];
242
+ readonly enum: readonly ["prompt", "session", "persisted", "inherited", "auto"];
243
243
  };
244
244
  readonly approvalScope: {
245
245
  readonly type: "string";
@@ -400,7 +400,7 @@ export declare const PI_DADDY_RECORD_V1_GOVERNANCE_SCHEMA: {
400
400
  };
401
401
  readonly gateOutcome: {
402
402
  readonly type: "string";
403
- readonly enum: readonly ["declined", "dismissed", "no-ui", "error"];
403
+ readonly enum: readonly ["declined", "dismissed", "expired", "aborted", "no-ui", "error"];
404
404
  };
405
405
  readonly definitionDigest: {
406
406
  readonly $ref: "#/$defs/definitionDigest";
@@ -902,7 +902,7 @@ export declare const PI_DADDY_RECORD_V1_GOVERNANCE_SCHEMA: {
902
902
  readonly enum: readonly ["kept", "changed"];
903
903
  };
904
904
  readonly trigger: {
905
- readonly enum: readonly ["first-delegation", "grants-models"];
905
+ readonly enum: readonly ["first-delegation", "grants-models", "auto-mode"];
906
906
  };
907
907
  readonly overrides: {
908
908
  readonly type: "object";
@@ -922,9 +922,51 @@ export declare const PI_DADDY_RECORD_V1_GOVERNANCE_SCHEMA: {
922
922
  readonly additionalProperties: false;
923
923
  };
924
924
  };
925
+ readonly autoMode: {
926
+ readonly type: "object";
927
+ readonly properties: {
928
+ readonly enabled: {
929
+ readonly type: "boolean";
930
+ };
931
+ readonly source: {
932
+ readonly enum: readonly ["default", "environment", "session"];
933
+ };
934
+ readonly revision: {
935
+ readonly type: "integer";
936
+ readonly minimum: 0;
937
+ readonly maximum: 9007199254740991;
938
+ };
939
+ };
940
+ readonly required: readonly ["enabled", "source", "revision"];
941
+ readonly additionalProperties: false;
942
+ };
925
943
  };
926
944
  readonly required: readonly ["ledgerVersion", "event", "ts", "episodeId", "outcome", "trigger", "overrides"];
927
945
  readonly additionalProperties: false;
946
+ readonly oneOf: readonly [{
947
+ readonly properties: {
948
+ readonly trigger: {
949
+ readonly const: "auto-mode";
950
+ };
951
+ readonly outcome: {
952
+ readonly const: "changed";
953
+ };
954
+ readonly overrides: {
955
+ readonly type: "object";
956
+ readonly additionalProperties: false;
957
+ };
958
+ };
959
+ readonly required: readonly ["autoMode"];
960
+ }, {
961
+ readonly properties: {
962
+ readonly trigger: {
963
+ readonly enum: readonly ["first-delegation", "grants-models"];
964
+ };
965
+ };
966
+ readonly not: {
967
+ readonly required: readonly ["autoMode"];
968
+ };
969
+ }];
928
970
  };
929
971
  readonly episodeOutcome: {
930
972
  readonly type: "object";
@@ -1,6 +1,6 @@
1
1
  // GENERATED by scripts/vendor-pi-daddy-record-v1-contract.mjs; do not hand-edit.
2
- export const PI_DADDY_RECORD_V1_COMMIT = "38418793efb785bc582c4a233a18c40364ccd1be";
3
- export const PI_DADDY_RECORD_V1_VERSION = "0.44.3";
2
+ export const PI_DADDY_RECORD_V1_COMMIT = "ce7ea2e00f371f74fe3119e3f9de7aef672462a1";
3
+ export const PI_DADDY_RECORD_V1_VERSION = "0.47.0";
4
4
  export const PI_DADDY_RECORD_V1_SCHEMA = {
5
5
  "$schema": "https://json-schema.org/draft/2020-12/schema",
6
6
  "$id": "https://github.com/mojomanyana/pi-daddy/contracts/ledger-record/v1/record.schema.json",
@@ -329,7 +329,8 @@ export const PI_DADDY_RECORD_V1_GOVERNANCE_SCHEMA = {
329
329
  "prompt",
330
330
  "session",
331
331
  "persisted",
332
- "inherited"
332
+ "inherited",
333
+ "auto"
333
334
  ]
334
335
  },
335
336
  "approvalScope": {
@@ -505,6 +506,8 @@ export const PI_DADDY_RECORD_V1_GOVERNANCE_SCHEMA = {
505
506
  "enum": [
506
507
  "declined",
507
508
  "dismissed",
509
+ "expired",
510
+ "aborted",
508
511
  "no-ui",
509
512
  "error"
510
513
  ]
@@ -1245,7 +1248,8 @@ export const PI_DADDY_RECORD_V1_GOVERNANCE_SCHEMA = {
1245
1248
  "trigger": {
1246
1249
  "enum": [
1247
1250
  "first-delegation",
1248
- "grants-models"
1251
+ "grants-models",
1252
+ "auto-mode"
1249
1253
  ]
1250
1254
  },
1251
1255
  "overrides": {
@@ -1268,6 +1272,32 @@ export const PI_DADDY_RECORD_V1_GOVERNANCE_SCHEMA = {
1268
1272
  ],
1269
1273
  "additionalProperties": false
1270
1274
  }
1275
+ },
1276
+ "autoMode": {
1277
+ "type": "object",
1278
+ "properties": {
1279
+ "enabled": {
1280
+ "type": "boolean"
1281
+ },
1282
+ "source": {
1283
+ "enum": [
1284
+ "default",
1285
+ "environment",
1286
+ "session"
1287
+ ]
1288
+ },
1289
+ "revision": {
1290
+ "type": "integer",
1291
+ "minimum": 0,
1292
+ "maximum": 9007199254740991
1293
+ }
1294
+ },
1295
+ "required": [
1296
+ "enabled",
1297
+ "source",
1298
+ "revision"
1299
+ ],
1300
+ "additionalProperties": false
1271
1301
  }
1272
1302
  },
1273
1303
  "required": [
@@ -1279,7 +1309,41 @@ export const PI_DADDY_RECORD_V1_GOVERNANCE_SCHEMA = {
1279
1309
  "trigger",
1280
1310
  "overrides"
1281
1311
  ],
1282
- "additionalProperties": false
1312
+ "additionalProperties": false,
1313
+ "oneOf": [
1314
+ {
1315
+ "properties": {
1316
+ "trigger": {
1317
+ "const": "auto-mode"
1318
+ },
1319
+ "outcome": {
1320
+ "const": "changed"
1321
+ },
1322
+ "overrides": {
1323
+ "type": "object",
1324
+ "additionalProperties": false
1325
+ }
1326
+ },
1327
+ "required": [
1328
+ "autoMode"
1329
+ ]
1330
+ },
1331
+ {
1332
+ "properties": {
1333
+ "trigger": {
1334
+ "enum": [
1335
+ "first-delegation",
1336
+ "grants-models"
1337
+ ]
1338
+ }
1339
+ },
1340
+ "not": {
1341
+ "required": [
1342
+ "autoMode"
1343
+ ]
1344
+ }
1345
+ }
1346
+ ]
1283
1347
  },
1284
1348
  "episodeOutcome": {
1285
1349
  "type": "object",
@@ -1,4 +1,4 @@
1
- /** Read the separately pinned pi-daddy 0.44.3 record format. No compatibility guessing. */
1
+ /** Read the separately separately pinned current pi-daddy record format. No compatibility guessing. */
2
2
  import { createHash } from "node:crypto";
3
3
  import { TRAJECTORY_EVENT_VERSION, deserializeTrajectoryEvents, redactArgs, redactText } from "@skill-harness/core";
4
4
  import { assertSupportedSchemaV3, declaredPropertyNames, validateClosedSchemaV3 } from "./closed-schema.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skill-harness/adapters",
3
- "version": "0.26.0",
3
+ "version": "0.26.2",
4
4
  "description": "skill-harness Pi runner and judge adapter (internal API)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -42,6 +42,6 @@
42
42
  "prepack": "node ../../scripts/release-pack.mjs --guard"
43
43
  },
44
44
  "dependencies": {
45
- "@skill-harness/core": "0.26.0"
45
+ "@skill-harness/core": "0.26.2"
46
46
  }
47
47
  }