@eigenpal/cli 0.14.2 → 0.15.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.
@@ -77,6 +77,8 @@ inherited settings. `{}` selects a path with inherited platform defaults.
77
77
  allowExtraFields: false
78
78
  lineItems[].unitPrice:
79
79
  numericTolerance: 0.01
80
+ lineItems[].evidence:
81
+ ignore: true
80
82
  ```
81
83
 
82
84
  - `rules` — map of path → comparison settings. Only listed paths (and their
@@ -114,6 +116,10 @@ inherited settings. `{}` selects a path with inherited platform defaults.
114
116
  `lineItems`, not `lineItems[]`.
115
117
  - `allowExtraFields: false` — on an object path (often `someArray[]`), reject
116
118
  object keys present in actual but absent from expected.
119
+ - `ignore: true` — remove that path and every descendant from both expected and
120
+ actual output. This is useful for volatile evidence, citations, and timestamps
121
+ under an otherwise selected parent. It cannot share a rule with other
122
+ settings. An ignore-only rules map means full output minus those paths.
117
123
 
118
124
  Path syntax: `lineItems` targets the array; `lineItems[]` targets each element;
119
125
  `lineItems[].unitPrice` targets a field inside every element. Nested unordered
@@ -308,10 +314,10 @@ _Generated from `EvalConfigYamlSchema` in `@eigenpal/types/src/eval/evaluator-co
308
314
 
309
315
  | Field | Type | Required | Default | Description |
310
316
  | --- | --- | --- | --- | --- |
311
- | `evaluators` | array<object> | no | `[]` | |
312
- | `passThreshold` | number | no | | |
317
+ | `evaluators` | array<object> | no | `[]` | Evaluator entries run after each experiment execution. |
318
+ | `passThreshold` | number | no | | Workflow-level pass threshold for the weighted mean score. When omitted, legacy evaluator thresholds are combined for compatibility, otherwise the platform default is 0.7. |
313
319
 
314
- ### Common entry fields (every evaluator type)
320
+ ### Evaluator entry envelope
315
321
 
316
322
  | Field | Type | Required | Default | Description |
317
323
  | --- | --- | --- | --- | --- |
@@ -319,11 +325,14 @@ _Generated from `EvalConfigYamlSchema` in `@eigenpal/types/src/eval/evaluator-co
319
325
  | `description` | string | no | | One-sentence explanation, in business language, of what this evaluator measures and why a stakeholder should care. Shown in the dashboard to non-technical reviewers (legal, ops, finance) who never see the YAML or judge prompt. Skip implementation detail (model names, thresholds, dot-paths); those live in `config`. |
320
326
  | `weight` | number | no | `1` | Relative importance in the weighted mean. The overall score is Σ(weightᵢ × scoreᵢ) / Σweight. Set to 0 to score-only without affecting overall. |
321
327
 
328
+ - `type` — required discriminator: `exact-diff`, `llm-judge`, `custom-script`.
329
+ - `config` — required object whose fields are defined by the selected evaluator type below.
330
+
322
331
  ### `exact-diff` — JSON deep-diff against expected output
323
332
 
324
333
  | Field | Type | Required | Default | Description |
325
334
  | --- | --- | --- | --- | --- |
326
- | `rules` | record<string, object> | no | | Per-path comparison rules. Keys select compared paths (`$` = full output). More-specific keys inherit then override parent rules. `{}` selects a path using inherited platform defaults. Do not mix with legacy `paths`, `unorderedPaths`, `numericTolerance`, or `allowExtraFields`. |
335
+ | `rules` | record<string, object> | no | | Per-path comparison rules. Non-ignored keys select compared paths (`$` = full output); an ignore-only map means full output minus those paths. More-specific keys inherit then override parent rules. `{}` selects a path using inherited platform defaults; `{ ignore: true }` excludes it. Do not mix with legacy `paths`, `unorderedPaths`, `numericTolerance`, or `allowExtraFields`. |
327
336
  | `numericTolerance` | number | no | | Legacy global numeric tolerance (absolute). When omitted, comparison uses historical relative epsilon. Prefer `rules.<path>.numericTolerance`. Accepted only when `rules` is omitted. |
328
337
  | `allowExtraFields` | boolean | no | | Legacy global extra-field/extra-item flag. Prefer `rules.<path>.allowExtraFields` and `rules.<path>.items`. `true` normalizes to object extras allowed and array `items: at-least`; `false` normalizes to object extras rejected and array `items: exactly`. Accepted only when `rules` is omitted. |
329
338
  | `passThreshold` | number | no | | Legacy per-evaluator pass threshold. Pass/fail now uses the single workflow-level pass threshold; this is read only to preserve the run gate of configs authored before the single-threshold model. |
@@ -334,6 +343,7 @@ _Generated from `EvalConfigYamlSchema` in `@eigenpal/types/src/eval/evaluator-co
334
343
 
335
344
  | Field | Type | Required | Default | Description |
336
345
  | --- | --- | --- | --- | --- |
346
+ | `ignore` | `true` | no | | Exclude this path and every descendant from comparison. Cannot be combined with other settings on the same rule. |
337
347
  | `order` | `"ordered"` \| `"unordered"` | no | | Array matching mode at this path. Independent of `items`. Set on the array path (`lineItems`), not the item path (`lineItems[]`). `unordered` matches distinct items in any order. Arrays stay ordered when omitted. Unordered matching is limited to 1000 items, 1000000 candidate pairs, and 2000000 recursive operations per comparison. |
338
348
  | `items` | `"at-least"` \| `"at-most"` \| `"exactly"` | no | | How expected and actual array items relate. Set on the array path (`lineItems`), not the item path (`lineItems[]`). Independent of `order`. Ordered arrays use positional prefix matching: `at-least` (default) requires expected to match actual from index 0 and allows trailing actual extras; `at-most` requires actual to match expected from index 0 and allows trailing expected extras; `exactly` is equal-cardinality positional comparison. Unordered arrays match distinct items in any order: `at-least` requires every expected item and allows extra actual items (including extras with missing or duplicate identities); `at-most` requires every actual item and allows missing expected items (every actual item being checked needs a valid unique identity); `exactly` is a bijection (both sides need valid unique identities). |
339
349
  | `matchBy` | string \| array<string> | no | | Identity fields for unordered arrays of objects. Requires `order: unordered` on the same rule. Set on the array path (`lineItems`), not the item path (`lineItems[]`). A relative path (`sku`) or unique paths (`[country, sku]`) inside each item. Pairs expected and actual objects by exact identity, then diffs the paired objects with inherited nested rules. Identity type and value must both match: numeric `10` differs from string `'10'`; no coercion or numeric tolerance. Omitted = structural matching. Applies only at the array path where it is set and is not inherited by descendants. Nested object fields are allowed; array indexes, commas, and wildcards are not. Empty or comma-only values are rejected; composite paths must be unique. |
@@ -346,6 +356,7 @@ _Generated from `EvalConfigYamlSchema` in `@eigenpal/types/src/eval/evaluator-co
346
356
  | Field | Type | Required | Default | Description |
347
357
  | --- | --- | --- | --- | --- |
348
358
  | `model` | string | no | | Which LLM grades the output. Falls back to the workspace's default LLM provider when unset. |
359
+ | `reasoningEffort` | `"none"` \| `"minimal"` \| `"low"` \| `"medium"` \| `"high"` \| `"xhigh"` \| `"max"` | no | | Reasoning effort for models that support it. Omit to preserve the current provider default. |
349
360
  | `mode` | `"continuous"` \| `"discrete"` | no | `"continuous"` | Continuous = the LLM returns a free-form score in [0, 1]. Discrete = the LLM picks one of your labels and the score is looked up from the table. |
350
361
  | `labels` | record<string, number> | no | | Allowed labels and the score each maps to. Required in discrete mode. The judge MUST return one of these labels; each score must be in [0, 1]. |
351
362
  | `passThreshold` | number | no | | Legacy per-evaluator pass threshold. Pass/fail now uses the single workflow-level pass threshold; this is read only to preserve the run gate of configs authored before the single-threshold model. |
@@ -361,4 +372,351 @@ _Generated from `EvalConfigYamlSchema` in `@eigenpal/types/src/eval/evaluator-co
361
372
  | `timeoutMs` | integer | no | `5000` | Maximum wall-clock time the script can run before it is killed and the run is marked failed. |
362
373
  | `memoryLimitMb` | integer | no | `10` | Maximum memory the sandbox may allocate. Increase if the script processes large arrays or strings. |
363
374
  | `passThreshold` | number | no | | Legacy per-evaluator pass threshold. Pass/fail now uses the single workflow-level pass threshold; this is read only to preserve the run gate of configs authored before the single-threshold model. |
375
+
376
+
377
+ ### Complete machine-readable `evaluators.yaml` schema
378
+
379
+ Generated from the same discriminated union used by evaluator validation; YAML keys and nesting are identical.
380
+
381
+ ```json
382
+ {
383
+ "$schema": "http://json-schema.org/draft-07/schema#",
384
+ "type": "object",
385
+ "properties": {
386
+ "evaluators": {
387
+ "default": [],
388
+ "description": "Evaluator entries run after each experiment execution.",
389
+ "type": "array",
390
+ "items": {
391
+ "oneOf": [
392
+ {
393
+ "type": "object",
394
+ "properties": {
395
+ "name": {
396
+ "type": "string",
397
+ "minLength": 1,
398
+ "maxLength": 64,
399
+ "pattern": "^[a-z0-9-]+$",
400
+ "description": "Identifier used in eval results and the weighted-mean formula. Use a short kebab-case slug like header-exact or covenants-recall."
401
+ },
402
+ "description": {
403
+ "description": "One-sentence explanation, in business language, of what this evaluator measures and why a stakeholder should care. Shown in the dashboard to non-technical reviewers (legal, ops, finance) who never see the YAML or judge prompt. Skip implementation detail (model names, thresholds, dot-paths); those live in `config`.",
404
+ "type": "string",
405
+ "maxLength": 500
406
+ },
407
+ "weight": {
408
+ "default": 1,
409
+ "description": "Relative importance in the weighted mean. The overall score is Σ(weightᵢ × scoreᵢ) / Σweight. Set to 0 to score-only without affecting overall.",
410
+ "type": "number",
411
+ "minimum": 0
412
+ },
413
+ "type": {
414
+ "type": "string",
415
+ "const": "exact-diff",
416
+ "description": "Deterministic structured-output comparison."
417
+ },
418
+ "config": {
419
+ "default": {},
420
+ "description": "Configuration for exact-diff.",
421
+ "type": "object",
422
+ "properties": {
423
+ "rules": {
424
+ "description": "Per-path comparison rules. Non-ignored keys select compared paths (`$` = full output); an ignore-only map means full output minus those paths. More-specific keys inherit then override parent rules. `{}` selects a path using inherited platform defaults; `{ ignore: true }` excludes it. Do not mix with legacy `paths`, `unorderedPaths`, `numericTolerance`, or `allowExtraFields`.",
425
+ "type": "object",
426
+ "propertyNames": {
427
+ "type": "string"
428
+ },
429
+ "additionalProperties": {
430
+ "type": "object",
431
+ "properties": {
432
+ "ignore": {
433
+ "description": "Exclude this path and every descendant from comparison. Cannot be combined with other settings on the same rule.",
434
+ "type": "boolean",
435
+ "const": true
436
+ },
437
+ "order": {
438
+ "description": "Array matching mode at this path. Independent of `items`. Set on the array path (`lineItems`), not the item path (`lineItems[]`). `unordered` matches distinct items in any order. Arrays stay ordered when omitted. Unordered matching is limited to 1000 items, 1000000 candidate pairs, and 2000000 recursive operations per comparison.",
439
+ "type": "string",
440
+ "enum": [
441
+ "ordered",
442
+ "unordered"
443
+ ]
444
+ },
445
+ "items": {
446
+ "description": "How expected and actual array items relate. Set on the array path (`lineItems`), not the item path (`lineItems[]`). Independent of `order`. Ordered arrays use positional prefix matching: `at-least` (default) requires expected to match actual from index 0 and allows trailing actual extras; `at-most` requires actual to match expected from index 0 and allows trailing expected extras; `exactly` is equal-cardinality positional comparison. Unordered arrays match distinct items in any order: `at-least` requires every expected item and allows extra actual items (including extras with missing or duplicate identities); `at-most` requires every actual item and allows missing expected items (every actual item being checked needs a valid unique identity); `exactly` is a bijection (both sides need valid unique identities).",
447
+ "type": "string",
448
+ "enum": [
449
+ "at-least",
450
+ "at-most",
451
+ "exactly"
452
+ ]
453
+ },
454
+ "matchBy": {
455
+ "description": "Identity fields for unordered arrays of objects. Requires `order: unordered` on the same rule. Set on the array path (`lineItems`), not the item path (`lineItems[]`). A relative path (`sku`) or unique paths (`[country, sku]`) inside each item. Pairs expected and actual objects by exact identity, then diffs the paired objects with inherited nested rules. Identity type and value must both match: numeric `10` differs from string `'10'`; no coercion or numeric tolerance. Omitted = structural matching. Applies only at the array path where it is set and is not inherited by descendants. Nested object fields are allowed; array indexes, commas, and wildcards are not. Empty or comma-only values are rejected; composite paths must be unique.",
456
+ "anyOf": [
457
+ {
458
+ "type": "string",
459
+ "minLength": 1,
460
+ "pattern": "^[^.[\\]\\s$,]+(?:\\.[^.[\\]\\s$,]+)*$"
461
+ },
462
+ {
463
+ "minItems": 1,
464
+ "type": "array",
465
+ "items": {
466
+ "type": "string",
467
+ "minLength": 1,
468
+ "pattern": "^[^.[\\]\\s$,]+(?:\\.[^.[\\]\\s$,]+)*$"
469
+ }
470
+ }
471
+ ]
472
+ },
473
+ "allowExtraFields": {
474
+ "description": "When false, extra actual keys at this object fail the diff. When omitted, extra keys are allowed. Applies only to objects.",
475
+ "type": "boolean"
476
+ },
477
+ "numericTolerance": {
478
+ "description": "Maximum absolute difference for numeric leaves at or under this path. Omitted = inherit, then historical relative epsilon. Explicit `0` is exact.",
479
+ "type": "number",
480
+ "minimum": 0
481
+ }
482
+ },
483
+ "additionalProperties": false
484
+ }
485
+ },
486
+ "numericTolerance": {
487
+ "description": "Legacy global numeric tolerance (absolute). When omitted, comparison uses historical relative epsilon. Prefer `rules.<path>.numericTolerance`. Accepted only when `rules` is omitted.",
488
+ "type": "number",
489
+ "minimum": 0
490
+ },
491
+ "allowExtraFields": {
492
+ "description": "Legacy global extra-field/extra-item flag. Prefer `rules.<path>.allowExtraFields` and `rules.<path>.items`. `true` normalizes to object extras allowed and array `items: at-least`; `false` normalizes to object extras rejected and array `items: exactly`. Accepted only when `rules` is omitted.",
493
+ "type": "boolean"
494
+ },
495
+ "passThreshold": {
496
+ "description": "Legacy per-evaluator pass threshold. Pass/fail now uses the single workflow-level pass threshold; this is read only to preserve the run gate of configs authored before the single-threshold model.",
497
+ "type": "number",
498
+ "minimum": 0,
499
+ "maximum": 1
500
+ },
501
+ "paths": {
502
+ "description": "Legacy scoped paths. Prefer selecting those paths as `rules` keys. Syntax: `header.id`, `lineItems[].total`, `lineItems[0].sku`.",
503
+ "type": "array",
504
+ "items": {
505
+ "type": "string",
506
+ "minLength": 1
507
+ }
508
+ },
509
+ "unorderedPaths": {
510
+ "description": "Legacy unordered array paths. Prefer `rules.<path>.order: unordered`. Name the array field itself (`subjects`, not `subjects[]`).",
511
+ "type": "array",
512
+ "items": {
513
+ "type": "string",
514
+ "minLength": 1,
515
+ "pattern": "^[^.[\\]\\s]+(?:(?:\\[\\])?\\.[^.[\\]\\s]+)*$"
516
+ }
517
+ }
518
+ },
519
+ "additionalProperties": false
520
+ }
521
+ },
522
+ "required": [
523
+ "name",
524
+ "weight",
525
+ "type",
526
+ "config"
527
+ ],
528
+ "additionalProperties": false
529
+ },
530
+ {
531
+ "type": "object",
532
+ "properties": {
533
+ "name": {
534
+ "type": "string",
535
+ "minLength": 1,
536
+ "maxLength": 64,
537
+ "pattern": "^[a-z0-9-]+$",
538
+ "description": "Identifier used in eval results and the weighted-mean formula. Use a short kebab-case slug like header-exact or covenants-recall."
539
+ },
540
+ "description": {
541
+ "description": "One-sentence explanation, in business language, of what this evaluator measures and why a stakeholder should care. Shown in the dashboard to non-technical reviewers (legal, ops, finance) who never see the YAML or judge prompt. Skip implementation detail (model names, thresholds, dot-paths); those live in `config`.",
542
+ "type": "string",
543
+ "maxLength": 500
544
+ },
545
+ "weight": {
546
+ "default": 1,
547
+ "description": "Relative importance in the weighted mean. The overall score is Σ(weightᵢ × scoreᵢ) / Σweight. Set to 0 to score-only without affecting overall.",
548
+ "type": "number",
549
+ "minimum": 0
550
+ },
551
+ "type": {
552
+ "type": "string",
553
+ "const": "llm-judge",
554
+ "description": "Model-graded semantic comparison."
555
+ },
556
+ "config": {
557
+ "type": "object",
558
+ "properties": {
559
+ "model": {
560
+ "description": "Which LLM grades the output. Falls back to the workspace's default LLM provider when unset.",
561
+ "type": "string",
562
+ "minLength": 1
563
+ },
564
+ "reasoningEffort": {
565
+ "description": "Reasoning effort for models that support it. Omit to preserve the current provider default.",
566
+ "type": "string",
567
+ "enum": [
568
+ "none",
569
+ "minimal",
570
+ "low",
571
+ "medium",
572
+ "high",
573
+ "xhigh",
574
+ "max"
575
+ ]
576
+ },
577
+ "mode": {
578
+ "default": "continuous",
579
+ "description": "Continuous = the LLM returns a free-form score in [0, 1]. Discrete = the LLM picks one of your labels and the score is looked up from the table.",
580
+ "type": "string",
581
+ "enum": [
582
+ "continuous",
583
+ "discrete"
584
+ ]
585
+ },
586
+ "labels": {
587
+ "description": "Allowed labels and the score each maps to. Required in discrete mode. The judge MUST return one of these labels; each score must be in [0, 1].",
588
+ "type": "object",
589
+ "propertyNames": {
590
+ "type": "string",
591
+ "minLength": 1
592
+ },
593
+ "additionalProperties": {
594
+ "type": "number",
595
+ "minimum": 0,
596
+ "maximum": 1
597
+ }
598
+ },
599
+ "passThreshold": {
600
+ "description": "Legacy per-evaluator pass threshold. Pass/fail now uses the single workflow-level pass threshold; this is read only to preserve the run gate of configs authored before the single-threshold model.",
601
+ "type": "number",
602
+ "minimum": 0,
603
+ "maximum": 1
604
+ },
605
+ "promptExtension": {
606
+ "type": "string",
607
+ "minLength": 10,
608
+ "description": "Required. Evaluation criteria appended to the judge prompt — describe what makes a good answer for this workflow (tone, completeness, edge cases). Cannot be empty: an empty prompt yields the model inventing its own criteria."
609
+ },
610
+ "docLabel": {
611
+ "default": "output",
612
+ "description": "Name the judge uses to refer to the output in its prompt (e.g. 'invoice', 'extraction'). Default is 'output'.",
613
+ "type": "string"
614
+ }
615
+ },
616
+ "required": [
617
+ "mode",
618
+ "promptExtension",
619
+ "docLabel"
620
+ ],
621
+ "additionalProperties": false,
622
+ "description": "Configuration for llm-judge."
623
+ }
624
+ },
625
+ "required": [
626
+ "name",
627
+ "weight",
628
+ "type",
629
+ "config"
630
+ ],
631
+ "additionalProperties": false
632
+ },
633
+ {
634
+ "type": "object",
635
+ "properties": {
636
+ "name": {
637
+ "type": "string",
638
+ "minLength": 1,
639
+ "maxLength": 64,
640
+ "pattern": "^[a-z0-9-]+$",
641
+ "description": "Identifier used in eval results and the weighted-mean formula. Use a short kebab-case slug like header-exact or covenants-recall."
642
+ },
643
+ "description": {
644
+ "description": "One-sentence explanation, in business language, of what this evaluator measures and why a stakeholder should care. Shown in the dashboard to non-technical reviewers (legal, ops, finance) who never see the YAML or judge prompt. Skip implementation detail (model names, thresholds, dot-paths); those live in `config`.",
645
+ "type": "string",
646
+ "maxLength": 500
647
+ },
648
+ "weight": {
649
+ "default": 1,
650
+ "description": "Relative importance in the weighted mean. The overall score is Σ(weightᵢ × scoreᵢ) / Σweight. Set to 0 to score-only without affecting overall.",
651
+ "type": "number",
652
+ "minimum": 0
653
+ },
654
+ "type": {
655
+ "type": "string",
656
+ "const": "custom-script",
657
+ "description": "Typed deterministic scoring script."
658
+ },
659
+ "config": {
660
+ "type": "object",
661
+ "properties": {
662
+ "function": {
663
+ "type": "string",
664
+ "minLength": 1,
665
+ "maxLength": 10000,
666
+ "description": "Full TypeScript source for optional `type` aliases plus `function scoreScript(expected, actual): number { ... }`. Receives `expected` (the example's expected-output envelope (`{ data: ... }`)) and `actual` (the workflow result envelope (`{ data: ..., files?: ... }`)), returns a number in [0, 1] (the `: number` annotation is required). The `: number` return-type annotation is required and enforced at parse time. Throws are caught and scored as 0."
667
+ },
668
+ "timeoutMs": {
669
+ "default": 5000,
670
+ "description": "Maximum wall-clock time the script can run before it is killed and the run is marked failed.",
671
+ "type": "integer",
672
+ "exclusiveMinimum": 0,
673
+ "maximum": 30000
674
+ },
675
+ "memoryLimitMb": {
676
+ "default": 10,
677
+ "description": "Maximum memory the sandbox may allocate. Increase if the script processes large arrays or strings.",
678
+ "type": "integer",
679
+ "exclusiveMinimum": 0,
680
+ "maximum": 50
681
+ },
682
+ "passThreshold": {
683
+ "description": "Legacy per-evaluator pass threshold. Pass/fail now uses the single workflow-level pass threshold; this is read only to preserve the run gate of configs authored before the single-threshold model.",
684
+ "type": "number",
685
+ "minimum": 0,
686
+ "maximum": 1
687
+ }
688
+ },
689
+ "required": [
690
+ "function",
691
+ "timeoutMs",
692
+ "memoryLimitMb"
693
+ ],
694
+ "additionalProperties": false,
695
+ "description": "Configuration for custom-script."
696
+ }
697
+ },
698
+ "required": [
699
+ "name",
700
+ "weight",
701
+ "type",
702
+ "config"
703
+ ],
704
+ "additionalProperties": false
705
+ }
706
+ ]
707
+ }
708
+ },
709
+ "passThreshold": {
710
+ "description": "Workflow-level pass threshold for the weighted mean score. When omitted, legacy evaluator thresholds are combined for compatibility, otherwise the platform default is 0.7.",
711
+ "type": "number",
712
+ "minimum": 0,
713
+ "maximum": 1
714
+ }
715
+ },
716
+ "required": [
717
+ "evaluators"
718
+ ],
719
+ "additionalProperties": false
720
+ }
721
+ ```
364
722
  <!-- GENERATED:EVALUATOR_CATALOG END -->