@claritylabs/cl-sdk 3.2.13 → 4.0.1

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.mjs CHANGED
@@ -294,57 +294,6 @@ function expectedOutputTokensFloor(taskKind, schemaTokens, expectedListLength, h
294
294
 
295
295
  // src/schemas/enums.ts
296
296
  import { z as z2 } from "zod";
297
- var PolicyTypeSchema = z2.enum([
298
- // Commercial lines
299
- "general_liability",
300
- "commercial_property",
301
- "commercial_auto",
302
- "non_owned_auto",
303
- "workers_comp",
304
- "umbrella",
305
- "excess_liability",
306
- "professional_liability",
307
- "cyber",
308
- "epli",
309
- "directors_officers",
310
- "fiduciary_liability",
311
- "crime_fidelity",
312
- "inland_marine",
313
- "builders_risk",
314
- "environmental",
315
- "ocean_marine",
316
- "surety",
317
- "product_liability",
318
- "bop",
319
- "management_liability_package",
320
- "property",
321
- // Personal lines
322
- "homeowners_ho3",
323
- "homeowners_ho5",
324
- "renters_ho4",
325
- "condo_ho6",
326
- "dwelling_fire",
327
- "mobile_home",
328
- "personal_auto",
329
- "personal_umbrella",
330
- "flood_nfip",
331
- "flood_private",
332
- "earthquake",
333
- "personal_inland_marine",
334
- "watercraft",
335
- "recreational_vehicle",
336
- "farm_ranch",
337
- "life",
338
- "critical_illness",
339
- "disability",
340
- "long_term_care",
341
- "pet",
342
- "travel",
343
- "identity_theft",
344
- "title",
345
- "other"
346
- ]);
347
- var POLICY_TYPES = PolicyTypeSchema.options;
348
297
  var EndorsementTypeSchema = z2.enum([
349
298
  "additional_insured",
350
299
  "waiver_of_subrogation",
@@ -565,85 +514,419 @@ var TITLE_POLICY_TYPES = TitlePolicyTypeSchema.options;
565
514
  var PetSpeciesSchema = z2.enum(["dog", "cat", "other"]);
566
515
  var PET_SPECIES = PetSpeciesSchema.options;
567
516
 
568
- // src/schemas/shared.ts
517
+ // src/schemas/lines-of-business.ts
569
518
  import { z as z3 } from "zod";
570
- var SourceProvenanceSchema = z3.object({
571
- sourceSpanIds: z3.array(z3.string().min(1)).min(1),
572
- documentNodeId: z3.string().optional(),
573
- sourceTextHash: z3.string().optional(),
574
- pageStart: z3.number().int().positive().optional(),
575
- pageEnd: z3.number().int().positive().optional()
576
- });
577
- var AddressSchema = z3.object({
578
- street1: z3.string(),
579
- street2: z3.string().optional(),
580
- city: z3.string(),
581
- state: z3.string(),
582
- zip: z3.string(),
583
- country: z3.string().optional()
519
+ var ACORD_LOB_CODES = [
520
+ "AAPPL",
521
+ "AGLIA",
522
+ "AGPP",
523
+ "AGPR",
524
+ "AIRC",
525
+ "AIRPFB",
526
+ "APKG",
527
+ "APKGE",
528
+ "APROD",
529
+ "ARVP",
530
+ "AUTO",
531
+ "AUTOB",
532
+ "AUTOP",
533
+ "AVPKG",
534
+ "BANDM",
535
+ "BLANK",
536
+ "BMISC",
537
+ "BOAT",
538
+ "BOP",
539
+ "BOPGL",
540
+ "BOPPR",
541
+ "CAVN",
542
+ "CEQFL",
543
+ "CFIRE",
544
+ "CFRM",
545
+ "CGL",
546
+ "COMAR",
547
+ "COMR",
548
+ "CONTR",
549
+ "CPKGE",
550
+ "CPMP",
551
+ "CRIME",
552
+ "DFIRE",
553
+ "DISAB",
554
+ "DO",
555
+ "EDP",
556
+ "EL",
557
+ "EO",
558
+ "EPLI",
559
+ "EQ",
560
+ "EQPFL",
561
+ "EXLIA",
562
+ "FIDTY",
563
+ "FIDUC",
564
+ "FINEA",
565
+ "FLOOD",
566
+ "GARAG",
567
+ "GL",
568
+ "GLASS",
569
+ "HANG",
570
+ "HBB",
571
+ "HOME",
572
+ "INBR",
573
+ "INMAR",
574
+ "INMRC",
575
+ "INMRP",
576
+ "JUDCL",
577
+ "KIDRA",
578
+ "LL",
579
+ "MHOME",
580
+ "MMAL",
581
+ "Motorcycle",
582
+ "MTRTK",
583
+ "OLIB",
584
+ "PHYS",
585
+ "PKG",
586
+ "PL",
587
+ "PLMSC",
588
+ "PPKGE",
589
+ "PROP",
590
+ "PROPC",
591
+ "PUBOF",
592
+ "RECV",
593
+ "SCHPR",
594
+ "SIGNS",
595
+ "SMP",
596
+ "SURE",
597
+ "TRANS",
598
+ "TRUCK",
599
+ "UMBRC",
600
+ "UMBRL",
601
+ "UMBRP",
602
+ "UN",
603
+ "WCMA",
604
+ "WIND",
605
+ "WORK",
606
+ "WORKP",
607
+ "WORKV"
608
+ ];
609
+ var AcordLobCodeSchema = z3.enum(ACORD_LOB_CODES);
610
+ var ACORD_LOB_LABELS = {
611
+ AAPPL: "Aircraft / Aerial Applicator",
612
+ AGLIA: "Agricultural Liability",
613
+ AGPP: "Agricultural Personal Property",
614
+ AGPR: "Agricultural Property",
615
+ AIRC: "Aircraft",
616
+ AIRPFB: "Airport / Fixed Base Operator",
617
+ APKG: "Agricultural Package",
618
+ APKGE: "Agricultural Package (Extended)",
619
+ APROD: "Agricultural Products",
620
+ ARVP: "Recreational Vehicle Package",
621
+ AUTO: "Automobile",
622
+ AUTOB: "Business Auto",
623
+ AUTOP: "Personal Auto",
624
+ AVPKG: "Aviation Package",
625
+ BANDM: "Boiler & Machinery",
626
+ BLANK: "Blanket",
627
+ BMISC: "Business Miscellaneous",
628
+ BOAT: "Boat",
629
+ BOP: "Businessowners Policy",
630
+ BOPGL: "BOP - General Liability",
631
+ BOPPR: "BOP - Property",
632
+ CAVN: "Commercial Aviation",
633
+ CEQFL: "Contractors Equipment Floater",
634
+ CFIRE: "Commercial Fire",
635
+ CFRM: "Commercial Farm",
636
+ CGL: "Commercial General Liability",
637
+ COMAR: "Commercial Marine / Ocean Marine",
638
+ COMR: "Commercial (misc.)",
639
+ CONTR: "Contractors",
640
+ CPKGE: "Commercial Package",
641
+ CPMP: "Commercial Package (multi-peril)",
642
+ CRIME: "Crime",
643
+ DFIRE: "Dwelling Fire",
644
+ DISAB: "Disability",
645
+ DO: "Directors & Officers Liability",
646
+ EDP: "Electronic Data Processing",
647
+ EL: "Employers Liability",
648
+ EO: "Errors & Omissions",
649
+ EPLI: "Employment Practices Liability",
650
+ EQ: "Earthquake",
651
+ EQPFL: "Equipment Floater",
652
+ EXLIA: "Excess Liability",
653
+ FIDTY: "Fidelity",
654
+ FIDUC: "Fiduciary Liability",
655
+ FINEA: "Fine Arts",
656
+ FLOOD: "Flood",
657
+ GARAG: "Garage",
658
+ GL: "General Liability",
659
+ GLASS: "Glass",
660
+ HANG: "Hangar (Aviation)",
661
+ HBB: "Home-Based Business",
662
+ HOME: "Homeowners",
663
+ INBR: "Inland Marine - Brokers",
664
+ INMAR: "Inland Marine",
665
+ INMRC: "Inland Marine - Commercial",
666
+ INMRP: "Inland Marine - Personal",
667
+ JUDCL: "Judicial Bonds",
668
+ KIDRA: "Kidnap & Ransom",
669
+ LL: "Liquor Liability",
670
+ MHOME: "Mobile Home",
671
+ MMAL: "Medical Malpractice",
672
+ Motorcycle: "Motorcycle",
673
+ MTRTK: "Motor Truck Cargo",
674
+ OLIB: "Other Liability",
675
+ PHYS: "Physical Damage",
676
+ PKG: "Package",
677
+ PL: "Professional Liability",
678
+ PLMSC: "Personal Lines Miscellaneous",
679
+ PPKGE: "Personal Package",
680
+ PROP: "Property",
681
+ PROPC: "Property - Commercial",
682
+ PUBOF: "Public Officials Liability",
683
+ RECV: "Recreational Vehicle",
684
+ SCHPR: "Scheduled Property",
685
+ SIGNS: "Signs",
686
+ SMP: "Special Multi-Peril",
687
+ SURE: "Surety",
688
+ TRANS: "Transportation",
689
+ TRUCK: "Trucking",
690
+ UMBRC: "Umbrella - Commercial",
691
+ UMBRL: "Umbrella",
692
+ UMBRP: "Umbrella - Personal",
693
+ UN: "Unspecified / Unknown",
694
+ WCMA: "Workers Comp - Monopolistic/State",
695
+ WIND: "Wind",
696
+ WORK: "Workers Compensation",
697
+ WORKP: "Workers Compensation (Personal/Package)",
698
+ WORKV: "Workers Compensation (Voluntary)"
699
+ };
700
+ var EXCLUDED_ACORD_LOB_CODES = /* @__PURE__ */ new Set([
701
+ "ACHE",
702
+ "INTER",
703
+ "LICPT",
704
+ "LSTIN",
705
+ "NWFGR",
706
+ "PAPER",
707
+ "SCAP",
708
+ "SFRNC"
709
+ ]);
710
+ var LEGACY_POLICY_TYPE_TO_LOB = {
711
+ general_liability: ["CGL"],
712
+ commercial_property: ["PROPC"],
713
+ commercial_auto: ["AUTOB"],
714
+ non_owned_auto: ["AUTOB"],
715
+ workers_comp: ["WORK"],
716
+ umbrella: ["UMBRC"],
717
+ excess_liability: ["EXLIA"],
718
+ professional_liability: ["EO"],
719
+ cyber: ["OLIB"],
720
+ epli: ["EPLI"],
721
+ directors_officers: ["DO"],
722
+ fiduciary_liability: ["FIDUC"],
723
+ crime_fidelity: ["CRIME"],
724
+ inland_marine: ["INMRC"],
725
+ builders_risk: ["INMRC"],
726
+ environmental: ["OLIB"],
727
+ ocean_marine: ["COMAR"],
728
+ surety: ["SURE"],
729
+ product_liability: ["OLIB"],
730
+ bop: ["BOP"],
731
+ management_liability_package: ["DO", "EPLI", "FIDUC"],
732
+ property: ["PROP"],
733
+ homeowners_ho3: ["HOME"],
734
+ homeowners_ho5: ["HOME"],
735
+ renters_ho4: ["HOME"],
736
+ condo_ho6: ["HOME"],
737
+ dwelling_fire: ["DFIRE"],
738
+ mobile_home: ["MHOME"],
739
+ personal_auto: ["AUTOP"],
740
+ personal_umbrella: ["UMBRP"],
741
+ flood_nfip: ["FLOOD"],
742
+ flood_private: ["FLOOD"],
743
+ earthquake: ["EQ"],
744
+ personal_inland_marine: ["INMRP"],
745
+ watercraft: ["BOAT"],
746
+ recreational_vehicle: ["RECV"],
747
+ farm_ranch: ["CFRM"],
748
+ life: ["UN"],
749
+ critical_illness: ["DISAB"],
750
+ disability: ["DISAB"],
751
+ long_term_care: ["UN"],
752
+ pet: ["UN"],
753
+ travel: ["UN"],
754
+ identity_theft: ["UN"],
755
+ title: ["UN"],
756
+ other: ["UN"],
757
+ unknown: ["UN"],
758
+ auto: ["AUTOB"],
759
+ crime: ["CRIME"],
760
+ crim: ["CRIME"],
761
+ fiduciary: ["FIDUC"],
762
+ d_and_o: ["DO"],
763
+ d_o: ["DO"],
764
+ homeowners: ["HOME"],
765
+ renters: ["HOME"],
766
+ flood: ["FLOOD"],
767
+ boat: ["BOAT"],
768
+ motorcycle: ["Motorcycle"]
769
+ };
770
+ var PERSONAL_LOB_CODES = /* @__PURE__ */ new Set([
771
+ "AUTOP",
772
+ "HOME",
773
+ "MHOME",
774
+ "DFIRE",
775
+ "FLOOD",
776
+ "EQ",
777
+ "INMRP",
778
+ "UMBRP",
779
+ "BOAT",
780
+ "RECV",
781
+ "Motorcycle",
782
+ "PPKGE",
783
+ "DISAB",
784
+ "PLMSC",
785
+ "HBB"
786
+ ]);
787
+ function hasOwn(object, key) {
788
+ return Object.prototype.hasOwnProperty.call(object, key);
789
+ }
790
+ function canonicalLegacyKey(value) {
791
+ return value.trim().toLowerCase().replace(/&/g, " and ").replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").replace(/_+/g, "_");
792
+ }
793
+ function humanize(value) {
794
+ return value.trim().replace(/[_-]+/g, " ").replace(/\b\w/g, (char) => char.toUpperCase());
795
+ }
796
+ function isLobCode(value) {
797
+ return typeof value === "string" && hasOwn(ACORD_LOB_LABELS, value);
798
+ }
799
+ function resolveLobCode(value) {
800
+ const trimmed = value.trim();
801
+ if (!trimmed) return void 0;
802
+ if (isLobCode(trimmed)) return trimmed;
803
+ if (trimmed.toLowerCase() === "motorcycle") return "Motorcycle";
804
+ const legacy = LEGACY_POLICY_TYPE_TO_LOB[canonicalLegacyKey(trimmed)];
805
+ if (legacy?.[0]) return legacy[0];
806
+ const upper = trimmed.toUpperCase();
807
+ if (upper === "CRIM") return "CRIME";
808
+ if (isLobCode(upper)) return upper;
809
+ return void 0;
810
+ }
811
+ function normalizeOperationalLinesOfBusiness(values) {
812
+ const source = Array.isArray(values) ? values.filter((value) => typeof value === "string" && value.trim().length > 0) : [];
813
+ return toLobCodes(source);
814
+ }
815
+ function toLobCodes(values) {
816
+ const source = values?.filter((value) => typeof value === "string" && value.trim()) ?? [];
817
+ if (source.length === 0) return ["UN"];
818
+ const codes = [];
819
+ for (const value of source) {
820
+ const trimmed = value.trim();
821
+ if (isLobCode(trimmed)) {
822
+ codes.push(trimmed);
823
+ continue;
824
+ }
825
+ if (trimmed.toUpperCase() === "CRIM") {
826
+ codes.push("CRIME");
827
+ continue;
828
+ }
829
+ const mapped = LEGACY_POLICY_TYPE_TO_LOB[canonicalLegacyKey(trimmed)];
830
+ if (mapped) {
831
+ codes.push(...mapped);
832
+ continue;
833
+ }
834
+ const upper = trimmed.toUpperCase();
835
+ if (isLobCode(upper)) {
836
+ codes.push(upper);
837
+ continue;
838
+ }
839
+ codes.push("UN");
840
+ }
841
+ return Array.from(new Set(codes));
842
+ }
843
+ function lobLabel(value) {
844
+ const code = resolveLobCode(value);
845
+ return code ? ACORD_LOB_LABELS[code] : humanize(value);
846
+ }
847
+ function isPersonalLob(code) {
848
+ return isLobCode(code) && PERSONAL_LOB_CODES.has(code);
849
+ }
850
+
851
+ // src/schemas/shared.ts
852
+ import { z as z4 } from "zod";
853
+ var SourceProvenanceSchema = z4.object({
854
+ sourceSpanIds: z4.array(z4.string().min(1)).min(1),
855
+ documentNodeId: z4.string().optional(),
856
+ sourceTextHash: z4.string().optional(),
857
+ pageStart: z4.number().int().positive().optional(),
858
+ pageEnd: z4.number().int().positive().optional()
859
+ });
860
+ var AddressSchema = z4.object({
861
+ street1: z4.string(),
862
+ street2: z4.string().optional(),
863
+ city: z4.string(),
864
+ state: z4.string(),
865
+ zip: z4.string(),
866
+ country: z4.string().optional()
584
867
  });
585
868
  var SourceBackedAddressSchema = AddressSchema.merge(SourceProvenanceSchema);
586
- var ContactSchema = z3.object({
587
- name: z3.string().optional(),
588
- title: z3.string().optional(),
589
- type: z3.string().optional(),
590
- phone: z3.string().optional(),
591
- fax: z3.string().optional(),
592
- email: z3.string().optional(),
869
+ var ContactSchema = z4.object({
870
+ name: z4.string().optional(),
871
+ title: z4.string().optional(),
872
+ type: z4.string().optional(),
873
+ phone: z4.string().optional(),
874
+ fax: z4.string().optional(),
875
+ email: z4.string().optional(),
593
876
  address: AddressSchema.optional(),
594
- hours: z3.string().optional()
877
+ hours: z4.string().optional()
595
878
  }).merge(SourceProvenanceSchema);
596
- var FormReferenceSchema = z3.object({
597
- formNumber: z3.string(),
598
- editionDate: z3.string().optional(),
599
- title: z3.string().optional(),
600
- formType: z3.enum(["coverage", "endorsement", "declarations", "application", "notice", "other"]),
601
- pageStart: z3.number().optional(),
602
- pageEnd: z3.number().optional(),
603
- documentNodeId: z3.string().optional(),
604
- sourceSpanIds: z3.array(z3.string()).optional(),
605
- sourceTextHash: z3.string().optional()
606
- });
607
- var TaxFeeItemSchema = z3.object({
608
- name: z3.string(),
609
- amount: z3.string(),
610
- amountValue: z3.number().optional(),
611
- type: z3.enum(["tax", "fee", "surcharge", "assessment"]).optional(),
612
- description: z3.string().optional(),
613
- documentNodeId: z3.string().optional(),
614
- sourceSpanIds: z3.array(z3.string()).optional(),
615
- sourceTextHash: z3.string().optional()
616
- });
617
- var RatingBasisSchema = z3.object({
879
+ var FormReferenceSchema = z4.object({
880
+ formNumber: z4.string(),
881
+ editionDate: z4.string().optional(),
882
+ title: z4.string().optional(),
883
+ formType: z4.enum(["coverage", "endorsement", "declarations", "application", "notice", "other"]),
884
+ pageStart: z4.number().optional(),
885
+ pageEnd: z4.number().optional(),
886
+ documentNodeId: z4.string().optional(),
887
+ sourceSpanIds: z4.array(z4.string()).optional(),
888
+ sourceTextHash: z4.string().optional()
889
+ });
890
+ var TaxFeeItemSchema = z4.object({
891
+ name: z4.string(),
892
+ amount: z4.string(),
893
+ amountValue: z4.number().optional(),
894
+ type: z4.enum(["tax", "fee", "surcharge", "assessment"]).optional(),
895
+ description: z4.string().optional(),
896
+ documentNodeId: z4.string().optional(),
897
+ sourceSpanIds: z4.array(z4.string()).optional(),
898
+ sourceTextHash: z4.string().optional()
899
+ });
900
+ var RatingBasisSchema = z4.object({
618
901
  type: RatingBasisTypeSchema,
619
- amount: z3.string().optional(),
620
- description: z3.string().optional()
621
- });
622
- var SublimitSchema = z3.object({
623
- name: z3.string(),
624
- limit: z3.string(),
625
- appliesTo: z3.string().optional(),
626
- deductible: z3.string().optional()
627
- });
628
- var SharedLimitSchema = z3.object({
629
- description: z3.string(),
630
- limit: z3.string(),
631
- coverageParts: z3.array(z3.string())
632
- });
633
- var ExtendedReportingPeriodSchema = z3.object({
634
- basicDays: z3.number().optional(),
635
- supplementalYears: z3.number().optional(),
636
- supplementalPremium: z3.string().optional()
637
- });
638
- var NamedInsuredSchema = z3.object({
639
- name: z3.string(),
640
- relationship: z3.string().optional(),
902
+ amount: z4.string().optional(),
903
+ description: z4.string().optional()
904
+ });
905
+ var SublimitSchema = z4.object({
906
+ name: z4.string(),
907
+ limit: z4.string(),
908
+ appliesTo: z4.string().optional(),
909
+ deductible: z4.string().optional()
910
+ });
911
+ var SharedLimitSchema = z4.object({
912
+ description: z4.string(),
913
+ limit: z4.string(),
914
+ coverageParts: z4.array(z4.string())
915
+ });
916
+ var ExtendedReportingPeriodSchema = z4.object({
917
+ basicDays: z4.number().optional(),
918
+ supplementalYears: z4.number().optional(),
919
+ supplementalPremium: z4.string().optional()
920
+ });
921
+ var NamedInsuredSchema = z4.object({
922
+ name: z4.string(),
923
+ relationship: z4.string().optional(),
641
924
  address: AddressSchema.optional()
642
925
  }).merge(SourceProvenanceSchema);
643
926
 
644
927
  // src/schemas/coverage.ts
645
- import { z as z4 } from "zod";
646
- var CoverageValueTypeSchema = z4.enum([
928
+ import { z as z5 } from "zod";
929
+ var CoverageValueTypeSchema = z5.enum([
647
930
  "numeric",
648
931
  "included",
649
932
  "not_included",
@@ -652,116 +935,98 @@ var CoverageValueTypeSchema = z4.enum([
652
935
  "referential",
653
936
  "other"
654
937
  ]);
655
- var CoverageSchema = z4.object({
656
- name: z4.string(),
657
- limit: z4.string(),
658
- limitAmount: z4.number().optional(),
938
+ var CoverageSchema = z5.object({
939
+ name: z5.string(),
940
+ limit: z5.string(),
941
+ limitAmount: z5.number().optional(),
659
942
  limitType: LimitTypeSchema.optional(),
660
943
  limitValueType: CoverageValueTypeSchema.optional(),
661
- deductible: z4.string().optional(),
662
- deductibleAmount: z4.number().optional(),
944
+ deductible: z5.string().optional(),
945
+ deductibleAmount: z5.number().optional(),
663
946
  deductibleValueType: CoverageValueTypeSchema.optional(),
664
947
  trigger: CoverageTriggerSchema.optional(),
665
- retroactiveDate: z4.string().optional(),
666
- formNumber: z4.string().optional(),
667
- pageNumber: z4.number().optional(),
668
- sectionRef: z4.string().optional(),
669
- originalContent: z4.string().optional(),
670
- recordId: z4.string().optional(),
671
- documentNodeId: z4.string().optional(),
672
- sourceSpanIds: z4.array(z4.string()).optional(),
673
- sourceTextHash: z4.string().optional()
948
+ retroactiveDate: z5.string().optional(),
949
+ formNumber: z5.string().optional(),
950
+ pageNumber: z5.number().optional(),
951
+ sectionRef: z5.string().optional(),
952
+ originalContent: z5.string().optional(),
953
+ recordId: z5.string().optional(),
954
+ documentNodeId: z5.string().optional(),
955
+ sourceSpanIds: z5.array(z5.string()).optional(),
956
+ sourceTextHash: z5.string().optional()
674
957
  });
675
- var EnrichedCoverageSchema = z4.object({
676
- name: z4.string(),
677
- coverageCode: z4.string().optional(),
678
- formNumber: z4.string().optional(),
679
- formEditionDate: z4.string().optional(),
680
- limit: z4.string(),
681
- limitAmount: z4.number().optional(),
958
+ var EnrichedCoverageSchema = z5.object({
959
+ name: z5.string(),
960
+ coverageCode: z5.string().optional(),
961
+ formNumber: z5.string().optional(),
962
+ formEditionDate: z5.string().optional(),
963
+ limit: z5.string(),
964
+ limitAmount: z5.number().optional(),
682
965
  limitType: LimitTypeSchema.optional(),
683
966
  limitValueType: CoverageValueTypeSchema.optional(),
684
- deductible: z4.string().optional(),
685
- deductibleAmount: z4.number().optional(),
967
+ deductible: z5.string().optional(),
968
+ deductibleAmount: z5.number().optional(),
686
969
  deductibleType: DeductibleTypeSchema.optional(),
687
970
  deductibleValueType: CoverageValueTypeSchema.optional(),
688
- sir: z4.string().optional(),
689
- sublimit: z4.string().optional(),
690
- coinsurance: z4.string().optional(),
971
+ sir: z5.string().optional(),
972
+ sublimit: z5.string().optional(),
973
+ coinsurance: z5.string().optional(),
691
974
  valuation: ValuationMethodSchema.optional(),
692
- territory: z4.string().optional(),
975
+ territory: z5.string().optional(),
693
976
  trigger: CoverageTriggerSchema.optional(),
694
- retroactiveDate: z4.string().optional(),
695
- included: z4.boolean(),
696
- premium: z4.string().optional(),
697
- pageNumber: z4.number().optional(),
698
- sectionRef: z4.string().optional(),
699
- originalContent: z4.string().optional(),
700
- recordId: z4.string().optional(),
701
- documentNodeId: z4.string().optional(),
702
- sourceSpanIds: z4.array(z4.string()).optional(),
703
- sourceTextHash: z4.string().optional()
704
- });
705
-
706
- // src/schemas/endorsement.ts
707
- import { z as z5 } from "zod";
708
- var EndorsementPartySchema = z5.object({
709
- name: z5.string(),
710
- role: EndorsementPartyRoleSchema,
711
- address: AddressSchema.optional(),
712
- relationship: z5.string().optional(),
713
- scope: z5.string().optional()
714
- }).merge(SourceProvenanceSchema);
715
- var EndorsementSchema = z5.object({
716
- formNumber: z5.string(),
717
- editionDate: z5.string().optional(),
718
- title: z5.string(),
719
- endorsementType: EndorsementTypeSchema,
720
- effectiveDate: z5.string().optional(),
721
- affectedCoverageParts: z5.array(z5.string()).optional(),
722
- namedParties: z5.array(EndorsementPartySchema).optional(),
723
- keyTerms: z5.array(z5.string()).optional(),
724
- premiumImpact: z5.string().optional(),
725
- excerpt: z5.string().optional(),
726
- content: z5.string().optional(),
727
- pageStart: z5.number(),
728
- pageEnd: z5.number().optional(),
977
+ retroactiveDate: z5.string().optional(),
978
+ included: z5.boolean(),
979
+ premium: z5.string().optional(),
980
+ pageNumber: z5.number().optional(),
981
+ sectionRef: z5.string().optional(),
982
+ originalContent: z5.string().optional(),
729
983
  recordId: z5.string().optional(),
730
984
  documentNodeId: z5.string().optional(),
731
985
  sourceSpanIds: z5.array(z5.string()).optional(),
732
986
  sourceTextHash: z5.string().optional()
733
987
  });
734
988
 
735
- // src/schemas/exclusion.ts
989
+ // src/schemas/endorsement.ts
736
990
  import { z as z6 } from "zod";
737
- var ExclusionSchema = z6.object({
991
+ var EndorsementPartySchema = z6.object({
738
992
  name: z6.string(),
739
- formNumber: z6.string().optional(),
740
- excludedPerils: z6.array(z6.string()).optional(),
741
- isAbsolute: z6.boolean().optional(),
742
- exceptions: z6.array(z6.string()).optional(),
743
- buybackAvailable: z6.boolean().optional(),
744
- buybackEndorsement: z6.string().optional(),
745
- appliesTo: z6.array(z6.string()).optional(),
746
- content: z6.string(),
747
- pageNumber: z6.number().optional(),
993
+ role: EndorsementPartyRoleSchema,
994
+ address: AddressSchema.optional(),
995
+ relationship: z6.string().optional(),
996
+ scope: z6.string().optional()
997
+ }).merge(SourceProvenanceSchema);
998
+ var EndorsementSchema = z6.object({
999
+ formNumber: z6.string(),
1000
+ editionDate: z6.string().optional(),
1001
+ title: z6.string(),
1002
+ endorsementType: EndorsementTypeSchema,
1003
+ effectiveDate: z6.string().optional(),
1004
+ affectedCoverageParts: z6.array(z6.string()).optional(),
1005
+ namedParties: z6.array(EndorsementPartySchema).optional(),
1006
+ keyTerms: z6.array(z6.string()).optional(),
1007
+ premiumImpact: z6.string().optional(),
1008
+ excerpt: z6.string().optional(),
1009
+ content: z6.string().optional(),
1010
+ pageStart: z6.number(),
1011
+ pageEnd: z6.number().optional(),
748
1012
  recordId: z6.string().optional(),
749
1013
  documentNodeId: z6.string().optional(),
750
1014
  sourceSpanIds: z6.array(z6.string()).optional(),
751
1015
  sourceTextHash: z6.string().optional()
752
1016
  });
753
1017
 
754
- // src/schemas/condition.ts
1018
+ // src/schemas/exclusion.ts
755
1019
  import { z as z7 } from "zod";
756
- var ConditionKeyValueSchema = z7.object({
757
- key: z7.string(),
758
- value: z7.string()
759
- });
760
- var PolicyConditionSchema = z7.object({
1020
+ var ExclusionSchema = z7.object({
761
1021
  name: z7.string(),
762
- conditionType: ConditionTypeSchema,
1022
+ formNumber: z7.string().optional(),
1023
+ excludedPerils: z7.array(z7.string()).optional(),
1024
+ isAbsolute: z7.boolean().optional(),
1025
+ exceptions: z7.array(z7.string()).optional(),
1026
+ buybackAvailable: z7.boolean().optional(),
1027
+ buybackEndorsement: z7.string().optional(),
1028
+ appliesTo: z7.array(z7.string()).optional(),
763
1029
  content: z7.string(),
764
- keyValues: z7.array(ConditionKeyValueSchema).optional(),
765
1030
  pageNumber: z7.number().optional(),
766
1031
  recordId: z7.string().optional(),
767
1032
  documentNodeId: z7.string().optional(),
@@ -769,543 +1034,561 @@ var PolicyConditionSchema = z7.object({
769
1034
  sourceTextHash: z7.string().optional()
770
1035
  });
771
1036
 
772
- // src/schemas/parties.ts
1037
+ // src/schemas/condition.ts
773
1038
  import { z as z8 } from "zod";
774
- var InsurerInfoSchema = z8.object({
775
- legalName: z8.string(),
776
- naicNumber: z8.string().optional(),
777
- amBestRating: z8.string().optional(),
778
- amBestNumber: z8.string().optional(),
1039
+ var ConditionKeyValueSchema = z8.object({
1040
+ key: z8.string(),
1041
+ value: z8.string()
1042
+ });
1043
+ var PolicyConditionSchema = z8.object({
1044
+ name: z8.string(),
1045
+ conditionType: ConditionTypeSchema,
1046
+ content: z8.string(),
1047
+ keyValues: z8.array(ConditionKeyValueSchema).optional(),
1048
+ pageNumber: z8.number().optional(),
1049
+ recordId: z8.string().optional(),
1050
+ documentNodeId: z8.string().optional(),
1051
+ sourceSpanIds: z8.array(z8.string()).optional(),
1052
+ sourceTextHash: z8.string().optional()
1053
+ });
1054
+
1055
+ // src/schemas/parties.ts
1056
+ import { z as z9 } from "zod";
1057
+ var InsurerInfoSchema = z9.object({
1058
+ legalName: z9.string(),
1059
+ naicNumber: z9.string().optional(),
1060
+ amBestRating: z9.string().optional(),
1061
+ amBestNumber: z9.string().optional(),
779
1062
  admittedStatus: AdmittedStatusSchema.optional(),
780
- stateOfDomicile: z8.string().optional()
1063
+ stateOfDomicile: z9.string().optional()
781
1064
  }).merge(SourceProvenanceSchema);
782
- var ProducerInfoSchema = z8.object({
783
- agencyName: z8.string(),
784
- contactName: z8.string().optional(),
785
- licenseNumber: z8.string().optional(),
786
- phone: z8.string().optional(),
787
- email: z8.string().optional(),
1065
+ var ProducerInfoSchema = z9.object({
1066
+ agencyName: z9.string(),
1067
+ contactName: z9.string().optional(),
1068
+ licenseNumber: z9.string().optional(),
1069
+ phone: z9.string().optional(),
1070
+ email: z9.string().optional(),
788
1071
  address: AddressSchema.optional()
789
1072
  }).merge(SourceProvenanceSchema);
790
1073
 
791
1074
  // src/schemas/financial.ts
792
- import { z as z9 } from "zod";
793
- var PaymentInstallmentSchema = z9.object({
794
- dueDate: z9.string(),
795
- amount: z9.string(),
796
- description: z9.string().optional()
1075
+ import { z as z10 } from "zod";
1076
+ var PaymentInstallmentSchema = z10.object({
1077
+ dueDate: z10.string(),
1078
+ amount: z10.string(),
1079
+ description: z10.string().optional()
797
1080
  });
798
- var PaymentPlanSchema = z9.object({
799
- installments: z9.array(PaymentInstallmentSchema),
800
- financeCharge: z9.string().optional()
1081
+ var PaymentPlanSchema = z10.object({
1082
+ installments: z10.array(PaymentInstallmentSchema),
1083
+ financeCharge: z10.string().optional()
801
1084
  });
802
- var LocationPremiumSchema = z9.object({
803
- locationNumber: z9.number(),
804
- premium: z9.string(),
805
- description: z9.string().optional()
1085
+ var LocationPremiumSchema = z10.object({
1086
+ locationNumber: z10.number(),
1087
+ premium: z10.string(),
1088
+ description: z10.string().optional()
806
1089
  });
807
1090
 
808
1091
  // src/schemas/loss-history.ts
809
- import { z as z10 } from "zod";
810
- var ClaimRecordSchema = z10.object({
811
- dateOfLoss: z10.string(),
812
- claimNumber: z10.string().optional(),
813
- description: z10.string(),
1092
+ import { z as z11 } from "zod";
1093
+ var ClaimRecordSchema = z11.object({
1094
+ dateOfLoss: z11.string(),
1095
+ claimNumber: z11.string().optional(),
1096
+ description: z11.string(),
814
1097
  status: ClaimStatusSchema,
815
- paid: z10.string().optional(),
816
- reserved: z10.string().optional(),
817
- incurred: z10.string().optional(),
818
- claimant: z10.string().optional(),
819
- coverageLine: z10.string().optional()
820
- });
821
- var LossSummarySchema = z10.object({
822
- period: z10.string().optional(),
823
- totalClaims: z10.number().optional(),
824
- totalIncurred: z10.string().optional(),
825
- totalPaid: z10.string().optional(),
826
- totalReserved: z10.string().optional(),
827
- lossRatio: z10.string().optional()
828
- });
829
- var ExperienceModSchema = z10.object({
830
- factor: z10.number(),
831
- effectiveDate: z10.string().optional(),
832
- state: z10.string().optional()
1098
+ paid: z11.string().optional(),
1099
+ reserved: z11.string().optional(),
1100
+ incurred: z11.string().optional(),
1101
+ claimant: z11.string().optional(),
1102
+ coverageLine: z11.string().optional()
1103
+ });
1104
+ var LossSummarySchema = z11.object({
1105
+ period: z11.string().optional(),
1106
+ totalClaims: z11.number().optional(),
1107
+ totalIncurred: z11.string().optional(),
1108
+ totalPaid: z11.string().optional(),
1109
+ totalReserved: z11.string().optional(),
1110
+ lossRatio: z11.string().optional()
1111
+ });
1112
+ var ExperienceModSchema = z11.object({
1113
+ factor: z11.number(),
1114
+ effectiveDate: z11.string().optional(),
1115
+ state: z11.string().optional()
833
1116
  });
834
1117
 
835
1118
  // src/schemas/underwriting.ts
836
- import { z as z11 } from "zod";
837
- var EnrichedSubjectivitySchema = z11.object({
838
- description: z11.string(),
1119
+ import { z as z12 } from "zod";
1120
+ var EnrichedSubjectivitySchema = z12.object({
1121
+ description: z12.string(),
839
1122
  category: SubjectivityCategorySchema.optional(),
840
- dueDate: z11.string().optional(),
841
- status: z11.enum(["open", "satisfied", "waived"]).optional(),
842
- pageNumber: z11.number().optional()
1123
+ dueDate: z12.string().optional(),
1124
+ status: z12.enum(["open", "satisfied", "waived"]).optional(),
1125
+ pageNumber: z12.number().optional()
843
1126
  });
844
- var EnrichedUnderwritingConditionSchema = z11.object({
845
- description: z11.string(),
846
- category: z11.string().optional(),
847
- pageNumber: z11.number().optional()
1127
+ var EnrichedUnderwritingConditionSchema = z12.object({
1128
+ description: z12.string(),
1129
+ category: z12.string().optional(),
1130
+ pageNumber: z12.number().optional()
848
1131
  });
849
- var BindingAuthoritySchema = z11.object({
850
- authorizedBy: z11.string().optional(),
851
- method: z11.string().optional(),
852
- expiration: z11.string().optional(),
853
- conditions: z11.array(z11.string()).optional()
1132
+ var BindingAuthoritySchema = z12.object({
1133
+ authorizedBy: z12.string().optional(),
1134
+ method: z12.string().optional(),
1135
+ expiration: z12.string().optional(),
1136
+ conditions: z12.array(z12.string()).optional()
854
1137
  });
855
1138
 
856
1139
  // src/schemas/declarations/index.ts
857
- import { z as z15 } from "zod";
1140
+ import { z as z16 } from "zod";
858
1141
 
859
1142
  // src/schemas/declarations/personal.ts
860
- import { z as z13 } from "zod";
1143
+ import { z as z14 } from "zod";
861
1144
 
862
1145
  // src/schemas/declarations/shared.ts
863
- import { z as z12 } from "zod";
864
- var EmployersLiabilityLimitsSchema = z12.object({
865
- eachAccident: z12.string(),
866
- diseasePolicyLimit: z12.string(),
867
- diseaseEachEmployee: z12.string()
868
- });
869
- var LimitScheduleSchema = z12.object({
870
- perOccurrence: z12.string().optional(),
871
- generalAggregate: z12.string().optional(),
872
- productsCompletedOpsAggregate: z12.string().optional(),
873
- personalAdvertisingInjury: z12.string().optional(),
874
- eachEmployee: z12.string().optional(),
875
- fireDamage: z12.string().optional(),
876
- medicalExpense: z12.string().optional(),
877
- combinedSingleLimit: z12.string().optional(),
878
- bodilyInjuryPerPerson: z12.string().optional(),
879
- bodilyInjuryPerAccident: z12.string().optional(),
880
- propertyDamage: z12.string().optional(),
881
- eachOccurrenceUmbrella: z12.string().optional(),
882
- umbrellaAggregate: z12.string().optional(),
883
- umbrellaRetention: z12.string().optional(),
884
- statutory: z12.boolean().optional(),
1146
+ import { z as z13 } from "zod";
1147
+ var EmployersLiabilityLimitsSchema = z13.object({
1148
+ eachAccident: z13.string(),
1149
+ diseasePolicyLimit: z13.string(),
1150
+ diseaseEachEmployee: z13.string()
1151
+ });
1152
+ var LimitScheduleSchema = z13.object({
1153
+ perOccurrence: z13.string().optional(),
1154
+ generalAggregate: z13.string().optional(),
1155
+ productsCompletedOpsAggregate: z13.string().optional(),
1156
+ personalAdvertisingInjury: z13.string().optional(),
1157
+ eachEmployee: z13.string().optional(),
1158
+ fireDamage: z13.string().optional(),
1159
+ medicalExpense: z13.string().optional(),
1160
+ combinedSingleLimit: z13.string().optional(),
1161
+ bodilyInjuryPerPerson: z13.string().optional(),
1162
+ bodilyInjuryPerAccident: z13.string().optional(),
1163
+ propertyDamage: z13.string().optional(),
1164
+ eachOccurrenceUmbrella: z13.string().optional(),
1165
+ umbrellaAggregate: z13.string().optional(),
1166
+ umbrellaRetention: z13.string().optional(),
1167
+ statutory: z13.boolean().optional(),
885
1168
  employersLiability: EmployersLiabilityLimitsSchema.optional(),
886
- sublimits: z12.array(SublimitSchema).optional(),
887
- sharedLimits: z12.array(SharedLimitSchema).optional(),
1169
+ sublimits: z13.array(SublimitSchema).optional(),
1170
+ sharedLimits: z13.array(SharedLimitSchema).optional(),
888
1171
  defenseCostTreatment: DefenseCostTreatmentSchema.optional()
889
1172
  });
890
- var DeductibleScheduleSchema = z12.object({
891
- perClaim: z12.string().optional(),
892
- perOccurrence: z12.string().optional(),
893
- aggregateDeductible: z12.string().optional(),
894
- selfInsuredRetention: z12.string().optional(),
895
- corridorDeductible: z12.string().optional(),
896
- waitingPeriod: z12.string().optional(),
897
- appliesTo: z12.enum(["damages_only", "damages_and_defense", "defense_only"]).optional()
898
- });
899
- var InsuredLocationSchema = z12.object({
900
- number: z12.number(),
1173
+ var DeductibleScheduleSchema = z13.object({
1174
+ perClaim: z13.string().optional(),
1175
+ perOccurrence: z13.string().optional(),
1176
+ aggregateDeductible: z13.string().optional(),
1177
+ selfInsuredRetention: z13.string().optional(),
1178
+ corridorDeductible: z13.string().optional(),
1179
+ waitingPeriod: z13.string().optional(),
1180
+ appliesTo: z13.enum(["damages_only", "damages_and_defense", "defense_only"]).optional()
1181
+ });
1182
+ var InsuredLocationSchema = z13.object({
1183
+ number: z13.number(),
901
1184
  address: AddressSchema,
902
- description: z12.string().optional(),
903
- buildingValue: z12.string().optional(),
904
- contentsValue: z12.string().optional(),
905
- businessIncomeValue: z12.string().optional(),
906
- constructionType: z12.string().optional(),
907
- yearBuilt: z12.number().optional(),
908
- squareFootage: z12.number().optional(),
909
- protectionClass: z12.string().optional(),
910
- sprinklered: z12.boolean().optional(),
911
- alarmType: z12.string().optional(),
912
- occupancy: z12.string().optional()
913
- });
914
- var VehicleCoverageSchema = z12.object({
1185
+ description: z13.string().optional(),
1186
+ buildingValue: z13.string().optional(),
1187
+ contentsValue: z13.string().optional(),
1188
+ businessIncomeValue: z13.string().optional(),
1189
+ constructionType: z13.string().optional(),
1190
+ yearBuilt: z13.number().optional(),
1191
+ squareFootage: z13.number().optional(),
1192
+ protectionClass: z13.string().optional(),
1193
+ sprinklered: z13.boolean().optional(),
1194
+ alarmType: z13.string().optional(),
1195
+ occupancy: z13.string().optional()
1196
+ });
1197
+ var VehicleCoverageSchema = z13.object({
915
1198
  type: VehicleCoverageTypeSchema,
916
- limit: z12.string().optional(),
917
- deductible: z12.string().optional(),
918
- included: z12.boolean()
919
- });
920
- var InsuredVehicleSchema = z12.object({
921
- number: z12.number(),
922
- year: z12.number(),
923
- make: z12.string(),
924
- model: z12.string(),
925
- vin: z12.string(),
926
- costNew: z12.string().optional(),
927
- statedValue: z12.string().optional(),
928
- garageLocation: z12.number().optional(),
929
- coverages: z12.array(VehicleCoverageSchema).optional(),
930
- radius: z12.string().optional(),
931
- vehicleType: z12.string().optional()
932
- });
933
- var ClassificationCodeSchema = z12.object({
934
- code: z12.string(),
935
- description: z12.string(),
936
- premiumBasis: z12.string(),
937
- basisAmount: z12.string().optional(),
938
- rate: z12.string().optional(),
939
- premium: z12.string().optional(),
940
- locationNumber: z12.number().optional()
941
- });
942
- var DwellingDetailsSchema = z12.object({
1199
+ limit: z13.string().optional(),
1200
+ deductible: z13.string().optional(),
1201
+ included: z13.boolean()
1202
+ });
1203
+ var InsuredVehicleSchema = z13.object({
1204
+ number: z13.number(),
1205
+ year: z13.number(),
1206
+ make: z13.string(),
1207
+ model: z13.string(),
1208
+ vin: z13.string(),
1209
+ costNew: z13.string().optional(),
1210
+ statedValue: z13.string().optional(),
1211
+ garageLocation: z13.number().optional(),
1212
+ coverages: z13.array(VehicleCoverageSchema).optional(),
1213
+ radius: z13.string().optional(),
1214
+ vehicleType: z13.string().optional()
1215
+ });
1216
+ var ClassificationCodeSchema = z13.object({
1217
+ code: z13.string(),
1218
+ description: z13.string(),
1219
+ premiumBasis: z13.string(),
1220
+ basisAmount: z13.string().optional(),
1221
+ rate: z13.string().optional(),
1222
+ premium: z13.string().optional(),
1223
+ locationNumber: z13.number().optional()
1224
+ });
1225
+ var DwellingDetailsSchema = z13.object({
943
1226
  constructionType: ConstructionTypeSchema.optional(),
944
- yearBuilt: z12.number().optional(),
945
- squareFootage: z12.number().optional(),
946
- stories: z12.number().optional(),
1227
+ yearBuilt: z13.number().optional(),
1228
+ squareFootage: z13.number().optional(),
1229
+ stories: z13.number().optional(),
947
1230
  roofType: RoofTypeSchema.optional(),
948
- roofAge: z12.number().optional(),
949
- heatingType: z12.enum(["central", "baseboard", "radiant", "space_heater", "heat_pump", "other"]).optional(),
1231
+ roofAge: z13.number().optional(),
1232
+ heatingType: z13.enum(["central", "baseboard", "radiant", "space_heater", "heat_pump", "other"]).optional(),
950
1233
  foundationType: FoundationTypeSchema.optional(),
951
- plumbingType: z12.enum(["copper", "pex", "galvanized", "polybutylene", "cpvc", "other"]).optional(),
952
- electricalType: z12.enum(["circuit_breaker", "fuse_box", "knob_and_tube", "other"]).optional(),
953
- electricalAmps: z12.number().optional(),
954
- hasSwimmingPool: z12.boolean().optional(),
955
- poolType: z12.enum(["in_ground", "above_ground"]).optional(),
956
- hasTrampoline: z12.boolean().optional(),
957
- hasDog: z12.boolean().optional(),
958
- dogBreed: z12.string().optional(),
959
- protectiveDevices: z12.array(z12.string()).optional(),
960
- distanceToFireStation: z12.string().optional(),
961
- distanceToHydrant: z12.string().optional(),
962
- fireProtectionClass: z12.string().optional()
963
- });
964
- var DriverRecordSchema = z12.object({
965
- name: z12.string(),
966
- dateOfBirth: z12.string().optional(),
967
- licenseNumber: z12.string().optional(),
968
- licenseState: z12.string().optional(),
969
- relationship: z12.enum(["named_insured", "spouse", "child", "other_household", "other"]).optional(),
970
- yearsLicensed: z12.number().optional(),
971
- gender: z12.string().optional(),
972
- maritalStatus: z12.string().optional(),
973
- goodStudentDiscount: z12.boolean().optional(),
974
- defensiveDriverDiscount: z12.boolean().optional(),
975
- violations: z12.array(z12.object({
976
- date: z12.string().optional(),
977
- type: z12.string().optional(),
978
- description: z12.string().optional()
1234
+ plumbingType: z13.enum(["copper", "pex", "galvanized", "polybutylene", "cpvc", "other"]).optional(),
1235
+ electricalType: z13.enum(["circuit_breaker", "fuse_box", "knob_and_tube", "other"]).optional(),
1236
+ electricalAmps: z13.number().optional(),
1237
+ hasSwimmingPool: z13.boolean().optional(),
1238
+ poolType: z13.enum(["in_ground", "above_ground"]).optional(),
1239
+ hasTrampoline: z13.boolean().optional(),
1240
+ hasDog: z13.boolean().optional(),
1241
+ dogBreed: z13.string().optional(),
1242
+ protectiveDevices: z13.array(z13.string()).optional(),
1243
+ distanceToFireStation: z13.string().optional(),
1244
+ distanceToHydrant: z13.string().optional(),
1245
+ fireProtectionClass: z13.string().optional()
1246
+ });
1247
+ var DriverRecordSchema = z13.object({
1248
+ name: z13.string(),
1249
+ dateOfBirth: z13.string().optional(),
1250
+ licenseNumber: z13.string().optional(),
1251
+ licenseState: z13.string().optional(),
1252
+ relationship: z13.enum(["named_insured", "spouse", "child", "other_household", "other"]).optional(),
1253
+ yearsLicensed: z13.number().optional(),
1254
+ gender: z13.string().optional(),
1255
+ maritalStatus: z13.string().optional(),
1256
+ goodStudentDiscount: z13.boolean().optional(),
1257
+ defensiveDriverDiscount: z13.boolean().optional(),
1258
+ violations: z13.array(z13.object({
1259
+ date: z13.string().optional(),
1260
+ type: z13.string().optional(),
1261
+ description: z13.string().optional()
979
1262
  })).optional(),
980
- accidents: z12.array(z12.object({
981
- date: z12.string().optional(),
982
- atFault: z12.boolean().optional(),
983
- description: z12.string().optional(),
984
- amountPaid: z12.string().optional()
1263
+ accidents: z13.array(z13.object({
1264
+ date: z13.string().optional(),
1265
+ atFault: z13.boolean().optional(),
1266
+ description: z13.string().optional(),
1267
+ amountPaid: z13.string().optional()
985
1268
  })).optional(),
986
- sr22Required: z12.boolean().optional()
987
- });
988
- var PersonalVehicleDetailsSchema = z12.object({
989
- number: z12.number().optional(),
990
- year: z12.number().optional(),
991
- make: z12.string().optional(),
992
- model: z12.string().optional(),
993
- vin: z12.string().optional(),
994
- bodyType: z12.string().optional(),
1269
+ sr22Required: z13.boolean().optional()
1270
+ });
1271
+ var PersonalVehicleDetailsSchema = z13.object({
1272
+ number: z13.number().optional(),
1273
+ year: z13.number().optional(),
1274
+ make: z13.string().optional(),
1275
+ model: z13.string().optional(),
1276
+ vin: z13.string().optional(),
1277
+ bodyType: z13.string().optional(),
995
1278
  garagingAddress: AddressSchema.optional(),
996
1279
  usage: PersonalAutoUsageSchema.optional(),
997
- annualMileage: z12.number().optional(),
998
- odometerReading: z12.number().optional(),
999
- driverAssignment: z12.string().optional(),
1280
+ annualMileage: z13.number().optional(),
1281
+ odometerReading: z13.number().optional(),
1282
+ driverAssignment: z13.string().optional(),
1000
1283
  lienHolder: EndorsementPartySchema.optional(),
1001
- collisionDeductible: z12.string().optional(),
1002
- comprehensiveDeductible: z12.string().optional(),
1003
- rentalReimbursement: z12.boolean().optional(),
1004
- towing: z12.boolean().optional()
1284
+ collisionDeductible: z13.string().optional(),
1285
+ comprehensiveDeductible: z13.string().optional(),
1286
+ rentalReimbursement: z13.boolean().optional(),
1287
+ towing: z13.boolean().optional()
1005
1288
  });
1006
1289
 
1007
1290
  // src/schemas/declarations/personal.ts
1008
- var HomeownersDeclarationsSchema = z13.object({
1009
- line: z13.literal("homeowners"),
1291
+ var HomeownersDeclarationsSchema = z14.object({
1292
+ line: z14.literal("homeowners"),
1010
1293
  formType: HomeownersFormTypeSchema,
1011
- coverageA: z13.string().optional(),
1012
- coverageB: z13.string().optional(),
1013
- coverageC: z13.string().optional(),
1014
- coverageD: z13.string().optional(),
1015
- coverageE: z13.string().optional(),
1016
- coverageF: z13.string().optional(),
1017
- allPerilDeductible: z13.string().optional(),
1018
- windHailDeductible: z13.string().optional(),
1019
- hurricaneDeductible: z13.string().optional(),
1294
+ coverageA: z14.string().optional(),
1295
+ coverageB: z14.string().optional(),
1296
+ coverageC: z14.string().optional(),
1297
+ coverageD: z14.string().optional(),
1298
+ coverageE: z14.string().optional(),
1299
+ coverageF: z14.string().optional(),
1300
+ allPerilDeductible: z14.string().optional(),
1301
+ windHailDeductible: z14.string().optional(),
1302
+ hurricaneDeductible: z14.string().optional(),
1020
1303
  lossSettlement: LossSettlementSchema.optional(),
1021
1304
  dwelling: DwellingDetailsSchema,
1022
1305
  mortgagee: EndorsementPartySchema.optional(),
1023
- additionalMortgagees: z13.array(EndorsementPartySchema).optional()
1024
- });
1025
- var PersonalAutoDeclarationsSchema = z13.object({
1026
- line: z13.literal("personal_auto"),
1027
- vehicles: z13.array(PersonalVehicleDetailsSchema),
1028
- drivers: z13.array(DriverRecordSchema),
1029
- liabilityLimits: z13.object({
1030
- bodilyInjuryPerPerson: z13.string().optional(),
1031
- bodilyInjuryPerAccident: z13.string().optional(),
1032
- propertyDamage: z13.string().optional(),
1033
- combinedSingleLimit: z13.string().optional()
1306
+ additionalMortgagees: z14.array(EndorsementPartySchema).optional()
1307
+ });
1308
+ var PersonalAutoDeclarationsSchema = z14.object({
1309
+ line: z14.literal("personal_auto"),
1310
+ vehicles: z14.array(PersonalVehicleDetailsSchema),
1311
+ drivers: z14.array(DriverRecordSchema),
1312
+ liabilityLimits: z14.object({
1313
+ bodilyInjuryPerPerson: z14.string().optional(),
1314
+ bodilyInjuryPerAccident: z14.string().optional(),
1315
+ propertyDamage: z14.string().optional(),
1316
+ combinedSingleLimit: z14.string().optional()
1034
1317
  }).optional(),
1035
- umLimits: z13.object({
1036
- bodilyInjuryPerPerson: z13.string().optional(),
1037
- bodilyInjuryPerAccident: z13.string().optional()
1318
+ umLimits: z14.object({
1319
+ bodilyInjuryPerPerson: z14.string().optional(),
1320
+ bodilyInjuryPerAccident: z14.string().optional()
1038
1321
  }).optional(),
1039
- uimLimits: z13.object({
1040
- bodilyInjuryPerPerson: z13.string().optional(),
1041
- bodilyInjuryPerAccident: z13.string().optional()
1322
+ uimLimits: z14.object({
1323
+ bodilyInjuryPerPerson: z14.string().optional(),
1324
+ bodilyInjuryPerAccident: z14.string().optional()
1042
1325
  }).optional(),
1043
- pipLimit: z13.string().optional(),
1044
- medPayLimit: z13.string().optional()
1326
+ pipLimit: z14.string().optional(),
1327
+ medPayLimit: z14.string().optional()
1045
1328
  });
1046
- var DwellingFireDeclarationsSchema = z13.object({
1047
- line: z13.literal("dwelling_fire"),
1329
+ var DwellingFireDeclarationsSchema = z14.object({
1330
+ line: z14.literal("dwelling_fire"),
1048
1331
  formType: DwellingFireFormTypeSchema,
1049
- dwellingLimit: z13.string().optional(),
1050
- otherStructuresLimit: z13.string().optional(),
1051
- personalPropertyLimit: z13.string().optional(),
1052
- fairRentalValueLimit: z13.string().optional(),
1053
- liabilityLimit: z13.string().optional(),
1054
- medicalPaymentsLimit: z13.string().optional(),
1055
- deductible: z13.string().optional(),
1332
+ dwellingLimit: z14.string().optional(),
1333
+ otherStructuresLimit: z14.string().optional(),
1334
+ personalPropertyLimit: z14.string().optional(),
1335
+ fairRentalValueLimit: z14.string().optional(),
1336
+ liabilityLimit: z14.string().optional(),
1337
+ medicalPaymentsLimit: z14.string().optional(),
1338
+ deductible: z14.string().optional(),
1056
1339
  dwelling: DwellingDetailsSchema
1057
1340
  });
1058
- var FloodDeclarationsSchema = z13.object({
1059
- line: z13.literal("flood"),
1060
- programType: z13.enum(["nfip", "private"]),
1341
+ var FloodDeclarationsSchema = z14.object({
1342
+ line: z14.literal("flood"),
1343
+ programType: z14.enum(["nfip", "private"]),
1061
1344
  floodZone: FloodZoneSchema.optional(),
1062
- communityNumber: z13.string().optional(),
1063
- communityRating: z13.number().optional(),
1064
- buildingCoverage: z13.string().optional(),
1065
- contentsCoverage: z13.string().optional(),
1066
- iccCoverage: z13.string().optional(),
1067
- deductible: z13.string().optional(),
1068
- waitingPeriodDays: z13.number().optional(),
1069
- elevationCertificate: z13.boolean().optional(),
1070
- elevationDifference: z13.string().optional(),
1071
- buildingDiagramNumber: z13.number().optional(),
1072
- basementOrEnclosure: z13.boolean().optional(),
1073
- postFirmConstruction: z13.boolean().optional()
1074
- });
1075
- var EarthquakeDeclarationsSchema = z13.object({
1076
- line: z13.literal("earthquake"),
1077
- dwellingCoverage: z13.string().optional(),
1078
- contentsCoverage: z13.string().optional(),
1079
- lossOfUseCoverage: z13.string().optional(),
1080
- deductiblePercent: z13.number().optional(),
1081
- retrofitDiscount: z13.boolean().optional(),
1082
- masonryVeneerCoverage: z13.boolean().optional()
1083
- });
1084
- var PersonalUmbrellaDeclarationsSchema = z13.object({
1085
- line: z13.literal("personal_umbrella"),
1086
- perOccurrenceLimit: z13.string().optional(),
1087
- aggregateLimit: z13.string().optional(),
1088
- retainedLimit: z13.string().optional(),
1089
- underlyingPolicies: z13.array(z13.object({
1090
- carrier: z13.string().optional(),
1091
- policyNumber: z13.string().optional(),
1092
- policyType: z13.string().optional(),
1093
- limits: z13.string().optional()
1345
+ communityNumber: z14.string().optional(),
1346
+ communityRating: z14.number().optional(),
1347
+ buildingCoverage: z14.string().optional(),
1348
+ contentsCoverage: z14.string().optional(),
1349
+ iccCoverage: z14.string().optional(),
1350
+ deductible: z14.string().optional(),
1351
+ waitingPeriodDays: z14.number().optional(),
1352
+ elevationCertificate: z14.boolean().optional(),
1353
+ elevationDifference: z14.string().optional(),
1354
+ buildingDiagramNumber: z14.number().optional(),
1355
+ basementOrEnclosure: z14.boolean().optional(),
1356
+ postFirmConstruction: z14.boolean().optional()
1357
+ });
1358
+ var EarthquakeDeclarationsSchema = z14.object({
1359
+ line: z14.literal("earthquake"),
1360
+ dwellingCoverage: z14.string().optional(),
1361
+ contentsCoverage: z14.string().optional(),
1362
+ lossOfUseCoverage: z14.string().optional(),
1363
+ deductiblePercent: z14.number().optional(),
1364
+ retrofitDiscount: z14.boolean().optional(),
1365
+ masonryVeneerCoverage: z14.boolean().optional()
1366
+ });
1367
+ var PersonalUmbrellaDeclarationsSchema = z14.object({
1368
+ line: z14.literal("personal_umbrella"),
1369
+ perOccurrenceLimit: z14.string().optional(),
1370
+ aggregateLimit: z14.string().optional(),
1371
+ retainedLimit: z14.string().optional(),
1372
+ underlyingPolicies: z14.array(z14.object({
1373
+ carrier: z14.string().optional(),
1374
+ policyNumber: z14.string().optional(),
1375
+ policyType: z14.string().optional(),
1376
+ limits: z14.string().optional()
1094
1377
  }))
1095
1378
  });
1096
- var PersonalArticlesDeclarationsSchema = z13.object({
1097
- line: z13.literal("personal_articles"),
1098
- scheduledItems: z13.array(z13.object({
1099
- itemNumber: z13.number().optional(),
1379
+ var PersonalArticlesDeclarationsSchema = z14.object({
1380
+ line: z14.literal("personal_articles"),
1381
+ scheduledItems: z14.array(z14.object({
1382
+ itemNumber: z14.number().optional(),
1100
1383
  category: ScheduledItemCategorySchema.optional(),
1101
- description: z13.string(),
1102
- appraisedValue: z13.string(),
1103
- appraisalDate: z13.string().optional()
1384
+ description: z14.string(),
1385
+ appraisedValue: z14.string(),
1386
+ appraisalDate: z14.string().optional()
1104
1387
  })),
1105
- blanketCoverage: z13.string().optional(),
1106
- deductible: z13.string().optional(),
1107
- worldwideCoverage: z13.boolean().optional(),
1108
- breakageCoverage: z13.boolean().optional()
1388
+ blanketCoverage: z14.string().optional(),
1389
+ deductible: z14.string().optional(),
1390
+ worldwideCoverage: z14.boolean().optional(),
1391
+ breakageCoverage: z14.boolean().optional()
1109
1392
  });
1110
- var WatercraftDeclarationsSchema = z13.object({
1111
- line: z13.literal("watercraft"),
1393
+ var WatercraftDeclarationsSchema = z14.object({
1394
+ line: z14.literal("watercraft"),
1112
1395
  boatType: BoatTypeSchema.optional(),
1113
- year: z13.number().optional(),
1114
- make: z13.string().optional(),
1115
- model: z13.string().optional(),
1116
- length: z13.string().optional(),
1117
- hullMaterial: z13.enum(["fiberglass", "aluminum", "wood", "steel", "inflatable", "other"]).optional(),
1118
- hullValue: z13.string().optional(),
1119
- motorHorsepower: z13.number().optional(),
1120
- motorType: z13.enum(["outboard", "inboard", "inboard_outboard", "jet"]).optional(),
1121
- navigationLimits: z13.string().optional(),
1122
- layupPeriod: z13.string().optional(),
1123
- liabilityLimit: z13.string().optional(),
1124
- medicalPaymentsLimit: z13.string().optional(),
1125
- physicalDamageDeductible: z13.string().optional(),
1126
- uninsuredBoaterLimit: z13.string().optional(),
1127
- trailerCovered: z13.boolean().optional(),
1128
- trailerValue: z13.string().optional()
1129
- });
1130
- var RecreationalVehicleDeclarationsSchema = z13.object({
1131
- line: z13.literal("recreational_vehicle"),
1396
+ year: z14.number().optional(),
1397
+ make: z14.string().optional(),
1398
+ model: z14.string().optional(),
1399
+ length: z14.string().optional(),
1400
+ hullMaterial: z14.enum(["fiberglass", "aluminum", "wood", "steel", "inflatable", "other"]).optional(),
1401
+ hullValue: z14.string().optional(),
1402
+ motorHorsepower: z14.number().optional(),
1403
+ motorType: z14.enum(["outboard", "inboard", "inboard_outboard", "jet"]).optional(),
1404
+ navigationLimits: z14.string().optional(),
1405
+ layupPeriod: z14.string().optional(),
1406
+ liabilityLimit: z14.string().optional(),
1407
+ medicalPaymentsLimit: z14.string().optional(),
1408
+ physicalDamageDeductible: z14.string().optional(),
1409
+ uninsuredBoaterLimit: z14.string().optional(),
1410
+ trailerCovered: z14.boolean().optional(),
1411
+ trailerValue: z14.string().optional()
1412
+ });
1413
+ var RecreationalVehicleDeclarationsSchema = z14.object({
1414
+ line: z14.literal("recreational_vehicle"),
1132
1415
  vehicleType: RVTypeSchema,
1133
- year: z13.number().optional(),
1134
- make: z13.string().optional(),
1135
- model: z13.string().optional(),
1136
- vin: z13.string().optional(),
1137
- value: z13.string().optional(),
1138
- liabilityLimit: z13.string().optional(),
1139
- collisionDeductible: z13.string().optional(),
1140
- comprehensiveDeductible: z13.string().optional(),
1141
- personalEffectsCoverage: z13.string().optional(),
1142
- fullTimerCoverage: z13.boolean().optional()
1143
- });
1144
- var FarmRanchDeclarationsSchema = z13.object({
1145
- line: z13.literal("farm_ranch"),
1146
- dwellingCoverage: z13.string().optional(),
1147
- farmPersonalPropertyCoverage: z13.string().optional(),
1148
- farmLiabilityLimit: z13.string().optional(),
1149
- farmAutoIncluded: z13.boolean().optional(),
1150
- livestock: z13.array(z13.object({
1151
- type: z13.string(),
1152
- headCount: z13.number(),
1153
- value: z13.string().optional()
1416
+ year: z14.number().optional(),
1417
+ make: z14.string().optional(),
1418
+ model: z14.string().optional(),
1419
+ vin: z14.string().optional(),
1420
+ value: z14.string().optional(),
1421
+ liabilityLimit: z14.string().optional(),
1422
+ collisionDeductible: z14.string().optional(),
1423
+ comprehensiveDeductible: z14.string().optional(),
1424
+ personalEffectsCoverage: z14.string().optional(),
1425
+ fullTimerCoverage: z14.boolean().optional()
1426
+ });
1427
+ var FarmRanchDeclarationsSchema = z14.object({
1428
+ line: z14.literal("farm_ranch"),
1429
+ dwellingCoverage: z14.string().optional(),
1430
+ farmPersonalPropertyCoverage: z14.string().optional(),
1431
+ farmLiabilityLimit: z14.string().optional(),
1432
+ farmAutoIncluded: z14.boolean().optional(),
1433
+ livestock: z14.array(z14.object({
1434
+ type: z14.string(),
1435
+ headCount: z14.number(),
1436
+ value: z14.string().optional()
1154
1437
  })).optional(),
1155
- equipmentSchedule: z13.array(z13.object({
1156
- description: z13.string(),
1157
- value: z13.string()
1438
+ equipmentSchedule: z14.array(z14.object({
1439
+ description: z14.string(),
1440
+ value: z14.string()
1158
1441
  })).optional(),
1159
- acreage: z13.number().optional(),
1442
+ acreage: z14.number().optional(),
1160
1443
  dwelling: DwellingDetailsSchema.optional()
1161
1444
  });
1162
- var TitleDeclarationsSchema = z13.object({
1163
- line: z13.literal("title"),
1445
+ var TitleDeclarationsSchema = z14.object({
1446
+ line: z14.literal("title"),
1164
1447
  policyType: TitlePolicyTypeSchema,
1165
- policyAmount: z13.string(),
1166
- legalDescription: z13.string().optional(),
1448
+ policyAmount: z14.string(),
1449
+ legalDescription: z14.string().optional(),
1167
1450
  propertyAddress: AddressSchema.optional(),
1168
- effectiveDate: z13.string().optional(),
1169
- exceptions: z13.array(z13.object({
1170
- number: z13.number(),
1171
- description: z13.string()
1451
+ effectiveDate: z14.string().optional(),
1452
+ exceptions: z14.array(z14.object({
1453
+ number: z14.number(),
1454
+ description: z14.string()
1172
1455
  })).optional(),
1173
- underwriter: z13.string().optional()
1456
+ underwriter: z14.string().optional()
1174
1457
  });
1175
- var PetDeclarationsSchema = z13.object({
1176
- line: z13.literal("pet"),
1458
+ var PetDeclarationsSchema = z14.object({
1459
+ line: z14.literal("pet"),
1177
1460
  species: PetSpeciesSchema,
1178
- breed: z13.string().optional(),
1179
- petName: z13.string().optional(),
1180
- age: z13.number().optional(),
1181
- annualLimit: z13.string().optional(),
1182
- perIncidentLimit: z13.string().optional(),
1183
- deductible: z13.string().optional(),
1184
- reimbursementPercent: z13.number().optional(),
1185
- waitingPeriodDays: z13.number().optional(),
1186
- preExistingConditionsExcluded: z13.boolean().optional(),
1187
- wellnessCoverage: z13.boolean().optional()
1188
- });
1189
- var TravelDeclarationsSchema = z13.object({
1190
- line: z13.literal("travel"),
1191
- tripDepartureDate: z13.string().optional(),
1192
- tripReturnDate: z13.string().optional(),
1193
- destinations: z13.array(z13.string()).optional(),
1194
- travelers: z13.array(z13.object({
1195
- name: z13.string(),
1196
- age: z13.number().optional()
1461
+ breed: z14.string().optional(),
1462
+ petName: z14.string().optional(),
1463
+ age: z14.number().optional(),
1464
+ annualLimit: z14.string().optional(),
1465
+ perIncidentLimit: z14.string().optional(),
1466
+ deductible: z14.string().optional(),
1467
+ reimbursementPercent: z14.number().optional(),
1468
+ waitingPeriodDays: z14.number().optional(),
1469
+ preExistingConditionsExcluded: z14.boolean().optional(),
1470
+ wellnessCoverage: z14.boolean().optional()
1471
+ });
1472
+ var TravelDeclarationsSchema = z14.object({
1473
+ line: z14.literal("travel"),
1474
+ tripDepartureDate: z14.string().optional(),
1475
+ tripReturnDate: z14.string().optional(),
1476
+ destinations: z14.array(z14.string()).optional(),
1477
+ travelers: z14.array(z14.object({
1478
+ name: z14.string(),
1479
+ age: z14.number().optional()
1197
1480
  })).optional(),
1198
- tripCost: z13.string().optional(),
1199
- tripCancellationLimit: z13.string().optional(),
1200
- medicalLimit: z13.string().optional(),
1201
- evacuationLimit: z13.string().optional(),
1202
- baggageLimit: z13.string().optional()
1481
+ tripCost: z14.string().optional(),
1482
+ tripCancellationLimit: z14.string().optional(),
1483
+ medicalLimit: z14.string().optional(),
1484
+ evacuationLimit: z14.string().optional(),
1485
+ baggageLimit: z14.string().optional()
1203
1486
  });
1204
- var IdentityTheftDeclarationsSchema = z13.object({
1205
- line: z13.literal("identity_theft"),
1206
- coverageLimit: z13.string().optional(),
1207
- expenseReimbursement: z13.string().optional(),
1208
- creditMonitoring: z13.boolean().optional(),
1209
- restorationServices: z13.boolean().optional(),
1210
- lostWagesLimit: z13.string().optional()
1487
+ var IdentityTheftDeclarationsSchema = z14.object({
1488
+ line: z14.literal("identity_theft"),
1489
+ coverageLimit: z14.string().optional(),
1490
+ expenseReimbursement: z14.string().optional(),
1491
+ creditMonitoring: z14.boolean().optional(),
1492
+ restorationServices: z14.boolean().optional(),
1493
+ lostWagesLimit: z14.string().optional()
1211
1494
  });
1212
1495
 
1213
1496
  // src/schemas/declarations/commercial.ts
1214
- import { z as z14 } from "zod";
1215
- var GLDeclarationsSchema = z14.object({
1216
- line: z14.literal("gl"),
1497
+ import { z as z15 } from "zod";
1498
+ var GLDeclarationsSchema = z15.object({
1499
+ line: z15.literal("gl"),
1217
1500
  coverageForm: CoverageFormSchema.optional(),
1218
- perOccurrenceLimit: z14.string().optional(),
1219
- generalAggregate: z14.string().optional(),
1220
- productsCompletedOpsAggregate: z14.string().optional(),
1221
- personalAdvertisingInjury: z14.string().optional(),
1222
- fireDamage: z14.string().optional(),
1223
- medicalExpense: z14.string().optional(),
1501
+ perOccurrenceLimit: z15.string().optional(),
1502
+ generalAggregate: z15.string().optional(),
1503
+ productsCompletedOpsAggregate: z15.string().optional(),
1504
+ personalAdvertisingInjury: z15.string().optional(),
1505
+ fireDamage: z15.string().optional(),
1506
+ medicalExpense: z15.string().optional(),
1224
1507
  defenseCostTreatment: DefenseCostTreatmentSchema.optional(),
1225
- deductible: z14.string().optional(),
1226
- classifications: z14.array(ClassificationCodeSchema).optional(),
1227
- retroactiveDate: z14.string().optional()
1228
- });
1229
- var CommercialPropertyDeclarationsSchema = z14.object({
1230
- line: z14.literal("commercial_property"),
1231
- causesOfLossForm: z14.enum(["basic", "broad", "special"]).optional(),
1232
- coinsurancePercent: z14.number().optional(),
1508
+ deductible: z15.string().optional(),
1509
+ classifications: z15.array(ClassificationCodeSchema).optional(),
1510
+ retroactiveDate: z15.string().optional()
1511
+ });
1512
+ var CommercialPropertyDeclarationsSchema = z15.object({
1513
+ line: z15.literal("commercial_property"),
1514
+ causesOfLossForm: z15.enum(["basic", "broad", "special"]).optional(),
1515
+ coinsurancePercent: z15.number().optional(),
1233
1516
  valuationMethod: ValuationMethodSchema.optional(),
1234
- locations: z14.array(InsuredLocationSchema),
1235
- blanketLimit: z14.string().optional(),
1236
- businessIncomeLimit: z14.string().optional(),
1237
- extraExpenseLimit: z14.string().optional()
1238
- });
1239
- var CommercialAutoDeclarationsSchema = z14.object({
1240
- line: z14.literal("commercial_auto"),
1241
- vehicles: z14.array(InsuredVehicleSchema),
1242
- coveredAutoSymbols: z14.array(z14.number()).optional(),
1243
- liabilityLimit: z14.string().optional(),
1244
- umLimit: z14.string().optional(),
1245
- uimLimit: z14.string().optional(),
1246
- hiredAutoLiability: z14.boolean().optional(),
1247
- nonOwnedAutoLiability: z14.boolean().optional()
1248
- });
1249
- var WorkersCompDeclarationsSchema = z14.object({
1250
- line: z14.literal("workers_comp"),
1251
- coveredStates: z14.array(z14.string()).optional(),
1252
- classifications: z14.array(ClassificationCodeSchema),
1517
+ locations: z15.array(InsuredLocationSchema),
1518
+ blanketLimit: z15.string().optional(),
1519
+ businessIncomeLimit: z15.string().optional(),
1520
+ extraExpenseLimit: z15.string().optional()
1521
+ });
1522
+ var CommercialAutoDeclarationsSchema = z15.object({
1523
+ line: z15.literal("commercial_auto"),
1524
+ vehicles: z15.array(InsuredVehicleSchema),
1525
+ coveredAutoSymbols: z15.array(z15.number()).optional(),
1526
+ liabilityLimit: z15.string().optional(),
1527
+ umLimit: z15.string().optional(),
1528
+ uimLimit: z15.string().optional(),
1529
+ hiredAutoLiability: z15.boolean().optional(),
1530
+ nonOwnedAutoLiability: z15.boolean().optional()
1531
+ });
1532
+ var WorkersCompDeclarationsSchema = z15.object({
1533
+ line: z15.literal("workers_comp"),
1534
+ coveredStates: z15.array(z15.string()).optional(),
1535
+ classifications: z15.array(ClassificationCodeSchema),
1253
1536
  experienceMod: ExperienceModSchema.optional(),
1254
1537
  employersLiability: EmployersLiabilityLimitsSchema.optional()
1255
1538
  });
1256
- var UmbrellaExcessDeclarationsSchema = z14.object({
1257
- line: z14.literal("umbrella_excess"),
1258
- perOccurrenceLimit: z14.string().optional(),
1259
- aggregateLimit: z14.string().optional(),
1260
- retention: z14.string().optional(),
1261
- underlyingPolicies: z14.array(z14.object({
1262
- carrier: z14.string().optional(),
1263
- policyNumber: z14.string().optional(),
1264
- policyType: z14.string().optional(),
1265
- limits: z14.string().optional()
1539
+ var UmbrellaExcessDeclarationsSchema = z15.object({
1540
+ line: z15.literal("umbrella_excess"),
1541
+ perOccurrenceLimit: z15.string().optional(),
1542
+ aggregateLimit: z15.string().optional(),
1543
+ retention: z15.string().optional(),
1544
+ underlyingPolicies: z15.array(z15.object({
1545
+ carrier: z15.string().optional(),
1546
+ policyNumber: z15.string().optional(),
1547
+ policyType: z15.string().optional(),
1548
+ limits: z15.string().optional()
1266
1549
  }))
1267
1550
  });
1268
- var ProfessionalLiabilityDeclarationsSchema = z14.object({
1269
- line: z14.literal("professional_liability"),
1270
- perClaimLimit: z14.string().optional(),
1271
- aggregateLimit: z14.string().optional(),
1272
- retroactiveDate: z14.string().optional(),
1551
+ var ProfessionalLiabilityDeclarationsSchema = z15.object({
1552
+ line: z15.literal("professional_liability"),
1553
+ perClaimLimit: z15.string().optional(),
1554
+ aggregateLimit: z15.string().optional(),
1555
+ retroactiveDate: z15.string().optional(),
1273
1556
  defenseCostTreatment: DefenseCostTreatmentSchema.optional(),
1274
1557
  extendedReportingPeriod: ExtendedReportingPeriodSchema.optional()
1275
1558
  });
1276
- var CyberDeclarationsSchema = z14.object({
1277
- line: z14.literal("cyber"),
1278
- aggregateLimit: z14.string().optional(),
1279
- retroactiveDate: z14.string().optional(),
1280
- waitingPeriodHours: z14.number().optional(),
1281
- sublimits: z14.array(z14.object({
1282
- coverageName: z14.string(),
1283
- limit: z14.string()
1559
+ var CyberDeclarationsSchema = z15.object({
1560
+ line: z15.literal("cyber"),
1561
+ aggregateLimit: z15.string().optional(),
1562
+ retroactiveDate: z15.string().optional(),
1563
+ waitingPeriodHours: z15.number().optional(),
1564
+ sublimits: z15.array(z15.object({
1565
+ coverageName: z15.string(),
1566
+ limit: z15.string()
1284
1567
  })).optional()
1285
1568
  });
1286
- var DODeclarationsSchema = z14.object({
1287
- line: z14.literal("directors_officers"),
1288
- sideALimit: z14.string().optional(),
1289
- sideBLimit: z14.string().optional(),
1290
- sideCLimit: z14.string().optional(),
1291
- sideARetention: z14.string().optional(),
1292
- sideBRetention: z14.string().optional(),
1293
- sideCRetention: z14.string().optional(),
1294
- continuityDate: z14.string().optional()
1295
- });
1296
- var CrimeDeclarationsSchema = z14.object({
1297
- line: z14.literal("crime"),
1298
- formType: z14.enum(["discovery", "loss_sustained"]).optional(),
1299
- agreements: z14.array(z14.object({
1300
- agreement: z14.string(),
1301
- coverageName: z14.string(),
1302
- limit: z14.string(),
1303
- deductible: z14.string()
1569
+ var DODeclarationsSchema = z15.object({
1570
+ line: z15.literal("directors_officers"),
1571
+ sideALimit: z15.string().optional(),
1572
+ sideBLimit: z15.string().optional(),
1573
+ sideCLimit: z15.string().optional(),
1574
+ sideARetention: z15.string().optional(),
1575
+ sideBRetention: z15.string().optional(),
1576
+ sideCRetention: z15.string().optional(),
1577
+ continuityDate: z15.string().optional()
1578
+ });
1579
+ var CrimeDeclarationsSchema = z15.object({
1580
+ line: z15.literal("crime"),
1581
+ formType: z15.enum(["discovery", "loss_sustained"]).optional(),
1582
+ agreements: z15.array(z15.object({
1583
+ agreement: z15.string(),
1584
+ coverageName: z15.string(),
1585
+ limit: z15.string(),
1586
+ deductible: z15.string()
1304
1587
  }))
1305
1588
  });
1306
1589
 
1307
1590
  // src/schemas/declarations/index.ts
1308
- var DeclarationsSchema = z15.discriminatedUnion("line", [
1591
+ var DeclarationsSchema = z16.discriminatedUnion("line", [
1309
1592
  // Personal lines
1310
1593
  HomeownersDeclarationsSchema,
1311
1594
  PersonalAutoDeclarationsSchema,
@@ -1334,251 +1617,251 @@ var DeclarationsSchema = z15.discriminatedUnion("line", [
1334
1617
  ]);
1335
1618
 
1336
1619
  // src/schemas/document.ts
1337
- import { z as z16 } from "zod";
1338
- var SubsectionSchema = z16.object({
1339
- title: z16.string(),
1340
- sectionNumber: z16.string().optional(),
1341
- pageNumber: z16.number().optional(),
1342
- excerpt: z16.string().optional(),
1343
- content: z16.string().optional(),
1344
- documentNodeId: z16.string().optional(),
1345
- sourceSpanIds: z16.array(z16.string()).optional(),
1346
- sourceTextHash: z16.string().optional()
1347
- });
1348
- var SectionSchema = z16.object({
1349
- title: z16.string(),
1350
- sectionNumber: z16.string().optional(),
1351
- pageStart: z16.number(),
1352
- pageEnd: z16.number().optional(),
1353
- type: z16.string(),
1354
- coverageType: z16.string().optional(),
1355
- excerpt: z16.string().optional(),
1356
- content: z16.string().optional(),
1357
- subsections: z16.array(SubsectionSchema).optional(),
1358
- recordId: z16.string().optional(),
1359
- documentNodeId: z16.string().optional(),
1360
- sourceSpanIds: z16.array(z16.string()).optional(),
1361
- sourceTextHash: z16.string().optional()
1362
- });
1363
- var SubjectivitySchema = z16.object({
1364
- description: z16.string(),
1365
- category: z16.string().optional()
1366
- });
1367
- var UnderwritingConditionSchema = z16.object({
1368
- description: z16.string()
1369
- });
1370
- var PremiumLineSchema = z16.object({
1371
- line: z16.string(),
1372
- amount: z16.string(),
1373
- amountValue: z16.number().optional(),
1374
- documentNodeId: z16.string().optional(),
1375
- sourceSpanIds: z16.array(z16.string()).optional(),
1376
- sourceTextHash: z16.string().optional()
1377
- });
1378
- var AuxiliaryFactSchema = z16.object({
1379
- key: z16.string(),
1380
- value: z16.string(),
1381
- subject: z16.string().optional(),
1382
- context: z16.string().optional(),
1383
- documentNodeId: z16.string().optional(),
1384
- sourceSpanIds: z16.array(z16.string()).optional(),
1385
- sourceTextHash: z16.string().optional()
1386
- });
1387
- var DefinitionSchema = z16.object({
1388
- term: z16.string(),
1389
- definition: z16.string(),
1390
- pageNumber: z16.number().optional(),
1391
- formNumber: z16.string().optional(),
1392
- formTitle: z16.string().optional(),
1393
- sectionRef: z16.string().optional(),
1394
- originalContent: z16.string().optional(),
1395
- recordId: z16.string().optional(),
1396
- documentNodeId: z16.string().optional(),
1397
- sourceSpanIds: z16.array(z16.string()).optional(),
1398
- sourceTextHash: z16.string().optional()
1399
- });
1400
- var CoveredReasonSchema = z16.object({
1401
- coverageName: z16.string(),
1402
- reasonNumber: z16.string().optional(),
1403
- title: z16.string().optional(),
1404
- content: z16.string(),
1405
- conditions: z16.array(z16.string()).optional(),
1406
- exceptions: z16.array(z16.string()).optional(),
1407
- appliesTo: z16.array(z16.string()).optional(),
1408
- pageNumber: z16.number().optional(),
1409
- formNumber: z16.string().optional(),
1410
- formTitle: z16.string().optional(),
1411
- sectionRef: z16.string().optional(),
1412
- originalContent: z16.string().optional(),
1413
- recordId: z16.string().optional(),
1414
- documentNodeId: z16.string().optional(),
1415
- sourceSpanIds: z16.array(z16.string()).optional(),
1416
- sourceTextHash: z16.string().optional()
1417
- });
1418
- var DocumentTableOfContentsEntrySchema = z16.object({
1419
- title: z16.string(),
1420
- level: z16.number().int().positive().optional(),
1421
- pageStart: z16.number().optional(),
1422
- pageEnd: z16.number().optional(),
1423
- documentNodeId: z16.string().optional(),
1424
- sourceSpanIds: z16.array(z16.string()).optional()
1425
- });
1426
- var DocumentPageMapEntrySchema = z16.object({
1427
- page: z16.number().int().positive(),
1428
- label: z16.string().optional(),
1429
- formNumber: z16.string().optional(),
1430
- formTitle: z16.string().optional(),
1431
- sectionTitle: z16.string().optional(),
1432
- extractorNames: z16.array(z16.string()).optional(),
1433
- sourceSpanIds: z16.array(z16.string()).optional()
1434
- });
1435
- var DocumentAgentGuidanceSchema = z16.object({
1436
- kind: z16.string(),
1437
- title: z16.string(),
1438
- detail: z16.string(),
1439
- sourceSpanIds: z16.array(z16.string()).optional()
1440
- });
1441
- var DocumentMetadataSchema = z16.object({
1442
- sourceTreeVersion: z16.string().optional(),
1443
- sourceTreeCanonical: z16.boolean().optional(),
1444
- formInventory: z16.array(FormReferenceSchema).optional(),
1445
- tableOfContents: z16.array(DocumentTableOfContentsEntrySchema).optional(),
1446
- pageMap: z16.array(DocumentPageMapEntrySchema).optional(),
1447
- agentGuidance: z16.array(DocumentAgentGuidanceSchema).optional()
1448
- });
1449
- var DocumentNodeSchema = z16.lazy(
1450
- () => z16.object({
1451
- id: z16.string(),
1452
- title: z16.string(),
1453
- originalTitle: z16.string().optional(),
1454
- type: z16.string().optional(),
1455
- label: z16.string().optional(),
1456
- level: z16.number().int().positive().optional(),
1457
- sectionNumber: z16.string().optional(),
1458
- pageStart: z16.number().optional(),
1459
- pageEnd: z16.number().optional(),
1460
- formNumber: z16.string().optional(),
1461
- formTitle: z16.string().optional(),
1462
- excerpt: z16.string().optional(),
1463
- content: z16.string().optional(),
1464
- interpretationLabels: z16.array(z16.string()).optional(),
1465
- sourceSpanIds: z16.array(z16.string()).optional(),
1466
- sourceTextHash: z16.string().optional(),
1467
- children: z16.array(DocumentNodeSchema).optional()
1620
+ import { z as z17 } from "zod";
1621
+ var SubsectionSchema = z17.object({
1622
+ title: z17.string(),
1623
+ sectionNumber: z17.string().optional(),
1624
+ pageNumber: z17.number().optional(),
1625
+ excerpt: z17.string().optional(),
1626
+ content: z17.string().optional(),
1627
+ documentNodeId: z17.string().optional(),
1628
+ sourceSpanIds: z17.array(z17.string()).optional(),
1629
+ sourceTextHash: z17.string().optional()
1630
+ });
1631
+ var SectionSchema = z17.object({
1632
+ title: z17.string(),
1633
+ sectionNumber: z17.string().optional(),
1634
+ pageStart: z17.number(),
1635
+ pageEnd: z17.number().optional(),
1636
+ type: z17.string(),
1637
+ coverageType: z17.string().optional(),
1638
+ excerpt: z17.string().optional(),
1639
+ content: z17.string().optional(),
1640
+ subsections: z17.array(SubsectionSchema).optional(),
1641
+ recordId: z17.string().optional(),
1642
+ documentNodeId: z17.string().optional(),
1643
+ sourceSpanIds: z17.array(z17.string()).optional(),
1644
+ sourceTextHash: z17.string().optional()
1645
+ });
1646
+ var SubjectivitySchema = z17.object({
1647
+ description: z17.string(),
1648
+ category: z17.string().optional()
1649
+ });
1650
+ var UnderwritingConditionSchema = z17.object({
1651
+ description: z17.string()
1652
+ });
1653
+ var PremiumLineSchema = z17.object({
1654
+ line: z17.string(),
1655
+ amount: z17.string(),
1656
+ amountValue: z17.number().optional(),
1657
+ documentNodeId: z17.string().optional(),
1658
+ sourceSpanIds: z17.array(z17.string()).optional(),
1659
+ sourceTextHash: z17.string().optional()
1660
+ });
1661
+ var AuxiliaryFactSchema = z17.object({
1662
+ key: z17.string(),
1663
+ value: z17.string(),
1664
+ subject: z17.string().optional(),
1665
+ context: z17.string().optional(),
1666
+ documentNodeId: z17.string().optional(),
1667
+ sourceSpanIds: z17.array(z17.string()).optional(),
1668
+ sourceTextHash: z17.string().optional()
1669
+ });
1670
+ var DefinitionSchema = z17.object({
1671
+ term: z17.string(),
1672
+ definition: z17.string(),
1673
+ pageNumber: z17.number().optional(),
1674
+ formNumber: z17.string().optional(),
1675
+ formTitle: z17.string().optional(),
1676
+ sectionRef: z17.string().optional(),
1677
+ originalContent: z17.string().optional(),
1678
+ recordId: z17.string().optional(),
1679
+ documentNodeId: z17.string().optional(),
1680
+ sourceSpanIds: z17.array(z17.string()).optional(),
1681
+ sourceTextHash: z17.string().optional()
1682
+ });
1683
+ var CoveredReasonSchema = z17.object({
1684
+ coverageName: z17.string(),
1685
+ reasonNumber: z17.string().optional(),
1686
+ title: z17.string().optional(),
1687
+ content: z17.string(),
1688
+ conditions: z17.array(z17.string()).optional(),
1689
+ exceptions: z17.array(z17.string()).optional(),
1690
+ appliesTo: z17.array(z17.string()).optional(),
1691
+ pageNumber: z17.number().optional(),
1692
+ formNumber: z17.string().optional(),
1693
+ formTitle: z17.string().optional(),
1694
+ sectionRef: z17.string().optional(),
1695
+ originalContent: z17.string().optional(),
1696
+ recordId: z17.string().optional(),
1697
+ documentNodeId: z17.string().optional(),
1698
+ sourceSpanIds: z17.array(z17.string()).optional(),
1699
+ sourceTextHash: z17.string().optional()
1700
+ });
1701
+ var DocumentTableOfContentsEntrySchema = z17.object({
1702
+ title: z17.string(),
1703
+ level: z17.number().int().positive().optional(),
1704
+ pageStart: z17.number().optional(),
1705
+ pageEnd: z17.number().optional(),
1706
+ documentNodeId: z17.string().optional(),
1707
+ sourceSpanIds: z17.array(z17.string()).optional()
1708
+ });
1709
+ var DocumentPageMapEntrySchema = z17.object({
1710
+ page: z17.number().int().positive(),
1711
+ label: z17.string().optional(),
1712
+ formNumber: z17.string().optional(),
1713
+ formTitle: z17.string().optional(),
1714
+ sectionTitle: z17.string().optional(),
1715
+ extractorNames: z17.array(z17.string()).optional(),
1716
+ sourceSpanIds: z17.array(z17.string()).optional()
1717
+ });
1718
+ var DocumentAgentGuidanceSchema = z17.object({
1719
+ kind: z17.string(),
1720
+ title: z17.string(),
1721
+ detail: z17.string(),
1722
+ sourceSpanIds: z17.array(z17.string()).optional()
1723
+ });
1724
+ var DocumentMetadataSchema = z17.object({
1725
+ sourceTreeVersion: z17.string().optional(),
1726
+ sourceTreeCanonical: z17.boolean().optional(),
1727
+ formInventory: z17.array(FormReferenceSchema).optional(),
1728
+ tableOfContents: z17.array(DocumentTableOfContentsEntrySchema).optional(),
1729
+ pageMap: z17.array(DocumentPageMapEntrySchema).optional(),
1730
+ agentGuidance: z17.array(DocumentAgentGuidanceSchema).optional()
1731
+ });
1732
+ var DocumentNodeSchema = z17.lazy(
1733
+ () => z17.object({
1734
+ id: z17.string(),
1735
+ title: z17.string(),
1736
+ originalTitle: z17.string().optional(),
1737
+ type: z17.string().optional(),
1738
+ label: z17.string().optional(),
1739
+ level: z17.number().int().positive().optional(),
1740
+ sectionNumber: z17.string().optional(),
1741
+ pageStart: z17.number().optional(),
1742
+ pageEnd: z17.number().optional(),
1743
+ formNumber: z17.string().optional(),
1744
+ formTitle: z17.string().optional(),
1745
+ excerpt: z17.string().optional(),
1746
+ content: z17.string().optional(),
1747
+ interpretationLabels: z17.array(z17.string()).optional(),
1748
+ sourceSpanIds: z17.array(z17.string()).optional(),
1749
+ sourceTextHash: z17.string().optional(),
1750
+ children: z17.array(DocumentNodeSchema).optional()
1468
1751
  })
1469
1752
  );
1470
1753
  var BaseDocumentFields = {
1471
- id: z16.string(),
1472
- carrier: z16.string(),
1473
- security: z16.string().optional(),
1474
- insuredName: z16.string(),
1475
- premium: z16.string().optional(),
1476
- premiumAmount: z16.number().optional(),
1477
- summary: z16.string().optional(),
1478
- policyTypes: z16.array(z16.string()).optional(),
1479
- coverages: z16.array(CoverageSchema),
1754
+ id: z17.string(),
1755
+ carrier: z17.string(),
1756
+ security: z17.string().optional(),
1757
+ insuredName: z17.string(),
1758
+ premium: z17.string().optional(),
1759
+ premiumAmount: z17.number().optional(),
1760
+ summary: z17.string().optional(),
1761
+ linesOfBusiness: z17.array(z17.string()).optional(),
1762
+ coverages: z17.array(CoverageSchema),
1480
1763
  documentMetadata: DocumentMetadataSchema,
1481
- documentOutline: z16.array(DocumentNodeSchema),
1482
- sections: z16.array(SectionSchema).optional(),
1483
- definitions: z16.array(DefinitionSchema).optional(),
1484
- coveredReasons: z16.array(CoveredReasonSchema).optional(),
1764
+ documentOutline: z17.array(DocumentNodeSchema),
1765
+ sections: z17.array(SectionSchema).optional(),
1766
+ definitions: z17.array(DefinitionSchema).optional(),
1767
+ coveredReasons: z17.array(CoveredReasonSchema).optional(),
1485
1768
  // Enriched fields (v1.2+)
1486
- carrierLegalName: z16.string().optional(),
1487
- carrierNaicNumber: z16.string().optional(),
1488
- carrierAmBestRating: z16.string().optional(),
1489
- carrierAdmittedStatus: z16.string().optional(),
1490
- mga: z16.string().optional(),
1491
- underwriter: z16.string().optional(),
1492
- brokerAgency: z16.string().optional(),
1493
- brokerContactName: z16.string().optional(),
1494
- brokerLicenseNumber: z16.string().optional(),
1495
- priorPolicyNumber: z16.string().optional(),
1496
- programName: z16.string().optional(),
1497
- isRenewal: z16.boolean().optional(),
1498
- isPackage: z16.boolean().optional(),
1499
- insuredDba: z16.string().optional(),
1769
+ carrierLegalName: z17.string().optional(),
1770
+ carrierNaicNumber: z17.string().optional(),
1771
+ carrierAmBestRating: z17.string().optional(),
1772
+ carrierAdmittedStatus: z17.string().optional(),
1773
+ mga: z17.string().optional(),
1774
+ underwriter: z17.string().optional(),
1775
+ brokerAgency: z17.string().optional(),
1776
+ brokerContactName: z17.string().optional(),
1777
+ brokerLicenseNumber: z17.string().optional(),
1778
+ priorPolicyNumber: z17.string().optional(),
1779
+ programName: z17.string().optional(),
1780
+ isRenewal: z17.boolean().optional(),
1781
+ isPackage: z17.boolean().optional(),
1782
+ insuredDba: z17.string().optional(),
1500
1783
  insuredAddress: SourceBackedAddressSchema.optional(),
1501
1784
  insuredEntityType: EntityTypeSchema.optional(),
1502
- additionalNamedInsureds: z16.array(NamedInsuredSchema).optional(),
1503
- insuredSicCode: z16.string().optional(),
1504
- insuredNaicsCode: z16.string().optional(),
1505
- insuredFein: z16.string().optional(),
1506
- enrichedCoverages: z16.array(EnrichedCoverageSchema).optional(),
1507
- endorsements: z16.array(EndorsementSchema).optional(),
1508
- exclusions: z16.array(ExclusionSchema).optional(),
1509
- conditions: z16.array(PolicyConditionSchema).optional(),
1785
+ additionalNamedInsureds: z17.array(NamedInsuredSchema).optional(),
1786
+ insuredSicCode: z17.string().optional(),
1787
+ insuredNaicsCode: z17.string().optional(),
1788
+ insuredFein: z17.string().optional(),
1789
+ enrichedCoverages: z17.array(EnrichedCoverageSchema).optional(),
1790
+ endorsements: z17.array(EndorsementSchema).optional(),
1791
+ exclusions: z17.array(ExclusionSchema).optional(),
1792
+ conditions: z17.array(PolicyConditionSchema).optional(),
1510
1793
  limits: LimitScheduleSchema.optional(),
1511
1794
  deductibles: DeductibleScheduleSchema.optional(),
1512
- locations: z16.array(InsuredLocationSchema).optional(),
1513
- vehicles: z16.array(InsuredVehicleSchema).optional(),
1514
- classifications: z16.array(ClassificationCodeSchema).optional(),
1515
- formInventory: z16.array(FormReferenceSchema).optional(),
1795
+ locations: z17.array(InsuredLocationSchema).optional(),
1796
+ vehicles: z17.array(InsuredVehicleSchema).optional(),
1797
+ classifications: z17.array(ClassificationCodeSchema).optional(),
1798
+ formInventory: z17.array(FormReferenceSchema).optional(),
1516
1799
  declarations: DeclarationsSchema.optional(),
1517
1800
  coverageForm: CoverageFormSchema.optional(),
1518
- retroactiveDate: z16.string().optional(),
1801
+ retroactiveDate: z17.string().optional(),
1519
1802
  extendedReportingPeriod: ExtendedReportingPeriodSchema.optional(),
1520
1803
  insurer: InsurerInfoSchema.optional(),
1521
1804
  producer: ProducerInfoSchema.optional(),
1522
- claimsContacts: z16.array(ContactSchema).optional(),
1523
- regulatoryContacts: z16.array(ContactSchema).optional(),
1524
- thirdPartyAdministrators: z16.array(ContactSchema).optional(),
1525
- additionalInsureds: z16.array(EndorsementPartySchema).optional(),
1526
- lossPayees: z16.array(EndorsementPartySchema).optional(),
1527
- mortgageHolders: z16.array(EndorsementPartySchema).optional(),
1528
- taxesAndFees: z16.array(TaxFeeItemSchema).optional(),
1529
- totalCost: z16.string().optional(),
1530
- totalCostAmount: z16.number().optional(),
1531
- minimumPremium: z16.string().optional(),
1532
- minimumPremiumAmount: z16.number().optional(),
1533
- depositPremium: z16.string().optional(),
1534
- depositPremiumAmount: z16.number().optional(),
1805
+ claimsContacts: z17.array(ContactSchema).optional(),
1806
+ regulatoryContacts: z17.array(ContactSchema).optional(),
1807
+ thirdPartyAdministrators: z17.array(ContactSchema).optional(),
1808
+ additionalInsureds: z17.array(EndorsementPartySchema).optional(),
1809
+ lossPayees: z17.array(EndorsementPartySchema).optional(),
1810
+ mortgageHolders: z17.array(EndorsementPartySchema).optional(),
1811
+ taxesAndFees: z17.array(TaxFeeItemSchema).optional(),
1812
+ totalCost: z17.string().optional(),
1813
+ totalCostAmount: z17.number().optional(),
1814
+ minimumPremium: z17.string().optional(),
1815
+ minimumPremiumAmount: z17.number().optional(),
1816
+ depositPremium: z17.string().optional(),
1817
+ depositPremiumAmount: z17.number().optional(),
1535
1818
  paymentPlan: PaymentPlanSchema.optional(),
1536
1819
  auditType: AuditTypeSchema.optional(),
1537
- ratingBasis: z16.array(RatingBasisSchema).optional(),
1538
- premiumByLocation: z16.array(LocationPremiumSchema).optional(),
1820
+ ratingBasis: z17.array(RatingBasisSchema).optional(),
1821
+ premiumByLocation: z17.array(LocationPremiumSchema).optional(),
1539
1822
  lossSummary: LossSummarySchema.optional(),
1540
- individualClaims: z16.array(ClaimRecordSchema).optional(),
1823
+ individualClaims: z17.array(ClaimRecordSchema).optional(),
1541
1824
  experienceMod: ExperienceModSchema.optional(),
1542
- cancellationNoticeDays: z16.number().optional(),
1543
- nonrenewalNoticeDays: z16.number().optional(),
1544
- supplementaryFacts: z16.array(AuxiliaryFactSchema).optional()
1825
+ cancellationNoticeDays: z17.number().optional(),
1826
+ nonrenewalNoticeDays: z17.number().optional(),
1827
+ supplementaryFacts: z17.array(AuxiliaryFactSchema).optional()
1545
1828
  };
1546
- var PolicyDocumentSchema = z16.object({
1829
+ var PolicyDocumentSchema = z17.object({
1547
1830
  ...BaseDocumentFields,
1548
- type: z16.literal("policy"),
1549
- policyNumber: z16.string(),
1550
- effectiveDate: z16.string(),
1551
- expirationDate: z16.string().optional(),
1831
+ type: z17.literal("policy"),
1832
+ policyNumber: z17.string(),
1833
+ effectiveDate: z17.string(),
1834
+ expirationDate: z17.string().optional(),
1552
1835
  policyTermType: PolicyTermTypeSchema.optional(),
1553
- nextReviewDate: z16.string().optional(),
1554
- effectiveTime: z16.string().optional()
1836
+ nextReviewDate: z17.string().optional(),
1837
+ effectiveTime: z17.string().optional()
1555
1838
  });
1556
- var QuoteDocumentSchema = z16.object({
1839
+ var QuoteDocumentSchema = z17.object({
1557
1840
  ...BaseDocumentFields,
1558
- type: z16.literal("quote"),
1559
- quoteNumber: z16.string(),
1560
- proposedEffectiveDate: z16.string().optional(),
1561
- proposedExpirationDate: z16.string().optional(),
1562
- quoteExpirationDate: z16.string().optional(),
1563
- subjectivities: z16.array(SubjectivitySchema).optional(),
1564
- underwritingConditions: z16.array(UnderwritingConditionSchema).optional(),
1565
- premiumBreakdown: z16.array(PremiumLineSchema).optional(),
1841
+ type: z17.literal("quote"),
1842
+ quoteNumber: z17.string(),
1843
+ proposedEffectiveDate: z17.string().optional(),
1844
+ proposedExpirationDate: z17.string().optional(),
1845
+ quoteExpirationDate: z17.string().optional(),
1846
+ subjectivities: z17.array(SubjectivitySchema).optional(),
1847
+ underwritingConditions: z17.array(UnderwritingConditionSchema).optional(),
1848
+ premiumBreakdown: z17.array(PremiumLineSchema).optional(),
1566
1849
  // Enriched quote fields (v1.2+)
1567
- enrichedSubjectivities: z16.array(EnrichedSubjectivitySchema).optional(),
1568
- enrichedUnderwritingConditions: z16.array(EnrichedUnderwritingConditionSchema).optional(),
1569
- warrantyRequirements: z16.array(z16.string()).optional(),
1570
- lossControlRecommendations: z16.array(z16.string()).optional(),
1850
+ enrichedSubjectivities: z17.array(EnrichedSubjectivitySchema).optional(),
1851
+ enrichedUnderwritingConditions: z17.array(EnrichedUnderwritingConditionSchema).optional(),
1852
+ warrantyRequirements: z17.array(z17.string()).optional(),
1853
+ lossControlRecommendations: z17.array(z17.string()).optional(),
1571
1854
  bindingAuthority: BindingAuthoritySchema.optional()
1572
1855
  });
1573
- var InsuranceDocumentSchema = z16.discriminatedUnion("type", [
1856
+ var InsuranceDocumentSchema = z17.discriminatedUnion("type", [
1574
1857
  PolicyDocumentSchema,
1575
1858
  QuoteDocumentSchema
1576
1859
  ]);
1577
1860
 
1578
1861
  // src/schemas/platform.ts
1579
- import { z as z17 } from "zod";
1580
- var PlatformSchema = z17.enum(["email", "chat", "sms", "slack", "discord"]);
1581
- var CommunicationIntentSchema = z17.enum(["direct", "mediated", "observed"]);
1862
+ import { z as z18 } from "zod";
1863
+ var PlatformSchema = z18.enum(["email", "chat", "sms", "slack", "discord"]);
1864
+ var CommunicationIntentSchema = z18.enum(["direct", "mediated", "observed"]);
1582
1865
  var PLATFORM_CONFIGS = {
1583
1866
  email: {
1584
1867
  supportsMarkdown: false,
@@ -1611,65 +1894,65 @@ var PLATFORM_CONFIGS = {
1611
1894
  };
1612
1895
 
1613
1896
  // src/schemas/pce.ts
1614
- import { z as z19 } from "zod";
1897
+ import { z as z20 } from "zod";
1615
1898
 
1616
1899
  // src/case/index.ts
1617
- import { z as z18 } from "zod";
1618
- var CaseEvidenceSourceSchema = z18.object({
1619
- id: z18.string(),
1620
- label: z18.string().optional(),
1621
- documentId: z18.string().optional(),
1622
- page: z18.number().optional(),
1623
- fieldPath: z18.string().optional(),
1624
- text: z18.string().describe("Source text available for span validation and citation"),
1625
- metadata: z18.record(z18.string(), z18.string()).optional()
1626
- });
1627
- var CaseCitationSchema = z18.object({
1628
- sourceId: z18.string(),
1629
- quote: z18.string(),
1630
- page: z18.number().optional(),
1631
- fieldPath: z18.string().optional()
1632
- });
1633
- var ValidationIssueSeveritySchema = z18.enum(["info", "warning", "blocking"]);
1634
- var CaseValidationIssueSchema = z18.object({
1635
- code: z18.string(),
1900
+ import { z as z19 } from "zod";
1901
+ var CaseEvidenceSourceSchema = z19.object({
1902
+ id: z19.string(),
1903
+ label: z19.string().optional(),
1904
+ documentId: z19.string().optional(),
1905
+ page: z19.number().optional(),
1906
+ fieldPath: z19.string().optional(),
1907
+ text: z19.string().describe("Source text available for span validation and citation"),
1908
+ metadata: z19.record(z19.string(), z19.string()).optional()
1909
+ });
1910
+ var CaseCitationSchema = z19.object({
1911
+ sourceId: z19.string(),
1912
+ quote: z19.string(),
1913
+ page: z19.number().optional(),
1914
+ fieldPath: z19.string().optional()
1915
+ });
1916
+ var ValidationIssueSeveritySchema = z19.enum(["info", "warning", "blocking"]);
1917
+ var CaseValidationIssueSchema = z19.object({
1918
+ code: z19.string(),
1636
1919
  severity: ValidationIssueSeveritySchema,
1637
- message: z18.string(),
1638
- itemId: z18.string().optional(),
1639
- fieldPath: z18.string().optional(),
1640
- sourceId: z18.string().optional()
1641
- });
1642
- var MissingInfoQuestionSchema = z18.object({
1643
- id: z18.string(),
1644
- itemId: z18.string().optional(),
1645
- fieldPath: z18.string().optional(),
1646
- question: z18.string(),
1647
- reason: z18.string(),
1648
- answer: z18.string().optional()
1649
- });
1650
- var CasePacketArtifactKindSchema = z18.enum([
1920
+ message: z19.string(),
1921
+ itemId: z19.string().optional(),
1922
+ fieldPath: z19.string().optional(),
1923
+ sourceId: z19.string().optional()
1924
+ });
1925
+ var MissingInfoQuestionSchema = z19.object({
1926
+ id: z19.string(),
1927
+ itemId: z19.string().optional(),
1928
+ fieldPath: z19.string().optional(),
1929
+ question: z19.string(),
1930
+ reason: z19.string(),
1931
+ answer: z19.string().optional()
1932
+ });
1933
+ var CasePacketArtifactKindSchema = z19.enum([
1651
1934
  "underwriter_summary",
1652
1935
  "carrier_email",
1653
1936
  "missing_info_request",
1654
1937
  "json_packet",
1655
1938
  "validation_report"
1656
1939
  ]);
1657
- var CasePacketArtifactSchema = z18.object({
1658
- id: z18.string(),
1940
+ var CasePacketArtifactSchema = z19.object({
1941
+ id: z19.string(),
1659
1942
  kind: CasePacketArtifactKindSchema,
1660
- title: z18.string(),
1661
- content: z18.string(),
1662
- citations: z18.array(CaseCitationSchema).default([])
1663
- });
1664
- var CaseSubmissionPacketSchema = z18.object({
1665
- id: z18.string(),
1666
- caseId: z18.string(),
1667
- artifacts: z18.array(CasePacketArtifactSchema),
1668
- validationIssues: z18.array(CaseValidationIssueSchema),
1669
- missingInfoQuestions: z18.array(MissingInfoQuestionSchema),
1670
- createdAt: z18.number()
1671
- });
1672
- var CaseActionSchema = z18.enum([
1943
+ title: z19.string(),
1944
+ content: z19.string(),
1945
+ citations: z19.array(CaseCitationSchema).default([])
1946
+ });
1947
+ var CaseSubmissionPacketSchema = z19.object({
1948
+ id: z19.string(),
1949
+ caseId: z19.string(),
1950
+ artifacts: z19.array(CasePacketArtifactSchema),
1951
+ validationIssues: z19.array(CaseValidationIssueSchema),
1952
+ missingInfoQuestions: z19.array(MissingInfoQuestionSchema),
1953
+ createdAt: z19.number()
1954
+ });
1955
+ var CaseActionSchema = z19.enum([
1673
1956
  "inspect_attachments",
1674
1957
  "retrieve_policy_evidence",
1675
1958
  "retrieve_prior_applications",
@@ -1682,23 +1965,23 @@ var CaseActionSchema = z18.enum([
1682
1965
  "generate_packet",
1683
1966
  "answer_field_or_case_question"
1684
1967
  ]);
1685
- var AgenticExecutionModeSchema = z18.enum(["deterministic_tree", "market_eval", "hybrid"]);
1686
- var CaseProposalScoreSchema = z18.object({
1687
- grounding: z18.number().min(0).max(1),
1688
- completeness: z18.number().min(0).max(1),
1689
- consistency: z18.number().min(0).max(1),
1690
- determinism: z18.number().min(0).max(1),
1691
- risk: z18.number().min(0).max(1),
1692
- cost: z18.number().min(0).max(1)
1693
- });
1694
- var CaseProposalSchema = z18.object({
1695
- id: z18.string(),
1696
- sourceSpanIds: z18.array(z18.string()).default([]),
1697
- confidence: z18.number().min(0).max(1),
1698
- missingInfo: z18.array(z18.string()).default([]),
1699
- validationIssues: z18.array(CaseValidationIssueSchema).default([]),
1700
- estimatedRisk: z18.number().min(0).max(1).default(0.5),
1701
- estimatedCost: z18.number().min(0).max(1).default(0.5),
1968
+ var AgenticExecutionModeSchema = z19.enum(["deterministic_tree", "market_eval", "hybrid"]);
1969
+ var CaseProposalScoreSchema = z19.object({
1970
+ grounding: z19.number().min(0).max(1),
1971
+ completeness: z19.number().min(0).max(1),
1972
+ consistency: z19.number().min(0).max(1),
1973
+ determinism: z19.number().min(0).max(1),
1974
+ risk: z19.number().min(0).max(1),
1975
+ cost: z19.number().min(0).max(1)
1976
+ });
1977
+ var CaseProposalSchema = z19.object({
1978
+ id: z19.string(),
1979
+ sourceSpanIds: z19.array(z19.string()).default([]),
1980
+ confidence: z19.number().min(0).max(1),
1981
+ missingInfo: z19.array(z19.string()).default([]),
1982
+ validationIssues: z19.array(CaseValidationIssueSchema).default([]),
1983
+ estimatedRisk: z19.number().min(0).max(1).default(0.5),
1984
+ estimatedCost: z19.number().min(0).max(1).default(0.5),
1702
1985
  score: CaseProposalScoreSchema.optional()
1703
1986
  });
1704
1987
  function stableCaseId(prefix, parts) {
@@ -1817,8 +2100,8 @@ function totalProposalScore(score) {
1817
2100
  }
1818
2101
 
1819
2102
  // src/schemas/pce.ts
1820
- var PolicyChangeActionSchema = z19.enum(["add", "remove", "update", "replace", "clarify"]);
1821
- var PolicyChangeKindSchema = z19.enum([
2103
+ var PolicyChangeActionSchema = z20.enum(["add", "remove", "update", "replace", "clarify"]);
2104
+ var PolicyChangeKindSchema = z20.enum([
1822
2105
  "named_insured_change",
1823
2106
  "additional_insured_change",
1824
2107
  "coverage_change",
@@ -1832,70 +2115,70 @@ var PolicyChangeKindSchema = z19.enum([
1832
2115
  "renewal_submission_update",
1833
2116
  "general_endorsement"
1834
2117
  ]);
1835
- var PolicyChangeConfidenceSchema = z19.enum(["high", "medium", "low"]);
1836
- var PolicyChangeStatusSchema = z19.enum(["draft", "needs_info", "ready", "blocked"]);
1837
- var PolicyChangeItemSchema = z19.object({
1838
- id: z19.string(),
2118
+ var PolicyChangeConfidenceSchema = z20.enum(["high", "medium", "low"]);
2119
+ var PolicyChangeStatusSchema = z20.enum(["draft", "needs_info", "ready", "blocked"]);
2120
+ var PolicyChangeItemSchema = z20.object({
2121
+ id: z20.string(),
1839
2122
  kind: PolicyChangeKindSchema.default("general_endorsement"),
1840
2123
  action: PolicyChangeActionSchema,
1841
- affectedPolicyId: z19.string().default("unknown"),
1842
- fieldPath: z19.string().describe("Stable policy field path or business field name"),
1843
- label: z19.string(),
1844
- beforeValue: z19.string().optional().describe("Existing policy value, when cited from policy evidence"),
1845
- afterValue: z19.string().optional().describe("Requested new value"),
1846
- requestedValue: z19.string().optional().describe("Alias for afterValue used by policy-change workflows"),
1847
- effectiveDate: z19.string().optional(),
1848
- reason: z19.string().optional(),
1849
- sourceIds: z19.array(z19.string()).default([]),
1850
- sourceSpanIds: z19.array(z19.string()).default([]),
1851
- userSourceSpanIds: z19.array(z19.string()).optional(),
1852
- citations: z19.array(CaseCitationSchema).default([]),
2124
+ affectedPolicyId: z20.string().default("unknown"),
2125
+ fieldPath: z20.string().describe("Stable policy field path or business field name"),
2126
+ label: z20.string(),
2127
+ beforeValue: z20.string().optional().describe("Existing policy value, when cited from policy evidence"),
2128
+ afterValue: z20.string().optional().describe("Requested new value"),
2129
+ requestedValue: z20.string().optional().describe("Alias for afterValue used by policy-change workflows"),
2130
+ effectiveDate: z20.string().optional(),
2131
+ reason: z20.string().optional(),
2132
+ sourceIds: z20.array(z20.string()).default([]),
2133
+ sourceSpanIds: z20.array(z20.string()).default([]),
2134
+ userSourceSpanIds: z20.array(z20.string()).optional(),
2135
+ citations: z20.array(CaseCitationSchema).default([]),
1853
2136
  confidence: PolicyChangeConfidenceSchema.default("medium"),
1854
- confidenceScore: z19.number().min(0).max(1).optional(),
2137
+ confidenceScore: z20.number().min(0).max(1).optional(),
1855
2138
  status: PolicyChangeStatusSchema.default("ready")
1856
2139
  });
1857
- var PceNormalizationResultSchema = z19.object({
1858
- summary: z19.string(),
1859
- items: z19.array(PolicyChangeItemSchema.omit({ id: true, status: true }).extend({
1860
- id: z19.string().optional(),
2140
+ var PceNormalizationResultSchema = z20.object({
2141
+ summary: z20.string(),
2142
+ items: z20.array(PolicyChangeItemSchema.omit({ id: true, status: true }).extend({
2143
+ id: z20.string().optional(),
1861
2144
  status: PolicyChangeStatusSchema.optional()
1862
2145
  })),
1863
- missingInfoQuestions: z19.array(MissingInfoQuestionSchema.omit({ id: true }).extend({
1864
- id: z19.string().optional()
2146
+ missingInfoQuestions: z20.array(MissingInfoQuestionSchema.omit({ id: true }).extend({
2147
+ id: z20.string().optional()
1865
2148
  })).default([])
1866
2149
  });
1867
- var PolicyChangeImpactSchema = z19.object({
1868
- itemId: z19.string(),
1869
- beforeValue: z19.string().optional(),
1870
- requestedValue: z19.string().optional(),
1871
- likelyEndorsementRequired: z19.boolean().default(true),
1872
- carrierApprovalLikelyRequired: z19.boolean().default(true),
1873
- affectedCoverageForms: z19.array(z19.string()).default([]),
1874
- sourceSpanIds: z19.array(z19.string()).default([])
1875
- });
1876
- var PceCaseStateSchema = z19.object({
1877
- id: z19.string(),
1878
- requestText: z19.string(),
1879
- summary: z19.string(),
2150
+ var PolicyChangeImpactSchema = z20.object({
2151
+ itemId: z20.string(),
2152
+ beforeValue: z20.string().optional(),
2153
+ requestedValue: z20.string().optional(),
2154
+ likelyEndorsementRequired: z20.boolean().default(true),
2155
+ carrierApprovalLikelyRequired: z20.boolean().default(true),
2156
+ affectedCoverageForms: z20.array(z20.string()).default([]),
2157
+ sourceSpanIds: z20.array(z20.string()).default([])
2158
+ });
2159
+ var PceCaseStateSchema = z20.object({
2160
+ id: z20.string(),
2161
+ requestText: z20.string(),
2162
+ summary: z20.string(),
1880
2163
  executionMode: AgenticExecutionModeSchema.default("deterministic_tree"),
1881
- items: z19.array(PolicyChangeItemSchema),
1882
- impacts: z19.array(PolicyChangeImpactSchema),
1883
- evidenceSources: z19.array(CaseEvidenceSourceSchema),
1884
- validationIssues: z19.array(CaseValidationIssueSchema),
1885
- missingInfoQuestions: z19.array(MissingInfoQuestionSchema),
1886
- createdAt: z19.number(),
1887
- updatedAt: z19.number()
1888
- });
1889
- var PolicyChangeRequestSchema = z19.object({
1890
- id: z19.string(),
1891
- text: z19.string(),
2164
+ items: z20.array(PolicyChangeItemSchema),
2165
+ impacts: z20.array(PolicyChangeImpactSchema),
2166
+ evidenceSources: z20.array(CaseEvidenceSourceSchema),
2167
+ validationIssues: z20.array(CaseValidationIssueSchema),
2168
+ missingInfoQuestions: z20.array(MissingInfoQuestionSchema),
2169
+ createdAt: z20.number(),
2170
+ updatedAt: z20.number()
2171
+ });
2172
+ var PolicyChangeRequestSchema = z20.object({
2173
+ id: z20.string(),
2174
+ text: z20.string(),
1892
2175
  executionMode: AgenticExecutionModeSchema.optional(),
1893
- userSourceSpanIds: z19.array(z19.string()).optional(),
1894
- createdAt: z19.number().optional()
2176
+ userSourceSpanIds: z20.array(z20.string()).optional(),
2177
+ createdAt: z20.number().optional()
1895
2178
  });
1896
2179
  var PceSubmissionPacketSchema = CaseSubmissionPacketSchema.extend({
1897
2180
  pceCase: PceCaseStateSchema,
1898
- artifacts: z19.array(CasePacketArtifactSchema)
2181
+ artifacts: z20.array(CasePacketArtifactSchema)
1899
2182
  });
1900
2183
 
1901
2184
  // src/schemas/context-keys.ts
@@ -1913,7 +2196,7 @@ var CONTEXT_KEY_MAP = [
1913
2196
  { extractedField: "totalPremium", category: "financial", contextKey: "current_premium", description: "Total policy premium" },
1914
2197
  { extractedField: "locations[].buildingValue", category: "financial", contextKey: "total_property_values", description: "Sum of building values" },
1915
2198
  { extractedField: "locations[].contentsValue", category: "financial", contextKey: "total_contents_values", description: "Sum of contents values" },
1916
- { extractedField: "policyTypes", category: "coverage", contextKey: "coverage_types", description: "Lines of business covered" },
2199
+ { extractedField: "linesOfBusiness", category: "coverage", contextKey: "coverage_types", description: "ACORD lines of business covered" },
1917
2200
  { extractedField: "coverages[].limit", category: "coverage", contextKey: "current_limits", description: "Current coverage limits" },
1918
2201
  { extractedField: "coverages[].deductible", category: "coverage", contextKey: "current_deductibles", description: "Current deductibles" },
1919
2202
  { extractedField: "experienceMod.factor", category: "loss_history", contextKey: "experience_mod", description: "Workers comp experience modification factor" },
@@ -1951,8 +2234,8 @@ var CONTEXT_KEY_MAP = [
1951
2234
  ];
1952
2235
 
1953
2236
  // src/source/schemas.ts
1954
- import { z as z20 } from "zod";
1955
- var SourceSpanKindSchema = z20.enum([
2237
+ import { z as z21 } from "zod";
2238
+ var SourceSpanKindSchema = z21.enum([
1956
2239
  "pdf_text",
1957
2240
  "pdf_image",
1958
2241
  "html",
@@ -1960,7 +2243,7 @@ var SourceSpanKindSchema = z20.enum([
1960
2243
  "plain_text",
1961
2244
  "structured_field"
1962
2245
  ]);
1963
- var SourceSpanUnitSchema = z20.enum([
2246
+ var SourceSpanUnitSchema = z21.enum([
1964
2247
  "page",
1965
2248
  "section",
1966
2249
  "table",
@@ -1969,78 +2252,78 @@ var SourceSpanUnitSchema = z20.enum([
1969
2252
  "key_value",
1970
2253
  "text"
1971
2254
  ]);
1972
- var SourceKindSchema = z20.enum([
2255
+ var SourceKindSchema = z21.enum([
1973
2256
  "policy_pdf",
1974
2257
  "application_pdf",
1975
2258
  "email",
1976
2259
  "attachment",
1977
2260
  "manual_note"
1978
2261
  ]);
1979
- var SourceSpanBBoxSchema = z20.object({
1980
- page: z20.number().int().positive(),
1981
- x: z20.number(),
1982
- y: z20.number(),
1983
- width: z20.number(),
1984
- height: z20.number()
1985
- });
1986
- var SourceSpanLocationSchema = z20.object({
1987
- page: z20.number().int().positive().optional(),
1988
- startPage: z20.number().int().positive().optional(),
1989
- endPage: z20.number().int().positive().optional(),
1990
- charStart: z20.number().int().nonnegative().optional(),
1991
- charEnd: z20.number().int().nonnegative().optional(),
1992
- lineStart: z20.number().int().positive().optional(),
1993
- lineEnd: z20.number().int().positive().optional(),
1994
- fieldPath: z20.string().optional()
1995
- });
1996
- var SourceSpanTableLocationSchema = z20.object({
1997
- tableId: z20.string().optional(),
1998
- rowIndex: z20.number().int().nonnegative().optional(),
1999
- columnIndex: z20.number().int().nonnegative().optional(),
2000
- columnName: z20.string().optional(),
2001
- rowSpanId: z20.string().optional(),
2002
- tableSpanId: z20.string().optional(),
2003
- isHeader: z20.boolean().optional()
2004
- });
2005
- var SourceSpanSchema = z20.object({
2006
- id: z20.string().min(1),
2007
- documentId: z20.string().min(1),
2262
+ var SourceSpanBBoxSchema = z21.object({
2263
+ page: z21.number().int().positive(),
2264
+ x: z21.number(),
2265
+ y: z21.number(),
2266
+ width: z21.number(),
2267
+ height: z21.number()
2268
+ });
2269
+ var SourceSpanLocationSchema = z21.object({
2270
+ page: z21.number().int().positive().optional(),
2271
+ startPage: z21.number().int().positive().optional(),
2272
+ endPage: z21.number().int().positive().optional(),
2273
+ charStart: z21.number().int().nonnegative().optional(),
2274
+ charEnd: z21.number().int().nonnegative().optional(),
2275
+ lineStart: z21.number().int().positive().optional(),
2276
+ lineEnd: z21.number().int().positive().optional(),
2277
+ fieldPath: z21.string().optional()
2278
+ });
2279
+ var SourceSpanTableLocationSchema = z21.object({
2280
+ tableId: z21.string().optional(),
2281
+ rowIndex: z21.number().int().nonnegative().optional(),
2282
+ columnIndex: z21.number().int().nonnegative().optional(),
2283
+ columnName: z21.string().optional(),
2284
+ rowSpanId: z21.string().optional(),
2285
+ tableSpanId: z21.string().optional(),
2286
+ isHeader: z21.boolean().optional()
2287
+ });
2288
+ var SourceSpanSchema = z21.object({
2289
+ id: z21.string().min(1),
2290
+ documentId: z21.string().min(1),
2008
2291
  sourceKind: SourceKindSchema.optional(),
2009
- chunkId: z20.string().optional(),
2292
+ chunkId: z21.string().optional(),
2010
2293
  kind: SourceSpanKindSchema,
2011
- text: z20.string(),
2012
- hash: z20.string().min(1),
2013
- textHash: z20.string().optional(),
2014
- pageStart: z20.number().int().positive().optional(),
2015
- pageEnd: z20.number().int().positive().optional(),
2016
- sectionId: z20.string().optional(),
2017
- formNumber: z20.string().optional(),
2294
+ text: z21.string(),
2295
+ hash: z21.string().min(1),
2296
+ textHash: z21.string().optional(),
2297
+ pageStart: z21.number().int().positive().optional(),
2298
+ pageEnd: z21.number().int().positive().optional(),
2299
+ sectionId: z21.string().optional(),
2300
+ formNumber: z21.string().optional(),
2018
2301
  sourceUnit: SourceSpanUnitSchema.optional(),
2019
- parentSpanId: z20.string().optional(),
2302
+ parentSpanId: z21.string().optional(),
2020
2303
  table: SourceSpanTableLocationSchema.optional(),
2021
- bbox: z20.array(SourceSpanBBoxSchema).optional(),
2304
+ bbox: z21.array(SourceSpanBBoxSchema).optional(),
2022
2305
  location: SourceSpanLocationSchema.optional(),
2023
- metadata: z20.record(z20.string(), z20.string()).optional()
2024
- });
2025
- var SourceSpanRefSchema = z20.object({
2026
- sourceSpanId: z20.string().min(1),
2027
- documentId: z20.string().min(1).optional(),
2028
- chunkId: z20.string().optional(),
2029
- quote: z20.string().optional(),
2030
- hash: z20.string().optional(),
2306
+ metadata: z21.record(z21.string(), z21.string()).optional()
2307
+ });
2308
+ var SourceSpanRefSchema = z21.object({
2309
+ sourceSpanId: z21.string().min(1),
2310
+ documentId: z21.string().min(1).optional(),
2311
+ chunkId: z21.string().optional(),
2312
+ quote: z21.string().optional(),
2313
+ hash: z21.string().optional(),
2031
2314
  location: SourceSpanLocationSchema.optional()
2032
2315
  });
2033
- var SourceChunkSchema = z20.object({
2034
- id: z20.string().min(1),
2035
- documentId: z20.string().min(1),
2036
- sourceSpanIds: z20.array(z20.string().min(1)),
2037
- text: z20.string(),
2038
- textHash: z20.string().min(1),
2039
- pageStart: z20.number().int().positive().optional(),
2040
- pageEnd: z20.number().int().positive().optional(),
2041
- metadata: z20.record(z20.string(), z20.string()).default({})
2042
- });
2043
- var DocumentSourceNodeKindSchema = z20.enum([
2316
+ var SourceChunkSchema = z21.object({
2317
+ id: z21.string().min(1),
2318
+ documentId: z21.string().min(1),
2319
+ sourceSpanIds: z21.array(z21.string().min(1)),
2320
+ text: z21.string(),
2321
+ textHash: z21.string().min(1),
2322
+ pageStart: z21.number().int().positive().optional(),
2323
+ pageEnd: z21.number().int().positive().optional(),
2324
+ metadata: z21.record(z21.string(), z21.string()).default({})
2325
+ });
2326
+ var DocumentSourceNodeKindSchema = z21.enum([
2044
2327
  "document",
2045
2328
  "page_group",
2046
2329
  "page",
@@ -2054,31 +2337,31 @@ var DocumentSourceNodeKindSchema = z20.enum([
2054
2337
  "table_cell",
2055
2338
  "text"
2056
2339
  ]);
2057
- var DocumentSourceNodeSchema = z20.object({
2058
- id: z20.string().min(1),
2059
- documentId: z20.string().min(1),
2060
- parentId: z20.string().optional(),
2340
+ var DocumentSourceNodeSchema = z21.object({
2341
+ id: z21.string().min(1),
2342
+ documentId: z21.string().min(1),
2343
+ parentId: z21.string().optional(),
2061
2344
  kind: DocumentSourceNodeKindSchema,
2062
- title: z20.string(),
2063
- description: z20.string(),
2064
- textExcerpt: z20.string().optional(),
2065
- sourceSpanIds: z20.array(z20.string().min(1)),
2066
- pageStart: z20.number().int().positive().optional(),
2067
- pageEnd: z20.number().int().positive().optional(),
2068
- bbox: z20.array(SourceSpanBBoxSchema).optional(),
2069
- order: z20.number().int().nonnegative(),
2070
- path: z20.string(),
2071
- metadata: z20.record(z20.string(), z20.unknown()).optional()
2072
- });
2073
- var SourceBackedValueSchema = z20.object({
2074
- value: z20.string(),
2075
- normalizedValue: z20.string().optional(),
2076
- confidence: z20.enum(["low", "medium", "high"]).default("medium"),
2077
- sourceNodeIds: z20.array(z20.string().min(1)).default([]),
2078
- sourceSpanIds: z20.array(z20.string().min(1)).default([])
2079
- });
2080
- var OperationalCoverageTermSchema = z20.object({
2081
- kind: z20.enum([
2345
+ title: z21.string(),
2346
+ description: z21.string(),
2347
+ textExcerpt: z21.string().optional(),
2348
+ sourceSpanIds: z21.array(z21.string().min(1)),
2349
+ pageStart: z21.number().int().positive().optional(),
2350
+ pageEnd: z21.number().int().positive().optional(),
2351
+ bbox: z21.array(SourceSpanBBoxSchema).optional(),
2352
+ order: z21.number().int().nonnegative(),
2353
+ path: z21.string(),
2354
+ metadata: z21.record(z21.string(), z21.unknown()).optional()
2355
+ });
2356
+ var SourceBackedValueSchema = z21.object({
2357
+ value: z21.string(),
2358
+ normalizedValue: z21.string().optional(),
2359
+ confidence: z21.enum(["low", "medium", "high"]).default("medium"),
2360
+ sourceNodeIds: z21.array(z21.string().min(1)).default([]),
2361
+ sourceSpanIds: z21.array(z21.string().min(1)).default([])
2362
+ });
2363
+ var OperationalCoverageTermSchema = z21.object({
2364
+ kind: z21.enum([
2082
2365
  "each_claim_limit",
2083
2366
  "each_occurrence_limit",
2084
2367
  "each_loss_limit",
@@ -2090,182 +2373,132 @@ var OperationalCoverageTermSchema = z20.object({
2090
2373
  "premium",
2091
2374
  "other"
2092
2375
  ]).default("other"),
2093
- label: z20.string(),
2094
- value: z20.string(),
2095
- amount: z20.number().optional(),
2096
- appliesTo: z20.string().optional(),
2097
- sourceNodeIds: z20.array(z20.string().min(1)).default([]),
2098
- sourceSpanIds: z20.array(z20.string().min(1)).default([])
2099
- });
2100
- var OperationalCoverageLineSchema = z20.object({
2101
- name: z20.string(),
2102
- coverageCode: z20.string().optional(),
2103
- limit: z20.string().optional(),
2104
- deductible: z20.string().optional(),
2105
- premium: z20.string().optional(),
2106
- retroactiveDate: z20.string().optional(),
2107
- formNumber: z20.string().optional(),
2108
- sectionRef: z20.string().optional(),
2109
- endorsementNumber: z20.string().optional(),
2110
- limits: z20.array(OperationalCoverageTermSchema).default([]),
2111
- sourceNodeIds: z20.array(z20.string().min(1)).default([]),
2112
- sourceSpanIds: z20.array(z20.string().min(1)).default([])
2113
- });
2114
- var OperationalPartySchema = z20.object({
2115
- role: z20.string(),
2116
- name: z20.string(),
2117
- sourceNodeIds: z20.array(z20.string().min(1)).default([]),
2118
- sourceSpanIds: z20.array(z20.string().min(1)).default([])
2119
- });
2120
- var OperationalEndorsementSupportSchema = z20.object({
2121
- kind: z20.string(),
2122
- status: z20.enum(["supported", "excluded", "requires_review"]),
2123
- summary: z20.string(),
2124
- sourceNodeIds: z20.array(z20.string().min(1)).default([]),
2125
- sourceSpanIds: z20.array(z20.string().min(1)).default([])
2126
- });
2127
- var PolicyOperationalProfileSchema = z20.object({
2128
- documentType: z20.enum(["policy", "quote"]).default("policy"),
2129
- policyTypes: z20.array(z20.string()).default(["other"]),
2130
- policyNumber: SourceBackedValueSchema.optional(),
2131
- namedInsured: SourceBackedValueSchema.optional(),
2132
- insurer: SourceBackedValueSchema.optional(),
2133
- broker: SourceBackedValueSchema.optional(),
2134
- effectiveDate: SourceBackedValueSchema.optional(),
2135
- expirationDate: SourceBackedValueSchema.optional(),
2136
- retroactiveDate: SourceBackedValueSchema.optional(),
2137
- premium: SourceBackedValueSchema.optional(),
2138
- coverages: z20.array(OperationalCoverageLineSchema).default([]),
2139
- parties: z20.array(OperationalPartySchema).default([]),
2140
- endorsementSupport: z20.array(OperationalEndorsementSupportSchema).default([]),
2141
- sourceNodeIds: z20.array(z20.string().min(1)).default([]),
2142
- sourceSpanIds: z20.array(z20.string().min(1)).default([]),
2143
- warnings: z20.array(z20.string()).default([])
2144
- });
2376
+ label: z21.string(),
2377
+ value: z21.string(),
2378
+ amount: z21.number().optional(),
2379
+ appliesTo: z21.string().optional(),
2380
+ sourceNodeIds: z21.array(z21.string().min(1)).default([]),
2381
+ sourceSpanIds: z21.array(z21.string().min(1)).default([])
2382
+ });
2383
+ var OperationalCoverageLineSchema = z21.object({
2384
+ name: z21.string(),
2385
+ coverageCode: z21.string().optional(),
2386
+ limit: z21.string().optional(),
2387
+ deductible: z21.string().optional(),
2388
+ premium: z21.string().optional(),
2389
+ retroactiveDate: z21.string().optional(),
2390
+ formNumber: z21.string().optional(),
2391
+ sectionRef: z21.string().optional(),
2392
+ endorsementNumber: z21.string().optional(),
2393
+ limits: z21.array(OperationalCoverageTermSchema).default([]),
2394
+ sourceNodeIds: z21.array(z21.string().min(1)).default([]),
2395
+ sourceSpanIds: z21.array(z21.string().min(1)).default([])
2396
+ });
2397
+ var OperationalPartySchema = z21.object({
2398
+ role: z21.string(),
2399
+ name: z21.string(),
2400
+ sourceNodeIds: z21.array(z21.string().min(1)).default([]),
2401
+ sourceSpanIds: z21.array(z21.string().min(1)).default([])
2402
+ });
2403
+ var OperationalEndorsementSupportSchema = z21.object({
2404
+ kind: z21.string(),
2405
+ status: z21.enum(["supported", "excluded", "requires_review"]),
2406
+ summary: z21.string(),
2407
+ sourceNodeIds: z21.array(z21.string().min(1)).default([]),
2408
+ sourceSpanIds: z21.array(z21.string().min(1)).default([])
2409
+ });
2410
+ function legacyOperationalProfileInput(value) {
2411
+ if (!value || typeof value !== "object" || Array.isArray(value)) return value;
2412
+ const record = value;
2413
+ if ("linesOfBusiness" in record) return value;
2414
+ if (!("policyTypes" in record)) return value;
2415
+ return {
2416
+ ...record,
2417
+ linesOfBusiness: record.policyTypes
2418
+ };
2419
+ }
2420
+ var OperationalLinesOfBusinessSchema = z21.preprocess(
2421
+ (value) => Array.isArray(value) ? toLobCodes(value.filter((item) => typeof item === "string")) : void 0,
2422
+ z21.array(AcordLobCodeSchema).default(["UN"])
2423
+ );
2424
+ var PolicyOperationalProfileSchema = z21.preprocess(
2425
+ legacyOperationalProfileInput,
2426
+ z21.object({
2427
+ documentType: z21.enum(["policy", "quote"]).default("policy"),
2428
+ linesOfBusiness: OperationalLinesOfBusinessSchema,
2429
+ policyNumber: SourceBackedValueSchema.optional(),
2430
+ namedInsured: SourceBackedValueSchema.optional(),
2431
+ insurer: SourceBackedValueSchema.optional(),
2432
+ broker: SourceBackedValueSchema.optional(),
2433
+ effectiveDate: SourceBackedValueSchema.optional(),
2434
+ expirationDate: SourceBackedValueSchema.optional(),
2435
+ retroactiveDate: SourceBackedValueSchema.optional(),
2436
+ premium: SourceBackedValueSchema.optional(),
2437
+ coverages: z21.array(OperationalCoverageLineSchema).default([]),
2438
+ parties: z21.array(OperationalPartySchema).default([]),
2439
+ endorsementSupport: z21.array(OperationalEndorsementSupportSchema).default([]),
2440
+ sourceNodeIds: z21.array(z21.string().min(1)).default([]),
2441
+ sourceSpanIds: z21.array(z21.string().min(1)).default([]),
2442
+ warnings: z21.array(z21.string()).default([])
2443
+ })
2444
+ );
2145
2445
 
2146
2446
  // src/source/policy-types.ts
2147
- var POLICY_TYPE_KEYS = new Set(POLICY_TYPES);
2148
- var POLICY_TYPE_ALIASES = {
2149
- "general liability": "general_liability",
2150
- "commercial general liability": "general_liability",
2151
- cgl: "general_liability",
2152
- "commercial property": "commercial_property",
2153
- property: "property",
2154
- "property insurance": "commercial_property",
2155
- "commercial auto": "commercial_auto",
2156
- "commercial automobile": "commercial_auto",
2157
- "business auto": "commercial_auto",
2158
- "business automobile": "commercial_auto",
2159
- "auto physical damage": "commercial_auto",
2160
- "automobile physical damage": "commercial_auto",
2161
- "hired non owned auto": "non_owned_auto",
2162
- "hired non-owned auto": "non_owned_auto",
2163
- "non owned auto": "non_owned_auto",
2164
- "non-owned auto": "non_owned_auto",
2165
- "workers comp": "workers_comp",
2166
- "workers compensation": "workers_comp",
2167
- "workers' compensation": "workers_comp",
2168
- umbrella: "umbrella",
2169
- "excess liability": "excess_liability",
2170
- "professional liability": "professional_liability",
2171
- "errors and omissions": "professional_liability",
2172
- "e&o": "professional_liability",
2173
- cyber: "cyber",
2174
- "cyber liability": "cyber",
2175
- "network security": "cyber",
2176
- "privacy liability": "cyber",
2177
- epli: "epli",
2178
- "employment practices liability": "epli",
2179
- "directors and officers": "directors_officers",
2180
- "directors & officers": "directors_officers",
2181
- "d&o": "directors_officers",
2182
- "fiduciary liability insurance": "fiduciary_liability",
2183
- "crime insurance": "crime_fidelity",
2184
- "fidelity bond": "crime_fidelity",
2185
- "inland marine insurance": "inland_marine",
2186
- "motor truck cargo": "inland_marine",
2187
- "motor truck cargo legal liability": "inland_marine",
2188
- "builders risk insurance": "builders_risk",
2189
- "pollution liability": "environmental",
2190
- "premises pollution liability": "environmental",
2191
- "environmental liability": "environmental",
2192
- "ocean marine insurance": "ocean_marine",
2193
- "surety bond": "surety",
2194
- "product liability insurance": "product_liability",
2195
- "life insurance": "life",
2196
- "permanent life": "life",
2197
- "term life": "life",
2198
- "whole life": "life",
2199
- "universal life": "life",
2200
- "critical illness": "critical_illness",
2201
- "critical illness insurance": "critical_illness",
2202
- "disability insurance": "disability",
2203
- "long term care": "long_term_care",
2204
- "long-term care": "long_term_care"
2205
- };
2206
- var POLICY_TYPE_TEXT_PATTERNS = [
2207
- { type: "general_liability", pattern: /\b(?:commercial\s+)?general\s+liability\b|\bcgl\b/i },
2208
- { type: "commercial_property", pattern: /\bcommercial\s+property\b|\bproperty\s+insurance\b/i },
2209
- { type: "commercial_auto", pattern: /\bcommercial\s+auto(?:mobile)?\b|\bbusiness\s+auto(?:mobile)?\b|\bauto(?:mobile)?\s+physical\s+damage\b/i },
2210
- { type: "non_owned_auto", pattern: /\b(?:hired\s+(?:and\s+)?)?non[-\s]?owned\s+auto\b/i },
2211
- { type: "workers_comp", pattern: /\bworkers['’]?\s+comp(?:ensation)?\b/i },
2212
- { type: "umbrella", pattern: /\bcommercial\s+umbrella\b|\bumbrella\s+liability\b/i },
2213
- { type: "excess_liability", pattern: /\bexcess\s+liability\b/i },
2214
- { type: "professional_liability", pattern: /\bprofessional\s+liability\b|\berrors?\s*(?:and|&)\s*omissions?\b|\be&o\b/i },
2215
- { type: "cyber", pattern: /\bcyber\b|\bnetwork\s+security\b|\bprivacy\s+liability\b/i },
2216
- { type: "epli", pattern: /\bemployment\s+practices?\s+liability\b|\bepli\b/i },
2217
- { type: "directors_officers", pattern: /\bdirectors?\s*(?:and|&)\s*officers?\b|\bd&o\b/i },
2218
- { type: "fiduciary_liability", pattern: /\bfiduciary\s+liability\b/i },
2219
- { type: "crime_fidelity", pattern: /\bcrime\b|\bfidelity\b/i },
2220
- { type: "inland_marine", pattern: /\binland\s+marine\b|\bmotor\s+truck\s+cargo\b|\bcargo\s+legal\s+liability\b/i },
2221
- { type: "builders_risk", pattern: /\bbuilders?\s+risk\b/i },
2222
- { type: "environmental", pattern: /\bpollution\s+liability\b|\benvironmental\s+liability\b/i },
2223
- { type: "ocean_marine", pattern: /\bocean\s+marine\b/i },
2224
- { type: "surety", pattern: /\bsurety\b/i },
2225
- { type: "product_liability", pattern: /\bproduct\s+liability\b|\bproducts?\s+completed\s+operations\b/i },
2226
- { type: "bop", pattern: /\bbusiness\s*owners?\s+policy\b|\bbop\b/i },
2227
- { type: "homeowners_ho3", pattern: /\bhomeowners?\s*(?:ho[-\s]?3)?\b/i },
2228
- { type: "homeowners_ho5", pattern: /\bho[-\s]?5\b/i },
2229
- { type: "renters_ho4", pattern: /\brenters?\b|\bho[-\s]?4\b/i },
2230
- { type: "condo_ho6", pattern: /\bcondo(?:minium)?\b|\bho[-\s]?6\b/i },
2231
- { type: "dwelling_fire", pattern: /\bdwelling\s+fire\b/i },
2232
- { type: "personal_auto", pattern: /\bpersonal\s+auto\b/i },
2233
- { type: "personal_umbrella", pattern: /\bpersonal\s+umbrella\b/i },
2234
- { type: "flood_private", pattern: /\bflood\b/i },
2235
- { type: "earthquake", pattern: /\bearthquake\b/i },
2236
- { type: "personal_inland_marine", pattern: /\bpersonal\s+(?:articles|inland\s+marine)\b/i },
2237
- { type: "watercraft", pattern: /\bwatercraft\b|\bboat\s+insurance\b/i },
2238
- { type: "recreational_vehicle", pattern: /\brecreational\s+vehicle\b|\brv\s+insurance\b/i },
2239
- { type: "farm_ranch", pattern: /\bfarm\b|\branch\b/i },
2240
- { type: "life", pattern: /\blife\s+insurance\b|\bterm\s+life\b|\bwhole\s+life\b|\buniversal\s+life\b/i },
2241
- { type: "critical_illness", pattern: /\bcritical\s+illness\b/i },
2242
- { type: "disability", pattern: /\bdisability\s+insurance\b|\btotal\s+disability\b/i },
2243
- { type: "long_term_care", pattern: /\blong[-\s]?term\s+care\b/i },
2244
- { type: "pet", pattern: /\bpet\s+insurance\b/i },
2245
- { type: "travel", pattern: /\btravel\s+insurance\b/i },
2246
- { type: "identity_theft", pattern: /\bidentity\s+theft\b/i },
2247
- { type: "title", pattern: /\btitle\s+insurance\b/i }
2447
+ var LOB_TEXT_PATTERNS = [
2448
+ { codes: ["CGL"], pattern: /\b(?:commercial\s+)?general\s+liability\b|\bcgl\b/i },
2449
+ { codes: ["PROPC"], pattern: /\bcommercial\s+property\b|\bproperty\s+insurance\b/i },
2450
+ { codes: ["PROP"], pattern: /\bproperty\b/i },
2451
+ { codes: ["AUTOB"], pattern: /\bcommercial\s+auto(?:mobile)?\b|\bbusiness\s+auto(?:mobile)?\b|\bauto(?:mobile)?\s+physical\s+damage\b/i },
2452
+ { codes: ["AUTOB"], pattern: /\b(?:hired\s+(?:and\s+)?)?non[-\s]?owned\s+auto\b/i },
2453
+ { codes: ["WORK"], pattern: /\bworkers['’]?\s+comp(?:ensation)?\b/i },
2454
+ { codes: ["UMBRC"], pattern: /\bcommercial\s+umbrella\b|\bumbrella\s+liability\b/i },
2455
+ { codes: ["EXLIA"], pattern: /\bexcess\s+liability\b/i },
2456
+ { codes: ["EO"], pattern: /\bprofessional\s+liability\b|\berrors?\s*(?:and|&)\s*omissions?\b|\be&o\b/i },
2457
+ { codes: ["OLIB"], pattern: /\bcyber\b|\bnetwork\s+security\b|\bprivacy\s+liability\b/i },
2458
+ { codes: ["EPLI"], pattern: /\bemployment\s+practices?\s+liability\b|\bepli\b/i },
2459
+ { codes: ["DO"], pattern: /\bdirectors?\s*(?:and|&)\s*officers?\b|\bd&o\b/i },
2460
+ { codes: ["FIDUC"], pattern: /\bfiduciary\s+liability\b/i },
2461
+ { codes: ["CRIME"], pattern: /\bcrime\b|\bfidelity\b/i },
2462
+ { codes: ["INMRC"], pattern: /\binland\s+marine\b|\bmotor\s+truck\s+cargo\b|\bcargo\s+legal\s+liability\b/i },
2463
+ { codes: ["INMRC"], pattern: /\bbuilders?\s+risk\b/i },
2464
+ { codes: ["OLIB"], pattern: /\bpollution\s+liability\b|\benvironmental\s+liability\b/i },
2465
+ { codes: ["COMAR"], pattern: /\bocean\s+marine\b/i },
2466
+ { codes: ["SURE"], pattern: /\bsurety\b/i },
2467
+ { codes: ["OLIB"], pattern: /\bproduct\s+liability\b|\bproducts?\s+completed\s+operations\b/i },
2468
+ { codes: ["BOP"], pattern: /\bbusiness\s*owners?\s+policy\b|\bbop\b/i },
2469
+ { codes: ["DO", "EPLI", "FIDUC"], pattern: /\bmanagement\s+liability\b/i },
2470
+ { codes: ["HOME"], pattern: /\bhomeowners?\s*(?:ho[-\s]?[35])?\b|\bho[-\s]?[35]\b/i },
2471
+ { codes: ["HOME"], pattern: /\brenters?\b|\bho[-\s]?4\b/i },
2472
+ { codes: ["HOME"], pattern: /\bcondo(?:minium)?\b|\bho[-\s]?6\b/i },
2473
+ { codes: ["DFIRE"], pattern: /\bdwelling\s+fire\b/i },
2474
+ { codes: ["MHOME"], pattern: /\bmobile\s+home\b|\bmanufactured\s+home\b/i },
2475
+ { codes: ["AUTOP"], pattern: /\bpersonal\s+auto\b/i },
2476
+ { codes: ["UMBRP"], pattern: /\bpersonal\s+umbrella\b/i },
2477
+ { codes: ["FLOOD"], pattern: /\bflood\b/i },
2478
+ { codes: ["EQ"], pattern: /\bearthquake\b/i },
2479
+ { codes: ["INMRP"], pattern: /\bpersonal\s+(?:articles|inland\s+marine)\b/i },
2480
+ { codes: ["BOAT"], pattern: /\bwatercraft\b|\bboat\s+insurance\b/i },
2481
+ { codes: ["RECV"], pattern: /\brecreational\s+vehicle\b|\brv\s+insurance\b/i },
2482
+ { codes: ["CFRM"], pattern: /\bfarm\b|\branch\b/i },
2483
+ { codes: ["UN"], pattern: /\blife\s+insurance\b|\bterm\s+life\b|\bwhole\s+life\b|\buniversal\s+life\b/i },
2484
+ { codes: ["DISAB"], pattern: /\bcritical\s+illness\b|\bdisability\s+insurance\b|\btotal\s+disability\b/i },
2485
+ { codes: ["UN"], pattern: /\blong[-\s]?term\s+care\b|\bpet\s+insurance\b|\btravel\s+insurance\b|\bidentity\s+theft\b|\btitle\s+insurance\b/i }
2248
2486
  ];
2249
2487
  function normalizeWhitespace(value) {
2250
2488
  return value.replace(/\s+/g, " ").trim();
2251
2489
  }
2252
- function normalizeOperationalPolicyTypes(values) {
2253
- const types = Array.isArray(values) ? values.filter((value) => typeof value === "string") : [];
2254
- const controlled = types.map((type) => type.trim().toLowerCase().replace(/\s+/g, " ")).map((type) => POLICY_TYPE_ALIASES[type] ?? type.replace(/[\s-]+/g, "_")).filter((type) => POLICY_TYPE_KEYS.has(type));
2255
- const unique = [...new Set(controlled)].slice(0, 6);
2256
- return unique.length ? unique : ["other"];
2490
+ function hasSpecificLineOfBusiness(codes) {
2491
+ return codes.some((code) => code !== "UN");
2257
2492
  }
2258
- function hasSpecificPolicyType(types) {
2259
- return types.some((type) => type !== "other");
2260
- }
2261
- function policyTypesFromText(value) {
2493
+ function linesOfBusinessFromText(value) {
2262
2494
  const text = normalizeWhitespace(value ?? "");
2263
2495
  if (!text) return [];
2264
- const aliasType = POLICY_TYPE_ALIASES[text.toLowerCase()];
2265
- if (aliasType && POLICY_TYPE_KEYS.has(aliasType)) return [aliasType];
2266
- return POLICY_TYPE_TEXT_PATTERNS.filter(({ pattern }) => pattern.test(text)).map(({ type }) => type).filter((type) => POLICY_TYPE_KEYS.has(type));
2496
+ const direct = toLobCodes([text]);
2497
+ if (direct.some((code) => code !== "UN") || isLobCode(text) || text.toUpperCase() === "UN") return direct;
2498
+ const inferred = LOB_TEXT_PATTERNS.flatMap(({ codes, pattern }) => pattern.test(text) ? codes : []);
2499
+ return Array.from(new Set(inferred));
2267
2500
  }
2268
- function inferPolicyTypesFromOperationalCoverages(coverages) {
2501
+ function inferLinesOfBusinessFromOperationalCoverages(coverages) {
2269
2502
  const inferred = [];
2270
2503
  for (const coverage of coverages) {
2271
2504
  const limits = coverage.limits ?? [];
@@ -2276,23 +2509,23 @@ function inferPolicyTypesFromOperationalCoverages(coverages) {
2276
2509
  ...limits.flatMap((term) => [term.appliesTo, term.label])
2277
2510
  ].filter((value) => typeof value === "string" && value.trim().length > 0);
2278
2511
  for (const value of text) {
2279
- for (const type of policyTypesFromText(value)) {
2280
- if (!inferred.includes(type)) inferred.push(type);
2512
+ for (const code of linesOfBusinessFromText(value)) {
2513
+ if (!inferred.includes(code)) inferred.push(code);
2281
2514
  }
2282
2515
  }
2283
2516
  }
2284
2517
  return inferred.slice(0, 6);
2285
2518
  }
2286
- function resolveOperationalProfilePolicyTypes(params) {
2287
- const inferred = inferPolicyTypesFromOperationalCoverages(params.coverages ?? []);
2288
- if (inferred.length > 0) {
2289
- return { policyTypes: inferred, source: "coverage" };
2519
+ function resolveOperationalProfileLinesOfBusiness(params) {
2520
+ const inferred = inferLinesOfBusinessFromOperationalCoverages(params.coverages ?? []);
2521
+ if (inferred.some((code) => code !== "UN")) {
2522
+ return { linesOfBusiness: inferred, source: "coverage" };
2290
2523
  }
2291
- const controlled = normalizeOperationalPolicyTypes(params.profileTypes);
2292
- if (hasSpecificPolicyType(controlled)) return { policyTypes: controlled, source: "profile_hint" };
2293
- const existingControlled = normalizeOperationalPolicyTypes(params.existingTypes);
2294
- if (hasSpecificPolicyType(existingControlled)) return { policyTypes: existingControlled, source: "existing_hint" };
2295
- return { policyTypes: controlled, source: "default" };
2524
+ const controlled = normalizeOperationalLinesOfBusiness(params.profileLinesOfBusiness);
2525
+ if (hasSpecificLineOfBusiness(controlled)) return { linesOfBusiness: controlled, source: "profile_hint" };
2526
+ const existingControlled = normalizeOperationalLinesOfBusiness(params.existingLinesOfBusiness);
2527
+ if (hasSpecificLineOfBusiness(existingControlled)) return { linesOfBusiness: existingControlled, source: "existing_hint" };
2528
+ return { linesOfBusiness: controlled, source: "default" };
2296
2529
  }
2297
2530
 
2298
2531
  // src/source/ids.ts
@@ -3524,7 +3757,7 @@ function shouldFailQualityGate(mode, status) {
3524
3757
  }
3525
3758
 
3526
3759
  // src/extraction/source-tree-extractor.ts
3527
- import { z as z22 } from "zod";
3760
+ import { z as z23 } from "zod";
3528
3761
 
3529
3762
  // src/source/operational-profile.ts
3530
3763
  function normalizeWhitespace4(value) {
@@ -3697,15 +3930,17 @@ function mergeOperationalProfile(base, candidate, validNodeIds, validSpanIds) {
3697
3930
  ...base.warnings,
3698
3931
  ...Array.isArray(candidate.warnings) ? candidate.warnings.filter((warning) => typeof warning === "string" && warning.trim().length > 0) : []
3699
3932
  ];
3700
- const resolvedPolicyTypes = resolveOperationalProfilePolicyTypes({
3701
- profileTypes: candidate.policyTypes,
3702
- existingTypes: base.policyTypes,
3933
+ const candidateLinesOfBusiness = candidate.linesOfBusiness ?? candidate.policyTypes;
3934
+ const baseLinesOfBusiness = base.linesOfBusiness ?? base.policyTypes;
3935
+ const resolvedLinesOfBusiness = resolveOperationalProfileLinesOfBusiness({
3936
+ profileLinesOfBusiness: candidateLinesOfBusiness,
3937
+ existingLinesOfBusiness: baseLinesOfBusiness,
3703
3938
  coverages
3704
3939
  });
3705
3940
  return PolicyOperationalProfileSchema.parse({
3706
3941
  ...base,
3707
3942
  documentType: candidate.documentType === "policy" ? "policy" : base.documentType,
3708
- policyTypes: resolvedPolicyTypes.policyTypes,
3943
+ linesOfBusiness: resolvedLinesOfBusiness.linesOfBusiness,
3709
3944
  policyNumber,
3710
3945
  namedInsured,
3711
3946
  insurer,
@@ -3724,7 +3959,7 @@ function mergeOperationalProfile(base, candidate, validNodeIds, validSpanIds) {
3724
3959
  }
3725
3960
 
3726
3961
  // src/extraction/operational-profile-cleanup.ts
3727
- import { z as z21 } from "zod";
3962
+ import { z as z22 } from "zod";
3728
3963
  var OPERATIONAL_COVERAGE_TERM_KINDS2 = [
3729
3964
  "each_claim_limit",
3730
3965
  "each_occurrence_limit",
@@ -3737,33 +3972,33 @@ var OPERATIONAL_COVERAGE_TERM_KINDS2 = [
3737
3972
  "premium",
3738
3973
  "other"
3739
3974
  ];
3740
- var OperationalCoverageTermKindSchema = z21.enum(OPERATIONAL_COVERAGE_TERM_KINDS2);
3741
- var OperationalProfileCleanupSchema = z21.object({
3742
- coverageDecisions: z21.array(z21.object({
3743
- coverageIndex: z21.number().int().nonnegative(),
3744
- action: z21.enum(["keep", "drop", "update"]),
3745
- reason: z21.string().optional(),
3746
- name: z21.string().optional(),
3747
- limit: z21.string().nullable().optional(),
3748
- deductible: z21.string().nullable().optional(),
3749
- premium: z21.string().nullable().optional(),
3750
- retroactiveDate: z21.string().nullable().optional(),
3751
- sourceNodeIds: z21.array(z21.string()).optional(),
3752
- sourceSpanIds: z21.array(z21.string()).optional(),
3753
- termDecisions: z21.array(z21.object({
3754
- termIndex: z21.number().int().nonnegative(),
3755
- action: z21.enum(["keep", "drop", "update"]),
3756
- reason: z21.string().optional(),
3975
+ var OperationalCoverageTermKindSchema = z22.enum(OPERATIONAL_COVERAGE_TERM_KINDS2);
3976
+ var OperationalProfileCleanupSchema = z22.object({
3977
+ coverageDecisions: z22.array(z22.object({
3978
+ coverageIndex: z22.number().int().nonnegative(),
3979
+ action: z22.enum(["keep", "drop", "update"]),
3980
+ reason: z22.string().optional(),
3981
+ name: z22.string().optional(),
3982
+ limit: z22.string().nullable().optional(),
3983
+ deductible: z22.string().nullable().optional(),
3984
+ premium: z22.string().nullable().optional(),
3985
+ retroactiveDate: z22.string().nullable().optional(),
3986
+ sourceNodeIds: z22.array(z22.string()).optional(),
3987
+ sourceSpanIds: z22.array(z22.string()).optional(),
3988
+ termDecisions: z22.array(z22.object({
3989
+ termIndex: z22.number().int().nonnegative(),
3990
+ action: z22.enum(["keep", "drop", "update"]),
3991
+ reason: z22.string().optional(),
3757
3992
  kind: OperationalCoverageTermKindSchema.optional(),
3758
- label: z21.string().optional(),
3759
- value: z21.string().optional(),
3760
- amount: z21.number().nullable().optional(),
3761
- appliesTo: z21.string().nullable().optional(),
3762
- sourceNodeIds: z21.array(z21.string()).optional(),
3763
- sourceSpanIds: z21.array(z21.string()).optional()
3993
+ label: z22.string().optional(),
3994
+ value: z22.string().optional(),
3995
+ amount: z22.number().nullable().optional(),
3996
+ appliesTo: z22.string().nullable().optional(),
3997
+ sourceNodeIds: z22.array(z22.string()).optional(),
3998
+ sourceSpanIds: z22.array(z22.string()).optional()
3764
3999
  })).optional()
3765
4000
  })).default([]),
3766
- warnings: z21.array(z21.string()).default([])
4001
+ warnings: z22.array(z22.string()).default([])
3767
4002
  });
3768
4003
  var CLEANUP_CANDIDATE_ID_LIMIT = 12;
3769
4004
  var CLEANUP_SOURCE_NODE_LIMIT = 90;
@@ -3919,7 +4154,7 @@ function buildOperationalProfileCleanupPrompt(sourceTree, profile, options = {})
3919
4154
  ));
3920
4155
  const candidate = {
3921
4156
  documentType: profile.documentType,
3922
- policyTypes: profile.policyTypes,
4157
+ linesOfBusiness: profile.linesOfBusiness,
3923
4158
  coverages: coverageEntries.map(({ coverage, coverageIndex }) => compactCoverageForCleanup(coverage, coverageIndex))
3924
4159
  };
3925
4160
  return `Review and clean a source-backed operational profile projection for an insurance policy.
@@ -4217,16 +4452,16 @@ function applyOperationalProfileCleanup(profile, cleanup, validNodeIds, validSpa
4217
4452
  }
4218
4453
 
4219
4454
  // src/extraction/source-tree-extractor.ts
4220
- var SourceBackedValueForPromptSchema = z22.object({
4221
- value: z22.string(),
4222
- normalizedValue: z22.string().optional(),
4223
- confidence: z22.enum(["low", "medium", "high"]).optional(),
4224
- sourceNodeIds: z22.array(z22.string()),
4225
- sourceSpanIds: z22.array(z22.string())
4226
- });
4227
- var OperationalProfilePromptSchema = z22.object({
4228
- documentType: z22.enum(["policy", "quote"]).optional(),
4229
- policyTypes: z22.array(z22.string()).optional(),
4455
+ var SourceBackedValueForPromptSchema = z23.object({
4456
+ value: z23.string(),
4457
+ normalizedValue: z23.string().optional(),
4458
+ confidence: z23.enum(["low", "medium", "high"]).optional(),
4459
+ sourceNodeIds: z23.array(z23.string()),
4460
+ sourceSpanIds: z23.array(z23.string())
4461
+ });
4462
+ var OperationalProfilePromptSchema = z23.object({
4463
+ documentType: z23.enum(["policy", "quote"]).optional(),
4464
+ linesOfBusiness: z23.array(z23.string()).optional(),
4230
4465
  policyNumber: SourceBackedValueForPromptSchema.optional(),
4231
4466
  namedInsured: SourceBackedValueForPromptSchema.optional(),
4232
4467
  insurer: SourceBackedValueForPromptSchema.optional(),
@@ -4235,30 +4470,30 @@ var OperationalProfilePromptSchema = z22.object({
4235
4470
  expirationDate: SourceBackedValueForPromptSchema.optional(),
4236
4471
  retroactiveDate: SourceBackedValueForPromptSchema.optional(),
4237
4472
  premium: SourceBackedValueForPromptSchema.optional(),
4238
- coverages: z22.array(z22.object({
4239
- name: z22.string(),
4240
- coverageCode: z22.string().optional(),
4241
- limit: z22.string().optional(),
4242
- deductible: z22.string().optional(),
4243
- premium: z22.string().optional(),
4244
- retroactiveDate: z22.string().optional(),
4245
- formNumber: z22.string().optional(),
4246
- sectionRef: z22.string().optional(),
4247
- endorsementNumber: z22.string().optional(),
4248
- limits: z22.array(z22.object({
4473
+ coverages: z23.array(z23.object({
4474
+ name: z23.string(),
4475
+ coverageCode: z23.string().optional(),
4476
+ limit: z23.string().optional(),
4477
+ deductible: z23.string().optional(),
4478
+ premium: z23.string().optional(),
4479
+ retroactiveDate: z23.string().optional(),
4480
+ formNumber: z23.string().optional(),
4481
+ sectionRef: z23.string().optional(),
4482
+ endorsementNumber: z23.string().optional(),
4483
+ limits: z23.array(z23.object({
4249
4484
  kind: OperationalCoverageTermKindSchema.optional(),
4250
- label: z22.string(),
4251
- value: z22.string(),
4252
- amount: z22.number().optional(),
4253
- appliesTo: z22.string().optional(),
4254
- sourceNodeIds: z22.array(z22.string()),
4255
- sourceSpanIds: z22.array(z22.string())
4485
+ label: z23.string(),
4486
+ value: z23.string(),
4487
+ amount: z23.number().optional(),
4488
+ appliesTo: z23.string().optional(),
4489
+ sourceNodeIds: z23.array(z23.string()),
4490
+ sourceSpanIds: z23.array(z23.string())
4256
4491
  })).optional(),
4257
- sourceNodeIds: z22.array(z22.string()),
4258
- sourceSpanIds: z22.array(z22.string())
4492
+ sourceNodeIds: z23.array(z23.string()),
4493
+ sourceSpanIds: z23.array(z23.string())
4259
4494
  })).optional(),
4260
- sourceNodeIds: z22.array(z22.string()).optional(),
4261
- sourceSpanIds: z22.array(z22.string()).optional()
4495
+ sourceNodeIds: z23.array(z23.string()).optional(),
4496
+ sourceSpanIds: z23.array(z23.string()).optional()
4262
4497
  });
4263
4498
  function cleanText(value, fallback) {
4264
4499
  const text = value?.replace(/\s+/g, " ").trim();
@@ -5265,7 +5500,7 @@ function operationalProfilePromptNodes(sourceTree) {
5265
5500
  function emptyOperationalProfile() {
5266
5501
  return {
5267
5502
  documentType: "policy",
5268
- policyTypes: ["other"],
5503
+ linesOfBusiness: ["UN"],
5269
5504
  coverages: [],
5270
5505
  parties: [],
5271
5506
  endorsementSupport: [],
@@ -5416,7 +5651,7 @@ function materializeDocument(params) {
5416
5651
  carrier !== "Unknown" ? carrier : void 0,
5417
5652
  policyNumber !== "Unknown" ? `#${policyNumber}` : void 0,
5418
5653
  insuredName !== "Unknown" ? `for ${insuredName}` : void 0,
5419
- profile.policyTypes.length ? `covering ${profile.policyTypes.slice(0, 5).join(", ")}` : void 0
5654
+ profile.linesOfBusiness.length ? `covering ${profile.linesOfBusiness.slice(0, 5).join(", ")}` : void 0
5420
5655
  ].filter(Boolean).join(" ");
5421
5656
  const base = {
5422
5657
  id: params.id,
@@ -5430,7 +5665,7 @@ function materializeDocument(params) {
5430
5665
  brokerAgency: broker,
5431
5666
  producer: { agencyName: broker, ...brokerProvenance }
5432
5667
  } : {},
5433
- policyTypes: profile.policyTypes,
5668
+ linesOfBusiness: profile.linesOfBusiness,
5434
5669
  formInventory: params.formInventory.filter((form) => typeof form.formNumber === "string" && form.formNumber.trim().length > 0).map((form) => ({
5435
5670
  formNumber: form.formNumber,
5436
5671
  editionDate: form.editionDate,
@@ -5816,13 +6051,13 @@ function chunkDocument(doc) {
5816
6051
  };
5817
6052
  const chunks = [];
5818
6053
  const docId = doc.id;
5819
- const policyTypesStr = doc.policyTypes?.length ? doc.policyTypes.join(",") : void 0;
6054
+ const linesOfBusinessStr = doc.linesOfBusiness?.length ? doc.linesOfBusiness.join(",") : void 0;
5820
6055
  const extendedDoc = doc;
5821
6056
  function stringMetadata(entries) {
5822
6057
  const base = Object.fromEntries(
5823
6058
  Object.entries(entries).filter(([, value]) => value !== void 0 && value !== null && String(value).length > 0).map(([key, value]) => [key, String(value)])
5824
6059
  );
5825
- if (policyTypesStr) base.policyTypes = policyTypesStr;
6060
+ if (linesOfBusinessStr) base.linesOfBusiness = linesOfBusinessStr;
5826
6061
  return base;
5827
6062
  }
5828
6063
  function lines(values) {
@@ -5856,7 +6091,7 @@ function chunkDocument(doc) {
5856
6091
  doc.isRenewal != null ? `Renewal: ${doc.isRenewal ? "Yes" : "No"}` : null,
5857
6092
  doc.isPackage != null ? `Package: ${doc.isPackage ? "Yes" : "No"}` : null,
5858
6093
  doc.security ? `Security: ${doc.security}` : null,
5859
- doc.policyTypes?.length ? `Policy Types: ${doc.policyTypes.join(", ")}` : null
6094
+ doc.linesOfBusiness?.length ? `Lines of Business: ${doc.linesOfBusiness.join(", ")}` : null
5860
6095
  ]),
5861
6096
  { carrier: doc.carrier, documentType: doc.type }
5862
6097
  );
@@ -7191,8 +7426,8 @@ Respond with JSON only:
7191
7426
  }`;
7192
7427
 
7193
7428
  // src/schemas/application.ts
7194
- import { z as z23 } from "zod";
7195
- var FieldTypeSchema = z23.enum([
7429
+ import { z as z24 } from "zod";
7430
+ var FieldTypeSchema = z24.enum([
7196
7431
  "text",
7197
7432
  "numeric",
7198
7433
  "currency",
@@ -7201,223 +7436,223 @@ var FieldTypeSchema = z23.enum([
7201
7436
  "table",
7202
7437
  "declaration"
7203
7438
  ]);
7204
- var ApplicationFieldSchema = z23.object({
7205
- id: z23.string(),
7206
- label: z23.string(),
7207
- section: z23.string(),
7439
+ var ApplicationFieldSchema = z24.object({
7440
+ id: z24.string(),
7441
+ label: z24.string(),
7442
+ section: z24.string(),
7208
7443
  fieldType: FieldTypeSchema,
7209
- required: z23.boolean(),
7210
- options: z23.array(z23.string()).optional(),
7211
- columns: z23.array(z23.string()).optional(),
7212
- requiresExplanationIfYes: z23.boolean().optional(),
7213
- condition: z23.object({
7214
- dependsOn: z23.string(),
7215
- whenValue: z23.string()
7444
+ required: z24.boolean(),
7445
+ options: z24.array(z24.string()).optional(),
7446
+ columns: z24.array(z24.string()).optional(),
7447
+ requiresExplanationIfYes: z24.boolean().optional(),
7448
+ condition: z24.object({
7449
+ dependsOn: z24.string(),
7450
+ whenValue: z24.string()
7216
7451
  }).optional(),
7217
- value: z23.string().optional(),
7218
- source: z23.string().optional().describe("Where the value came from: auto-fill, user, lookup"),
7219
- confidence: z23.enum(["confirmed", "high", "medium", "low"]).optional(),
7220
- sourceSpanIds: z23.array(z23.string()).optional().describe("Stable source spans that support the field value or field anchor"),
7221
- userSourceSpanIds: z23.array(z23.string()).optional().describe("Message or attachment spans that support user-provided values"),
7222
- pageNumber: z23.number().int().positive().optional().describe("Application page where the field label or anchor appears"),
7223
- fieldAnchorId: z23.string().optional().describe("Stable field anchor ID derived from page, section, label, and form metadata"),
7224
- acroFormName: z23.string().optional().describe("Native PDF AcroForm field name when available"),
7225
- validationStatus: z23.enum(["valid", "needs_review", "unsupported", "missing"]).optional()
7226
- });
7227
- var ApplicationQuestionConditionSchema = z23.object({
7228
- dependsOn: z23.string(),
7229
- operator: z23.enum(["equals", "not_equals", "in", "not_in", "exists"]).optional(),
7230
- value: z23.string().optional(),
7231
- whenValue: z23.string().optional(),
7232
- values: z23.array(z23.string()).optional()
7233
- });
7234
- var ApplicationRepeatSchema = z23.object({
7235
- min: z23.number().int().nonnegative().optional(),
7236
- max: z23.number().int().positive().optional(),
7237
- label: z23.string().optional()
7238
- });
7239
- var ApplicationQuestionNodeSchema = z23.lazy(
7240
- () => z23.object({
7241
- id: z23.string(),
7242
- nodeType: z23.enum(["group", "question", "repeat_group", "table"]),
7243
- fieldId: z23.string().optional(),
7244
- fieldPath: z23.string().optional(),
7245
- parentId: z23.string().optional(),
7246
- order: z23.number().int().nonnegative().optional(),
7247
- label: z23.string(),
7248
- section: z23.string().optional(),
7452
+ value: z24.string().optional(),
7453
+ source: z24.string().optional().describe("Where the value came from: auto-fill, user, lookup"),
7454
+ confidence: z24.enum(["confirmed", "high", "medium", "low"]).optional(),
7455
+ sourceSpanIds: z24.array(z24.string()).optional().describe("Stable source spans that support the field value or field anchor"),
7456
+ userSourceSpanIds: z24.array(z24.string()).optional().describe("Message or attachment spans that support user-provided values"),
7457
+ pageNumber: z24.number().int().positive().optional().describe("Application page where the field label or anchor appears"),
7458
+ fieldAnchorId: z24.string().optional().describe("Stable field anchor ID derived from page, section, label, and form metadata"),
7459
+ acroFormName: z24.string().optional().describe("Native PDF AcroForm field name when available"),
7460
+ validationStatus: z24.enum(["valid", "needs_review", "unsupported", "missing"]).optional()
7461
+ });
7462
+ var ApplicationQuestionConditionSchema = z24.object({
7463
+ dependsOn: z24.string(),
7464
+ operator: z24.enum(["equals", "not_equals", "in", "not_in", "exists"]).optional(),
7465
+ value: z24.string().optional(),
7466
+ whenValue: z24.string().optional(),
7467
+ values: z24.array(z24.string()).optional()
7468
+ });
7469
+ var ApplicationRepeatSchema = z24.object({
7470
+ min: z24.number().int().nonnegative().optional(),
7471
+ max: z24.number().int().positive().optional(),
7472
+ label: z24.string().optional()
7473
+ });
7474
+ var ApplicationQuestionNodeSchema = z24.lazy(
7475
+ () => z24.object({
7476
+ id: z24.string(),
7477
+ nodeType: z24.enum(["group", "question", "repeat_group", "table"]),
7478
+ fieldId: z24.string().optional(),
7479
+ fieldPath: z24.string().optional(),
7480
+ parentId: z24.string().optional(),
7481
+ order: z24.number().int().nonnegative().optional(),
7482
+ label: z24.string(),
7483
+ section: z24.string().optional(),
7249
7484
  fieldType: FieldTypeSchema.optional(),
7250
- required: z23.boolean().optional(),
7251
- prompt: z23.string().optional(),
7252
- options: z23.array(z23.string()).optional(),
7253
- columns: z23.array(z23.string()).optional(),
7485
+ required: z24.boolean().optional(),
7486
+ prompt: z24.string().optional(),
7487
+ options: z24.array(z24.string()).optional(),
7488
+ columns: z24.array(z24.string()).optional(),
7254
7489
  condition: ApplicationQuestionConditionSchema.optional(),
7255
7490
  repeat: ApplicationRepeatSchema.optional(),
7256
- children: z23.array(ApplicationQuestionNodeSchema).optional()
7491
+ children: z24.array(ApplicationQuestionNodeSchema).optional()
7257
7492
  })
7258
7493
  );
7259
- var ApplicationQuestionGraphSchema = z23.object({
7260
- id: z23.string(),
7261
- version: z23.string(),
7262
- title: z23.string().optional(),
7263
- applicationType: z23.string().nullable().optional(),
7264
- source: z23.enum(["pdf", "manual", "imported", "generated"]).default("generated"),
7265
- rootNodeIds: z23.array(z23.string()).optional(),
7266
- nodes: z23.array(ApplicationQuestionNodeSchema)
7267
- });
7268
- var ApplicationTemplateSchema = z23.object({
7269
- id: z23.string(),
7270
- version: z23.string(),
7271
- title: z23.string(),
7272
- applicationType: z23.string().nullable().optional(),
7494
+ var ApplicationQuestionGraphSchema = z24.object({
7495
+ id: z24.string(),
7496
+ version: z24.string(),
7497
+ title: z24.string().optional(),
7498
+ applicationType: z24.string().nullable().optional(),
7499
+ source: z24.enum(["pdf", "manual", "imported", "generated"]).default("generated"),
7500
+ rootNodeIds: z24.array(z24.string()).optional(),
7501
+ nodes: z24.array(ApplicationQuestionNodeSchema)
7502
+ });
7503
+ var ApplicationTemplateSchema = z24.object({
7504
+ id: z24.string(),
7505
+ version: z24.string(),
7506
+ title: z24.string(),
7507
+ applicationType: z24.string().nullable().optional(),
7273
7508
  questionGraph: ApplicationQuestionGraphSchema,
7274
- fields: z23.array(ApplicationFieldSchema).optional()
7275
- });
7276
- var ApplicationClassifyResultSchema = z23.object({
7277
- isApplication: z23.boolean(),
7278
- confidence: z23.number().min(0).max(1),
7279
- applicationType: z23.string().nullable()
7280
- });
7281
- var FieldExtractionResultSchema = z23.object({
7282
- fields: z23.array(ApplicationFieldSchema)
7283
- });
7284
- var AutoFillMatchSchema = z23.object({
7285
- fieldId: z23.string(),
7286
- value: z23.string(),
7287
- confidence: z23.enum(["confirmed"]),
7288
- contextKey: z23.string()
7289
- });
7290
- var AutoFillResultSchema = z23.object({
7291
- matches: z23.array(AutoFillMatchSchema)
7292
- });
7293
- var QuestionBatchResultSchema = z23.object({
7294
- batches: z23.array(z23.array(z23.string()).describe("Array of field IDs in this batch"))
7295
- });
7296
- var LookupRequestSchema = z23.object({
7297
- type: z23.string().describe("Type of lookup: 'records', 'website', 'policy'"),
7298
- description: z23.string(),
7299
- url: z23.string().optional(),
7300
- targetFieldIds: z23.array(z23.string())
7301
- });
7302
- var ReplyIntentSchema = z23.object({
7303
- primaryIntent: z23.enum(["answers_only", "question", "lookup_request", "mixed"]),
7304
- hasAnswers: z23.boolean(),
7305
- questionText: z23.string().optional(),
7306
- questionFieldIds: z23.array(z23.string()).optional(),
7307
- lookupRequests: z23.array(LookupRequestSchema).optional()
7308
- });
7309
- var ParsedAnswerSchema = z23.object({
7310
- fieldId: z23.string(),
7311
- value: z23.string(),
7312
- explanation: z23.string().optional()
7313
- });
7314
- var AnswerParsingResultSchema = z23.object({
7315
- answers: z23.array(ParsedAnswerSchema),
7316
- unanswered: z23.array(z23.string()).describe("Field IDs that were not answered")
7509
+ fields: z24.array(ApplicationFieldSchema).optional()
7317
7510
  });
7318
- var LookupFillSchema = z23.object({
7319
- fieldId: z23.string(),
7320
- value: z23.string(),
7321
- source: z23.string().describe("Specific citable reference, e.g. 'GL Policy #POL-12345 (Hartford)'"),
7322
- sourceSpanIds: z23.array(z23.string()).optional()
7323
- });
7324
- var LookupFillResultSchema = z23.object({
7325
- fills: z23.array(LookupFillSchema),
7326
- unfillable: z23.array(z23.string()),
7327
- explanation: z23.string().optional()
7328
- });
7329
- var FlatPdfPlacementSchema = z23.object({
7330
- fieldId: z23.string(),
7331
- page: z23.number(),
7332
- x: z23.number().describe("Percentage from left edge (0-100)"),
7333
- y: z23.number().describe("Percentage from top edge (0-100)"),
7334
- text: z23.string(),
7335
- fontSize: z23.number().optional(),
7336
- isCheckmark: z23.boolean().optional()
7337
- });
7338
- var AcroFormMappingSchema = z23.object({
7339
- fieldId: z23.string(),
7340
- acroFormName: z23.string(),
7341
- value: z23.string()
7342
- });
7343
- var QualityGateStatusSchema = z23.enum(["passed", "warning", "failed"]);
7344
- var QualitySeveritySchema = z23.enum(["info", "warning", "blocking"]);
7345
- var ApplicationQualityIssueSchema = z23.object({
7346
- code: z23.string(),
7511
+ var ApplicationClassifyResultSchema = z24.object({
7512
+ isApplication: z24.boolean(),
7513
+ confidence: z24.number().min(0).max(1),
7514
+ applicationType: z24.string().nullable()
7515
+ });
7516
+ var FieldExtractionResultSchema = z24.object({
7517
+ fields: z24.array(ApplicationFieldSchema)
7518
+ });
7519
+ var AutoFillMatchSchema = z24.object({
7520
+ fieldId: z24.string(),
7521
+ value: z24.string(),
7522
+ confidence: z24.enum(["confirmed"]),
7523
+ contextKey: z24.string()
7524
+ });
7525
+ var AutoFillResultSchema = z24.object({
7526
+ matches: z24.array(AutoFillMatchSchema)
7527
+ });
7528
+ var QuestionBatchResultSchema = z24.object({
7529
+ batches: z24.array(z24.array(z24.string()).describe("Array of field IDs in this batch"))
7530
+ });
7531
+ var LookupRequestSchema = z24.object({
7532
+ type: z24.string().describe("Type of lookup: 'records', 'website', 'policy'"),
7533
+ description: z24.string(),
7534
+ url: z24.string().optional(),
7535
+ targetFieldIds: z24.array(z24.string())
7536
+ });
7537
+ var ReplyIntentSchema = z24.object({
7538
+ primaryIntent: z24.enum(["answers_only", "question", "lookup_request", "mixed"]),
7539
+ hasAnswers: z24.boolean(),
7540
+ questionText: z24.string().optional(),
7541
+ questionFieldIds: z24.array(z24.string()).optional(),
7542
+ lookupRequests: z24.array(LookupRequestSchema).optional()
7543
+ });
7544
+ var ParsedAnswerSchema = z24.object({
7545
+ fieldId: z24.string(),
7546
+ value: z24.string(),
7547
+ explanation: z24.string().optional()
7548
+ });
7549
+ var AnswerParsingResultSchema = z24.object({
7550
+ answers: z24.array(ParsedAnswerSchema),
7551
+ unanswered: z24.array(z24.string()).describe("Field IDs that were not answered")
7552
+ });
7553
+ var LookupFillSchema = z24.object({
7554
+ fieldId: z24.string(),
7555
+ value: z24.string(),
7556
+ source: z24.string().describe("Specific citable reference, e.g. 'GL Policy #POL-12345 (Hartford)'"),
7557
+ sourceSpanIds: z24.array(z24.string()).optional()
7558
+ });
7559
+ var LookupFillResultSchema = z24.object({
7560
+ fills: z24.array(LookupFillSchema),
7561
+ unfillable: z24.array(z24.string()),
7562
+ explanation: z24.string().optional()
7563
+ });
7564
+ var FlatPdfPlacementSchema = z24.object({
7565
+ fieldId: z24.string(),
7566
+ page: z24.number(),
7567
+ x: z24.number().describe("Percentage from left edge (0-100)"),
7568
+ y: z24.number().describe("Percentage from top edge (0-100)"),
7569
+ text: z24.string(),
7570
+ fontSize: z24.number().optional(),
7571
+ isCheckmark: z24.boolean().optional()
7572
+ });
7573
+ var AcroFormMappingSchema = z24.object({
7574
+ fieldId: z24.string(),
7575
+ acroFormName: z24.string(),
7576
+ value: z24.string()
7577
+ });
7578
+ var QualityGateStatusSchema = z24.enum(["passed", "warning", "failed"]);
7579
+ var QualitySeveritySchema = z24.enum(["info", "warning", "blocking"]);
7580
+ var ApplicationQualityIssueSchema = z24.object({
7581
+ code: z24.string(),
7347
7582
  severity: QualitySeveritySchema,
7348
- message: z23.string(),
7349
- fieldId: z23.string().optional()
7583
+ message: z24.string(),
7584
+ fieldId: z24.string().optional()
7350
7585
  });
7351
- var ApplicationQualityRoundSchema = z23.object({
7352
- round: z23.number(),
7353
- kind: z23.string(),
7586
+ var ApplicationQualityRoundSchema = z24.object({
7587
+ round: z24.number(),
7588
+ kind: z24.string(),
7354
7589
  status: QualityGateStatusSchema,
7355
- summary: z23.string().optional()
7590
+ summary: z24.string().optional()
7356
7591
  });
7357
- var ApplicationQualityArtifactSchema = z23.object({
7358
- kind: z23.string(),
7359
- label: z23.string().optional(),
7360
- itemCount: z23.number().optional()
7592
+ var ApplicationQualityArtifactSchema = z24.object({
7593
+ kind: z24.string(),
7594
+ label: z24.string().optional(),
7595
+ itemCount: z24.number().optional()
7361
7596
  });
7362
- var ApplicationEmailReviewSchema = z23.object({
7363
- issues: z23.array(ApplicationQualityIssueSchema),
7597
+ var ApplicationEmailReviewSchema = z24.object({
7598
+ issues: z24.array(ApplicationQualityIssueSchema),
7364
7599
  qualityGateStatus: QualityGateStatusSchema
7365
7600
  });
7366
- var ApplicationQualityReportSchema = z23.object({
7367
- issues: z23.array(ApplicationQualityIssueSchema),
7368
- rounds: z23.array(ApplicationQualityRoundSchema).optional(),
7369
- artifacts: z23.array(ApplicationQualityArtifactSchema).optional(),
7601
+ var ApplicationQualityReportSchema = z24.object({
7602
+ issues: z24.array(ApplicationQualityIssueSchema),
7603
+ rounds: z24.array(ApplicationQualityRoundSchema).optional(),
7604
+ artifacts: z24.array(ApplicationQualityArtifactSchema).optional(),
7370
7605
  emailReview: ApplicationEmailReviewSchema.optional(),
7371
7606
  qualityGateStatus: QualityGateStatusSchema
7372
7607
  });
7373
- var ApplicationContextProposalSchema = z23.object({
7374
- id: z23.string(),
7375
- fieldId: z23.string().optional(),
7376
- key: z23.string(),
7377
- value: z23.string(),
7378
- category: z23.string(),
7379
- source: z23.enum(["application", "user", "lookup", "policy", "email", "chat", "imessage", "mcp"]),
7380
- confidence: z23.enum(["confirmed", "high", "medium", "low"]),
7381
- sourceSpanIds: z23.array(z23.string()).optional(),
7382
- userSourceSpanIds: z23.array(z23.string()).optional()
7383
- });
7384
- var ApplicationPacketAnswerSchema = z23.object({
7385
- fieldId: z23.string(),
7386
- label: z23.string(),
7387
- section: z23.string(),
7388
- value: z23.string(),
7389
- source: z23.string(),
7390
- confidence: z23.enum(["confirmed", "high", "medium", "low"]).optional(),
7391
- sourceSpanIds: z23.array(z23.string()).optional(),
7392
- userSourceSpanIds: z23.array(z23.string()).optional()
7393
- });
7394
- var ApplicationPacketSchema = z23.object({
7395
- id: z23.string(),
7396
- applicationId: z23.string(),
7397
- title: z23.string(),
7398
- status: z23.enum(["draft", "broker_ready", "submitted"]),
7399
- answers: z23.array(ApplicationPacketAnswerSchema),
7400
- missingFieldIds: z23.array(z23.string()),
7608
+ var ApplicationContextProposalSchema = z24.object({
7609
+ id: z24.string(),
7610
+ fieldId: z24.string().optional(),
7611
+ key: z24.string(),
7612
+ value: z24.string(),
7613
+ category: z24.string(),
7614
+ source: z24.enum(["application", "user", "lookup", "policy", "email", "chat", "imessage", "mcp"]),
7615
+ confidence: z24.enum(["confirmed", "high", "medium", "low"]),
7616
+ sourceSpanIds: z24.array(z24.string()).optional(),
7617
+ userSourceSpanIds: z24.array(z24.string()).optional()
7618
+ });
7619
+ var ApplicationPacketAnswerSchema = z24.object({
7620
+ fieldId: z24.string(),
7621
+ label: z24.string(),
7622
+ section: z24.string(),
7623
+ value: z24.string(),
7624
+ source: z24.string(),
7625
+ confidence: z24.enum(["confirmed", "high", "medium", "low"]).optional(),
7626
+ sourceSpanIds: z24.array(z24.string()).optional(),
7627
+ userSourceSpanIds: z24.array(z24.string()).optional()
7628
+ });
7629
+ var ApplicationPacketSchema = z24.object({
7630
+ id: z24.string(),
7631
+ applicationId: z24.string(),
7632
+ title: z24.string(),
7633
+ status: z24.enum(["draft", "broker_ready", "submitted"]),
7634
+ answers: z24.array(ApplicationPacketAnswerSchema),
7635
+ missingFieldIds: z24.array(z24.string()),
7401
7636
  qualityReport: ApplicationQualityReportSchema,
7402
- submissionNotes: z23.string().optional(),
7403
- createdAt: z23.number()
7404
- });
7405
- var ApplicationStateSchema = z23.object({
7406
- id: z23.string(),
7407
- pdfBase64: z23.string().optional().describe("Original PDF, omitted after extraction"),
7408
- templateId: z23.string().optional(),
7409
- templateVersion: z23.string().optional(),
7637
+ submissionNotes: z24.string().optional(),
7638
+ createdAt: z24.number()
7639
+ });
7640
+ var ApplicationStateSchema = z24.object({
7641
+ id: z24.string(),
7642
+ pdfBase64: z24.string().optional().describe("Original PDF, omitted after extraction"),
7643
+ templateId: z24.string().optional(),
7644
+ templateVersion: z24.string().optional(),
7410
7645
  templateSnapshot: ApplicationTemplateSchema.optional(),
7411
- title: z23.string().optional(),
7412
- applicationType: z23.string().nullable().optional(),
7646
+ title: z24.string().optional(),
7647
+ applicationType: z24.string().nullable().optional(),
7413
7648
  questionGraph: ApplicationQuestionGraphSchema.optional(),
7414
- fields: z23.array(ApplicationFieldSchema),
7415
- batches: z23.array(z23.array(z23.string())).optional(),
7416
- currentBatchIndex: z23.number().default(0),
7417
- contextProposals: z23.array(ApplicationContextProposalSchema).optional(),
7649
+ fields: z24.array(ApplicationFieldSchema),
7650
+ batches: z24.array(z24.array(z24.string())).optional(),
7651
+ currentBatchIndex: z24.number().default(0),
7652
+ contextProposals: z24.array(ApplicationContextProposalSchema).optional(),
7418
7653
  packet: ApplicationPacketSchema.optional(),
7419
7654
  qualityReport: ApplicationQualityReportSchema.optional(),
7420
- status: z23.enum([
7655
+ status: z24.enum([
7421
7656
  "classifying",
7422
7657
  "extracting",
7423
7658
  "auto_filling",
@@ -7431,8 +7666,8 @@ var ApplicationStateSchema = z23.object({
7431
7666
  "cancelled",
7432
7667
  "complete"
7433
7668
  ]),
7434
- createdAt: z23.number(),
7435
- updatedAt: z23.number()
7669
+ createdAt: z24.number(),
7670
+ updatedAt: z24.number()
7436
7671
  });
7437
7672
 
7438
7673
  // src/application/agents/classifier.ts
@@ -9166,106 +9401,106 @@ Respond with the final answer, deduplicated citations array, overall confidence
9166
9401
  }
9167
9402
 
9168
9403
  // src/schemas/query.ts
9169
- import { z as z24 } from "zod";
9170
- var QueryIntentSchema = z24.enum([
9404
+ import { z as z25 } from "zod";
9405
+ var QueryIntentSchema = z25.enum([
9171
9406
  "policy_question",
9172
9407
  "coverage_comparison",
9173
9408
  "document_search",
9174
9409
  "claims_inquiry",
9175
9410
  "general_knowledge"
9176
9411
  ]);
9177
- var QueryAttachmentKindSchema = z24.enum(["image", "pdf", "text"]);
9178
- var QueryAttachmentSchema = z24.object({
9179
- id: z24.string().optional().describe("Optional stable attachment ID from the caller"),
9412
+ var QueryAttachmentKindSchema = z25.enum(["image", "pdf", "text"]);
9413
+ var QueryAttachmentSchema = z25.object({
9414
+ id: z25.string().optional().describe("Optional stable attachment ID from the caller"),
9180
9415
  kind: QueryAttachmentKindSchema,
9181
- name: z24.string().optional().describe("Original filename or user-facing label"),
9182
- mimeType: z24.string().optional().describe("MIME type such as image/jpeg or application/pdf"),
9183
- base64: z24.string().optional().describe("Base64-encoded file content for image/pdf attachments"),
9184
- text: z24.string().optional().describe("Plain-text attachment content when available"),
9185
- description: z24.string().optional().describe("Caller-provided description of the attachment")
9416
+ name: z25.string().optional().describe("Original filename or user-facing label"),
9417
+ mimeType: z25.string().optional().describe("MIME type such as image/jpeg or application/pdf"),
9418
+ base64: z25.string().optional().describe("Base64-encoded file content for image/pdf attachments"),
9419
+ text: z25.string().optional().describe("Plain-text attachment content when available"),
9420
+ description: z25.string().optional().describe("Caller-provided description of the attachment")
9186
9421
  });
9187
- var QueryRetrievalModeSchema = z24.enum([
9422
+ var QueryRetrievalModeSchema = z25.enum([
9188
9423
  "graph_only",
9189
9424
  "source_rag",
9190
9425
  "long_context",
9191
9426
  "hybrid"
9192
9427
  ]);
9193
- var SubQuestionSchema = z24.object({
9194
- question: z24.string().describe("Atomic sub-question to retrieve and answer independently"),
9428
+ var SubQuestionSchema = z25.object({
9429
+ question: z25.string().describe("Atomic sub-question to retrieve and answer independently"),
9195
9430
  intent: QueryIntentSchema,
9196
- chunkTypes: z24.array(z24.string()).optional().describe("Chunk types to filter retrieval (e.g. coverage, endorsement, declaration)"),
9197
- documentFilters: z24.object({
9198
- type: z24.enum(["policy", "quote"]).optional(),
9199
- carrier: z24.string().optional(),
9200
- insuredName: z24.string().optional(),
9201
- policyNumber: z24.string().optional(),
9202
- quoteNumber: z24.string().optional(),
9203
- policyTypes: z24.array(PolicyTypeSchema).optional().describe("Filter by policy type (e.g. homeowners_ho3, renters_ho4, pet) to avoid mixing up similar policies")
9431
+ chunkTypes: z25.array(z25.string()).optional().describe("Chunk types to filter retrieval (e.g. coverage, endorsement, declaration)"),
9432
+ documentFilters: z25.object({
9433
+ type: z25.enum(["policy", "quote"]).optional(),
9434
+ carrier: z25.string().optional(),
9435
+ insuredName: z25.string().optional(),
9436
+ policyNumber: z25.string().optional(),
9437
+ quoteNumber: z25.string().optional(),
9438
+ linesOfBusiness: z25.array(AcordLobCodeSchema).optional().describe("Filter by ACORD line of business code (e.g. HOME, AUTOP, DISAB) to avoid mixing up similar policies")
9204
9439
  }).optional().describe("Structured filters to narrow document lookup")
9205
9440
  });
9206
- var QueryClassifyResultSchema = z24.object({
9441
+ var QueryClassifyResultSchema = z25.object({
9207
9442
  intent: QueryIntentSchema,
9208
- subQuestions: z24.array(SubQuestionSchema).min(1).describe("Decomposed atomic sub-questions"),
9209
- requiresDocumentLookup: z24.boolean().describe("Whether structured document lookup is needed"),
9210
- requiresChunkSearch: z24.boolean().describe("Whether semantic chunk search is needed"),
9211
- requiresConversationHistory: z24.boolean().describe("Whether conversation history is relevant"),
9443
+ subQuestions: z25.array(SubQuestionSchema).min(1).describe("Decomposed atomic sub-questions"),
9444
+ requiresDocumentLookup: z25.boolean().describe("Whether structured document lookup is needed"),
9445
+ requiresChunkSearch: z25.boolean().describe("Whether semantic chunk search is needed"),
9446
+ requiresConversationHistory: z25.boolean().describe("Whether conversation history is relevant"),
9212
9447
  retrievalMode: QueryRetrievalModeSchema.optional().describe("Preferred retrieval strategy for the query when source-span retrieval is available")
9213
9448
  });
9214
- var EvidenceItemSchema = z24.object({
9215
- source: z24.enum(["chunk", "document", "conversation", "attachment", "source_span", "source_node"]),
9216
- chunkId: z24.string().optional(),
9217
- sourceNodeId: z24.string().optional(),
9218
- sourceSpanId: z24.string().optional(),
9219
- documentId: z24.string().optional(),
9220
- turnId: z24.string().optional(),
9221
- attachmentId: z24.string().optional(),
9222
- text: z24.string().describe("Text excerpt from the source"),
9223
- relevance: z24.number().min(0).max(1),
9449
+ var EvidenceItemSchema = z25.object({
9450
+ source: z25.enum(["chunk", "document", "conversation", "attachment", "source_span", "source_node"]),
9451
+ chunkId: z25.string().optional(),
9452
+ sourceNodeId: z25.string().optional(),
9453
+ sourceSpanId: z25.string().optional(),
9454
+ documentId: z25.string().optional(),
9455
+ turnId: z25.string().optional(),
9456
+ attachmentId: z25.string().optional(),
9457
+ text: z25.string().describe("Text excerpt from the source"),
9458
+ relevance: z25.number().min(0).max(1),
9224
9459
  retrievalMode: QueryRetrievalModeSchema.optional(),
9225
9460
  sourceLocation: SourceSpanLocationSchema.optional(),
9226
- metadata: z24.array(z24.object({ key: z24.string(), value: z24.string() })).optional()
9227
- });
9228
- var AttachmentInterpretationSchema = z24.object({
9229
- summary: z24.string().describe("Concise summary of what the attachment shows or contains"),
9230
- extractedFacts: z24.array(z24.string()).describe("Specific observable or document facts grounded in the attachment"),
9231
- recommendedFocus: z24.array(z24.string()).describe("Important details to incorporate when answering follow-up questions"),
9232
- confidence: z24.number().min(0).max(1)
9233
- });
9234
- var RetrievalResultSchema = z24.object({
9235
- subQuestion: z24.string(),
9236
- evidence: z24.array(EvidenceItemSchema)
9237
- });
9238
- var CitationSchema = z24.object({
9239
- index: z24.number().describe("Citation number [1], [2], etc."),
9240
- chunkId: z24.string().optional().describe("Source chunk ID, e.g. doc-123:coverage:2"),
9241
- sourceNodeId: z24.string().optional().describe("Source tree node ID when available"),
9242
- sourceSpanId: z24.string().optional().describe("Precise source span ID when available"),
9243
- documentId: z24.string(),
9244
- documentType: z24.enum(["policy", "quote"]).optional(),
9245
- field: z24.string().optional().describe("Specific field path, e.g. coverages[0].deductible"),
9246
- quote: z24.string().describe("Exact text from source that supports the claim"),
9247
- relevance: z24.number().min(0).max(1),
9461
+ metadata: z25.array(z25.object({ key: z25.string(), value: z25.string() })).optional()
9462
+ });
9463
+ var AttachmentInterpretationSchema = z25.object({
9464
+ summary: z25.string().describe("Concise summary of what the attachment shows or contains"),
9465
+ extractedFacts: z25.array(z25.string()).describe("Specific observable or document facts grounded in the attachment"),
9466
+ recommendedFocus: z25.array(z25.string()).describe("Important details to incorporate when answering follow-up questions"),
9467
+ confidence: z25.number().min(0).max(1)
9468
+ });
9469
+ var RetrievalResultSchema = z25.object({
9470
+ subQuestion: z25.string(),
9471
+ evidence: z25.array(EvidenceItemSchema)
9472
+ });
9473
+ var CitationSchema = z25.object({
9474
+ index: z25.number().describe("Citation number [1], [2], etc."),
9475
+ chunkId: z25.string().optional().describe("Source chunk ID, e.g. doc-123:coverage:2"),
9476
+ sourceNodeId: z25.string().optional().describe("Source tree node ID when available"),
9477
+ sourceSpanId: z25.string().optional().describe("Precise source span ID when available"),
9478
+ documentId: z25.string(),
9479
+ documentType: z25.enum(["policy", "quote"]).optional(),
9480
+ field: z25.string().optional().describe("Specific field path, e.g. coverages[0].deductible"),
9481
+ quote: z25.string().describe("Exact text from source that supports the claim"),
9482
+ relevance: z25.number().min(0).max(1),
9248
9483
  retrievalMode: QueryRetrievalModeSchema.optional(),
9249
9484
  sourceLocation: SourceSpanLocationSchema.optional()
9250
9485
  });
9251
- var SubAnswerSchema = z24.object({
9252
- subQuestion: z24.string(),
9253
- answer: z24.string(),
9254
- citations: z24.array(CitationSchema),
9255
- confidence: z24.number().min(0).max(1),
9256
- needsMoreContext: z24.boolean().describe("True if evidence was insufficient to answer fully")
9257
- });
9258
- var VerifyResultSchema = z24.object({
9259
- approved: z24.boolean().describe("Whether all sub-answers are adequately grounded"),
9260
- issues: z24.array(z24.string()).describe("Specific grounding or consistency issues found"),
9261
- retrySubQuestions: z24.array(z24.string()).optional().describe("Sub-questions that need additional retrieval or re-reasoning")
9262
- });
9263
- var QueryResultSchema = z24.object({
9264
- answer: z24.string(),
9265
- citations: z24.array(CitationSchema),
9486
+ var SubAnswerSchema = z25.object({
9487
+ subQuestion: z25.string(),
9488
+ answer: z25.string(),
9489
+ citations: z25.array(CitationSchema),
9490
+ confidence: z25.number().min(0).max(1),
9491
+ needsMoreContext: z25.boolean().describe("True if evidence was insufficient to answer fully")
9492
+ });
9493
+ var VerifyResultSchema = z25.object({
9494
+ approved: z25.boolean().describe("Whether all sub-answers are adequately grounded"),
9495
+ issues: z25.array(z25.string()).describe("Specific grounding or consistency issues found"),
9496
+ retrySubQuestions: z25.array(z25.string()).optional().describe("Sub-questions that need additional retrieval or re-reasoning")
9497
+ });
9498
+ var QueryResultSchema = z25.object({
9499
+ answer: z25.string(),
9500
+ citations: z25.array(CitationSchema),
9266
9501
  intent: QueryIntentSchema,
9267
- confidence: z24.number().min(0).max(1),
9268
- followUp: z24.string().optional().describe("Suggested follow-up question if applicable")
9502
+ confidence: z25.number().min(0).max(1),
9503
+ followUp: z25.string().optional().describe("Suggested follow-up question if applicable")
9269
9504
  });
9270
9505
 
9271
9506
  // src/query/retriever.ts
@@ -10332,7 +10567,7 @@ ${sa.answer}`).join("\n\n"),
10332
10567
  }
10333
10568
 
10334
10569
  // src/pce/index.ts
10335
- import { z as z25 } from "zod";
10570
+ import { z as z26 } from "zod";
10336
10571
 
10337
10572
  // src/prompts/pce/index.ts
10338
10573
  function buildPceNormalizePrompt(input) {
@@ -10366,11 +10601,11 @@ ${input.openQuestions.map((question) => `- ${question.id}${question.fieldPath ?
10366
10601
  }
10367
10602
 
10368
10603
  // src/pce/index.ts
10369
- var ReplyAnswersSchema = z25.object({
10370
- answers: z25.array(z25.object({
10371
- questionId: z25.string().optional(),
10372
- fieldPath: z25.string().optional(),
10373
- answer: z25.string()
10604
+ var ReplyAnswersSchema = z26.object({
10605
+ answers: z26.array(z26.object({
10606
+ questionId: z26.string().optional(),
10607
+ fieldPath: z26.string().optional(),
10608
+ answer: z26.string()
10374
10609
  }))
10375
10610
  });
10376
10611
  function createPceAgent(config = {}) {
@@ -11099,7 +11334,7 @@ var COI_GENERATION_TOOL = {
11099
11334
  };
11100
11335
  var COVERAGE_COMPARISON_TOOL = {
11101
11336
  name: "coverage_comparison",
11102
- description: "Compare coverages across two or more insurance documents (policies and/or quotes). Returns a side-by-side comparison of policy types, limits, and deductibles.",
11337
+ description: "Compare coverages across two or more insurance documents (policies and/or quotes). Returns a side-by-side comparison of lines of business, limits, and deductibles.",
11103
11338
  input_schema: {
11104
11339
  type: "object",
11105
11340
  properties: {
@@ -11108,10 +11343,10 @@ var COVERAGE_COMPARISON_TOOL = {
11108
11343
  items: { type: "string" },
11109
11344
  description: "Array of document IDs (policies or quotes) to compare."
11110
11345
  },
11111
- policyTypes: {
11346
+ linesOfBusiness: {
11112
11347
  type: "array",
11113
11348
  items: { type: "string" },
11114
- description: "Optional filter: only compare these policy types (e.g. 'General Liability', 'Workers Compensation'). Omit to compare all."
11349
+ description: "Optional filter: only compare these ACORD line of business codes or labels (e.g. 'CGL', 'WORK'). Omit to compare all."
11115
11350
  }
11116
11351
  },
11117
11352
  required: ["documentIds"]
@@ -11124,23 +11359,23 @@ var AGENT_TOOLS = [
11124
11359
  ];
11125
11360
 
11126
11361
  // src/prompts/extractors/carrier-info.ts
11127
- import { z as z26 } from "zod";
11128
- var CarrierInfoSchema = z26.object({
11129
- carrierName: z26.string().describe("Primary insurance company name for display"),
11130
- carrierLegalName: z26.string().optional().describe("Legal entity name of insurer"),
11131
- naicNumber: z26.string().optional().describe("NAIC company code"),
11132
- amBestRating: z26.string().optional().describe("AM Best rating, e.g. 'A+ XV'"),
11133
- admittedStatus: z26.enum(["admitted", "non_admitted", "surplus_lines"]).optional().describe("Admitted status of the carrier"),
11134
- mga: z26.string().optional().describe("Managing General Agent or Program Administrator name"),
11135
- underwriter: z26.string().optional().describe("Named individual underwriter"),
11136
- brokerAgency: z26.string().optional().describe("Broker or producer agency name"),
11137
- brokerContactName: z26.string().optional().describe("Broker or producer contact person name"),
11138
- brokerLicenseNumber: z26.string().optional().describe("Broker or producer license number"),
11139
- policyNumber: z26.string().optional().describe("Policy or quote reference number"),
11140
- effectiveDate: z26.string().optional().describe("Policy effective date (MM/DD/YYYY)"),
11141
- expirationDate: z26.string().optional().describe("Policy expiration date (MM/DD/YYYY)"),
11142
- quoteNumber: z26.string().optional().describe("Quote or proposal reference number"),
11143
- proposedEffectiveDate: z26.string().optional().describe("Proposed effective date for quotes (MM/DD/YYYY)")
11362
+ import { z as z27 } from "zod";
11363
+ var CarrierInfoSchema = z27.object({
11364
+ carrierName: z27.string().describe("Primary insurance company name for display"),
11365
+ carrierLegalName: z27.string().optional().describe("Legal entity name of insurer"),
11366
+ naicNumber: z27.string().optional().describe("NAIC company code"),
11367
+ amBestRating: z27.string().optional().describe("AM Best rating, e.g. 'A+ XV'"),
11368
+ admittedStatus: z27.enum(["admitted", "non_admitted", "surplus_lines"]).optional().describe("Admitted status of the carrier"),
11369
+ mga: z27.string().optional().describe("Managing General Agent or Program Administrator name"),
11370
+ underwriter: z27.string().optional().describe("Named individual underwriter"),
11371
+ brokerAgency: z27.string().optional().describe("Broker or producer agency name"),
11372
+ brokerContactName: z27.string().optional().describe("Broker or producer contact person name"),
11373
+ brokerLicenseNumber: z27.string().optional().describe("Broker or producer license number"),
11374
+ policyNumber: z27.string().optional().describe("Policy or quote reference number"),
11375
+ effectiveDate: z27.string().optional().describe("Policy effective date (MM/DD/YYYY)"),
11376
+ expirationDate: z27.string().optional().describe("Policy expiration date (MM/DD/YYYY)"),
11377
+ quoteNumber: z27.string().optional().describe("Quote or proposal reference number"),
11378
+ proposedEffectiveDate: z27.string().optional().describe("Proposed effective date for quotes (MM/DD/YYYY)")
11144
11379
  });
11145
11380
  function buildCarrierInfoPrompt() {
11146
11381
  return `You are an expert insurance document analyst. Extract carrier and policy identification information from this document.
@@ -11163,21 +11398,21 @@ Return JSON only.`;
11163
11398
  }
11164
11399
 
11165
11400
  // src/prompts/extractors/named-insured.ts
11166
- import { z as z27 } from "zod";
11167
- var AdditionalNamedInsuredSchema = z27.object({
11168
- name: z27.string(),
11169
- relationship: z27.string().optional().describe("e.g. subsidiary, affiliate"),
11401
+ import { z as z28 } from "zod";
11402
+ var AdditionalNamedInsuredSchema = z28.object({
11403
+ name: z28.string(),
11404
+ relationship: z28.string().optional().describe("e.g. subsidiary, affiliate"),
11170
11405
  address: SourceBackedAddressSchema.optional()
11171
11406
  }).merge(SourceProvenanceSchema);
11172
- var ScheduledPartySchema = z27.object({
11173
- name: z27.string(),
11407
+ var ScheduledPartySchema = z28.object({
11408
+ name: z28.string(),
11174
11409
  address: SourceBackedAddressSchema.optional()
11175
11410
  }).merge(SourceProvenanceSchema);
11176
- var NamedInsuredSchema2 = z27.object({
11177
- insuredName: z27.string().describe("Name of primary named insured"),
11178
- insuredDba: z27.string().optional().describe("Doing-business-as name"),
11411
+ var NamedInsuredSchema2 = z28.object({
11412
+ insuredName: z28.string().describe("Name of primary named insured"),
11413
+ insuredDba: z28.string().optional().describe("Doing-business-as name"),
11179
11414
  insuredAddress: SourceBackedAddressSchema.optional().describe("Primary insured mailing address"),
11180
- insuredEntityType: z27.enum([
11415
+ insuredEntityType: z28.enum([
11181
11416
  "corporation",
11182
11417
  "llc",
11183
11418
  "partnership",
@@ -11190,12 +11425,12 @@ var NamedInsuredSchema2 = z27.object({
11190
11425
  "married_couple",
11191
11426
  "other"
11192
11427
  ]).optional().describe("Legal entity type of the insured"),
11193
- insuredFein: z27.string().optional().describe("Federal Employer Identification Number"),
11194
- insuredSicCode: z27.string().optional().describe("SIC code"),
11195
- insuredNaicsCode: z27.string().optional().describe("NAICS code"),
11196
- additionalNamedInsureds: z27.array(AdditionalNamedInsuredSchema).optional().describe("Additional named insureds listed on the policy"),
11197
- lossPayees: z27.array(ScheduledPartySchema).optional().describe("Loss payees listed on the policy"),
11198
- mortgageHolders: z27.array(ScheduledPartySchema).optional().describe("Mortgage holders / lienholders listed on the policy")
11428
+ insuredFein: z28.string().optional().describe("Federal Employer Identification Number"),
11429
+ insuredSicCode: z28.string().optional().describe("SIC code"),
11430
+ insuredNaicsCode: z28.string().optional().describe("NAICS code"),
11431
+ additionalNamedInsureds: z28.array(AdditionalNamedInsuredSchema).optional().describe("Additional named insureds listed on the policy"),
11432
+ lossPayees: z28.array(ScheduledPartySchema).optional().describe("Loss payees listed on the policy"),
11433
+ mortgageHolders: z28.array(ScheduledPartySchema).optional().describe("Mortgage holders / lienholders listed on the policy")
11199
11434
  });
11200
11435
  function buildNamedInsuredPrompt() {
11201
11436
  return `You are an expert insurance document analyst. Extract all named insured information from this document.
@@ -11222,14 +11457,14 @@ Return JSON only.`;
11222
11457
  }
11223
11458
 
11224
11459
  // src/prompts/extractors/coverage-limits.ts
11225
- import { z as z28 } from "zod";
11460
+ import { z as z29 } from "zod";
11226
11461
  var ExtractorCoverageSchema = CoverageSchema.extend({
11227
- coverageCode: z28.string().optional().describe("Coverage code or class code")
11462
+ coverageCode: z29.string().optional().describe("Coverage code or class code")
11228
11463
  });
11229
- var CoverageLimitsSchema = z28.object({
11230
- coverages: z28.array(ExtractorCoverageSchema).describe("All coverages with their limits"),
11231
- coverageForm: z28.enum(["occurrence", "claims_made", "accident"]).optional().describe("Primary coverage trigger type"),
11232
- retroactiveDate: z28.string().optional().describe("Retroactive date for claims-made policies (MM/DD/YYYY)")
11464
+ var CoverageLimitsSchema = z29.object({
11465
+ coverages: z29.array(ExtractorCoverageSchema).describe("All coverages with their limits"),
11466
+ coverageForm: z29.enum(["occurrence", "claims_made", "accident"]).optional().describe("Primary coverage trigger type"),
11467
+ retroactiveDate: z29.string().optional().describe("Retroactive date for claims-made policies (MM/DD/YYYY)")
11233
11468
  });
11234
11469
  function buildCoverageLimitsPrompt() {
11235
11470
  return `You are an expert insurance document analyst. Extract all coverage limits and deductibles from this document.
@@ -11271,14 +11506,14 @@ Return JSON only.`;
11271
11506
  }
11272
11507
 
11273
11508
  // src/prompts/extractors/endorsements.ts
11274
- import { z as z29 } from "zod";
11275
- var EndorsementsSchema = z29.object({
11276
- endorsements: z29.array(
11277
- z29.object({
11278
- formNumber: z29.string().describe("Form number, e.g. 'CG 21 47'"),
11279
- editionDate: z29.string().optional().describe("Edition date, e.g. '12 07'"),
11280
- title: z29.string().describe("Endorsement title"),
11281
- endorsementType: z29.enum([
11509
+ import { z as z30 } from "zod";
11510
+ var EndorsementsSchema = z30.object({
11511
+ endorsements: z30.array(
11512
+ z30.object({
11513
+ formNumber: z30.string().describe("Form number, e.g. 'CG 21 47'"),
11514
+ editionDate: z30.string().optional().describe("Edition date, e.g. '12 07'"),
11515
+ title: z30.string().describe("Endorsement title"),
11516
+ endorsementType: z30.enum([
11282
11517
  "additional_insured",
11283
11518
  "waiver_of_subrogation",
11284
11519
  "primary_noncontributory",
@@ -11298,12 +11533,12 @@ var EndorsementsSchema = z29.object({
11298
11533
  "territorial_extension",
11299
11534
  "other"
11300
11535
  ]).describe("Endorsement type classification"),
11301
- effectiveDate: z29.string().optional().describe("Endorsement effective date"),
11302
- affectedCoverageParts: z29.array(z29.string()).optional().describe("Coverage parts affected by this endorsement"),
11303
- namedParties: z29.array(
11304
- z29.object({
11305
- name: z29.string().describe("Party name"),
11306
- role: z29.enum([
11536
+ effectiveDate: z30.string().optional().describe("Endorsement effective date"),
11537
+ affectedCoverageParts: z30.array(z30.string()).optional().describe("Coverage parts affected by this endorsement"),
11538
+ namedParties: z30.array(
11539
+ z30.object({
11540
+ name: z30.string().describe("Party name"),
11541
+ role: z30.enum([
11307
11542
  "additional_insured",
11308
11543
  "loss_payee",
11309
11544
  "mortgage_holder",
@@ -11312,18 +11547,18 @@ var EndorsementsSchema = z29.object({
11312
11547
  "designated_person",
11313
11548
  "other"
11314
11549
  ]).describe("Party role"),
11315
- relationship: z29.string().optional().describe("Relationship to insured"),
11316
- scope: z29.string().optional().describe("Scope of coverage for this party")
11550
+ relationship: z30.string().optional().describe("Relationship to insured"),
11551
+ scope: z30.string().optional().describe("Scope of coverage for this party")
11317
11552
  })
11318
11553
  ).optional().describe("Named parties (additional insureds, loss payees, etc.)"),
11319
- keyTerms: z29.array(z29.string()).optional().describe("Key terms or notable provisions in the endorsement"),
11320
- premiumImpact: z29.string().optional().describe("Additional premium or credit"),
11321
- excerpt: z29.string().optional().describe("Short source excerpt, not full verbatim text"),
11322
- content: z29.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
11323
- pageStart: z29.number().describe("Starting page number of this endorsement"),
11324
- pageEnd: z29.number().optional().describe("Ending page number of this endorsement"),
11325
- sourceSpanIds: z29.array(z29.string()).optional().describe("Source span IDs grounding this endorsement"),
11326
- sourceTextHash: z29.string().optional().describe("Hash of the source text when available")
11554
+ keyTerms: z30.array(z30.string()).optional().describe("Key terms or notable provisions in the endorsement"),
11555
+ premiumImpact: z30.string().optional().describe("Additional premium or credit"),
11556
+ excerpt: z30.string().optional().describe("Short source excerpt, not full verbatim text"),
11557
+ content: z30.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
11558
+ pageStart: z30.number().describe("Starting page number of this endorsement"),
11559
+ pageEnd: z30.number().optional().describe("Ending page number of this endorsement"),
11560
+ sourceSpanIds: z30.array(z30.string()).optional().describe("Source span IDs grounding this endorsement"),
11561
+ sourceTextHash: z30.string().optional().describe("Hash of the source text when available")
11327
11562
  })
11328
11563
  ).describe("All endorsements found in the document")
11329
11564
  });
@@ -11361,20 +11596,20 @@ Return JSON only.`;
11361
11596
  }
11362
11597
 
11363
11598
  // src/prompts/extractors/exclusions.ts
11364
- import { z as z30 } from "zod";
11365
- var ExclusionsSchema = z30.object({
11366
- exclusions: z30.array(
11367
- z30.object({
11368
- name: z30.string().describe("Exclusion title or short description"),
11369
- formNumber: z30.string().optional().describe("Form number if part of a named endorsement"),
11370
- excludedPerils: z30.array(z30.string()).optional().describe("Specific perils excluded"),
11371
- isAbsolute: z30.boolean().optional().describe("Whether the exclusion is absolute (no exceptions)"),
11372
- exceptions: z30.array(z30.string()).optional().describe("Exceptions to the exclusion, if any"),
11373
- buybackAvailable: z30.boolean().optional().describe("Whether coverage can be bought back via endorsement"),
11374
- buybackEndorsement: z30.string().optional().describe("Form number of the buyback endorsement if available"),
11375
- appliesTo: z30.array(z30.string()).optional().describe("Policy types this exclusion applies to"),
11376
- content: z30.string().describe("Full verbatim exclusion text"),
11377
- pageNumber: z30.number().optional().describe("Page number where exclusion appears")
11599
+ import { z as z31 } from "zod";
11600
+ var ExclusionsSchema = z31.object({
11601
+ exclusions: z31.array(
11602
+ z31.object({
11603
+ name: z31.string().describe("Exclusion title or short description"),
11604
+ formNumber: z31.string().optional().describe("Form number if part of a named endorsement"),
11605
+ excludedPerils: z31.array(z31.string()).optional().describe("Specific perils excluded"),
11606
+ isAbsolute: z31.boolean().optional().describe("Whether the exclusion is absolute (no exceptions)"),
11607
+ exceptions: z31.array(z31.string()).optional().describe("Exceptions to the exclusion, if any"),
11608
+ buybackAvailable: z31.boolean().optional().describe("Whether coverage can be bought back via endorsement"),
11609
+ buybackEndorsement: z31.string().optional().describe("Form number of the buyback endorsement if available"),
11610
+ appliesTo: z31.array(z31.string()).optional().describe("Policy types this exclusion applies to"),
11611
+ content: z31.string().describe("Full verbatim exclusion text"),
11612
+ pageNumber: z31.number().optional().describe("Page number where exclusion appears")
11378
11613
  })
11379
11614
  ).describe("All exclusions found in the document")
11380
11615
  });
@@ -11389,7 +11624,7 @@ For EACH exclusion, extract:
11389
11624
  - exceptions: any exceptions to the exclusion (things still covered despite the exclusion)
11390
11625
  - buybackAvailable: whether coverage can be purchased back via endorsement
11391
11626
  - buybackEndorsement: the form number of the buyback endorsement if known
11392
- - appliesTo: which policy types or lines this exclusion applies to (as an array)
11627
+ - appliesTo: which lines of business or coverages this exclusion applies to (as an array)
11393
11628
  - content: full verbatim exclusion text \u2014 REQUIRED
11394
11629
  - pageNumber: page number where the exclusion appears
11395
11630
 
@@ -11410,12 +11645,12 @@ Return JSON only.`;
11410
11645
  }
11411
11646
 
11412
11647
  // src/prompts/extractors/conditions.ts
11413
- import { z as z31 } from "zod";
11414
- var ConditionsSchema = z31.object({
11415
- conditions: z31.array(
11416
- z31.object({
11417
- name: z31.string().describe("Condition title"),
11418
- conditionType: z31.enum([
11648
+ import { z as z32 } from "zod";
11649
+ var ConditionsSchema = z32.object({
11650
+ conditions: z32.array(
11651
+ z32.object({
11652
+ name: z32.string().describe("Condition title"),
11653
+ conditionType: z32.enum([
11419
11654
  "duties_after_loss",
11420
11655
  "notice_requirements",
11421
11656
  "other_insurance",
@@ -11434,14 +11669,14 @@ var ConditionsSchema = z31.object({
11434
11669
  "separation_of_insureds",
11435
11670
  "other"
11436
11671
  ]).describe("Condition category"),
11437
- content: z31.string().describe("Full verbatim condition text"),
11438
- keyValues: z31.array(
11439
- z31.object({
11440
- key: z31.string().describe("Key name (e.g. 'noticePeriod', 'suitDeadline')"),
11441
- value: z31.string().describe("Value (e.g. '30 days', '2 years')")
11672
+ content: z32.string().describe("Full verbatim condition text"),
11673
+ keyValues: z32.array(
11674
+ z32.object({
11675
+ key: z32.string().describe("Key name (e.g. 'noticePeriod', 'suitDeadline')"),
11676
+ value: z32.string().describe("Value (e.g. '30 days', '2 years')")
11442
11677
  })
11443
11678
  ).optional().describe("Key values extracted from the condition (notice periods, deadlines, etc.)"),
11444
- pageNumber: z31.number().optional().describe("Page number where condition appears")
11679
+ pageNumber: z32.number().optional().describe("Page number where condition appears")
11445
11680
  })
11446
11681
  ).describe("All policy conditions found in the document")
11447
11682
  });
@@ -11479,34 +11714,34 @@ Return JSON only.`;
11479
11714
  }
11480
11715
 
11481
11716
  // src/prompts/extractors/premium-breakdown.ts
11482
- import { z as z32 } from "zod";
11483
- var PremiumBreakdownSchema = z32.object({
11484
- premium: z32.string().optional().describe("Total premium amount, e.g. '$5,000'"),
11485
- premiumAmount: z32.number().optional().describe("Total premium as a plain number with no currency symbols or commas"),
11486
- totalCost: z32.string().optional().describe("Total cost including taxes and fees, e.g. '$5,250'"),
11487
- totalCostAmount: z32.number().optional().describe("Total cost as a plain number with no currency symbols or commas"),
11488
- premiumBreakdown: z32.array(
11489
- z32.object({
11490
- line: z32.string().describe("Coverage line name"),
11491
- amount: z32.string().describe("Premium amount for this line"),
11492
- amountValue: z32.number().optional().describe("Premium amount as a plain number with no currency symbols or commas")
11717
+ import { z as z33 } from "zod";
11718
+ var PremiumBreakdownSchema = z33.object({
11719
+ premium: z33.string().optional().describe("Total premium amount, e.g. '$5,000'"),
11720
+ premiumAmount: z33.number().optional().describe("Total premium as a plain number with no currency symbols or commas"),
11721
+ totalCost: z33.string().optional().describe("Total cost including taxes and fees, e.g. '$5,250'"),
11722
+ totalCostAmount: z33.number().optional().describe("Total cost as a plain number with no currency symbols or commas"),
11723
+ premiumBreakdown: z33.array(
11724
+ z33.object({
11725
+ line: z33.string().describe("Coverage line name"),
11726
+ amount: z33.string().describe("Premium amount for this line"),
11727
+ amountValue: z33.number().optional().describe("Premium amount as a plain number with no currency symbols or commas")
11493
11728
  })
11494
11729
  ).optional().describe("Per-coverage-line premium breakdown"),
11495
- taxesAndFees: z32.array(
11496
- z32.object({
11497
- name: z32.string().describe("Fee or tax name"),
11498
- amount: z32.string().describe("Dollar amount"),
11499
- amountValue: z32.number().optional().describe("Fee or tax amount as a plain number with no currency symbols or commas"),
11500
- type: z32.enum(["tax", "fee", "surcharge", "assessment"]).optional().describe("Fee category")
11730
+ taxesAndFees: z33.array(
11731
+ z33.object({
11732
+ name: z33.string().describe("Fee or tax name"),
11733
+ amount: z33.string().describe("Dollar amount"),
11734
+ amountValue: z33.number().optional().describe("Fee or tax amount as a plain number with no currency symbols or commas"),
11735
+ type: z33.enum(["tax", "fee", "surcharge", "assessment"]).optional().describe("Fee category")
11501
11736
  })
11502
11737
  ).optional().describe("Taxes, fees, surcharges, and assessments"),
11503
- minimumPremium: z32.string().optional().describe("Minimum premium if stated"),
11504
- minimumPremiumAmount: z32.number().optional().describe("Minimum premium as a plain number when the source states a fixed amount"),
11505
- depositPremium: z32.string().optional().describe("Deposit premium if stated"),
11506
- depositPremiumAmount: z32.number().optional().describe("Deposit premium as a plain number when the source states a fixed amount"),
11507
- paymentPlan: z32.string().optional().describe("Payment plan description"),
11508
- auditType: z32.enum(["annual", "semi_annual", "quarterly", "monthly", "final", "self"]).optional().describe("Premium audit type"),
11509
- ratingBasis: z32.string().optional().describe("Rating basis, e.g. payroll, revenue, area, units")
11738
+ minimumPremium: z33.string().optional().describe("Minimum premium if stated"),
11739
+ minimumPremiumAmount: z33.number().optional().describe("Minimum premium as a plain number when the source states a fixed amount"),
11740
+ depositPremium: z33.string().optional().describe("Deposit premium if stated"),
11741
+ depositPremiumAmount: z33.number().optional().describe("Deposit premium as a plain number when the source states a fixed amount"),
11742
+ paymentPlan: z33.string().optional().describe("Payment plan description"),
11743
+ auditType: z33.enum(["annual", "semi_annual", "quarterly", "monthly", "final", "self"]).optional().describe("Premium audit type"),
11744
+ ratingBasis: z33.string().optional().describe("Rating basis, e.g. payroll, revenue, area, units")
11510
11745
  });
11511
11746
  function buildPremiumBreakdownPrompt() {
11512
11747
  return `You are an expert insurance document analyst. Extract all premium and cost information from this document.
@@ -11528,14 +11763,14 @@ Return JSON only.`;
11528
11763
  }
11529
11764
 
11530
11765
  // src/prompts/extractors/declarations.ts
11531
- import { z as z33 } from "zod";
11532
- var DeclarationsFieldSchema = z33.object({
11533
- field: z33.string().describe("Descriptive field name (e.g. 'policyNumber', 'effectiveDate', 'coverageALimit')"),
11534
- value: z33.string().describe("Extracted value exactly as it appears in the document"),
11535
- section: z33.string().optional().describe("Section or grouping this field belongs to (e.g. 'Coverage Limits', 'Vehicle Schedule')")
11766
+ import { z as z34 } from "zod";
11767
+ var DeclarationsFieldSchema = z34.object({
11768
+ field: z34.string().describe("Descriptive field name (e.g. 'policyNumber', 'effectiveDate', 'coverageALimit')"),
11769
+ value: z34.string().describe("Extracted value exactly as it appears in the document"),
11770
+ section: z34.string().optional().describe("Section or grouping this field belongs to (e.g. 'Coverage Limits', 'Vehicle Schedule')")
11536
11771
  });
11537
- var DeclarationsExtractSchema = z33.object({
11538
- fields: z33.array(DeclarationsFieldSchema).describe("All declarations page fields extracted as key-value pairs. Structure varies by line of business.")
11772
+ var DeclarationsExtractSchema = z34.object({
11773
+ fields: z34.array(DeclarationsFieldSchema).describe("All declarations page fields extracted as key-value pairs. Structure varies by line of business.")
11539
11774
  });
11540
11775
  function buildDeclarationsPrompt() {
11541
11776
  return `You are an expert insurance document analyst. Extract all declarations page data from this document into a flexible key-value structure.
@@ -11575,21 +11810,21 @@ Preserve original values exactly as they appear. Return JSON only.`;
11575
11810
  }
11576
11811
 
11577
11812
  // src/prompts/extractors/loss-history.ts
11578
- import { z as z34 } from "zod";
11579
- var LossHistorySchema = z34.object({
11580
- lossSummary: z34.string().optional().describe("Summary of loss history, e.g. '3 claims in past 5 years totaling $125,000'"),
11581
- individualClaims: z34.array(
11582
- z34.object({
11583
- date: z34.string().optional().describe("Date of loss or claim"),
11584
- type: z34.string().optional().describe("Type of claim, e.g. 'property damage', 'bodily injury'"),
11585
- description: z34.string().optional().describe("Brief description of the claim"),
11586
- amountPaid: z34.string().optional().describe("Amount paid"),
11587
- amountReserved: z34.string().optional().describe("Amount reserved"),
11588
- status: z34.enum(["open", "closed", "reopened"]).optional().describe("Claim status"),
11589
- claimNumber: z34.string().optional().describe("Claim reference number")
11813
+ import { z as z35 } from "zod";
11814
+ var LossHistorySchema = z35.object({
11815
+ lossSummary: z35.string().optional().describe("Summary of loss history, e.g. '3 claims in past 5 years totaling $125,000'"),
11816
+ individualClaims: z35.array(
11817
+ z35.object({
11818
+ date: z35.string().optional().describe("Date of loss or claim"),
11819
+ type: z35.string().optional().describe("Type of claim, e.g. 'property damage', 'bodily injury'"),
11820
+ description: z35.string().optional().describe("Brief description of the claim"),
11821
+ amountPaid: z35.string().optional().describe("Amount paid"),
11822
+ amountReserved: z35.string().optional().describe("Amount reserved"),
11823
+ status: z35.enum(["open", "closed", "reopened"]).optional().describe("Claim status"),
11824
+ claimNumber: z35.string().optional().describe("Claim reference number")
11590
11825
  })
11591
11826
  ).optional().describe("Individual claim records"),
11592
- experienceMod: z34.string().optional().describe("Experience modification factor for workers comp, e.g. '0.85'")
11827
+ experienceMod: z35.string().optional().describe("Experience modification factor for workers comp, e.g. '0.85'")
11593
11828
  });
11594
11829
  function buildLossHistoryPrompt() {
11595
11830
  return `You are an expert insurance document analyst. Extract all loss history and claims information from this document.
@@ -11606,21 +11841,21 @@ Return JSON only.`;
11606
11841
  }
11607
11842
 
11608
11843
  // src/prompts/extractors/sections.ts
11609
- import { z as z35 } from "zod";
11610
- var SubsectionSchema2 = z35.object({
11611
- title: z35.string().describe("Subsection title"),
11612
- sectionNumber: z35.string().optional().describe("Subsection number"),
11613
- pageNumber: z35.number().optional().describe("Page number"),
11614
- excerpt: z35.string().optional().describe("Short source excerpt, not full verbatim text"),
11615
- content: z35.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
11616
- sourceSpanIds: z35.array(z35.string()).optional().describe("Source span IDs grounding this subsection"),
11617
- sourceTextHash: z35.string().optional().describe("Hash of the source text when available")
11618
- });
11619
- var SectionsSchema = z35.object({
11620
- sections: z35.array(
11621
- z35.object({
11622
- title: z35.string().describe("Section title"),
11623
- type: z35.enum([
11844
+ import { z as z36 } from "zod";
11845
+ var SubsectionSchema2 = z36.object({
11846
+ title: z36.string().describe("Subsection title"),
11847
+ sectionNumber: z36.string().optional().describe("Subsection number"),
11848
+ pageNumber: z36.number().optional().describe("Page number"),
11849
+ excerpt: z36.string().optional().describe("Short source excerpt, not full verbatim text"),
11850
+ content: z36.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
11851
+ sourceSpanIds: z36.array(z36.string()).optional().describe("Source span IDs grounding this subsection"),
11852
+ sourceTextHash: z36.string().optional().describe("Hash of the source text when available")
11853
+ });
11854
+ var SectionsSchema = z36.object({
11855
+ sections: z36.array(
11856
+ z36.object({
11857
+ title: z36.string().describe("Section title"),
11858
+ type: z36.enum([
11624
11859
  "declarations",
11625
11860
  "insuring_agreement",
11626
11861
  "policy_form",
@@ -11635,13 +11870,13 @@ var SectionsSchema = z35.object({
11635
11870
  "regulatory",
11636
11871
  "other"
11637
11872
  ]).describe("Section type classification"),
11638
- excerpt: z35.string().optional().describe("Short source excerpt, not full verbatim text"),
11639
- content: z35.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
11640
- pageStart: z35.number().describe("Starting page number"),
11641
- pageEnd: z35.number().optional().describe("Ending page number"),
11642
- sourceSpanIds: z35.array(z35.string()).optional().describe("Source span IDs grounding this section"),
11643
- sourceTextHash: z35.string().optional().describe("Hash of the source text when available"),
11644
- subsections: z35.array(SubsectionSchema2).optional().describe("Subsections within this section")
11873
+ excerpt: z36.string().optional().describe("Short source excerpt, not full verbatim text"),
11874
+ content: z36.string().optional().describe("Legacy fallback only; do not return full text when sourceSpanIds are available"),
11875
+ pageStart: z36.number().describe("Starting page number"),
11876
+ pageEnd: z36.number().optional().describe("Ending page number"),
11877
+ sourceSpanIds: z36.array(z36.string()).optional().describe("Source span IDs grounding this section"),
11878
+ sourceTextHash: z36.string().optional().describe("Hash of the source text when available"),
11879
+ subsections: z36.array(SubsectionSchema2).optional().describe("Subsections within this section")
11645
11880
  })
11646
11881
  ).describe("All document sections")
11647
11882
  });
@@ -11675,20 +11910,20 @@ Return JSON only.`;
11675
11910
  }
11676
11911
 
11677
11912
  // src/prompts/extractors/supplementary.ts
11678
- import { z as z36 } from "zod";
11679
- var AuxiliaryFactSchema2 = z36.object({
11680
- key: z36.string().describe("Normalized machine-readable fact key, e.g. 'policyholder_age' or 'insured_name'"),
11681
- value: z36.string().describe("Concrete extracted fact value"),
11682
- subject: z36.string().optional().describe("Person, entity, vehicle, property, or schedule item this fact belongs to"),
11683
- context: z36.string().optional().describe("Short disambiguating context, such as 'Driver Schedule' or 'Named Insured'")
11684
- });
11685
- var SupplementarySchema = z36.object({
11686
- regulatoryContacts: z36.array(ContactSchema).optional().describe("Regulatory body contacts (state department of insurance, ombudsman)"),
11687
- claimsContacts: z36.array(ContactSchema).optional().describe("Claims reporting contacts and instructions"),
11688
- thirdPartyAdministrators: z36.array(ContactSchema).optional().describe("Third-party administrators for claims handling"),
11689
- cancellationNoticeDays: z36.number().optional().describe("Required notice period for cancellation in days"),
11690
- nonrenewalNoticeDays: z36.number().optional().describe("Required notice period for nonrenewal in days"),
11691
- auxiliaryFacts: z36.array(AuxiliaryFactSchema2).optional().describe("Additional retrieval-only facts that do not fit the strict primary schema")
11913
+ import { z as z37 } from "zod";
11914
+ var AuxiliaryFactSchema2 = z37.object({
11915
+ key: z37.string().describe("Normalized machine-readable fact key, e.g. 'policyholder_age' or 'insured_name'"),
11916
+ value: z37.string().describe("Concrete extracted fact value"),
11917
+ subject: z37.string().optional().describe("Person, entity, vehicle, property, or schedule item this fact belongs to"),
11918
+ context: z37.string().optional().describe("Short disambiguating context, such as 'Driver Schedule' or 'Named Insured'")
11919
+ });
11920
+ var SupplementarySchema = z37.object({
11921
+ regulatoryContacts: z37.array(ContactSchema).optional().describe("Regulatory body contacts (state department of insurance, ombudsman)"),
11922
+ claimsContacts: z37.array(ContactSchema).optional().describe("Claims reporting contacts and instructions"),
11923
+ thirdPartyAdministrators: z37.array(ContactSchema).optional().describe("Third-party administrators for claims handling"),
11924
+ cancellationNoticeDays: z37.number().optional().describe("Required notice period for cancellation in days"),
11925
+ nonrenewalNoticeDays: z37.number().optional().describe("Required notice period for nonrenewal in days"),
11926
+ auxiliaryFacts: z37.array(AuxiliaryFactSchema2).optional().describe("Additional retrieval-only facts that do not fit the strict primary schema")
11692
11927
  });
11693
11928
  function buildSupplementaryPrompt(alreadyExtractedSummary) {
11694
11929
  const exclusionBlock = alreadyExtractedSummary ? `
@@ -11728,17 +11963,17 @@ Return JSON only.`;
11728
11963
  }
11729
11964
 
11730
11965
  // src/prompts/extractors/definitions.ts
11731
- import { z as z37 } from "zod";
11732
- var DefinitionsSchema = z37.object({
11733
- definitions: z37.array(
11734
- z37.object({
11735
- term: z37.string().describe("Defined term exactly as shown in the document"),
11736
- definition: z37.string().describe("Full verbatim definition text, preserving original wording"),
11737
- pageNumber: z37.number().optional().describe("Original document page number"),
11738
- formNumber: z37.string().optional().describe("Form number where this definition appears"),
11739
- formTitle: z37.string().optional().describe("Form title where this definition appears"),
11740
- sectionRef: z37.string().optional().describe("Definition section heading or subsection reference"),
11741
- originalContent: z37.string().optional().describe("Short verbatim source snippet containing the term and definition")
11966
+ import { z as z38 } from "zod";
11967
+ var DefinitionsSchema = z38.object({
11968
+ definitions: z38.array(
11969
+ z38.object({
11970
+ term: z38.string().describe("Defined term exactly as shown in the document"),
11971
+ definition: z38.string().describe("Full verbatim definition text, preserving original wording"),
11972
+ pageNumber: z38.number().optional().describe("Original document page number"),
11973
+ formNumber: z38.string().optional().describe("Form number where this definition appears"),
11974
+ formTitle: z38.string().optional().describe("Form title where this definition appears"),
11975
+ sectionRef: z38.string().optional().describe("Definition section heading or subsection reference"),
11976
+ originalContent: z38.string().optional().describe("Short verbatim source snippet containing the term and definition")
11742
11977
  })
11743
11978
  ).describe("All substantive insurance definitions found in the document")
11744
11979
  });
@@ -11772,22 +12007,22 @@ Return JSON only.`;
11772
12007
  }
11773
12008
 
11774
12009
  // src/prompts/extractors/covered-reasons.ts
11775
- import { z as z38 } from "zod";
11776
- var CoveredReasonsSchema = z38.object({
11777
- coveredReasons: z38.array(
11778
- z38.object({
11779
- coverageName: z38.string().describe("Coverage, coverage part, or form this covered reason belongs to"),
11780
- reasonNumber: z38.string().optional().describe("Source number or letter for the covered reason, if shown"),
11781
- title: z38.string().optional().describe("Covered reason title, peril, cause of loss, trigger, or short name"),
11782
- content: z38.string().describe("Full verbatim covered-reason or insuring-agreement text"),
11783
- conditions: z38.array(z38.string()).optional().describe("Conditions, timing rules, documentation requirements, or prerequisites attached to this covered reason"),
11784
- exceptions: z38.array(z38.string()).optional().describe("Exceptions or limitations attached to this covered reason"),
11785
- appliesTo: z38.array(z38.string()).optional().describe("Covered property, persons, autos, locations, operations, or coverage parts this reason applies to"),
11786
- pageNumber: z38.number().optional().describe("Original document page number"),
11787
- formNumber: z38.string().optional().describe("Form number where this covered reason appears"),
11788
- formTitle: z38.string().optional().describe("Form title where this covered reason appears"),
11789
- sectionRef: z38.string().optional().describe("Section heading where this covered reason appears"),
11790
- originalContent: z38.string().optional().describe("Short verbatim source snippet used for this covered reason")
12010
+ import { z as z39 } from "zod";
12011
+ var CoveredReasonsSchema = z39.object({
12012
+ coveredReasons: z39.array(
12013
+ z39.object({
12014
+ coverageName: z39.string().describe("Coverage, coverage part, or form this covered reason belongs to"),
12015
+ reasonNumber: z39.string().optional().describe("Source number or letter for the covered reason, if shown"),
12016
+ title: z39.string().optional().describe("Covered reason title, peril, cause of loss, trigger, or short name"),
12017
+ content: z39.string().describe("Full verbatim covered-reason or insuring-agreement text"),
12018
+ conditions: z39.array(z39.string()).optional().describe("Conditions, timing rules, documentation requirements, or prerequisites attached to this covered reason"),
12019
+ exceptions: z39.array(z39.string()).optional().describe("Exceptions or limitations attached to this covered reason"),
12020
+ appliesTo: z39.array(z39.string()).optional().describe("Covered property, persons, autos, locations, operations, or coverage parts this reason applies to"),
12021
+ pageNumber: z39.number().optional().describe("Original document page number"),
12022
+ formNumber: z39.string().optional().describe("Form number where this covered reason appears"),
12023
+ formTitle: z39.string().optional().describe("Form title where this covered reason appears"),
12024
+ sectionRef: z39.string().optional().describe("Section heading where this covered reason appears"),
12025
+ originalContent: z39.string().optional().describe("Short verbatim source snippet used for this covered reason")
11791
12026
  })
11792
12027
  ).describe("Covered causes, perils, triggers, or reasons that affirmatively grant coverage")
11793
12028
  });
@@ -12630,10 +12865,13 @@ function getTemplate(policyType) {
12630
12865
  return TEMPLATE_MAP[policyType] ?? DEFAULT_TEMPLATE;
12631
12866
  }
12632
12867
  export {
12868
+ ACORD_LOB_CODES,
12869
+ ACORD_LOB_LABELS,
12633
12870
  ADMITTED_STATUSES,
12634
12871
  AGENT_TOOLS,
12635
12872
  APPLICATION_CLASSIFY_PROMPT,
12636
12873
  AUDIT_TYPES,
12874
+ AcordLobCodeSchema,
12637
12875
  AcroFormMappingSchema,
12638
12876
  AddressSchema,
12639
12877
  AdmittedStatusSchema,
@@ -12726,6 +12964,7 @@ export {
12726
12964
  ENDORSEMENT_PARTY_ROLES,
12727
12965
  ENDORSEMENT_TYPES,
12728
12966
  ENTITY_TYPES,
12967
+ EXCLUDED_ACORD_LOB_CODES,
12729
12968
  EarthquakeDeclarationsSchema,
12730
12969
  EmployersLiabilityLimitsSchema,
12731
12970
  EndorsementPartyRoleSchema,
@@ -12759,6 +12998,7 @@ export {
12759
12998
  InsuredLocationSchema,
12760
12999
  InsuredVehicleSchema,
12761
13000
  InsurerInfoSchema,
13001
+ LEGACY_POLICY_TYPE_TO_LOB,
12762
13002
  LIMIT_TYPES,
12763
13003
  LOSS_SETTLEMENTS,
12764
13004
  LimitScheduleSchema,
@@ -12777,11 +13017,11 @@ export {
12777
13017
  OperationalEndorsementSupportSchema,
12778
13018
  OperationalPartySchema,
12779
13019
  PERSONAL_AUTO_USAGES,
13020
+ PERSONAL_LOB_CODES,
12780
13021
  PET_SPECIES,
12781
13022
  PLATFORM_CONFIGS,
12782
13023
  POLICY_SECTION_TYPES,
12783
13024
  POLICY_TERM_TYPES,
12784
- POLICY_TYPES,
12785
13025
  ParsedAnswerSchema,
12786
13026
  PaymentInstallmentSchema,
12787
13027
  PaymentPlanSchema,
@@ -12808,7 +13048,6 @@ export {
12808
13048
  PolicyOperationalProfileSchema,
12809
13049
  PolicySectionTypeSchema,
12810
13050
  PolicyTermTypeSchema,
12811
- PolicyTypeSchema,
12812
13051
  PremiumLineSchema,
12813
13052
  ProducerInfoSchema,
12814
13053
  ProfessionalLiabilityDeclarationsSchema,
@@ -12937,16 +13176,19 @@ export {
12937
13176
  getNextApplicationQuestions,
12938
13177
  getPdfPageCount,
12939
13178
  getTemplate,
12940
- inferPolicyTypesFromOperationalCoverages,
13179
+ inferLinesOfBusinessFromOperationalCoverages,
12941
13180
  isDoclingExtractionInput,
12942
13181
  isFileReference,
13182
+ isLobCode,
13183
+ isPersonalLob,
13184
+ lobLabel,
12943
13185
  mergeQuestionAnswers,
12944
13186
  mergeSourceSpans,
12945
13187
  normalizeApplicationQuestionGraph,
12946
13188
  normalizeDoclingDocument,
12947
13189
  normalizeDocumentSourceTreePaths,
12948
13190
  normalizeForMatch,
12949
- normalizeOperationalPolicyTypes,
13191
+ normalizeOperationalLinesOfBusiness,
12950
13192
  normalizeSourceSpans,
12951
13193
  orderSourceEvidence,
12952
13194
  overlayTextOnPdf,
@@ -12957,7 +13199,7 @@ export {
12957
13199
  processReply,
12958
13200
  proposeContextWrites,
12959
13201
  resolveModelBudget,
12960
- resolveOperationalProfilePolicyTypes,
13202
+ resolveOperationalProfileLinesOfBusiness,
12961
13203
  safeGenerateObject,
12962
13204
  sanitizeNulls,
12963
13205
  scoreCaseProposal,
@@ -12968,6 +13210,7 @@ export {
12968
13210
  stablePolicyChangeItemId,
12969
13211
  stableStringify,
12970
13212
  stripFences,
13213
+ toLobCodes,
12971
13214
  toStrictSchema,
12972
13215
  validateApplicationPacket,
12973
13216
  validateEvidence,