@proposit/proposit-core 5.1.0 → 5.2.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/builder-repl.js +1 -1
- package/dist/cli/builder-repl.js.map +1 -1
- package/dist/extensions/openai/openai-retrieval.d.ts.map +1 -1
- package/dist/extensions/openai/openai-retrieval.js +4 -2
- package/dist/extensions/openai/openai-retrieval.js.map +1 -1
- package/dist/extensions/openai/openai-tools.d.ts +8 -1
- package/dist/extensions/openai/openai-tools.d.ts.map +1 -1
- package/dist/extensions/openai/openai-tools.js +10 -0
- package/dist/extensions/openai/openai-tools.js.map +1 -1
- package/dist/extensions/openai/provider.d.ts.map +1 -1
- package/dist/extensions/openai/provider.js +5 -3
- package/dist/extensions/openai/provider.js.map +1 -1
- package/dist/extensions/openai/types.d.ts +2 -1
- package/dist/extensions/openai/types.d.ts.map +1 -1
- package/dist/extensions/openai/types.js.map +1 -1
- package/dist/extensions/pipelines/base/finalize-response-v2.d.ts +9 -6
- package/dist/extensions/pipelines/base/finalize-response-v2.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/finalize-response-v2.js +101 -20
- package/dist/extensions/pipelines/base/finalize-response-v2.js.map +1 -1
- package/dist/extensions/pipelines/base/index.d.ts +1 -1
- package/dist/extensions/pipelines/base/index.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/index.js.map +1 -1
- package/dist/extensions/pipelines/base/source-anchors.d.ts +33 -2
- package/dist/extensions/pipelines/base/source-anchors.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/source-anchors.js +191 -13
- package/dist/extensions/pipelines/base/source-anchors.js.map +1 -1
- package/dist/extensions/pipelines/base/stages/axiom-indicator-detection.d.ts +1 -1
- package/dist/extensions/pipelines/base/stages/axiom-indicator-detection.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/stages/axiom-indicator-detection.js +1 -1
- package/dist/extensions/pipelines/base/stages/axiom-indicator-detection.js.map +1 -1
- package/dist/extensions/pipelines/base/stages/citation-source-detection.d.ts +1 -1
- package/dist/extensions/pipelines/base/stages/citation-source-detection.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/stages/citation-source-detection.js +1 -1
- package/dist/extensions/pipelines/base/stages/citation-source-detection.js.map +1 -1
- package/dist/extensions/pipelines/base/stages/claim-canonicalization.d.ts +3 -2
- package/dist/extensions/pipelines/base/stages/claim-canonicalization.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/stages/claim-canonicalization.js +2 -2
- package/dist/extensions/pipelines/base/stages/claim-canonicalization.js.map +1 -1
- package/dist/extensions/pipelines/base/stages/claim-mention-extraction.d.ts +1 -1
- package/dist/extensions/pipelines/base/stages/claim-mention-extraction.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/stages/claim-mention-extraction.js +1 -1
- package/dist/extensions/pipelines/base/stages/claim-mention-extraction.js.map +1 -1
- package/dist/extensions/pipelines/base/stages/claim-type-classification.d.ts +1 -1
- package/dist/extensions/pipelines/base/stages/claim-type-classification.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/stages/claim-type-classification.js +1 -1
- package/dist/extensions/pipelines/base/stages/claim-type-classification.js.map +1 -1
- package/dist/extensions/pipelines/base/stages/conclusion-selection.d.ts +26 -3
- package/dist/extensions/pipelines/base/stages/conclusion-selection.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/stages/conclusion-selection.js +40 -2
- package/dist/extensions/pipelines/base/stages/conclusion-selection.js.map +1 -1
- package/dist/extensions/pipelines/base/stages/index.d.ts +1 -1
- package/dist/extensions/pipelines/base/stages/index.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/stages/index.js +1 -1
- package/dist/extensions/pipelines/base/stages/index.js.map +1 -1
- package/dist/extensions/pipelines/base/stages/relation-extraction.d.ts +4 -3
- package/dist/extensions/pipelines/base/stages/relation-extraction.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/stages/relation-extraction.js +6 -4
- package/dist/extensions/pipelines/base/stages/relation-extraction.js.map +1 -1
- package/dist/extensions/pipelines/base/stages/segmentation.d.ts +1 -1
- package/dist/extensions/pipelines/base/stages/segmentation.d.ts.map +1 -1
- package/dist/extensions/pipelines/base/stages/segmentation.js +1 -1
- package/dist/extensions/pipelines/base/stages/segmentation.js.map +1 -1
- package/dist/extensions/pipelines/base/types.d.ts +1 -1
- package/dist/extensions/pipelines/ingestion/scribe/extract-stage.d.ts +61 -10
- package/dist/extensions/pipelines/ingestion/scribe/extract-stage.d.ts.map +1 -1
- package/dist/extensions/pipelines/ingestion/scribe/extract-stage.js +203 -14
- package/dist/extensions/pipelines/ingestion/scribe/extract-stage.js.map +1 -1
- package/dist/extensions/pipelines/ingestion/scribe/schemas.d.ts +15 -2
- package/dist/extensions/pipelines/ingestion/scribe/schemas.d.ts.map +1 -1
- package/dist/extensions/pipelines/ingestion/scribe/schemas.js +14 -2
- package/dist/extensions/pipelines/ingestion/scribe/schemas.js.map +1 -1
- package/dist/extensions/pipelines/ingestion/scribe/scribe.js +2 -2
- package/dist/extensions/pipelines/ingestion/scribe/scribe.js.map +1 -1
- package/dist/extensions/pipelines/ingestion/scribe/source-attachment.d.ts +29 -0
- package/dist/extensions/pipelines/ingestion/scribe/source-attachment.d.ts.map +1 -0
- package/dist/extensions/pipelines/ingestion/scribe/source-attachment.js +200 -0
- package/dist/extensions/pipelines/ingestion/scribe/source-attachment.js.map +1 -0
- package/dist/extensions/pipelines/ingestion/scribe/structure-stage.d.ts +5 -3
- package/dist/extensions/pipelines/ingestion/scribe/structure-stage.d.ts.map +1 -1
- package/dist/extensions/pipelines/ingestion/scribe/structure-stage.js +42 -14
- package/dist/extensions/pipelines/ingestion/scribe/structure-stage.js.map +1 -1
- package/dist/lib/core/parser/formula-gen.js +309 -46
- package/dist/lib/llm/types.d.ts +8 -2
- package/dist/lib/llm/types.d.ts.map +1 -1
- package/dist/lib/llm/types.js.map +1 -1
- package/dist/lib/pipelines/debug-log.js +1 -1
- package/dist/lib/pipelines/debug-log.js.map +1 -1
- package/dist/lib/pipelines/index.d.ts +1 -1
- package/dist/lib/pipelines/index.d.ts.map +1 -1
- package/dist/lib/pipelines/index.js.map +1 -1
- package/dist/lib/pipelines/llm-stage-helpers.d.ts +22 -1
- package/dist/lib/pipelines/llm-stage-helpers.d.ts.map +1 -1
- package/dist/lib/pipelines/llm-stage-helpers.js +21 -9
- package/dist/lib/pipelines/llm-stage-helpers.js.map +1 -1
- package/dist/lib/pipelines/single-stage.d.ts +9 -1
- package/dist/lib/pipelines/single-stage.d.ts.map +1 -1
- package/dist/lib/pipelines/single-stage.js +14 -3
- package/dist/lib/pipelines/single-stage.js.map +1 -1
- package/dist/lib/pipelines/stage-helpers.d.ts +1 -1
- package/dist/lib/pipelines/stage-helpers.d.ts.map +1 -1
- package/dist/lib/pipelines/stage-helpers.js.map +1 -1
- package/package.json +1 -1
|
@@ -434,7 +434,7 @@ function peg$parse(input, options) {
|
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
function peg$parseImplication() {
|
|
437
|
-
let s0, s1, s2, s3, s4, s5;
|
|
437
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
438
438
|
|
|
439
439
|
s0 = peg$currPos;
|
|
440
440
|
s1 = peg$parseExclusiveDisjunction();
|
|
@@ -472,21 +472,79 @@ function peg$parse(input, options) {
|
|
|
472
472
|
if (peg$silentFails === 0) { peg$fail(peg$e3); }
|
|
473
473
|
}
|
|
474
474
|
if (s3 === peg$FAILED) {
|
|
475
|
-
s3 =
|
|
476
|
-
|
|
475
|
+
s3 = peg$currPos;
|
|
476
|
+
s4 = peg$currPos;
|
|
477
|
+
s5 = input.substr(peg$currPos, 7);
|
|
478
|
+
if (s5.toLowerCase() === peg$c4) {
|
|
477
479
|
peg$currPos += (7);
|
|
478
480
|
} else {
|
|
479
|
-
|
|
481
|
+
s5 = peg$FAILED;
|
|
480
482
|
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
481
483
|
}
|
|
484
|
+
if (s5 !== peg$FAILED) {
|
|
485
|
+
s6 = peg$currPos;
|
|
486
|
+
peg$silentFails++;
|
|
487
|
+
s7 = peg$parseIdentifierPart();
|
|
488
|
+
peg$silentFails--;
|
|
489
|
+
if (s7 === peg$FAILED) {
|
|
490
|
+
s6 = undefined;
|
|
491
|
+
} else {
|
|
492
|
+
peg$currPos = s6;
|
|
493
|
+
s6 = peg$FAILED;
|
|
494
|
+
}
|
|
495
|
+
if (s6 !== peg$FAILED) {
|
|
496
|
+
s5 = [s5, s6];
|
|
497
|
+
s4 = s5;
|
|
498
|
+
} else {
|
|
499
|
+
peg$currPos = s4;
|
|
500
|
+
s4 = peg$FAILED;
|
|
501
|
+
}
|
|
502
|
+
} else {
|
|
503
|
+
peg$currPos = s4;
|
|
504
|
+
s4 = peg$FAILED;
|
|
505
|
+
}
|
|
506
|
+
if (s4 !== peg$FAILED) {
|
|
507
|
+
s3 = input.substring(s3, peg$currPos);
|
|
508
|
+
} else {
|
|
509
|
+
s3 = s4;
|
|
510
|
+
}
|
|
482
511
|
if (s3 === peg$FAILED) {
|
|
483
|
-
s3 =
|
|
484
|
-
|
|
512
|
+
s3 = peg$currPos;
|
|
513
|
+
s4 = peg$currPos;
|
|
514
|
+
s5 = input.substr(peg$currPos, 3);
|
|
515
|
+
if (s5.toLowerCase() === peg$c5) {
|
|
485
516
|
peg$currPos += (3);
|
|
486
517
|
} else {
|
|
487
|
-
|
|
518
|
+
s5 = peg$FAILED;
|
|
488
519
|
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
489
520
|
}
|
|
521
|
+
if (s5 !== peg$FAILED) {
|
|
522
|
+
s6 = peg$currPos;
|
|
523
|
+
peg$silentFails++;
|
|
524
|
+
s7 = peg$parseIdentifierPart();
|
|
525
|
+
peg$silentFails--;
|
|
526
|
+
if (s7 === peg$FAILED) {
|
|
527
|
+
s6 = undefined;
|
|
528
|
+
} else {
|
|
529
|
+
peg$currPos = s6;
|
|
530
|
+
s6 = peg$FAILED;
|
|
531
|
+
}
|
|
532
|
+
if (s6 !== peg$FAILED) {
|
|
533
|
+
s5 = [s5, s6];
|
|
534
|
+
s4 = s5;
|
|
535
|
+
} else {
|
|
536
|
+
peg$currPos = s4;
|
|
537
|
+
s4 = peg$FAILED;
|
|
538
|
+
}
|
|
539
|
+
} else {
|
|
540
|
+
peg$currPos = s4;
|
|
541
|
+
s4 = peg$FAILED;
|
|
542
|
+
}
|
|
543
|
+
if (s4 !== peg$FAILED) {
|
|
544
|
+
s3 = input.substring(s3, peg$currPos);
|
|
545
|
+
} else {
|
|
546
|
+
s3 = s4;
|
|
547
|
+
}
|
|
490
548
|
}
|
|
491
549
|
}
|
|
492
550
|
}
|
|
@@ -518,7 +576,7 @@ function peg$parse(input, options) {
|
|
|
518
576
|
}
|
|
519
577
|
|
|
520
578
|
function peg$parseExclusiveDisjunction() {
|
|
521
|
-
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
579
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
|
|
522
580
|
|
|
523
581
|
s0 = peg$currPos;
|
|
524
582
|
s1 = peg$parseDisjunction();
|
|
@@ -534,13 +592,42 @@ function peg$parse(input, options) {
|
|
|
534
592
|
if (peg$silentFails === 0) { peg$fail(peg$e6); }
|
|
535
593
|
}
|
|
536
594
|
if (s5 === peg$FAILED) {
|
|
537
|
-
s5 =
|
|
538
|
-
|
|
595
|
+
s5 = peg$currPos;
|
|
596
|
+
s6 = peg$currPos;
|
|
597
|
+
s7 = input.substr(peg$currPos, 3);
|
|
598
|
+
if (s7.toLowerCase() === peg$c6) {
|
|
539
599
|
peg$currPos += (3);
|
|
540
600
|
} else {
|
|
541
|
-
|
|
601
|
+
s7 = peg$FAILED;
|
|
542
602
|
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
543
603
|
}
|
|
604
|
+
if (s7 !== peg$FAILED) {
|
|
605
|
+
s8 = peg$currPos;
|
|
606
|
+
peg$silentFails++;
|
|
607
|
+
s9 = peg$parseIdentifierPart();
|
|
608
|
+
peg$silentFails--;
|
|
609
|
+
if (s9 === peg$FAILED) {
|
|
610
|
+
s8 = undefined;
|
|
611
|
+
} else {
|
|
612
|
+
peg$currPos = s8;
|
|
613
|
+
s8 = peg$FAILED;
|
|
614
|
+
}
|
|
615
|
+
if (s8 !== peg$FAILED) {
|
|
616
|
+
s7 = [s7, s8];
|
|
617
|
+
s6 = s7;
|
|
618
|
+
} else {
|
|
619
|
+
peg$currPos = s6;
|
|
620
|
+
s6 = peg$FAILED;
|
|
621
|
+
}
|
|
622
|
+
} else {
|
|
623
|
+
peg$currPos = s6;
|
|
624
|
+
s6 = peg$FAILED;
|
|
625
|
+
}
|
|
626
|
+
if (s6 !== peg$FAILED) {
|
|
627
|
+
s5 = input.substring(s5, peg$currPos);
|
|
628
|
+
} else {
|
|
629
|
+
s5 = s6;
|
|
630
|
+
}
|
|
544
631
|
}
|
|
545
632
|
if (s5 !== peg$FAILED) {
|
|
546
633
|
s6 = peg$parse_();
|
|
@@ -568,13 +655,42 @@ function peg$parse(input, options) {
|
|
|
568
655
|
if (peg$silentFails === 0) { peg$fail(peg$e6); }
|
|
569
656
|
}
|
|
570
657
|
if (s5 === peg$FAILED) {
|
|
571
|
-
s5 =
|
|
572
|
-
|
|
658
|
+
s5 = peg$currPos;
|
|
659
|
+
s6 = peg$currPos;
|
|
660
|
+
s7 = input.substr(peg$currPos, 3);
|
|
661
|
+
if (s7.toLowerCase() === peg$c6) {
|
|
573
662
|
peg$currPos += (3);
|
|
574
663
|
} else {
|
|
575
|
-
|
|
664
|
+
s7 = peg$FAILED;
|
|
576
665
|
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
577
666
|
}
|
|
667
|
+
if (s7 !== peg$FAILED) {
|
|
668
|
+
s8 = peg$currPos;
|
|
669
|
+
peg$silentFails++;
|
|
670
|
+
s9 = peg$parseIdentifierPart();
|
|
671
|
+
peg$silentFails--;
|
|
672
|
+
if (s9 === peg$FAILED) {
|
|
673
|
+
s8 = undefined;
|
|
674
|
+
} else {
|
|
675
|
+
peg$currPos = s8;
|
|
676
|
+
s8 = peg$FAILED;
|
|
677
|
+
}
|
|
678
|
+
if (s8 !== peg$FAILED) {
|
|
679
|
+
s7 = [s7, s8];
|
|
680
|
+
s6 = s7;
|
|
681
|
+
} else {
|
|
682
|
+
peg$currPos = s6;
|
|
683
|
+
s6 = peg$FAILED;
|
|
684
|
+
}
|
|
685
|
+
} else {
|
|
686
|
+
peg$currPos = s6;
|
|
687
|
+
s6 = peg$FAILED;
|
|
688
|
+
}
|
|
689
|
+
if (s6 !== peg$FAILED) {
|
|
690
|
+
s5 = input.substring(s5, peg$currPos);
|
|
691
|
+
} else {
|
|
692
|
+
s5 = s6;
|
|
693
|
+
}
|
|
578
694
|
}
|
|
579
695
|
if (s5 !== peg$FAILED) {
|
|
580
696
|
s6 = peg$parse_();
|
|
@@ -602,7 +718,7 @@ function peg$parse(input, options) {
|
|
|
602
718
|
}
|
|
603
719
|
|
|
604
720
|
function peg$parseDisjunction() {
|
|
605
|
-
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
721
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
|
|
606
722
|
|
|
607
723
|
s0 = peg$currPos;
|
|
608
724
|
s1 = peg$parseConjunction();
|
|
@@ -626,13 +742,42 @@ function peg$parse(input, options) {
|
|
|
626
742
|
if (peg$silentFails === 0) { peg$fail(peg$e9); }
|
|
627
743
|
}
|
|
628
744
|
if (s5 === peg$FAILED) {
|
|
629
|
-
s5 =
|
|
630
|
-
|
|
745
|
+
s5 = peg$currPos;
|
|
746
|
+
s6 = peg$currPos;
|
|
747
|
+
s7 = input.substr(peg$currPos, 2);
|
|
748
|
+
if (s7.toLowerCase() === peg$c9) {
|
|
631
749
|
peg$currPos += (2);
|
|
632
750
|
} else {
|
|
633
|
-
|
|
751
|
+
s7 = peg$FAILED;
|
|
634
752
|
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
635
753
|
}
|
|
754
|
+
if (s7 !== peg$FAILED) {
|
|
755
|
+
s8 = peg$currPos;
|
|
756
|
+
peg$silentFails++;
|
|
757
|
+
s9 = peg$parseIdentifierPart();
|
|
758
|
+
peg$silentFails--;
|
|
759
|
+
if (s9 === peg$FAILED) {
|
|
760
|
+
s8 = undefined;
|
|
761
|
+
} else {
|
|
762
|
+
peg$currPos = s8;
|
|
763
|
+
s8 = peg$FAILED;
|
|
764
|
+
}
|
|
765
|
+
if (s8 !== peg$FAILED) {
|
|
766
|
+
s7 = [s7, s8];
|
|
767
|
+
s6 = s7;
|
|
768
|
+
} else {
|
|
769
|
+
peg$currPos = s6;
|
|
770
|
+
s6 = peg$FAILED;
|
|
771
|
+
}
|
|
772
|
+
} else {
|
|
773
|
+
peg$currPos = s6;
|
|
774
|
+
s6 = peg$FAILED;
|
|
775
|
+
}
|
|
776
|
+
if (s6 !== peg$FAILED) {
|
|
777
|
+
s5 = input.substring(s5, peg$currPos);
|
|
778
|
+
} else {
|
|
779
|
+
s5 = s6;
|
|
780
|
+
}
|
|
636
781
|
}
|
|
637
782
|
}
|
|
638
783
|
if (s5 !== peg$FAILED) {
|
|
@@ -669,13 +814,42 @@ function peg$parse(input, options) {
|
|
|
669
814
|
if (peg$silentFails === 0) { peg$fail(peg$e9); }
|
|
670
815
|
}
|
|
671
816
|
if (s5 === peg$FAILED) {
|
|
672
|
-
s5 =
|
|
673
|
-
|
|
817
|
+
s5 = peg$currPos;
|
|
818
|
+
s6 = peg$currPos;
|
|
819
|
+
s7 = input.substr(peg$currPos, 2);
|
|
820
|
+
if (s7.toLowerCase() === peg$c9) {
|
|
674
821
|
peg$currPos += (2);
|
|
675
822
|
} else {
|
|
676
|
-
|
|
823
|
+
s7 = peg$FAILED;
|
|
677
824
|
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
678
825
|
}
|
|
826
|
+
if (s7 !== peg$FAILED) {
|
|
827
|
+
s8 = peg$currPos;
|
|
828
|
+
peg$silentFails++;
|
|
829
|
+
s9 = peg$parseIdentifierPart();
|
|
830
|
+
peg$silentFails--;
|
|
831
|
+
if (s9 === peg$FAILED) {
|
|
832
|
+
s8 = undefined;
|
|
833
|
+
} else {
|
|
834
|
+
peg$currPos = s8;
|
|
835
|
+
s8 = peg$FAILED;
|
|
836
|
+
}
|
|
837
|
+
if (s8 !== peg$FAILED) {
|
|
838
|
+
s7 = [s7, s8];
|
|
839
|
+
s6 = s7;
|
|
840
|
+
} else {
|
|
841
|
+
peg$currPos = s6;
|
|
842
|
+
s6 = peg$FAILED;
|
|
843
|
+
}
|
|
844
|
+
} else {
|
|
845
|
+
peg$currPos = s6;
|
|
846
|
+
s6 = peg$FAILED;
|
|
847
|
+
}
|
|
848
|
+
if (s6 !== peg$FAILED) {
|
|
849
|
+
s5 = input.substring(s5, peg$currPos);
|
|
850
|
+
} else {
|
|
851
|
+
s5 = s6;
|
|
852
|
+
}
|
|
679
853
|
}
|
|
680
854
|
}
|
|
681
855
|
if (s5 !== peg$FAILED) {
|
|
@@ -704,7 +878,7 @@ function peg$parse(input, options) {
|
|
|
704
878
|
}
|
|
705
879
|
|
|
706
880
|
function peg$parseConjunction() {
|
|
707
|
-
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
881
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
|
|
708
882
|
|
|
709
883
|
s0 = peg$currPos;
|
|
710
884
|
s1 = peg$parseUnary();
|
|
@@ -728,13 +902,42 @@ function peg$parse(input, options) {
|
|
|
728
902
|
if (peg$silentFails === 0) { peg$fail(peg$e12); }
|
|
729
903
|
}
|
|
730
904
|
if (s5 === peg$FAILED) {
|
|
731
|
-
s5 =
|
|
732
|
-
|
|
905
|
+
s5 = peg$currPos;
|
|
906
|
+
s6 = peg$currPos;
|
|
907
|
+
s7 = input.substr(peg$currPos, 3);
|
|
908
|
+
if (s7.toLowerCase() === peg$c12) {
|
|
733
909
|
peg$currPos += (3);
|
|
734
910
|
} else {
|
|
735
|
-
|
|
911
|
+
s7 = peg$FAILED;
|
|
736
912
|
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
737
913
|
}
|
|
914
|
+
if (s7 !== peg$FAILED) {
|
|
915
|
+
s8 = peg$currPos;
|
|
916
|
+
peg$silentFails++;
|
|
917
|
+
s9 = peg$parseIdentifierPart();
|
|
918
|
+
peg$silentFails--;
|
|
919
|
+
if (s9 === peg$FAILED) {
|
|
920
|
+
s8 = undefined;
|
|
921
|
+
} else {
|
|
922
|
+
peg$currPos = s8;
|
|
923
|
+
s8 = peg$FAILED;
|
|
924
|
+
}
|
|
925
|
+
if (s8 !== peg$FAILED) {
|
|
926
|
+
s7 = [s7, s8];
|
|
927
|
+
s6 = s7;
|
|
928
|
+
} else {
|
|
929
|
+
peg$currPos = s6;
|
|
930
|
+
s6 = peg$FAILED;
|
|
931
|
+
}
|
|
932
|
+
} else {
|
|
933
|
+
peg$currPos = s6;
|
|
934
|
+
s6 = peg$FAILED;
|
|
935
|
+
}
|
|
936
|
+
if (s6 !== peg$FAILED) {
|
|
937
|
+
s5 = input.substring(s5, peg$currPos);
|
|
938
|
+
} else {
|
|
939
|
+
s5 = s6;
|
|
940
|
+
}
|
|
738
941
|
}
|
|
739
942
|
}
|
|
740
943
|
if (s5 !== peg$FAILED) {
|
|
@@ -771,13 +974,42 @@ function peg$parse(input, options) {
|
|
|
771
974
|
if (peg$silentFails === 0) { peg$fail(peg$e12); }
|
|
772
975
|
}
|
|
773
976
|
if (s5 === peg$FAILED) {
|
|
774
|
-
s5 =
|
|
775
|
-
|
|
977
|
+
s5 = peg$currPos;
|
|
978
|
+
s6 = peg$currPos;
|
|
979
|
+
s7 = input.substr(peg$currPos, 3);
|
|
980
|
+
if (s7.toLowerCase() === peg$c12) {
|
|
776
981
|
peg$currPos += (3);
|
|
777
982
|
} else {
|
|
778
|
-
|
|
983
|
+
s7 = peg$FAILED;
|
|
779
984
|
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
780
985
|
}
|
|
986
|
+
if (s7 !== peg$FAILED) {
|
|
987
|
+
s8 = peg$currPos;
|
|
988
|
+
peg$silentFails++;
|
|
989
|
+
s9 = peg$parseIdentifierPart();
|
|
990
|
+
peg$silentFails--;
|
|
991
|
+
if (s9 === peg$FAILED) {
|
|
992
|
+
s8 = undefined;
|
|
993
|
+
} else {
|
|
994
|
+
peg$currPos = s8;
|
|
995
|
+
s8 = peg$FAILED;
|
|
996
|
+
}
|
|
997
|
+
if (s8 !== peg$FAILED) {
|
|
998
|
+
s7 = [s7, s8];
|
|
999
|
+
s6 = s7;
|
|
1000
|
+
} else {
|
|
1001
|
+
peg$currPos = s6;
|
|
1002
|
+
s6 = peg$FAILED;
|
|
1003
|
+
}
|
|
1004
|
+
} else {
|
|
1005
|
+
peg$currPos = s6;
|
|
1006
|
+
s6 = peg$FAILED;
|
|
1007
|
+
}
|
|
1008
|
+
if (s6 !== peg$FAILED) {
|
|
1009
|
+
s5 = input.substring(s5, peg$currPos);
|
|
1010
|
+
} else {
|
|
1011
|
+
s5 = s6;
|
|
1012
|
+
}
|
|
781
1013
|
}
|
|
782
1014
|
}
|
|
783
1015
|
if (s5 !== peg$FAILED) {
|
|
@@ -806,7 +1038,7 @@ function peg$parse(input, options) {
|
|
|
806
1038
|
}
|
|
807
1039
|
|
|
808
1040
|
function peg$parseUnary() {
|
|
809
|
-
let s0, s1, s2, s3;
|
|
1041
|
+
let s0, s1, s2, s3, s4, s5;
|
|
810
1042
|
|
|
811
1043
|
s0 = peg$currPos;
|
|
812
1044
|
s1 = input.charAt(peg$currPos);
|
|
@@ -817,13 +1049,42 @@ function peg$parse(input, options) {
|
|
|
817
1049
|
if (peg$silentFails === 0) { peg$fail(peg$e14); }
|
|
818
1050
|
}
|
|
819
1051
|
if (s1 === peg$FAILED) {
|
|
820
|
-
s1 =
|
|
821
|
-
|
|
1052
|
+
s1 = peg$currPos;
|
|
1053
|
+
s2 = peg$currPos;
|
|
1054
|
+
s3 = input.substr(peg$currPos, 3);
|
|
1055
|
+
if (s3.toLowerCase() === peg$c13) {
|
|
822
1056
|
peg$currPos += (3);
|
|
823
1057
|
} else {
|
|
824
|
-
|
|
1058
|
+
s3 = peg$FAILED;
|
|
825
1059
|
if (peg$silentFails === 0) { peg$fail(peg$e15); }
|
|
826
1060
|
}
|
|
1061
|
+
if (s3 !== peg$FAILED) {
|
|
1062
|
+
s4 = peg$currPos;
|
|
1063
|
+
peg$silentFails++;
|
|
1064
|
+
s5 = peg$parseIdentifierPart();
|
|
1065
|
+
peg$silentFails--;
|
|
1066
|
+
if (s5 === peg$FAILED) {
|
|
1067
|
+
s4 = undefined;
|
|
1068
|
+
} else {
|
|
1069
|
+
peg$currPos = s4;
|
|
1070
|
+
s4 = peg$FAILED;
|
|
1071
|
+
}
|
|
1072
|
+
if (s4 !== peg$FAILED) {
|
|
1073
|
+
s3 = [s3, s4];
|
|
1074
|
+
s2 = s3;
|
|
1075
|
+
} else {
|
|
1076
|
+
peg$currPos = s2;
|
|
1077
|
+
s2 = peg$FAILED;
|
|
1078
|
+
}
|
|
1079
|
+
} else {
|
|
1080
|
+
peg$currPos = s2;
|
|
1081
|
+
s2 = peg$FAILED;
|
|
1082
|
+
}
|
|
1083
|
+
if (s2 !== peg$FAILED) {
|
|
1084
|
+
s1 = input.substring(s1, peg$currPos);
|
|
1085
|
+
} else {
|
|
1086
|
+
s1 = s2;
|
|
1087
|
+
}
|
|
827
1088
|
}
|
|
828
1089
|
if (s1 !== peg$FAILED) {
|
|
829
1090
|
s2 = peg$parse_();
|
|
@@ -911,22 +1172,10 @@ function peg$parse(input, options) {
|
|
|
911
1172
|
}
|
|
912
1173
|
if (s2 !== peg$FAILED) {
|
|
913
1174
|
s3 = [];
|
|
914
|
-
s4 =
|
|
915
|
-
if (peg$r3.test(s4)) {
|
|
916
|
-
peg$currPos++;
|
|
917
|
-
} else {
|
|
918
|
-
s4 = peg$FAILED;
|
|
919
|
-
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
920
|
-
}
|
|
1175
|
+
s4 = peg$parseIdentifierPart();
|
|
921
1176
|
while (s4 !== peg$FAILED) {
|
|
922
1177
|
s3.push(s4);
|
|
923
|
-
s4 =
|
|
924
|
-
if (peg$r3.test(s4)) {
|
|
925
|
-
peg$currPos++;
|
|
926
|
-
} else {
|
|
927
|
-
s4 = peg$FAILED;
|
|
928
|
-
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
929
|
-
}
|
|
1178
|
+
s4 = peg$parseIdentifierPart();
|
|
930
1179
|
}
|
|
931
1180
|
s2 = [s2, s3];
|
|
932
1181
|
s1 = s2;
|
|
@@ -943,6 +1192,20 @@ function peg$parse(input, options) {
|
|
|
943
1192
|
return s0;
|
|
944
1193
|
}
|
|
945
1194
|
|
|
1195
|
+
function peg$parseIdentifierPart() {
|
|
1196
|
+
let s0;
|
|
1197
|
+
|
|
1198
|
+
s0 = input.charAt(peg$currPos);
|
|
1199
|
+
if (peg$r3.test(s0)) {
|
|
1200
|
+
peg$currPos++;
|
|
1201
|
+
} else {
|
|
1202
|
+
s0 = peg$FAILED;
|
|
1203
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
return s0;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
946
1209
|
function peg$parse_() {
|
|
947
1210
|
let s0, s1;
|
|
948
1211
|
|
package/dist/lib/llm/types.d.ts
CHANGED
|
@@ -2,8 +2,14 @@ import Type, { type Static, type TSchema } from "typebox";
|
|
|
2
2
|
/** Opaque provider response identifier. Carried across turns so a
|
|
3
3
|
* downstream request can be chained to a specific upstream response. */
|
|
4
4
|
export type TResponseId = string;
|
|
5
|
-
export type TLlmModel = "gpt-5.5" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.4-nano";
|
|
6
|
-
|
|
5
|
+
export type TLlmModel = "gpt-6-sol" | "gpt-6-luna" | "gpt-5.5" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.4-nano";
|
|
6
|
+
/**
|
|
7
|
+
* How hard a reasoning model thinks. Not every model takes every value:
|
|
8
|
+
* `minimal` is a GPT-5 setting that GPT-6 rejects, and `none`, `xhigh` and
|
|
9
|
+
* `max` are GPT-6 settings. The OpenAI providers send `low` in place of
|
|
10
|
+
* `minimal` to a GPT-6 model, so a configured `minimal` never fails a run.
|
|
11
|
+
*/
|
|
12
|
+
export type TReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
7
13
|
export type TToolSpec = {
|
|
8
14
|
kind: "web_search";
|
|
9
15
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/llm/types.ts"],"names":[],"mappings":"AAcA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAA;AAEzD;wEACwE;AACxE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAA;AAEhC,MAAM,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/llm/types.ts"],"names":[],"mappings":"AAcA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAA;AAEzD;wEACwE;AACxE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAA;AAEhC,MAAM,MAAM,SAAS,GACf,WAAW,GACX,YAAY,GACZ,SAAS,GACT,SAAS,GACT,cAAc,GACd,cAAc,CAAA;AAEpB;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GACtB,MAAM,GACN,SAAS,GACT,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,KAAK,CAAA;AAEX,MAAM,MAAM,SAAS,GACf;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,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,CAAC,CAAA;CAC5D,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,GACrB,QAAQ,GACR,aAAa,GACb,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,WAAW,CAAA;AAEjB;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,6CAA6C;IAC7C,MAAM,EAAE,eAAe,CAAA;IACvB,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,4DAA4D;IAC5D,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,mDAAmD;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/llm/types.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,EAAE;AACF,gEAAgE;AAChE,iEAAiE;AACjE,oEAAoE;AACpE,iCAAiC;AACjC,2CAA2C;AAC3C,EAAE;AACF,qEAAqE;AACrE,mEAAmE;AACnE,6DAA6D;AAC7D,6DAA6D;AAC7D,oCAAoC;AAEpC,OAAO,IAAI,EAAE,EAA6B,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/llm/types.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,EAAE;AACF,gEAAgE;AAChE,iEAAiE;AACjE,oEAAoE;AACpE,iCAAiC;AACjC,2CAA2C;AAC3C,EAAE;AACF,qEAAqE;AACrE,mEAAmE;AACnE,6DAA6D;AAC7D,6DAA6D;AAC7D,oCAAoC;AAEpC,OAAO,IAAI,EAAE,EAA6B,MAAM,SAAS,CAAA;AAoFzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAA"}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
//
|
|
29
29
|
// [proposit/pipeline] [pipeline:start] {"pipelineId":"argument-ingestion-scholar","pipelineVersion":"1.0.0","stageCount":12,"rootStages":["segmentation"]}
|
|
30
30
|
// [proposit/pipeline] [stage:start] {"stageId":"segmentation","deps":[]}
|
|
31
|
-
// [proposit/pipeline] [llm:request] {"stageId":"segmentation","model":"gpt-
|
|
31
|
+
// [proposit/pipeline] [llm:request] {"stageId":"segmentation","model":"gpt-6-sol","maxOutputTokens":8192,"systemPromptLen":876,"userMessageLen":15601,"systemPromptHead":"<!-- stage-id: segmentation -->\\nYou are the first stage of an argument-ingestion pipeline..."}
|
|
32
32
|
// [proposit/pipeline] [llm:response] {"stageId":"segmentation","status":"completed","outputTextLen":4218,"tokenUsage":{"input":4012,"output":1056,"reasoning":0}}
|
|
33
33
|
// [proposit/pipeline] [stage:end] {"stageId":"segmentation","status":"completed","durationMs":3127,"tokenUsage":{"input":4012,"output":1056,"reasoning":0}}
|
|
34
34
|
/** Env var that gates every emission. Public + namespaced. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-log.js","sourceRoot":"","sources":["../../../src/lib/pipelines/debug-log.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oEAAoE;AACpE,kEAAkE;AAClE,oEAAoE;AACpE,YAAY;AACZ,EAAE;AACF,iEAAiE;AACjE,gEAAgE;AAChE,qDAAqD;AACrD,kEAAkE;AAClE,oEAAoE;AACpE,4DAA4D;AAC5D,kEAAkE;AAClE,uCAAuC;AACvC,EAAE;AACF,+DAA+D;AAC/D,gEAAgE;AAChE,+DAA+D;AAC/D,kEAAkE;AAClE,gEAAg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AA;AACN,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { optional, isOptionalDep, depId, ProcessingFailureSchema, } from "./types.js";
|
|
2
2
|
export type { TDepSpec, TOptionalDep, TStage, TStageContext, TStageStatus, TPipeline, TPipelineFinalize, TProcessingFailure, TPipelineResult, TPipelineEvent, } from "./types.js";
|
|
3
3
|
export { deterministicStage, llmStage, subPipelineStage, isLlmStage, DEFAULT_RETRY_POLICY, LlmStageRetryExhaustedError, StageAbortedError, SubPipelineFailedError, } from "./stage-helpers.js";
|
|
4
|
-
export type { TRetryPolicy, TRetryReason } from "./stage-helpers.js";
|
|
4
|
+
export type { TLlmOutputCheckFailure, TRetryPolicy, TRetryReason, } from "./stage-helpers.js";
|
|
5
5
|
export { executePipeline, PipelineConfigurationError } from "./scheduler.js";
|
|
6
6
|
export type { TExecutePipelineDeps } from "./scheduler.js";
|
|
7
7
|
export { executeStage, executeFinalize, launchStage, completeStage, } from "./single-stage.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/pipelines/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,QAAQ,EACR,aAAa,EACb,KAAK,EACL,uBAAuB,GAC1B,MAAM,YAAY,CAAA;AACnB,YAAY,EACR,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,GACjB,MAAM,YAAY,CAAA;AAEnB,OAAO,EACH,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,EACjB,sBAAsB,GACzB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/pipelines/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,QAAQ,EACR,aAAa,EACb,KAAK,EACL,uBAAuB,GAC1B,MAAM,YAAY,CAAA;AACnB,YAAY,EACR,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,GACjB,MAAM,YAAY,CAAA;AAEnB,OAAO,EACH,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,EACjB,sBAAsB,GACzB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACR,sBAAsB,EACtB,YAAY,EACZ,YAAY,GACf,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAC5E,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAE1D,OAAO,EACH,YAAY,EACZ,eAAe,EACf,WAAW,EACX,aAAa,GAChB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACR,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,GACrB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACH,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,GACxB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EACH,cAAc,EACd,+BAA+B,EAC/B,8BAA8B,EAC9B,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,wBAAwB,GAC3B,MAAM,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/pipelines/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAE5C,OAAO,EACH,QAAQ,EACR,aAAa,EACb,KAAK,EACL,uBAAuB,GAC1B,MAAM,YAAY,CAAA;AAcnB,OAAO,EACH,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,EACjB,sBAAsB,GACzB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/pipelines/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAE5C,OAAO,EACH,QAAQ,EACR,aAAa,EACb,KAAK,EACL,uBAAuB,GAC1B,MAAM,YAAY,CAAA;AAcnB,OAAO,EACH,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,EACjB,sBAAsB,GACzB,MAAM,oBAAoB,CAAA;AAO3B,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAG5E,OAAO,EACH,YAAY,EACZ,eAAe,EACf,WAAW,EACX,aAAa,GAChB,MAAM,mBAAmB,CAAA;AAS1B,OAAO,EACH,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,GACxB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EACH,cAAc,EACd,+BAA+B,EAC/B,8BAA8B,EAC9B,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,wBAAwB,GAC3B,MAAM,gBAAgB,CAAA"}
|
|
@@ -21,6 +21,15 @@ export declare class LlmStageRetryExhaustedError extends Error {
|
|
|
21
21
|
context?: Record<string, unknown>;
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Why an output that matched its schema is still unusable, as returned by
|
|
26
|
+
* an `llmStage`'s `checkOutput`. `message` is what a reader is shown if
|
|
27
|
+
* the retries run out, so it should be plain.
|
|
28
|
+
*/
|
|
29
|
+
export type TLlmOutputCheckFailure = {
|
|
30
|
+
code: string;
|
|
31
|
+
message: string;
|
|
32
|
+
};
|
|
24
33
|
/**
|
|
25
34
|
* The resolved `llmStage` config the seam functions operate on (defaults
|
|
26
35
|
* merged into `retryPolicy`). Package-internal — not exported.
|
|
@@ -38,6 +47,8 @@ export type TLlmStageConfig<TOutput> = {
|
|
|
38
47
|
maxOutputTokens?: number;
|
|
39
48
|
/** The resolved retry policy (factory defaults already merged). */
|
|
40
49
|
retryPolicy: TRetryPolicy;
|
|
50
|
+
/** See `llmStage`'s `checkOutput`. */
|
|
51
|
+
checkOutput?: (output: TOutput, ctx: TStageContext) => TLlmOutputCheckFailure | undefined;
|
|
41
52
|
/**
|
|
42
53
|
* Phantom field carrying the stage's structured-output type `TOutput`
|
|
43
54
|
* through the seam (so `buildLlmRequest` / `validateLlmOutcome` recover
|
|
@@ -95,7 +106,7 @@ export declare function buildLlmRequest<TOutput>(cfg: TLlmStageConfig<TOutput>,
|
|
|
95
106
|
* mapping is duplicated here and pinned to the provider by a contract test.
|
|
96
107
|
* Package-internal.
|
|
97
108
|
*/
|
|
98
|
-
export declare function validateLlmOutcome<TOutput>(cfg: TLlmStageConfig<TOutput>, rawText: string | undefined, status: TResponseStatus, incompleteReason: string | undefined): {
|
|
109
|
+
export declare function validateLlmOutcome<TOutput>(cfg: TLlmStageConfig<TOutput>, rawText: string | undefined, status: TResponseStatus, incompleteReason: string | undefined, ctx?: TStageContext): {
|
|
99
110
|
outcome: "completed" | "failed" | "skipped";
|
|
100
111
|
output?: TOutput;
|
|
101
112
|
failure?: {
|
|
@@ -122,5 +133,15 @@ export declare function llmStage<TOutput>(config: {
|
|
|
122
133
|
tools?: readonly TToolSpec[];
|
|
123
134
|
retry?: Partial<TRetryPolicy>;
|
|
124
135
|
maxOutputTokens?: number;
|
|
136
|
+
/**
|
|
137
|
+
* A check of the output's content, run once it matches the schema. A
|
|
138
|
+
* returned failure is handled exactly like a schema mismatch: the
|
|
139
|
+
* attempt is retried under the stage's retry policy (`schema_validation`
|
|
140
|
+
* must be in `retryOn`), and when the attempts run out the stage fails
|
|
141
|
+
* with that failure's code and message. It reads the stage context, so
|
|
142
|
+
* on the launch/complete path it runs only when `completeStage` is
|
|
143
|
+
* given the upstream outputs.
|
|
144
|
+
*/
|
|
145
|
+
checkOutput?: (output: TOutput, ctx: TStageContext) => TLlmOutputCheckFailure | undefined;
|
|
125
146
|
}): TStage<TOutput>;
|
|
126
147
|
//# sourceMappingURL=llm-stage-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-stage-helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/pipelines/llm-stage-helpers.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EACR,QAAQ,EAER,MAAM,EACN,aAAa,EAChB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACR,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,SAAS,EACZ,MAAM,iBAAiB,CAAA;AAexB,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAqBpE;;;GAGG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;IAClD,SAAgB,MAAM,EAAE,YAAY,CAAA;IACpC,SAAgB,IAAI,EAAE,MAAM,CAAA;IAC5B,SAAgB,QAAQ,EAAE,MAAM,CAAA;IAChC,SAAgB,OAAO,EAAE,MAAM,CAAA;IAC/B,SAAgB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;gBAEvD,IAAI,EAAE;QACd,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,EAAE,YAAY,CAAA;QACpB,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,MAAM,CAAA;QAChB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,MAAM,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