@claritylabs/cl-sdk 3.0.3 → 3.0.5

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.d.mts CHANGED
@@ -34259,6 +34259,7 @@ declare function buildPageSourceSpans(pages: SourcePageInput[]): SourceSpan[];
34259
34259
  declare function buildSectionSourceSpans(pages: SourcePageInput[], options?: SectionSourceSpanOptions): SourceSpan[];
34260
34260
  declare function buildTextSourceSpans(input: SourceTextUnitInput, options?: SourceChunkOptions): SourceSpan[];
34261
34261
  declare function chunkSourceSpans(spans: SourceSpan[], options?: SourceChunkOptions): SourceChunk[];
34262
+ declare function normalizeSourceSpans(spans: SourceSpan[]): SourceSpan[];
34262
34263
 
34263
34264
  interface SourceStore extends SourceRetriever {
34264
34265
  addSourceSpans(spans: SourceSpan[]): Promise<void>;
@@ -36540,8 +36541,8 @@ declare const CitationSchema: z.ZodObject<{
36540
36541
  }, "strip", z.ZodTypeAny, {
36541
36542
  quote: string;
36542
36543
  documentId: string;
36543
- relevance: number;
36544
36544
  index: number;
36545
+ relevance: number;
36545
36546
  chunkId?: string | undefined;
36546
36547
  sourceSpanId?: string | undefined;
36547
36548
  documentType?: "policy" | "quote" | undefined;
@@ -36561,8 +36562,8 @@ declare const CitationSchema: z.ZodObject<{
36561
36562
  }, {
36562
36563
  quote: string;
36563
36564
  documentId: string;
36564
- relevance: number;
36565
36565
  index: number;
36566
+ relevance: number;
36566
36567
  chunkId?: string | undefined;
36567
36568
  sourceSpanId?: string | undefined;
36568
36569
  documentType?: "policy" | "quote" | undefined;
@@ -36626,8 +36627,8 @@ declare const SubAnswerSchema: z.ZodObject<{
36626
36627
  }, "strip", z.ZodTypeAny, {
36627
36628
  quote: string;
36628
36629
  documentId: string;
36629
- relevance: number;
36630
36630
  index: number;
36631
+ relevance: number;
36631
36632
  chunkId?: string | undefined;
36632
36633
  sourceSpanId?: string | undefined;
36633
36634
  documentType?: "policy" | "quote" | undefined;
@@ -36647,8 +36648,8 @@ declare const SubAnswerSchema: z.ZodObject<{
36647
36648
  }, {
36648
36649
  quote: string;
36649
36650
  documentId: string;
36650
- relevance: number;
36651
36651
  index: number;
36652
+ relevance: number;
36652
36653
  chunkId?: string | undefined;
36653
36654
  sourceSpanId?: string | undefined;
36654
36655
  documentType?: "policy" | "quote" | undefined;
@@ -36673,8 +36674,8 @@ declare const SubAnswerSchema: z.ZodObject<{
36673
36674
  citations: {
36674
36675
  quote: string;
36675
36676
  documentId: string;
36676
- relevance: number;
36677
36677
  index: number;
36678
+ relevance: number;
36678
36679
  chunkId?: string | undefined;
36679
36680
  sourceSpanId?: string | undefined;
36680
36681
  documentType?: "policy" | "quote" | undefined;
@@ -36700,8 +36701,8 @@ declare const SubAnswerSchema: z.ZodObject<{
36700
36701
  citations: {
36701
36702
  quote: string;
36702
36703
  documentId: string;
36703
- relevance: number;
36704
36704
  index: number;
36705
+ relevance: number;
36705
36706
  chunkId?: string | undefined;
36706
36707
  sourceSpanId?: string | undefined;
36707
36708
  documentType?: "policy" | "quote" | undefined;
@@ -36782,8 +36783,8 @@ declare const QueryResultSchema: z.ZodObject<{
36782
36783
  }, "strip", z.ZodTypeAny, {
36783
36784
  quote: string;
36784
36785
  documentId: string;
36785
- relevance: number;
36786
36786
  index: number;
36787
+ relevance: number;
36787
36788
  chunkId?: string | undefined;
36788
36789
  sourceSpanId?: string | undefined;
36789
36790
  documentType?: "policy" | "quote" | undefined;
@@ -36803,8 +36804,8 @@ declare const QueryResultSchema: z.ZodObject<{
36803
36804
  }, {
36804
36805
  quote: string;
36805
36806
  documentId: string;
36806
- relevance: number;
36807
36807
  index: number;
36808
+ relevance: number;
36808
36809
  chunkId?: string | undefined;
36809
36810
  sourceSpanId?: string | undefined;
36810
36811
  documentType?: "policy" | "quote" | undefined;
@@ -36830,8 +36831,8 @@ declare const QueryResultSchema: z.ZodObject<{
36830
36831
  citations: {
36831
36832
  quote: string;
36832
36833
  documentId: string;
36833
- relevance: number;
36834
36834
  index: number;
36835
+ relevance: number;
36835
36836
  chunkId?: string | undefined;
36836
36837
  sourceSpanId?: string | undefined;
36837
36838
  documentType?: "policy" | "quote" | undefined;
@@ -36857,8 +36858,8 @@ declare const QueryResultSchema: z.ZodObject<{
36857
36858
  citations: {
36858
36859
  quote: string;
36859
36860
  documentId: string;
36860
- relevance: number;
36861
36861
  index: number;
36862
+ relevance: number;
36862
36863
  chunkId?: string | undefined;
36863
36864
  sourceSpanId?: string | undefined;
36864
36865
  documentType?: "policy" | "quote" | undefined;
@@ -37083,4 +37084,4 @@ interface DocumentTemplate {
37083
37084
  }
37084
37085
  declare function getTemplate(policyType: string): DocumentTemplate;
37085
37086
 
37086
- export { ADMITTED_STATUSES, AGENT_TOOLS, APPLICATION_CLASSIFY_PROMPT, AUDIT_TYPES, type AcroFormFieldInfo, type AcroFormMapping, AcroFormMappingSchema, type Address, AddressSchema, type AdmittedStatus, AdmittedStatusSchema, type AgentContext, type AgenticExecutionMode, AgenticExecutionModeSchema, type AnswerMergeResult, type AnswerParsingResult, AnswerParsingResultSchema, type ApplicationClassifyResult, ApplicationClassifyResultSchema, ApplicationEmailReviewSchema, type ApplicationField, ApplicationFieldSchema, type ApplicationListFilters, type ApplicationPipelineConfig, ApplicationQualityArtifactSchema, ApplicationQualityIssueSchema, ApplicationQualityReportSchema, ApplicationQualityRoundSchema, type ApplicationState, ApplicationStateSchema, type ApplicationStore, type AttachmentInterpretation, AttachmentInterpretationSchema, type AuditType, AuditTypeSchema, type AutoFillMatch, AutoFillMatchSchema, type AutoFillResult, AutoFillResultSchema, type AuxiliaryFact, AuxiliaryFactSchema, BOAT_TYPES, type BackfillProvider, type BindingAuthority, BindingAuthoritySchema, type BoatType, BoatTypeSchema, CHUNK_TYPES, CLAIM_STATUSES, COI_GENERATION_TOOL, CONDITION_TYPES, CONSTRUCTION_TYPES, CONTEXT_KEY_MAP, COVERAGE_COMPARISON_TOOL, COVERAGE_FORMS, COVERAGE_TRIGGERS, type CaseAction, CaseActionSchema, type CaseCitation, CaseCitationSchema, type CaseEvidence, type CaseEvidenceSource, CaseEvidenceSourceSchema, type CaseField, type CaseItem, type CasePacketArtifact, type CasePacketArtifactKind, CasePacketArtifactKindSchema, CasePacketArtifactSchema, type CaseProposal, CaseProposalSchema, type CaseProposalScore, CaseProposalScoreSchema, type CaseState, type CaseSubmissionPacket, CaseSubmissionPacketSchema, type CaseValidationIssue, CaseValidationIssueSchema, type CaseWorkflowPlan, type ChunkFilter, type ChunkType, ChunkTypeSchema, type Citation, CitationSchema, type ClaimRecord, ClaimRecordSchema, type ClaimStatus, ClaimStatusSchema, type ClassificationCode, ClassificationCodeSchema, type CommercialAutoDeclarations, CommercialAutoDeclarationsSchema, type CommercialPropertyDeclarations, CommercialPropertyDeclarationsSchema, type CommunicationIntent, CommunicationIntentSchema, ConditionKeyValueSchema, type ConditionType, ConditionTypeSchema, type ConstructionType, ConstructionTypeSchema, type Contact, ContactSchema, type ContextKeyMapping, type ConversationTurn, type ConvertPdfToImagesFn, type Coverage, type CoverageForm, CoverageFormSchema, CoverageSchema, type CoverageTrigger, CoverageTriggerSchema, type CoverageValueType, CoverageValueTypeSchema, type CoveredReason, CoveredReasonSchema, type CrimeDeclarations, CrimeDeclarationsSchema, type CyberDeclarations, CyberDeclarationsSchema, DEDUCTIBLE_TYPES, DEFENSE_COST_TREATMENTS, DOCUMENT_LOOKUP_TOOL, DOCUMENT_TYPES, type DODeclarations, DODeclarationsSchema, DWELLING_FIRE_FORM_TYPES, type Declarations, DeclarationsSchema, type DeductibleSchedule, DeductibleScheduleSchema, type DeductibleType, DeductibleTypeSchema, type DefenseCostTreatment, DefenseCostTreatmentSchema, type Definition, DefinitionSchema, type DoclingDocumentLike, type DoclingExtractionInput, type DoclingItemLike, type DoclingNodeLike, type DoclingNormalizedUnit, type DoclingProvenanceLike, type DocumentAgentGuidance, DocumentAgentGuidanceSchema, type DocumentChunk, type DocumentFilters, type DocumentMetadata, DocumentMetadataSchema, type DocumentNode, DocumentNodeSchema, type DocumentPageMapEntry, DocumentPageMapEntrySchema, type DocumentSourceNode, type DocumentSourceNodeKind, DocumentSourceNodeKindSchema, DocumentSourceNodeSchema, type DocumentStore, type DocumentTableOfContentsEntry, DocumentTableOfContentsEntrySchema, type DocumentTemplate, type DocumentType, DocumentTypeSchema, type DriverRecord, DriverRecordSchema, type DwellingDetails, DwellingDetailsSchema, type DwellingFireDeclarations, DwellingFireDeclarationsSchema, type DwellingFireFormType, DwellingFireFormTypeSchema, ENDORSEMENT_PARTY_ROLES, ENDORSEMENT_TYPES, ENTITY_TYPES, type EarthquakeDeclarations, EarthquakeDeclarationsSchema, type EmbedText, type EmployersLiabilityLimits, EmployersLiabilityLimitsSchema, type Endorsement, type EndorsementParty, type EndorsementPartyRole, EndorsementPartyRoleSchema, EndorsementPartySchema, EndorsementSchema, type EndorsementType, EndorsementTypeSchema, type EnrichedCoverage, EnrichedCoverageSchema, type EnrichedSubjectivity, EnrichedSubjectivitySchema, type EnrichedUnderwritingCondition, EnrichedUnderwritingConditionSchema, type EntityType, EntityTypeSchema, type EvidenceItem, EvidenceItemSchema, type Exclusion, ExclusionSchema, type ExperienceMod, ExperienceModSchema, type ExtendedReportingPeriod, ExtendedReportingPeriodSchema, type ExtractOptions, type ExtractionInput, type ExtractionResult, type ExtractionState, type ExtractionV3Result, type ExtractorConfig, type ExtractorDef, FLOOD_ZONES, FOUNDATION_TYPES, type FarmRanchDeclarations, FarmRanchDeclarationsSchema, type FieldExtractionResult, FieldExtractionResultSchema, type FieldMapping, type FieldType, FieldTypeSchema, type FlatPdfPlacement, FlatPdfPlacementSchema, type FloodDeclarations, FloodDeclarationsSchema, type FloodZone, FloodZoneSchema, type FormReference, FormReferenceSchema, type FoundationType, FoundationTypeSchema, type GLDeclarations, GLDeclarationsSchema, type GenerateObject, type GeneratePceSubmissionPacketInput, type GenerateText, HOMEOWNERS_FORM_TYPES, type HomeownersDeclarations, HomeownersDeclarationsSchema, type HomeownersFormType, HomeownersFormTypeSchema, type IdentityTheftDeclarations, IdentityTheftDeclarationsSchema, type InsuranceDocument, InsuranceDocumentSchema, type InsuredLocation, InsuredLocationSchema, type InsuredVehicle, InsuredVehicleSchema, type InsurerInfo, InsurerInfoSchema, LIMIT_TYPES, LOSS_SETTLEMENTS, type LimitSchedule, LimitScheduleSchema, type LimitType, LimitTypeSchema, type LocationPremium, LocationPremiumSchema, type LogFn, type LookupFill, type LookupFillResult, LookupFillResultSchema, LookupFillSchema, type LookupRequest, LookupRequestSchema, type LossSettlement, LossSettlementSchema, type LossSummary, LossSummarySchema, MemorySourceStore, type MemoryStore, type MissingInfoQuestion, MissingInfoQuestionSchema, type ModelBudgetConstraint, type ModelBudgetResolution, type ModelCallReport, type ModelCapabilities, type ModelTaskKind, type NamedInsured, NamedInsuredSchema, type NormalizedDoclingDocument, type OperationalCoverageLine, OperationalCoverageLineSchema, type OperationalEndorsementSupport, OperationalEndorsementSupportSchema, type OperationalParty, OperationalPartySchema, type OrderableSourceEvidence, PERSONAL_AUTO_USAGES, PET_SPECIES, PLATFORM_CONFIGS, POLICY_SECTION_TYPES, POLICY_TERM_TYPES, POLICY_TYPES, type ParsedAnswer, ParsedAnswerSchema, type PaymentInstallment, PaymentInstallmentSchema, type PaymentPlan, PaymentPlanSchema, type PceAgentConfig, type PceCaseState, PceCaseStateSchema, type PceEvidenceSource, type PceExecutionModePreference, type PceMissingInfoQuestion, type PceNormalizationResult, PceNormalizationResultSchema, type PceQualityGateStatus, type PceQualityReport, type PceSubmissionPacket, PceSubmissionPacketSchema, type PceValidationIssue, type PdfInput, type PerformanceReport, type PersonalArticlesDeclarations, PersonalArticlesDeclarationsSchema, type PersonalAutoDeclarations, PersonalAutoDeclarationsSchema, type PersonalAutoUsage, PersonalAutoUsageSchema, type PersonalUmbrellaDeclarations, PersonalUmbrellaDeclarationsSchema, type PersonalVehicleDetails, PersonalVehicleDetailsSchema, type PetDeclarations, PetDeclarationsSchema, type PetSpecies, PetSpeciesSchema, type PipelineCheckpoint, type PipelineContext, type PipelineContextOptions, type Platform, type PlatformConfig, PlatformSchema, type PolicyChangeAction, PolicyChangeActionSchema, type PolicyChangeConfidence, PolicyChangeConfidenceSchema, type PolicyChangeImpact, PolicyChangeImpactSchema, type PolicyChangeItem, PolicyChangeItemSchema, type PolicyChangeKind, PolicyChangeKindSchema, type PolicyChangeMissingInfoQuestion, type PolicyChangePacket, type PolicyChangeRequest, PolicyChangeRequestSchema, type PolicyChangeState, type PolicyChangeStatus, PolicyChangeStatusSchema, type PolicyChangeValidationIssue, type PolicyCondition, PolicyConditionSchema, type PolicyDocument, PolicyDocumentSchema, type PolicyOperationalProfile, PolicyOperationalProfileSchema, type PolicySectionType, PolicySectionTypeSchema, type PolicyTermType, PolicyTermTypeSchema, type PolicyType, PolicyTypeSchema, type PremiumLine, PremiumLineSchema, type PriorAnswer, type ProcessApplicationInput, type ProcessApplicationResult, type ProcessPceChangeRequestInput, type ProcessPceChangeRequestResult, type ProcessPceReplyInput, type ProcessPceReplyResult, type ProcessReplyInput, type ProcessReplyResult, type ProducerInfo, ProducerInfoSchema, type ProfessionalLiabilityDeclarations, ProfessionalLiabilityDeclarationsSchema, QUOTE_SECTION_TYPES, type QueryAttachment, type QueryAttachmentKind, QueryAttachmentKindSchema, QueryAttachmentSchema, type QueryClassifyResult, QueryClassifyResultSchema, type QueryConfig, type QueryInput, type QueryIntent, QueryIntentSchema, type QueryOutput, type QueryResult, QueryResultSchema, type QueryRetrievalMode, QueryRetrievalModeSchema, type QuestionBatchResult, QuestionBatchResultSchema, type QuoteDocument, QuoteDocumentSchema, type QuoteSectionType, QuoteSectionTypeSchema, RATING_BASIS_TYPES, ROOF_TYPES, type RVType, RVTypeSchema, RV_TYPES, type RatingBasis, RatingBasisSchema, type RatingBasisType, RatingBasisTypeSchema, type RecreationalVehicleDeclarations, RecreationalVehicleDeclarationsSchema, type ReplyIntent, ReplyIntentSchema, type ResolveModelBudgetParams, type RetrievalResult, RetrievalResultSchema, type RoofType, RoofTypeSchema, SCHEDULED_ITEM_CATEGORIES, SUBJECTIVITY_CATEGORIES, type SafeGenerateOptions, type SafeGenerateParams, type ScheduledItemCategory, ScheduledItemCategorySchema, type Section, SectionSchema, type SectionSourceSpanOptions, type SharedLimit, SharedLimitSchema, type SourceBackedValue, SourceBackedValueSchema, type SourceChunk, type SourceChunkOptions, SourceChunkSchema, type SourceKind, SourceKindSchema, type SourceNodeRetrievalResult, type SourcePageInput, type SourceRetrievalMode, type SourceRetrievalQuery, type SourceRetrievalResult, type SourceRetriever, type SourceSpan, type SourceSpanBBox, SourceSpanBBoxSchema, type SourceSpanIdInput, type SourceSpanKind, SourceSpanKindSchema, type SourceSpanLocation, SourceSpanLocationSchema, type SourceSpanRef, SourceSpanRefSchema, SourceSpanSchema, type SourceSpanTableLocation, SourceSpanTableLocationSchema, type SourceSpanUnit, SourceSpanUnitSchema, type SourceStore, type SourceTextUnitInput, type SubAnswer, SubAnswerSchema, type SubQuestion, SubQuestionSchema, type Subjectivity, type SubjectivityCategory, SubjectivityCategorySchema, SubjectivitySchema, type Sublimit, SublimitSchema, type Subsection, SubsectionSchema, TITLE_POLICY_TYPES, type TaxFeeItem, TaxFeeItemSchema, type TextOverlay, type TitleDeclarations, TitleDeclarationsSchema, type TitlePolicyType, TitlePolicyTypeSchema, type TokenUsage, type ToolDefinition, type TravelDeclarations, TravelDeclarationsSchema, type UmbrellaExcessDeclarations, UmbrellaExcessDeclarationsSchema, type UnderwritingCondition, UnderwritingConditionSchema, VALUATION_METHODS, VEHICLE_COVERAGE_TYPES, type ValidationIssueSeverity, ValidationIssueSeveritySchema, type ValuationMethod, ValuationMethodSchema, type VehicleCoverage, VehicleCoverageSchema, type VehicleCoverageType, VehicleCoverageTypeSchema, type VerifyResult, VerifyResultSchema, type WatercraftDeclarations, WatercraftDeclarationsSchema, type WorkersCompDeclarations, WorkersCompDeclarationsSchema, buildAcroFormMappingPrompt, buildAgentSystemPrompt, buildAnswerParsingPrompt, buildAutoFillPrompt, buildBatchEmailGenerationPrompt, buildClassifyMessagePrompt, buildCoiRoutingPrompt, buildConfirmationSummaryPrompt, buildConversationMemoryGuidance, buildCoverageGapPrompt, buildDeterministicOperationalProfile, buildDoclingProviderOptions, buildDocumentSourceTree, buildFieldExplanationPrompt, buildFieldExtractionPrompt, buildFlatPdfMappingPrompt, buildFormattingPrompt, buildIdentityPrompt, buildIntentPrompt, buildInterpretAttachmentPrompt, buildLookupFillPrompt, buildPageSourceSpans, buildPceNormalizePrompt, buildPceQualityReport, buildPceReplyPrompt, buildPceSubmissionPacket, buildPdfProviderOptions, buildQueryClassifyPrompt, buildQuestionBatchPrompt, buildQuotesPoliciesPrompt, buildReasonPrompt, buildReplyIntentClassificationPrompt, buildRespondPrompt, buildSafetyPrompt, buildSectionSourceSpans, buildSourceSpan, buildSourceSpanId, buildTextSourceSpans, buildVerifyPrompt, chunkDocument, chunkSourceSpans, collectPceEvidenceSources, compareSourceEvidence, createApplicationPipeline, createExtractor, createPceAgent, createPipelineContext, createQueryAgent, evaluateCaseProposals, evidenceContainsQuote, extractPageRange, fillAcroForm, generateNextMessage, getAcroFormFields, getDoclingPageRangeText, getExtractor, getFileIdentifier, getPdfPageCount, getTemplate, isDoclingExtractionInput, isFileReference, mergeOperationalProfile, mergeQuestionAnswers, mergeSourceSpans, normalizeDoclingDocument, normalizeDocumentSourceTreePaths, normalizeForMatch, orderSourceEvidence, overlayTextOnPdf, pLimit, pdfInputToBase64, pdfInputToBytes, processReply, resolveModelBudget, safeGenerateObject, sanitizeNulls, scoreCaseProposal, selectPceExecutionMode, sourceSpanTextHash, stableCaseId, stableHash, stablePolicyChangeItemId, stableStringify, stripFences, toStrictSchema, validateEvidence, validatePceItems, validateQuotedEvidence, withRetry };
37087
+ export { ADMITTED_STATUSES, AGENT_TOOLS, APPLICATION_CLASSIFY_PROMPT, AUDIT_TYPES, type AcroFormFieldInfo, type AcroFormMapping, AcroFormMappingSchema, type Address, AddressSchema, type AdmittedStatus, AdmittedStatusSchema, type AgentContext, type AgenticExecutionMode, AgenticExecutionModeSchema, type AnswerMergeResult, type AnswerParsingResult, AnswerParsingResultSchema, type ApplicationClassifyResult, ApplicationClassifyResultSchema, ApplicationEmailReviewSchema, type ApplicationField, ApplicationFieldSchema, type ApplicationListFilters, type ApplicationPipelineConfig, ApplicationQualityArtifactSchema, ApplicationQualityIssueSchema, ApplicationQualityReportSchema, ApplicationQualityRoundSchema, type ApplicationState, ApplicationStateSchema, type ApplicationStore, type AttachmentInterpretation, AttachmentInterpretationSchema, type AuditType, AuditTypeSchema, type AutoFillMatch, AutoFillMatchSchema, type AutoFillResult, AutoFillResultSchema, type AuxiliaryFact, AuxiliaryFactSchema, BOAT_TYPES, type BackfillProvider, type BindingAuthority, BindingAuthoritySchema, type BoatType, BoatTypeSchema, CHUNK_TYPES, CLAIM_STATUSES, COI_GENERATION_TOOL, CONDITION_TYPES, CONSTRUCTION_TYPES, CONTEXT_KEY_MAP, COVERAGE_COMPARISON_TOOL, COVERAGE_FORMS, COVERAGE_TRIGGERS, type CaseAction, CaseActionSchema, type CaseCitation, CaseCitationSchema, type CaseEvidence, type CaseEvidenceSource, CaseEvidenceSourceSchema, type CaseField, type CaseItem, type CasePacketArtifact, type CasePacketArtifactKind, CasePacketArtifactKindSchema, CasePacketArtifactSchema, type CaseProposal, CaseProposalSchema, type CaseProposalScore, CaseProposalScoreSchema, type CaseState, type CaseSubmissionPacket, CaseSubmissionPacketSchema, type CaseValidationIssue, CaseValidationIssueSchema, type CaseWorkflowPlan, type ChunkFilter, type ChunkType, ChunkTypeSchema, type Citation, CitationSchema, type ClaimRecord, ClaimRecordSchema, type ClaimStatus, ClaimStatusSchema, type ClassificationCode, ClassificationCodeSchema, type CommercialAutoDeclarations, CommercialAutoDeclarationsSchema, type CommercialPropertyDeclarations, CommercialPropertyDeclarationsSchema, type CommunicationIntent, CommunicationIntentSchema, ConditionKeyValueSchema, type ConditionType, ConditionTypeSchema, type ConstructionType, ConstructionTypeSchema, type Contact, ContactSchema, type ContextKeyMapping, type ConversationTurn, type ConvertPdfToImagesFn, type Coverage, type CoverageForm, CoverageFormSchema, CoverageSchema, type CoverageTrigger, CoverageTriggerSchema, type CoverageValueType, CoverageValueTypeSchema, type CoveredReason, CoveredReasonSchema, type CrimeDeclarations, CrimeDeclarationsSchema, type CyberDeclarations, CyberDeclarationsSchema, DEDUCTIBLE_TYPES, DEFENSE_COST_TREATMENTS, DOCUMENT_LOOKUP_TOOL, DOCUMENT_TYPES, type DODeclarations, DODeclarationsSchema, DWELLING_FIRE_FORM_TYPES, type Declarations, DeclarationsSchema, type DeductibleSchedule, DeductibleScheduleSchema, type DeductibleType, DeductibleTypeSchema, type DefenseCostTreatment, DefenseCostTreatmentSchema, type Definition, DefinitionSchema, type DoclingDocumentLike, type DoclingExtractionInput, type DoclingItemLike, type DoclingNodeLike, type DoclingNormalizedUnit, type DoclingProvenanceLike, type DocumentAgentGuidance, DocumentAgentGuidanceSchema, type DocumentChunk, type DocumentFilters, type DocumentMetadata, DocumentMetadataSchema, type DocumentNode, DocumentNodeSchema, type DocumentPageMapEntry, DocumentPageMapEntrySchema, type DocumentSourceNode, type DocumentSourceNodeKind, DocumentSourceNodeKindSchema, DocumentSourceNodeSchema, type DocumentStore, type DocumentTableOfContentsEntry, DocumentTableOfContentsEntrySchema, type DocumentTemplate, type DocumentType, DocumentTypeSchema, type DriverRecord, DriverRecordSchema, type DwellingDetails, DwellingDetailsSchema, type DwellingFireDeclarations, DwellingFireDeclarationsSchema, type DwellingFireFormType, DwellingFireFormTypeSchema, ENDORSEMENT_PARTY_ROLES, ENDORSEMENT_TYPES, ENTITY_TYPES, type EarthquakeDeclarations, EarthquakeDeclarationsSchema, type EmbedText, type EmployersLiabilityLimits, EmployersLiabilityLimitsSchema, type Endorsement, type EndorsementParty, type EndorsementPartyRole, EndorsementPartyRoleSchema, EndorsementPartySchema, EndorsementSchema, type EndorsementType, EndorsementTypeSchema, type EnrichedCoverage, EnrichedCoverageSchema, type EnrichedSubjectivity, EnrichedSubjectivitySchema, type EnrichedUnderwritingCondition, EnrichedUnderwritingConditionSchema, type EntityType, EntityTypeSchema, type EvidenceItem, EvidenceItemSchema, type Exclusion, ExclusionSchema, type ExperienceMod, ExperienceModSchema, type ExtendedReportingPeriod, ExtendedReportingPeriodSchema, type ExtractOptions, type ExtractionInput, type ExtractionResult, type ExtractionState, type ExtractionV3Result, type ExtractorConfig, type ExtractorDef, FLOOD_ZONES, FOUNDATION_TYPES, type FarmRanchDeclarations, FarmRanchDeclarationsSchema, type FieldExtractionResult, FieldExtractionResultSchema, type FieldMapping, type FieldType, FieldTypeSchema, type FlatPdfPlacement, FlatPdfPlacementSchema, type FloodDeclarations, FloodDeclarationsSchema, type FloodZone, FloodZoneSchema, type FormReference, FormReferenceSchema, type FoundationType, FoundationTypeSchema, type GLDeclarations, GLDeclarationsSchema, type GenerateObject, type GeneratePceSubmissionPacketInput, type GenerateText, HOMEOWNERS_FORM_TYPES, type HomeownersDeclarations, HomeownersDeclarationsSchema, type HomeownersFormType, HomeownersFormTypeSchema, type IdentityTheftDeclarations, IdentityTheftDeclarationsSchema, type InsuranceDocument, InsuranceDocumentSchema, type InsuredLocation, InsuredLocationSchema, type InsuredVehicle, InsuredVehicleSchema, type InsurerInfo, InsurerInfoSchema, LIMIT_TYPES, LOSS_SETTLEMENTS, type LimitSchedule, LimitScheduleSchema, type LimitType, LimitTypeSchema, type LocationPremium, LocationPremiumSchema, type LogFn, type LookupFill, type LookupFillResult, LookupFillResultSchema, LookupFillSchema, type LookupRequest, LookupRequestSchema, type LossSettlement, LossSettlementSchema, type LossSummary, LossSummarySchema, MemorySourceStore, type MemoryStore, type MissingInfoQuestion, MissingInfoQuestionSchema, type ModelBudgetConstraint, type ModelBudgetResolution, type ModelCallReport, type ModelCapabilities, type ModelTaskKind, type NamedInsured, NamedInsuredSchema, type NormalizedDoclingDocument, type OperationalCoverageLine, OperationalCoverageLineSchema, type OperationalEndorsementSupport, OperationalEndorsementSupportSchema, type OperationalParty, OperationalPartySchema, type OrderableSourceEvidence, PERSONAL_AUTO_USAGES, PET_SPECIES, PLATFORM_CONFIGS, POLICY_SECTION_TYPES, POLICY_TERM_TYPES, POLICY_TYPES, type ParsedAnswer, ParsedAnswerSchema, type PaymentInstallment, PaymentInstallmentSchema, type PaymentPlan, PaymentPlanSchema, type PceAgentConfig, type PceCaseState, PceCaseStateSchema, type PceEvidenceSource, type PceExecutionModePreference, type PceMissingInfoQuestion, type PceNormalizationResult, PceNormalizationResultSchema, type PceQualityGateStatus, type PceQualityReport, type PceSubmissionPacket, PceSubmissionPacketSchema, type PceValidationIssue, type PdfInput, type PerformanceReport, type PersonalArticlesDeclarations, PersonalArticlesDeclarationsSchema, type PersonalAutoDeclarations, PersonalAutoDeclarationsSchema, type PersonalAutoUsage, PersonalAutoUsageSchema, type PersonalUmbrellaDeclarations, PersonalUmbrellaDeclarationsSchema, type PersonalVehicleDetails, PersonalVehicleDetailsSchema, type PetDeclarations, PetDeclarationsSchema, type PetSpecies, PetSpeciesSchema, type PipelineCheckpoint, type PipelineContext, type PipelineContextOptions, type Platform, type PlatformConfig, PlatformSchema, type PolicyChangeAction, PolicyChangeActionSchema, type PolicyChangeConfidence, PolicyChangeConfidenceSchema, type PolicyChangeImpact, PolicyChangeImpactSchema, type PolicyChangeItem, PolicyChangeItemSchema, type PolicyChangeKind, PolicyChangeKindSchema, type PolicyChangeMissingInfoQuestion, type PolicyChangePacket, type PolicyChangeRequest, PolicyChangeRequestSchema, type PolicyChangeState, type PolicyChangeStatus, PolicyChangeStatusSchema, type PolicyChangeValidationIssue, type PolicyCondition, PolicyConditionSchema, type PolicyDocument, PolicyDocumentSchema, type PolicyOperationalProfile, PolicyOperationalProfileSchema, type PolicySectionType, PolicySectionTypeSchema, type PolicyTermType, PolicyTermTypeSchema, type PolicyType, PolicyTypeSchema, type PremiumLine, PremiumLineSchema, type PriorAnswer, type ProcessApplicationInput, type ProcessApplicationResult, type ProcessPceChangeRequestInput, type ProcessPceChangeRequestResult, type ProcessPceReplyInput, type ProcessPceReplyResult, type ProcessReplyInput, type ProcessReplyResult, type ProducerInfo, ProducerInfoSchema, type ProfessionalLiabilityDeclarations, ProfessionalLiabilityDeclarationsSchema, QUOTE_SECTION_TYPES, type QueryAttachment, type QueryAttachmentKind, QueryAttachmentKindSchema, QueryAttachmentSchema, type QueryClassifyResult, QueryClassifyResultSchema, type QueryConfig, type QueryInput, type QueryIntent, QueryIntentSchema, type QueryOutput, type QueryResult, QueryResultSchema, type QueryRetrievalMode, QueryRetrievalModeSchema, type QuestionBatchResult, QuestionBatchResultSchema, type QuoteDocument, QuoteDocumentSchema, type QuoteSectionType, QuoteSectionTypeSchema, RATING_BASIS_TYPES, ROOF_TYPES, type RVType, RVTypeSchema, RV_TYPES, type RatingBasis, RatingBasisSchema, type RatingBasisType, RatingBasisTypeSchema, type RecreationalVehicleDeclarations, RecreationalVehicleDeclarationsSchema, type ReplyIntent, ReplyIntentSchema, type ResolveModelBudgetParams, type RetrievalResult, RetrievalResultSchema, type RoofType, RoofTypeSchema, SCHEDULED_ITEM_CATEGORIES, SUBJECTIVITY_CATEGORIES, type SafeGenerateOptions, type SafeGenerateParams, type ScheduledItemCategory, ScheduledItemCategorySchema, type Section, SectionSchema, type SectionSourceSpanOptions, type SharedLimit, SharedLimitSchema, type SourceBackedValue, SourceBackedValueSchema, type SourceChunk, type SourceChunkOptions, SourceChunkSchema, type SourceKind, SourceKindSchema, type SourceNodeRetrievalResult, type SourcePageInput, type SourceRetrievalMode, type SourceRetrievalQuery, type SourceRetrievalResult, type SourceRetriever, type SourceSpan, type SourceSpanBBox, SourceSpanBBoxSchema, type SourceSpanIdInput, type SourceSpanKind, SourceSpanKindSchema, type SourceSpanLocation, SourceSpanLocationSchema, type SourceSpanRef, SourceSpanRefSchema, SourceSpanSchema, type SourceSpanTableLocation, SourceSpanTableLocationSchema, type SourceSpanUnit, SourceSpanUnitSchema, type SourceStore, type SourceTextUnitInput, type SubAnswer, SubAnswerSchema, type SubQuestion, SubQuestionSchema, type Subjectivity, type SubjectivityCategory, SubjectivityCategorySchema, SubjectivitySchema, type Sublimit, SublimitSchema, type Subsection, SubsectionSchema, TITLE_POLICY_TYPES, type TaxFeeItem, TaxFeeItemSchema, type TextOverlay, type TitleDeclarations, TitleDeclarationsSchema, type TitlePolicyType, TitlePolicyTypeSchema, type TokenUsage, type ToolDefinition, type TravelDeclarations, TravelDeclarationsSchema, type UmbrellaExcessDeclarations, UmbrellaExcessDeclarationsSchema, type UnderwritingCondition, UnderwritingConditionSchema, VALUATION_METHODS, VEHICLE_COVERAGE_TYPES, type ValidationIssueSeverity, ValidationIssueSeveritySchema, type ValuationMethod, ValuationMethodSchema, type VehicleCoverage, VehicleCoverageSchema, type VehicleCoverageType, VehicleCoverageTypeSchema, type VerifyResult, VerifyResultSchema, type WatercraftDeclarations, WatercraftDeclarationsSchema, type WorkersCompDeclarations, WorkersCompDeclarationsSchema, buildAcroFormMappingPrompt, buildAgentSystemPrompt, buildAnswerParsingPrompt, buildAutoFillPrompt, buildBatchEmailGenerationPrompt, buildClassifyMessagePrompt, buildCoiRoutingPrompt, buildConfirmationSummaryPrompt, buildConversationMemoryGuidance, buildCoverageGapPrompt, buildDeterministicOperationalProfile, buildDoclingProviderOptions, buildDocumentSourceTree, buildFieldExplanationPrompt, buildFieldExtractionPrompt, buildFlatPdfMappingPrompt, buildFormattingPrompt, buildIdentityPrompt, buildIntentPrompt, buildInterpretAttachmentPrompt, buildLookupFillPrompt, buildPageSourceSpans, buildPceNormalizePrompt, buildPceQualityReport, buildPceReplyPrompt, buildPceSubmissionPacket, buildPdfProviderOptions, buildQueryClassifyPrompt, buildQuestionBatchPrompt, buildQuotesPoliciesPrompt, buildReasonPrompt, buildReplyIntentClassificationPrompt, buildRespondPrompt, buildSafetyPrompt, buildSectionSourceSpans, buildSourceSpan, buildSourceSpanId, buildTextSourceSpans, buildVerifyPrompt, chunkDocument, chunkSourceSpans, collectPceEvidenceSources, compareSourceEvidence, createApplicationPipeline, createExtractor, createPceAgent, createPipelineContext, createQueryAgent, evaluateCaseProposals, evidenceContainsQuote, extractPageRange, fillAcroForm, generateNextMessage, getAcroFormFields, getDoclingPageRangeText, getExtractor, getFileIdentifier, getPdfPageCount, getTemplate, isDoclingExtractionInput, isFileReference, mergeOperationalProfile, mergeQuestionAnswers, mergeSourceSpans, normalizeDoclingDocument, normalizeDocumentSourceTreePaths, normalizeForMatch, normalizeSourceSpans, orderSourceEvidence, overlayTextOnPdf, pLimit, pdfInputToBase64, pdfInputToBytes, processReply, resolveModelBudget, safeGenerateObject, sanitizeNulls, scoreCaseProposal, selectPceExecutionMode, sourceSpanTextHash, stableCaseId, stableHash, stablePolicyChangeItemId, stableStringify, stripFences, toStrictSchema, validateEvidence, validatePceItems, validateQuotedEvidence, withRetry };
package/dist/index.d.ts CHANGED
@@ -34259,6 +34259,7 @@ declare function buildPageSourceSpans(pages: SourcePageInput[]): SourceSpan[];
34259
34259
  declare function buildSectionSourceSpans(pages: SourcePageInput[], options?: SectionSourceSpanOptions): SourceSpan[];
34260
34260
  declare function buildTextSourceSpans(input: SourceTextUnitInput, options?: SourceChunkOptions): SourceSpan[];
34261
34261
  declare function chunkSourceSpans(spans: SourceSpan[], options?: SourceChunkOptions): SourceChunk[];
34262
+ declare function normalizeSourceSpans(spans: SourceSpan[]): SourceSpan[];
34262
34263
 
34263
34264
  interface SourceStore extends SourceRetriever {
34264
34265
  addSourceSpans(spans: SourceSpan[]): Promise<void>;
@@ -36540,8 +36541,8 @@ declare const CitationSchema: z.ZodObject<{
36540
36541
  }, "strip", z.ZodTypeAny, {
36541
36542
  quote: string;
36542
36543
  documentId: string;
36543
- relevance: number;
36544
36544
  index: number;
36545
+ relevance: number;
36545
36546
  chunkId?: string | undefined;
36546
36547
  sourceSpanId?: string | undefined;
36547
36548
  documentType?: "policy" | "quote" | undefined;
@@ -36561,8 +36562,8 @@ declare const CitationSchema: z.ZodObject<{
36561
36562
  }, {
36562
36563
  quote: string;
36563
36564
  documentId: string;
36564
- relevance: number;
36565
36565
  index: number;
36566
+ relevance: number;
36566
36567
  chunkId?: string | undefined;
36567
36568
  sourceSpanId?: string | undefined;
36568
36569
  documentType?: "policy" | "quote" | undefined;
@@ -36626,8 +36627,8 @@ declare const SubAnswerSchema: z.ZodObject<{
36626
36627
  }, "strip", z.ZodTypeAny, {
36627
36628
  quote: string;
36628
36629
  documentId: string;
36629
- relevance: number;
36630
36630
  index: number;
36631
+ relevance: number;
36631
36632
  chunkId?: string | undefined;
36632
36633
  sourceSpanId?: string | undefined;
36633
36634
  documentType?: "policy" | "quote" | undefined;
@@ -36647,8 +36648,8 @@ declare const SubAnswerSchema: z.ZodObject<{
36647
36648
  }, {
36648
36649
  quote: string;
36649
36650
  documentId: string;
36650
- relevance: number;
36651
36651
  index: number;
36652
+ relevance: number;
36652
36653
  chunkId?: string | undefined;
36653
36654
  sourceSpanId?: string | undefined;
36654
36655
  documentType?: "policy" | "quote" | undefined;
@@ -36673,8 +36674,8 @@ declare const SubAnswerSchema: z.ZodObject<{
36673
36674
  citations: {
36674
36675
  quote: string;
36675
36676
  documentId: string;
36676
- relevance: number;
36677
36677
  index: number;
36678
+ relevance: number;
36678
36679
  chunkId?: string | undefined;
36679
36680
  sourceSpanId?: string | undefined;
36680
36681
  documentType?: "policy" | "quote" | undefined;
@@ -36700,8 +36701,8 @@ declare const SubAnswerSchema: z.ZodObject<{
36700
36701
  citations: {
36701
36702
  quote: string;
36702
36703
  documentId: string;
36703
- relevance: number;
36704
36704
  index: number;
36705
+ relevance: number;
36705
36706
  chunkId?: string | undefined;
36706
36707
  sourceSpanId?: string | undefined;
36707
36708
  documentType?: "policy" | "quote" | undefined;
@@ -36782,8 +36783,8 @@ declare const QueryResultSchema: z.ZodObject<{
36782
36783
  }, "strip", z.ZodTypeAny, {
36783
36784
  quote: string;
36784
36785
  documentId: string;
36785
- relevance: number;
36786
36786
  index: number;
36787
+ relevance: number;
36787
36788
  chunkId?: string | undefined;
36788
36789
  sourceSpanId?: string | undefined;
36789
36790
  documentType?: "policy" | "quote" | undefined;
@@ -36803,8 +36804,8 @@ declare const QueryResultSchema: z.ZodObject<{
36803
36804
  }, {
36804
36805
  quote: string;
36805
36806
  documentId: string;
36806
- relevance: number;
36807
36807
  index: number;
36808
+ relevance: number;
36808
36809
  chunkId?: string | undefined;
36809
36810
  sourceSpanId?: string | undefined;
36810
36811
  documentType?: "policy" | "quote" | undefined;
@@ -36830,8 +36831,8 @@ declare const QueryResultSchema: z.ZodObject<{
36830
36831
  citations: {
36831
36832
  quote: string;
36832
36833
  documentId: string;
36833
- relevance: number;
36834
36834
  index: number;
36835
+ relevance: number;
36835
36836
  chunkId?: string | undefined;
36836
36837
  sourceSpanId?: string | undefined;
36837
36838
  documentType?: "policy" | "quote" | undefined;
@@ -36857,8 +36858,8 @@ declare const QueryResultSchema: z.ZodObject<{
36857
36858
  citations: {
36858
36859
  quote: string;
36859
36860
  documentId: string;
36860
- relevance: number;
36861
36861
  index: number;
36862
+ relevance: number;
36862
36863
  chunkId?: string | undefined;
36863
36864
  sourceSpanId?: string | undefined;
36864
36865
  documentType?: "policy" | "quote" | undefined;
@@ -37083,4 +37084,4 @@ interface DocumentTemplate {
37083
37084
  }
37084
37085
  declare function getTemplate(policyType: string): DocumentTemplate;
37085
37086
 
37086
- export { ADMITTED_STATUSES, AGENT_TOOLS, APPLICATION_CLASSIFY_PROMPT, AUDIT_TYPES, type AcroFormFieldInfo, type AcroFormMapping, AcroFormMappingSchema, type Address, AddressSchema, type AdmittedStatus, AdmittedStatusSchema, type AgentContext, type AgenticExecutionMode, AgenticExecutionModeSchema, type AnswerMergeResult, type AnswerParsingResult, AnswerParsingResultSchema, type ApplicationClassifyResult, ApplicationClassifyResultSchema, ApplicationEmailReviewSchema, type ApplicationField, ApplicationFieldSchema, type ApplicationListFilters, type ApplicationPipelineConfig, ApplicationQualityArtifactSchema, ApplicationQualityIssueSchema, ApplicationQualityReportSchema, ApplicationQualityRoundSchema, type ApplicationState, ApplicationStateSchema, type ApplicationStore, type AttachmentInterpretation, AttachmentInterpretationSchema, type AuditType, AuditTypeSchema, type AutoFillMatch, AutoFillMatchSchema, type AutoFillResult, AutoFillResultSchema, type AuxiliaryFact, AuxiliaryFactSchema, BOAT_TYPES, type BackfillProvider, type BindingAuthority, BindingAuthoritySchema, type BoatType, BoatTypeSchema, CHUNK_TYPES, CLAIM_STATUSES, COI_GENERATION_TOOL, CONDITION_TYPES, CONSTRUCTION_TYPES, CONTEXT_KEY_MAP, COVERAGE_COMPARISON_TOOL, COVERAGE_FORMS, COVERAGE_TRIGGERS, type CaseAction, CaseActionSchema, type CaseCitation, CaseCitationSchema, type CaseEvidence, type CaseEvidenceSource, CaseEvidenceSourceSchema, type CaseField, type CaseItem, type CasePacketArtifact, type CasePacketArtifactKind, CasePacketArtifactKindSchema, CasePacketArtifactSchema, type CaseProposal, CaseProposalSchema, type CaseProposalScore, CaseProposalScoreSchema, type CaseState, type CaseSubmissionPacket, CaseSubmissionPacketSchema, type CaseValidationIssue, CaseValidationIssueSchema, type CaseWorkflowPlan, type ChunkFilter, type ChunkType, ChunkTypeSchema, type Citation, CitationSchema, type ClaimRecord, ClaimRecordSchema, type ClaimStatus, ClaimStatusSchema, type ClassificationCode, ClassificationCodeSchema, type CommercialAutoDeclarations, CommercialAutoDeclarationsSchema, type CommercialPropertyDeclarations, CommercialPropertyDeclarationsSchema, type CommunicationIntent, CommunicationIntentSchema, ConditionKeyValueSchema, type ConditionType, ConditionTypeSchema, type ConstructionType, ConstructionTypeSchema, type Contact, ContactSchema, type ContextKeyMapping, type ConversationTurn, type ConvertPdfToImagesFn, type Coverage, type CoverageForm, CoverageFormSchema, CoverageSchema, type CoverageTrigger, CoverageTriggerSchema, type CoverageValueType, CoverageValueTypeSchema, type CoveredReason, CoveredReasonSchema, type CrimeDeclarations, CrimeDeclarationsSchema, type CyberDeclarations, CyberDeclarationsSchema, DEDUCTIBLE_TYPES, DEFENSE_COST_TREATMENTS, DOCUMENT_LOOKUP_TOOL, DOCUMENT_TYPES, type DODeclarations, DODeclarationsSchema, DWELLING_FIRE_FORM_TYPES, type Declarations, DeclarationsSchema, type DeductibleSchedule, DeductibleScheduleSchema, type DeductibleType, DeductibleTypeSchema, type DefenseCostTreatment, DefenseCostTreatmentSchema, type Definition, DefinitionSchema, type DoclingDocumentLike, type DoclingExtractionInput, type DoclingItemLike, type DoclingNodeLike, type DoclingNormalizedUnit, type DoclingProvenanceLike, type DocumentAgentGuidance, DocumentAgentGuidanceSchema, type DocumentChunk, type DocumentFilters, type DocumentMetadata, DocumentMetadataSchema, type DocumentNode, DocumentNodeSchema, type DocumentPageMapEntry, DocumentPageMapEntrySchema, type DocumentSourceNode, type DocumentSourceNodeKind, DocumentSourceNodeKindSchema, DocumentSourceNodeSchema, type DocumentStore, type DocumentTableOfContentsEntry, DocumentTableOfContentsEntrySchema, type DocumentTemplate, type DocumentType, DocumentTypeSchema, type DriverRecord, DriverRecordSchema, type DwellingDetails, DwellingDetailsSchema, type DwellingFireDeclarations, DwellingFireDeclarationsSchema, type DwellingFireFormType, DwellingFireFormTypeSchema, ENDORSEMENT_PARTY_ROLES, ENDORSEMENT_TYPES, ENTITY_TYPES, type EarthquakeDeclarations, EarthquakeDeclarationsSchema, type EmbedText, type EmployersLiabilityLimits, EmployersLiabilityLimitsSchema, type Endorsement, type EndorsementParty, type EndorsementPartyRole, EndorsementPartyRoleSchema, EndorsementPartySchema, EndorsementSchema, type EndorsementType, EndorsementTypeSchema, type EnrichedCoverage, EnrichedCoverageSchema, type EnrichedSubjectivity, EnrichedSubjectivitySchema, type EnrichedUnderwritingCondition, EnrichedUnderwritingConditionSchema, type EntityType, EntityTypeSchema, type EvidenceItem, EvidenceItemSchema, type Exclusion, ExclusionSchema, type ExperienceMod, ExperienceModSchema, type ExtendedReportingPeriod, ExtendedReportingPeriodSchema, type ExtractOptions, type ExtractionInput, type ExtractionResult, type ExtractionState, type ExtractionV3Result, type ExtractorConfig, type ExtractorDef, FLOOD_ZONES, FOUNDATION_TYPES, type FarmRanchDeclarations, FarmRanchDeclarationsSchema, type FieldExtractionResult, FieldExtractionResultSchema, type FieldMapping, type FieldType, FieldTypeSchema, type FlatPdfPlacement, FlatPdfPlacementSchema, type FloodDeclarations, FloodDeclarationsSchema, type FloodZone, FloodZoneSchema, type FormReference, FormReferenceSchema, type FoundationType, FoundationTypeSchema, type GLDeclarations, GLDeclarationsSchema, type GenerateObject, type GeneratePceSubmissionPacketInput, type GenerateText, HOMEOWNERS_FORM_TYPES, type HomeownersDeclarations, HomeownersDeclarationsSchema, type HomeownersFormType, HomeownersFormTypeSchema, type IdentityTheftDeclarations, IdentityTheftDeclarationsSchema, type InsuranceDocument, InsuranceDocumentSchema, type InsuredLocation, InsuredLocationSchema, type InsuredVehicle, InsuredVehicleSchema, type InsurerInfo, InsurerInfoSchema, LIMIT_TYPES, LOSS_SETTLEMENTS, type LimitSchedule, LimitScheduleSchema, type LimitType, LimitTypeSchema, type LocationPremium, LocationPremiumSchema, type LogFn, type LookupFill, type LookupFillResult, LookupFillResultSchema, LookupFillSchema, type LookupRequest, LookupRequestSchema, type LossSettlement, LossSettlementSchema, type LossSummary, LossSummarySchema, MemorySourceStore, type MemoryStore, type MissingInfoQuestion, MissingInfoQuestionSchema, type ModelBudgetConstraint, type ModelBudgetResolution, type ModelCallReport, type ModelCapabilities, type ModelTaskKind, type NamedInsured, NamedInsuredSchema, type NormalizedDoclingDocument, type OperationalCoverageLine, OperationalCoverageLineSchema, type OperationalEndorsementSupport, OperationalEndorsementSupportSchema, type OperationalParty, OperationalPartySchema, type OrderableSourceEvidence, PERSONAL_AUTO_USAGES, PET_SPECIES, PLATFORM_CONFIGS, POLICY_SECTION_TYPES, POLICY_TERM_TYPES, POLICY_TYPES, type ParsedAnswer, ParsedAnswerSchema, type PaymentInstallment, PaymentInstallmentSchema, type PaymentPlan, PaymentPlanSchema, type PceAgentConfig, type PceCaseState, PceCaseStateSchema, type PceEvidenceSource, type PceExecutionModePreference, type PceMissingInfoQuestion, type PceNormalizationResult, PceNormalizationResultSchema, type PceQualityGateStatus, type PceQualityReport, type PceSubmissionPacket, PceSubmissionPacketSchema, type PceValidationIssue, type PdfInput, type PerformanceReport, type PersonalArticlesDeclarations, PersonalArticlesDeclarationsSchema, type PersonalAutoDeclarations, PersonalAutoDeclarationsSchema, type PersonalAutoUsage, PersonalAutoUsageSchema, type PersonalUmbrellaDeclarations, PersonalUmbrellaDeclarationsSchema, type PersonalVehicleDetails, PersonalVehicleDetailsSchema, type PetDeclarations, PetDeclarationsSchema, type PetSpecies, PetSpeciesSchema, type PipelineCheckpoint, type PipelineContext, type PipelineContextOptions, type Platform, type PlatformConfig, PlatformSchema, type PolicyChangeAction, PolicyChangeActionSchema, type PolicyChangeConfidence, PolicyChangeConfidenceSchema, type PolicyChangeImpact, PolicyChangeImpactSchema, type PolicyChangeItem, PolicyChangeItemSchema, type PolicyChangeKind, PolicyChangeKindSchema, type PolicyChangeMissingInfoQuestion, type PolicyChangePacket, type PolicyChangeRequest, PolicyChangeRequestSchema, type PolicyChangeState, type PolicyChangeStatus, PolicyChangeStatusSchema, type PolicyChangeValidationIssue, type PolicyCondition, PolicyConditionSchema, type PolicyDocument, PolicyDocumentSchema, type PolicyOperationalProfile, PolicyOperationalProfileSchema, type PolicySectionType, PolicySectionTypeSchema, type PolicyTermType, PolicyTermTypeSchema, type PolicyType, PolicyTypeSchema, type PremiumLine, PremiumLineSchema, type PriorAnswer, type ProcessApplicationInput, type ProcessApplicationResult, type ProcessPceChangeRequestInput, type ProcessPceChangeRequestResult, type ProcessPceReplyInput, type ProcessPceReplyResult, type ProcessReplyInput, type ProcessReplyResult, type ProducerInfo, ProducerInfoSchema, type ProfessionalLiabilityDeclarations, ProfessionalLiabilityDeclarationsSchema, QUOTE_SECTION_TYPES, type QueryAttachment, type QueryAttachmentKind, QueryAttachmentKindSchema, QueryAttachmentSchema, type QueryClassifyResult, QueryClassifyResultSchema, type QueryConfig, type QueryInput, type QueryIntent, QueryIntentSchema, type QueryOutput, type QueryResult, QueryResultSchema, type QueryRetrievalMode, QueryRetrievalModeSchema, type QuestionBatchResult, QuestionBatchResultSchema, type QuoteDocument, QuoteDocumentSchema, type QuoteSectionType, QuoteSectionTypeSchema, RATING_BASIS_TYPES, ROOF_TYPES, type RVType, RVTypeSchema, RV_TYPES, type RatingBasis, RatingBasisSchema, type RatingBasisType, RatingBasisTypeSchema, type RecreationalVehicleDeclarations, RecreationalVehicleDeclarationsSchema, type ReplyIntent, ReplyIntentSchema, type ResolveModelBudgetParams, type RetrievalResult, RetrievalResultSchema, type RoofType, RoofTypeSchema, SCHEDULED_ITEM_CATEGORIES, SUBJECTIVITY_CATEGORIES, type SafeGenerateOptions, type SafeGenerateParams, type ScheduledItemCategory, ScheduledItemCategorySchema, type Section, SectionSchema, type SectionSourceSpanOptions, type SharedLimit, SharedLimitSchema, type SourceBackedValue, SourceBackedValueSchema, type SourceChunk, type SourceChunkOptions, SourceChunkSchema, type SourceKind, SourceKindSchema, type SourceNodeRetrievalResult, type SourcePageInput, type SourceRetrievalMode, type SourceRetrievalQuery, type SourceRetrievalResult, type SourceRetriever, type SourceSpan, type SourceSpanBBox, SourceSpanBBoxSchema, type SourceSpanIdInput, type SourceSpanKind, SourceSpanKindSchema, type SourceSpanLocation, SourceSpanLocationSchema, type SourceSpanRef, SourceSpanRefSchema, SourceSpanSchema, type SourceSpanTableLocation, SourceSpanTableLocationSchema, type SourceSpanUnit, SourceSpanUnitSchema, type SourceStore, type SourceTextUnitInput, type SubAnswer, SubAnswerSchema, type SubQuestion, SubQuestionSchema, type Subjectivity, type SubjectivityCategory, SubjectivityCategorySchema, SubjectivitySchema, type Sublimit, SublimitSchema, type Subsection, SubsectionSchema, TITLE_POLICY_TYPES, type TaxFeeItem, TaxFeeItemSchema, type TextOverlay, type TitleDeclarations, TitleDeclarationsSchema, type TitlePolicyType, TitlePolicyTypeSchema, type TokenUsage, type ToolDefinition, type TravelDeclarations, TravelDeclarationsSchema, type UmbrellaExcessDeclarations, UmbrellaExcessDeclarationsSchema, type UnderwritingCondition, UnderwritingConditionSchema, VALUATION_METHODS, VEHICLE_COVERAGE_TYPES, type ValidationIssueSeverity, ValidationIssueSeveritySchema, type ValuationMethod, ValuationMethodSchema, type VehicleCoverage, VehicleCoverageSchema, type VehicleCoverageType, VehicleCoverageTypeSchema, type VerifyResult, VerifyResultSchema, type WatercraftDeclarations, WatercraftDeclarationsSchema, type WorkersCompDeclarations, WorkersCompDeclarationsSchema, buildAcroFormMappingPrompt, buildAgentSystemPrompt, buildAnswerParsingPrompt, buildAutoFillPrompt, buildBatchEmailGenerationPrompt, buildClassifyMessagePrompt, buildCoiRoutingPrompt, buildConfirmationSummaryPrompt, buildConversationMemoryGuidance, buildCoverageGapPrompt, buildDeterministicOperationalProfile, buildDoclingProviderOptions, buildDocumentSourceTree, buildFieldExplanationPrompt, buildFieldExtractionPrompt, buildFlatPdfMappingPrompt, buildFormattingPrompt, buildIdentityPrompt, buildIntentPrompt, buildInterpretAttachmentPrompt, buildLookupFillPrompt, buildPageSourceSpans, buildPceNormalizePrompt, buildPceQualityReport, buildPceReplyPrompt, buildPceSubmissionPacket, buildPdfProviderOptions, buildQueryClassifyPrompt, buildQuestionBatchPrompt, buildQuotesPoliciesPrompt, buildReasonPrompt, buildReplyIntentClassificationPrompt, buildRespondPrompt, buildSafetyPrompt, buildSectionSourceSpans, buildSourceSpan, buildSourceSpanId, buildTextSourceSpans, buildVerifyPrompt, chunkDocument, chunkSourceSpans, collectPceEvidenceSources, compareSourceEvidence, createApplicationPipeline, createExtractor, createPceAgent, createPipelineContext, createQueryAgent, evaluateCaseProposals, evidenceContainsQuote, extractPageRange, fillAcroForm, generateNextMessage, getAcroFormFields, getDoclingPageRangeText, getExtractor, getFileIdentifier, getPdfPageCount, getTemplate, isDoclingExtractionInput, isFileReference, mergeOperationalProfile, mergeQuestionAnswers, mergeSourceSpans, normalizeDoclingDocument, normalizeDocumentSourceTreePaths, normalizeForMatch, orderSourceEvidence, overlayTextOnPdf, pLimit, pdfInputToBase64, pdfInputToBytes, processReply, resolveModelBudget, safeGenerateObject, sanitizeNulls, scoreCaseProposal, selectPceExecutionMode, sourceSpanTextHash, stableCaseId, stableHash, stablePolicyChangeItemId, stableStringify, stripFences, toStrictSchema, validateEvidence, validatePceItems, validateQuotedEvidence, withRetry };
37087
+ export { ADMITTED_STATUSES, AGENT_TOOLS, APPLICATION_CLASSIFY_PROMPT, AUDIT_TYPES, type AcroFormFieldInfo, type AcroFormMapping, AcroFormMappingSchema, type Address, AddressSchema, type AdmittedStatus, AdmittedStatusSchema, type AgentContext, type AgenticExecutionMode, AgenticExecutionModeSchema, type AnswerMergeResult, type AnswerParsingResult, AnswerParsingResultSchema, type ApplicationClassifyResult, ApplicationClassifyResultSchema, ApplicationEmailReviewSchema, type ApplicationField, ApplicationFieldSchema, type ApplicationListFilters, type ApplicationPipelineConfig, ApplicationQualityArtifactSchema, ApplicationQualityIssueSchema, ApplicationQualityReportSchema, ApplicationQualityRoundSchema, type ApplicationState, ApplicationStateSchema, type ApplicationStore, type AttachmentInterpretation, AttachmentInterpretationSchema, type AuditType, AuditTypeSchema, type AutoFillMatch, AutoFillMatchSchema, type AutoFillResult, AutoFillResultSchema, type AuxiliaryFact, AuxiliaryFactSchema, BOAT_TYPES, type BackfillProvider, type BindingAuthority, BindingAuthoritySchema, type BoatType, BoatTypeSchema, CHUNK_TYPES, CLAIM_STATUSES, COI_GENERATION_TOOL, CONDITION_TYPES, CONSTRUCTION_TYPES, CONTEXT_KEY_MAP, COVERAGE_COMPARISON_TOOL, COVERAGE_FORMS, COVERAGE_TRIGGERS, type CaseAction, CaseActionSchema, type CaseCitation, CaseCitationSchema, type CaseEvidence, type CaseEvidenceSource, CaseEvidenceSourceSchema, type CaseField, type CaseItem, type CasePacketArtifact, type CasePacketArtifactKind, CasePacketArtifactKindSchema, CasePacketArtifactSchema, type CaseProposal, CaseProposalSchema, type CaseProposalScore, CaseProposalScoreSchema, type CaseState, type CaseSubmissionPacket, CaseSubmissionPacketSchema, type CaseValidationIssue, CaseValidationIssueSchema, type CaseWorkflowPlan, type ChunkFilter, type ChunkType, ChunkTypeSchema, type Citation, CitationSchema, type ClaimRecord, ClaimRecordSchema, type ClaimStatus, ClaimStatusSchema, type ClassificationCode, ClassificationCodeSchema, type CommercialAutoDeclarations, CommercialAutoDeclarationsSchema, type CommercialPropertyDeclarations, CommercialPropertyDeclarationsSchema, type CommunicationIntent, CommunicationIntentSchema, ConditionKeyValueSchema, type ConditionType, ConditionTypeSchema, type ConstructionType, ConstructionTypeSchema, type Contact, ContactSchema, type ContextKeyMapping, type ConversationTurn, type ConvertPdfToImagesFn, type Coverage, type CoverageForm, CoverageFormSchema, CoverageSchema, type CoverageTrigger, CoverageTriggerSchema, type CoverageValueType, CoverageValueTypeSchema, type CoveredReason, CoveredReasonSchema, type CrimeDeclarations, CrimeDeclarationsSchema, type CyberDeclarations, CyberDeclarationsSchema, DEDUCTIBLE_TYPES, DEFENSE_COST_TREATMENTS, DOCUMENT_LOOKUP_TOOL, DOCUMENT_TYPES, type DODeclarations, DODeclarationsSchema, DWELLING_FIRE_FORM_TYPES, type Declarations, DeclarationsSchema, type DeductibleSchedule, DeductibleScheduleSchema, type DeductibleType, DeductibleTypeSchema, type DefenseCostTreatment, DefenseCostTreatmentSchema, type Definition, DefinitionSchema, type DoclingDocumentLike, type DoclingExtractionInput, type DoclingItemLike, type DoclingNodeLike, type DoclingNormalizedUnit, type DoclingProvenanceLike, type DocumentAgentGuidance, DocumentAgentGuidanceSchema, type DocumentChunk, type DocumentFilters, type DocumentMetadata, DocumentMetadataSchema, type DocumentNode, DocumentNodeSchema, type DocumentPageMapEntry, DocumentPageMapEntrySchema, type DocumentSourceNode, type DocumentSourceNodeKind, DocumentSourceNodeKindSchema, DocumentSourceNodeSchema, type DocumentStore, type DocumentTableOfContentsEntry, DocumentTableOfContentsEntrySchema, type DocumentTemplate, type DocumentType, DocumentTypeSchema, type DriverRecord, DriverRecordSchema, type DwellingDetails, DwellingDetailsSchema, type DwellingFireDeclarations, DwellingFireDeclarationsSchema, type DwellingFireFormType, DwellingFireFormTypeSchema, ENDORSEMENT_PARTY_ROLES, ENDORSEMENT_TYPES, ENTITY_TYPES, type EarthquakeDeclarations, EarthquakeDeclarationsSchema, type EmbedText, type EmployersLiabilityLimits, EmployersLiabilityLimitsSchema, type Endorsement, type EndorsementParty, type EndorsementPartyRole, EndorsementPartyRoleSchema, EndorsementPartySchema, EndorsementSchema, type EndorsementType, EndorsementTypeSchema, type EnrichedCoverage, EnrichedCoverageSchema, type EnrichedSubjectivity, EnrichedSubjectivitySchema, type EnrichedUnderwritingCondition, EnrichedUnderwritingConditionSchema, type EntityType, EntityTypeSchema, type EvidenceItem, EvidenceItemSchema, type Exclusion, ExclusionSchema, type ExperienceMod, ExperienceModSchema, type ExtendedReportingPeriod, ExtendedReportingPeriodSchema, type ExtractOptions, type ExtractionInput, type ExtractionResult, type ExtractionState, type ExtractionV3Result, type ExtractorConfig, type ExtractorDef, FLOOD_ZONES, FOUNDATION_TYPES, type FarmRanchDeclarations, FarmRanchDeclarationsSchema, type FieldExtractionResult, FieldExtractionResultSchema, type FieldMapping, type FieldType, FieldTypeSchema, type FlatPdfPlacement, FlatPdfPlacementSchema, type FloodDeclarations, FloodDeclarationsSchema, type FloodZone, FloodZoneSchema, type FormReference, FormReferenceSchema, type FoundationType, FoundationTypeSchema, type GLDeclarations, GLDeclarationsSchema, type GenerateObject, type GeneratePceSubmissionPacketInput, type GenerateText, HOMEOWNERS_FORM_TYPES, type HomeownersDeclarations, HomeownersDeclarationsSchema, type HomeownersFormType, HomeownersFormTypeSchema, type IdentityTheftDeclarations, IdentityTheftDeclarationsSchema, type InsuranceDocument, InsuranceDocumentSchema, type InsuredLocation, InsuredLocationSchema, type InsuredVehicle, InsuredVehicleSchema, type InsurerInfo, InsurerInfoSchema, LIMIT_TYPES, LOSS_SETTLEMENTS, type LimitSchedule, LimitScheduleSchema, type LimitType, LimitTypeSchema, type LocationPremium, LocationPremiumSchema, type LogFn, type LookupFill, type LookupFillResult, LookupFillResultSchema, LookupFillSchema, type LookupRequest, LookupRequestSchema, type LossSettlement, LossSettlementSchema, type LossSummary, LossSummarySchema, MemorySourceStore, type MemoryStore, type MissingInfoQuestion, MissingInfoQuestionSchema, type ModelBudgetConstraint, type ModelBudgetResolution, type ModelCallReport, type ModelCapabilities, type ModelTaskKind, type NamedInsured, NamedInsuredSchema, type NormalizedDoclingDocument, type OperationalCoverageLine, OperationalCoverageLineSchema, type OperationalEndorsementSupport, OperationalEndorsementSupportSchema, type OperationalParty, OperationalPartySchema, type OrderableSourceEvidence, PERSONAL_AUTO_USAGES, PET_SPECIES, PLATFORM_CONFIGS, POLICY_SECTION_TYPES, POLICY_TERM_TYPES, POLICY_TYPES, type ParsedAnswer, ParsedAnswerSchema, type PaymentInstallment, PaymentInstallmentSchema, type PaymentPlan, PaymentPlanSchema, type PceAgentConfig, type PceCaseState, PceCaseStateSchema, type PceEvidenceSource, type PceExecutionModePreference, type PceMissingInfoQuestion, type PceNormalizationResult, PceNormalizationResultSchema, type PceQualityGateStatus, type PceQualityReport, type PceSubmissionPacket, PceSubmissionPacketSchema, type PceValidationIssue, type PdfInput, type PerformanceReport, type PersonalArticlesDeclarations, PersonalArticlesDeclarationsSchema, type PersonalAutoDeclarations, PersonalAutoDeclarationsSchema, type PersonalAutoUsage, PersonalAutoUsageSchema, type PersonalUmbrellaDeclarations, PersonalUmbrellaDeclarationsSchema, type PersonalVehicleDetails, PersonalVehicleDetailsSchema, type PetDeclarations, PetDeclarationsSchema, type PetSpecies, PetSpeciesSchema, type PipelineCheckpoint, type PipelineContext, type PipelineContextOptions, type Platform, type PlatformConfig, PlatformSchema, type PolicyChangeAction, PolicyChangeActionSchema, type PolicyChangeConfidence, PolicyChangeConfidenceSchema, type PolicyChangeImpact, PolicyChangeImpactSchema, type PolicyChangeItem, PolicyChangeItemSchema, type PolicyChangeKind, PolicyChangeKindSchema, type PolicyChangeMissingInfoQuestion, type PolicyChangePacket, type PolicyChangeRequest, PolicyChangeRequestSchema, type PolicyChangeState, type PolicyChangeStatus, PolicyChangeStatusSchema, type PolicyChangeValidationIssue, type PolicyCondition, PolicyConditionSchema, type PolicyDocument, PolicyDocumentSchema, type PolicyOperationalProfile, PolicyOperationalProfileSchema, type PolicySectionType, PolicySectionTypeSchema, type PolicyTermType, PolicyTermTypeSchema, type PolicyType, PolicyTypeSchema, type PremiumLine, PremiumLineSchema, type PriorAnswer, type ProcessApplicationInput, type ProcessApplicationResult, type ProcessPceChangeRequestInput, type ProcessPceChangeRequestResult, type ProcessPceReplyInput, type ProcessPceReplyResult, type ProcessReplyInput, type ProcessReplyResult, type ProducerInfo, ProducerInfoSchema, type ProfessionalLiabilityDeclarations, ProfessionalLiabilityDeclarationsSchema, QUOTE_SECTION_TYPES, type QueryAttachment, type QueryAttachmentKind, QueryAttachmentKindSchema, QueryAttachmentSchema, type QueryClassifyResult, QueryClassifyResultSchema, type QueryConfig, type QueryInput, type QueryIntent, QueryIntentSchema, type QueryOutput, type QueryResult, QueryResultSchema, type QueryRetrievalMode, QueryRetrievalModeSchema, type QuestionBatchResult, QuestionBatchResultSchema, type QuoteDocument, QuoteDocumentSchema, type QuoteSectionType, QuoteSectionTypeSchema, RATING_BASIS_TYPES, ROOF_TYPES, type RVType, RVTypeSchema, RV_TYPES, type RatingBasis, RatingBasisSchema, type RatingBasisType, RatingBasisTypeSchema, type RecreationalVehicleDeclarations, RecreationalVehicleDeclarationsSchema, type ReplyIntent, ReplyIntentSchema, type ResolveModelBudgetParams, type RetrievalResult, RetrievalResultSchema, type RoofType, RoofTypeSchema, SCHEDULED_ITEM_CATEGORIES, SUBJECTIVITY_CATEGORIES, type SafeGenerateOptions, type SafeGenerateParams, type ScheduledItemCategory, ScheduledItemCategorySchema, type Section, SectionSchema, type SectionSourceSpanOptions, type SharedLimit, SharedLimitSchema, type SourceBackedValue, SourceBackedValueSchema, type SourceChunk, type SourceChunkOptions, SourceChunkSchema, type SourceKind, SourceKindSchema, type SourceNodeRetrievalResult, type SourcePageInput, type SourceRetrievalMode, type SourceRetrievalQuery, type SourceRetrievalResult, type SourceRetriever, type SourceSpan, type SourceSpanBBox, SourceSpanBBoxSchema, type SourceSpanIdInput, type SourceSpanKind, SourceSpanKindSchema, type SourceSpanLocation, SourceSpanLocationSchema, type SourceSpanRef, SourceSpanRefSchema, SourceSpanSchema, type SourceSpanTableLocation, SourceSpanTableLocationSchema, type SourceSpanUnit, SourceSpanUnitSchema, type SourceStore, type SourceTextUnitInput, type SubAnswer, SubAnswerSchema, type SubQuestion, SubQuestionSchema, type Subjectivity, type SubjectivityCategory, SubjectivityCategorySchema, SubjectivitySchema, type Sublimit, SublimitSchema, type Subsection, SubsectionSchema, TITLE_POLICY_TYPES, type TaxFeeItem, TaxFeeItemSchema, type TextOverlay, type TitleDeclarations, TitleDeclarationsSchema, type TitlePolicyType, TitlePolicyTypeSchema, type TokenUsage, type ToolDefinition, type TravelDeclarations, TravelDeclarationsSchema, type UmbrellaExcessDeclarations, UmbrellaExcessDeclarationsSchema, type UnderwritingCondition, UnderwritingConditionSchema, VALUATION_METHODS, VEHICLE_COVERAGE_TYPES, type ValidationIssueSeverity, ValidationIssueSeveritySchema, type ValuationMethod, ValuationMethodSchema, type VehicleCoverage, VehicleCoverageSchema, type VehicleCoverageType, VehicleCoverageTypeSchema, type VerifyResult, VerifyResultSchema, type WatercraftDeclarations, WatercraftDeclarationsSchema, type WorkersCompDeclarations, WorkersCompDeclarationsSchema, buildAcroFormMappingPrompt, buildAgentSystemPrompt, buildAnswerParsingPrompt, buildAutoFillPrompt, buildBatchEmailGenerationPrompt, buildClassifyMessagePrompt, buildCoiRoutingPrompt, buildConfirmationSummaryPrompt, buildConversationMemoryGuidance, buildCoverageGapPrompt, buildDeterministicOperationalProfile, buildDoclingProviderOptions, buildDocumentSourceTree, buildFieldExplanationPrompt, buildFieldExtractionPrompt, buildFlatPdfMappingPrompt, buildFormattingPrompt, buildIdentityPrompt, buildIntentPrompt, buildInterpretAttachmentPrompt, buildLookupFillPrompt, buildPageSourceSpans, buildPceNormalizePrompt, buildPceQualityReport, buildPceReplyPrompt, buildPceSubmissionPacket, buildPdfProviderOptions, buildQueryClassifyPrompt, buildQuestionBatchPrompt, buildQuotesPoliciesPrompt, buildReasonPrompt, buildReplyIntentClassificationPrompt, buildRespondPrompt, buildSafetyPrompt, buildSectionSourceSpans, buildSourceSpan, buildSourceSpanId, buildTextSourceSpans, buildVerifyPrompt, chunkDocument, chunkSourceSpans, collectPceEvidenceSources, compareSourceEvidence, createApplicationPipeline, createExtractor, createPceAgent, createPipelineContext, createQueryAgent, evaluateCaseProposals, evidenceContainsQuote, extractPageRange, fillAcroForm, generateNextMessage, getAcroFormFields, getDoclingPageRangeText, getExtractor, getFileIdentifier, getPdfPageCount, getTemplate, isDoclingExtractionInput, isFileReference, mergeOperationalProfile, mergeQuestionAnswers, mergeSourceSpans, normalizeDoclingDocument, normalizeDocumentSourceTreePaths, normalizeForMatch, normalizeSourceSpans, orderSourceEvidence, overlayTextOnPdf, pLimit, pdfInputToBase64, pdfInputToBytes, processReply, resolveModelBudget, safeGenerateObject, sanitizeNulls, scoreCaseProposal, selectPceExecutionMode, sourceSpanTextHash, stableCaseId, stableHash, stablePolicyChangeItemId, stableStringify, stripFences, toStrictSchema, validateEvidence, validatePceItems, validateQuotedEvidence, withRetry };
package/dist/index.js CHANGED
@@ -327,6 +327,7 @@ __export(index_exports, {
327
327
  normalizeDoclingDocument: () => normalizeDoclingDocument,
328
328
  normalizeDocumentSourceTreePaths: () => normalizeDocumentSourceTreePaths,
329
329
  normalizeForMatch: () => normalizeForMatch,
330
+ normalizeSourceSpans: () => normalizeSourceSpans,
330
331
  orderSourceEvidence: () => orderSourceEvidence,
331
332
  overlayTextOnPdf: () => overlayTextOnPdf,
332
333
  pLimit: () => pLimit,
@@ -2655,9 +2656,117 @@ function chunkSourceSpans(spans, options = {}) {
2655
2656
  flush();
2656
2657
  return chunks;
2657
2658
  }
2659
+ function normalizeSourceSpans(spans) {
2660
+ const droppedParentSpanIds = /* @__PURE__ */ new Set();
2661
+ const cleaned = [];
2662
+ for (const [index, span] of spans.entries()) {
2663
+ if (span.parentSpanId && droppedParentSpanIds.has(span.parentSpanId)) continue;
2664
+ const normalized = normalizeSourceSpanText(span);
2665
+ if (!normalized) {
2666
+ droppedParentSpanIds.add(span.id);
2667
+ continue;
2668
+ }
2669
+ cleaned.push({ ...normalized, __originalIndex: index });
2670
+ }
2671
+ return mergeTextRuns(cleaned).map(({ __originalIndex: _index, ...span }) => span);
2672
+ }
2658
2673
  function sourceUnit(span) {
2659
2674
  return span.sourceUnit ?? span.metadata?.sourceUnit;
2660
2675
  }
2676
+ function spanPage(span) {
2677
+ return span.pageStart ?? span.location?.page ?? span.location?.startPage;
2678
+ }
2679
+ function normalizeSourceSpanText(span) {
2680
+ const unit = sourceUnit(span);
2681
+ const text = normalizeWhitespace(span.text);
2682
+ if (!text) return void 0;
2683
+ if (isDiscardableBoilerplate(text, unit)) return void 0;
2684
+ const cleanedText = cleanBoilerplateLines(text);
2685
+ if (!cleanedText) return void 0;
2686
+ if (cleanedText === text) return span;
2687
+ return retextSpan(span, cleanedText, {
2688
+ boilerplateRemoved: "true",
2689
+ removedBoilerplateText: removedBoilerplateLines(text).join(" | ").slice(0, 500)
2690
+ });
2691
+ }
2692
+ function isDiscardableBoilerplate(text, unit) {
2693
+ const cleaned = normalizeWhitespace(text.replace(/\bColumn\s+\d+:\s*/gi, ""));
2694
+ if (/^SPECIMEN POLICY\s+[-—]\s+FOR TESTING ONLY$/i.test(cleaned)) return true;
2695
+ if (/^Page\s+\d+\s+of\s+\d+$/i.test(cleaned)) return true;
2696
+ if (/^[A-Z]{2,}(?:-[A-Z0-9]{2,})+\s+\d{2}\s+\d{2}$/i.test(cleaned)) return true;
2697
+ if (/^[A-Z]{2,}(?:-[A-Z0-9]{2,})+\s+\d{2}\s+\d{2}\s*\|\s*Page\s+\d+\s+of\s+\d+$/i.test(cleaned)) return true;
2698
+ if (unit === "table_row" && /^[^|]{0,40}\|\s*Page\s+\d+\s+of\s+\d+$/i.test(cleaned)) return true;
2699
+ return false;
2700
+ }
2701
+ function isBoilerplateLine(line) {
2702
+ const cleaned = normalizeWhitespace(line.replace(/\bColumn\s+\d+:\s*/gi, ""));
2703
+ return isDiscardableBoilerplate(cleaned) || /^IMPORTANT NOTICE\s*[-—]\s*/i.test(cleaned) || /^THIS IS A CLAIMS-MADE AND REPORTED POLICY\.? PLEASE READ IT CAREFULLY\.?$/i.test(cleaned);
2704
+ }
2705
+ function removedBoilerplateLines(text) {
2706
+ return text.split(/\s{2,}|\r?\n/).map(normalizeWhitespace).filter((line) => line && isBoilerplateLine(line));
2707
+ }
2708
+ function cleanBoilerplateLines(text) {
2709
+ const withoutInlineBoilerplate = text.replace(/\b(?:Column\s+\d+:\s*)?[A-Z]{2,}(?:-[A-Z0-9]{2,})+\s+\d{2}\s+\d{2}\s+(?:\|\s*)?(?:Column\s+\d+:\s*)?Page\s+\d+\s+of\s+\d+\b/gi, " ").replace(/\bSPECIMEN POLICY\s+[-—]\s+FOR TESTING ONLY\b/gi, " ").replace(/\bPage\s+\d+\s+of\s+\d+\b/gi, " ");
2710
+ const lines = withoutInlineBoilerplate.split(/\r?\n/);
2711
+ const filtered = lines.map(normalizeWhitespace).filter((line) => line && !isBoilerplateLine(line));
2712
+ return normalizeWhitespace(filtered.join(" "));
2713
+ }
2714
+ function shouldMergeTextSpan(left, right) {
2715
+ if (sourceUnit(left) !== "text" || sourceUnit(right) !== "text") return false;
2716
+ if (spanPage(left) !== spanPage(right)) return false;
2717
+ if (left.metadata?.elementType === "title" || right.metadata?.elementType === "title") return false;
2718
+ const leftText = normalizeWhitespace(left.text);
2719
+ const rightText = normalizeWhitespace(right.text);
2720
+ if (!leftText || !rightText) return false;
2721
+ if (/[:.;!?)]$/.test(leftText)) return false;
2722
+ if (/^(?:[A-Z][A-Z0-9 &/(),.-]{8,}|Item\s+\d+|Section\s+\d+|Part\s+[A-Z]\b)/.test(rightText)) return false;
2723
+ return /^[a-z(]/.test(rightText) || /\b(?:a|an|and|any|as|at|by|for|from|in|into|may|must|of|or|that|the|this|to|with|within|you|your)$/i.test(leftText);
2724
+ }
2725
+ function mergeTextRuns(spans) {
2726
+ const result = [];
2727
+ let current;
2728
+ for (const span of spans) {
2729
+ if (current && shouldMergeTextSpan(current, span)) {
2730
+ current = mergeTextSpanPair(current, span);
2731
+ continue;
2732
+ }
2733
+ if (current) result.push(current);
2734
+ current = span;
2735
+ }
2736
+ if (current) result.push(current);
2737
+ return result;
2738
+ }
2739
+ function mergeTextSpanPair(left, right) {
2740
+ const text = normalizeWhitespace(`${left.text} ${right.text}`);
2741
+ const merged = retextSpan(left, text, {
2742
+ mergedSourceSpanIds: [left.metadata?.mergedSourceSpanIds, left.id, right.id, right.metadata?.mergedSourceSpanIds].filter(Boolean).join(","),
2743
+ sourceSpanNormalization: "merged_text_run"
2744
+ });
2745
+ return {
2746
+ ...merged,
2747
+ bbox: [...left.bbox ?? [], ...right.bbox ?? []],
2748
+ pageEnd: right.pageEnd ?? left.pageEnd,
2749
+ location: {
2750
+ ...left.location,
2751
+ endPage: right.location?.endPage ?? right.pageEnd ?? left.location?.endPage
2752
+ },
2753
+ __originalIndex: left.__originalIndex
2754
+ };
2755
+ }
2756
+ function retextSpan(span, text, metadata) {
2757
+ const textHash = sourceSpanTextHash(text);
2758
+ return SourceSpanSchema.parse({
2759
+ ...span,
2760
+ id: `${span.id.split(":").slice(0, -1).join(":")}:${textHash.slice(0, 12)}`,
2761
+ text,
2762
+ hash: textHash,
2763
+ textHash,
2764
+ metadata: {
2765
+ ...span.metadata ?? {},
2766
+ ...metadata
2767
+ }
2768
+ });
2769
+ }
2661
2770
  function filterChunkableSourceSpans(spans) {
2662
2771
  const rowIds = new Set(
2663
2772
  spans.filter((span) => sourceUnit(span) === "table_row").map((span) => span.id)
@@ -4406,14 +4515,14 @@ function stringArray(value) {
4406
4515
  function sourceUnit4(span) {
4407
4516
  return span.sourceUnit ?? span.metadata?.sourceUnit;
4408
4517
  }
4409
- function spanPage(span) {
4518
+ function spanPage2(span) {
4410
4519
  return span.pageStart ?? span.location?.page ?? span.location?.startPage;
4411
4520
  }
4412
4521
  function spanPageEnd(span) {
4413
- return span.pageEnd ?? span.location?.endPage ?? spanPage(span);
4522
+ return span.pageEnd ?? span.location?.endPage ?? spanPage2(span);
4414
4523
  }
4415
4524
  function sourceSpansForPage(sourceSpans, page) {
4416
- return sourceSpans.filter((span) => spanPage(span) === page && sourceUnit4(span) === "page").map((span) => span.id);
4525
+ return sourceSpans.filter((span) => spanPage2(span) === page && sourceUnit4(span) === "page").map((span) => span.id);
4417
4526
  }
4418
4527
  function nodePageOverlaps(node, record) {
4419
4528
  const recordStart = numberValue(record, "pageNumber", "pageStart", "resolvedFromPage");
@@ -4514,8 +4623,8 @@ function buildNodesFromSourceSpans(sourceSpans) {
4514
4623
  const unit = sourceUnit4(span);
4515
4624
  return unit === "section" || unit === "section_candidate" || unit === "page";
4516
4625
  });
4517
- return candidates.sort((left, right) => (spanPage(left) ?? 0) - (spanPage(right) ?? 0) || left.id.localeCompare(right.id)).map((span, index) => {
4518
- const title = span.sectionId ?? span.formNumber ?? (sourceUnit4(span) === "page" && spanPage(span) ? `Page ${spanPage(span)}` : `Source unit ${index + 1}`);
4626
+ return candidates.sort((left, right) => (spanPage2(left) ?? 0) - (spanPage2(right) ?? 0) || left.id.localeCompare(right.id)).map((span, index) => {
4627
+ const title = span.sectionId ?? span.formNumber ?? (sourceUnit4(span) === "page" && spanPage2(span) ? `Page ${spanPage2(span)}` : `Source unit ${index + 1}`);
4519
4628
  return {
4520
4629
  id: `source:${index}:${slugPart(span.id)}`,
4521
4630
  title,
@@ -4523,7 +4632,7 @@ function buildNodesFromSourceSpans(sourceSpans) {
4523
4632
  type: sourceUnit4(span),
4524
4633
  label: sourceUnit4(span),
4525
4634
  level: 1,
4526
- pageStart: spanPage(span),
4635
+ pageStart: spanPage2(span),
4527
4636
  pageEnd: spanPageEnd(span),
4528
4637
  formNumber: span.formNumber,
4529
4638
  excerpt: span.text.slice(0, 500),
@@ -9302,6 +9411,29 @@ function cleanText(value, fallback) {
9302
9411
  const text = value?.replace(/\s+/g, " ").trim();
9303
9412
  return text || fallback;
9304
9413
  }
9414
+ function simplifyOrganizerTitle(value, fallback, kind) {
9415
+ const title = cleanText(value, fallback);
9416
+ if (/^declarations\b/i.test(title)) return "Declarations";
9417
+ if (/^policy\s+form\b/i.test(title)) return "Policy Form";
9418
+ if (/^definitions\b/i.test(title)) return "Definitions";
9419
+ const endorsementNumber = title.match(/^endorsement\s+(?:no\.?|number|#)?\s*([A-Z0-9][A-Z0-9.-]*)\b/i)?.[1];
9420
+ if (endorsementNumber) return `Endorsement No. ${endorsementNumber}`;
9421
+ if (kind === "endorsement" && /^endorsements?\s+\d+\s*[–-]\s*\d+\b/i.test(title)) {
9422
+ return title.replace(/[–—]/g, "-").replace(/\s*\(.*/, "").trim();
9423
+ }
9424
+ return title;
9425
+ }
9426
+ function endorsementReference(value) {
9427
+ return value?.match(/\bendorsement\s+(?:no\.?|number|#)?\s*([A-Z0-9][A-Z0-9.-]*)\b/i)?.[1]?.toUpperCase();
9428
+ }
9429
+ function rejectsOrganizerGroup(group, children) {
9430
+ if (group.kind !== "endorsement") return false;
9431
+ if (/^endorsements?\s+\d+\s*[–-]\s*\d+\b/i.test(group.title)) return true;
9432
+ const childNumbers = new Set(
9433
+ children.map((child) => endorsementReference([child.title, child.description, child.textExcerpt].filter(Boolean).join(" "))).filter((value) => Boolean(value))
9434
+ );
9435
+ return childNumbers.size > 1;
9436
+ }
9305
9437
  function compactNode(node, maxText = 700) {
9306
9438
  return {
9307
9439
  id: node.id,
@@ -9389,8 +9521,10 @@ Scope:
9389
9521
  Rules:
9390
9522
  - Use only node IDs from the provided list.
9391
9523
  - Do not invent text, page numbers, source spans, limits, or policy facts.
9392
- - You may relabel existing nodes and group adjacent top-level/page nodes from this batch when they are clearly one form, endorsement, declarations set, schedule, or clause family.
9524
+ - You may relabel existing nodes and group adjacent top-level/page nodes from this batch only when they are clearly one continuous form, one declarations set, one schedule, or one clause family.
9525
+ - Do not group separately numbered endorsements into one parent. Never create rollup titles such as "Endorsements 1-3 (...)".
9393
9526
  - Add concise, human-readable titles to generic text, table, row, and cell nodes when the text makes their role clear.
9527
+ - Keep organizer titles terse. Use the printed heading or a compact canonical title such as "Declarations", "Policy Form", "Definitions", or "Endorsement No. 3"; do not add parenthetical summaries.
9394
9528
  - Groups must list existing childNodeIds only.
9395
9529
  - Keep descriptions short and useful for search.
9396
9530
  - Prefer the document's own form titles, endorsement titles, schedules, declarations headings, and page order over keyword-only guessing.
@@ -9440,17 +9574,20 @@ function applyOrganization(sourceTree, organization) {
9440
9574
  return {
9441
9575
  ...node,
9442
9576
  kind: label.kind ?? node.kind,
9443
- title: cleanText(label.title, node.title),
9577
+ title: simplifyOrganizerTitle(label.title, node.title, label.kind ?? node.kind),
9444
9578
  description: cleanText(label.description, node.description)
9445
9579
  };
9446
9580
  });
9447
9581
  for (const group of organization.groups) {
9448
9582
  const children = group.childNodeIds.map((id2) => byId.get(id2)).filter((node2) => Boolean(node2));
9449
9583
  if (children.length === 0) continue;
9584
+ if (rejectsOrganizerGroup(group, children)) continue;
9450
9585
  const parentId = children[0].parentId;
9451
9586
  if (!children.every((child) => child.parentId === parentId)) continue;
9452
9587
  const documentId = children[0].documentId;
9453
- const id = groupNodeId(documentId, group);
9588
+ const title = simplifyOrganizerTitle(group.title, group.title, group.kind);
9589
+ const description = cleanText(group.description, title);
9590
+ const id = groupNodeId(documentId, { ...group, title });
9454
9591
  if (byId.has(id)) continue;
9455
9592
  const sourceSpanIds = [...new Set(children.flatMap((child) => child.sourceSpanIds))];
9456
9593
  const pageStarts = children.map((child) => child.pageStart).filter((page) => typeof page === "number");
@@ -9461,8 +9598,8 @@ function applyOrganization(sourceTree, organization) {
9461
9598
  documentId,
9462
9599
  parentId,
9463
9600
  kind: group.kind,
9464
- title: group.title,
9465
- description: group.description ?? group.title,
9601
+ title,
9602
+ description,
9466
9603
  textExcerpt: children.map((child) => child.textExcerpt ?? child.description).filter(Boolean).join("\n\n").slice(0, 1600),
9467
9604
  sourceSpanIds,
9468
9605
  pageStart: pageStarts.length ? Math.min(...pageStarts) : void 0,
@@ -9603,7 +9740,8 @@ function materializeDocument(params) {
9603
9740
  };
9604
9741
  }
9605
9742
  async function runSourceTreeExtraction(params) {
9606
- let sourceTree = buildDocumentSourceTree(params.sourceSpans, params.id);
9743
+ const sourceSpans = normalizeSourceSpans(params.sourceSpans);
9744
+ let sourceTree = buildDocumentSourceTree(sourceSpans, params.id);
9607
9745
  const warnings = [];
9608
9746
  let modelCalls = 0;
9609
9747
  let callsWithUsage = 0;
@@ -9639,7 +9777,7 @@ async function runSourceTreeExtraction(params) {
9639
9777
  maxTokens: budget.maxTokens,
9640
9778
  taskKind: "extraction_source_tree",
9641
9779
  budgetDiagnostics: budget,
9642
- providerOptions: { ...params.providerOptions, sourceSpans: params.sourceSpans }
9780
+ providerOptions: { ...params.providerOptions, sourceSpans }
9643
9781
  },
9644
9782
  {
9645
9783
  fallback: { labels: [], groups: [] },
@@ -9660,12 +9798,12 @@ async function runSourceTreeExtraction(params) {
9660
9798
  }
9661
9799
  const deterministicProfile = buildDeterministicOperationalProfile({
9662
9800
  sourceTree,
9663
- sourceSpans: params.sourceSpans
9801
+ sourceSpans
9664
9802
  });
9665
9803
  let operationalProfile = deterministicProfile;
9666
9804
  try {
9667
9805
  const validNodeIds = new Set(sourceTree.map((node) => node.id));
9668
- const validSpanIds = new Set(params.sourceSpans.map((span) => span.id));
9806
+ const validSpanIds = new Set(sourceSpans.map((span) => span.id));
9669
9807
  const budget = params.resolveBudget("extraction_operational_profile", 8192);
9670
9808
  const startedAt = Date.now();
9671
9809
  const response = await safeGenerateObject(
@@ -9676,7 +9814,7 @@ async function runSourceTreeExtraction(params) {
9676
9814
  maxTokens: budget.maxTokens,
9677
9815
  taskKind: "extraction_operational_profile",
9678
9816
  budgetDiagnostics: budget,
9679
- providerOptions: { ...params.providerOptions, sourceSpans: params.sourceSpans, sourceTree }
9817
+ providerOptions: { ...params.providerOptions, sourceSpans, sourceTree }
9680
9818
  },
9681
9819
  {
9682
9820
  fallback: deterministicProfile,
@@ -9705,8 +9843,8 @@ async function runSourceTreeExtraction(params) {
9705
9843
  });
9706
9844
  return {
9707
9845
  sourceTree,
9708
- sourceSpans: params.sourceSpans,
9709
- sourceChunks: chunkSourceSpans(params.sourceSpans),
9846
+ sourceSpans,
9847
+ sourceChunks: chunkSourceSpans(sourceSpans),
9710
9848
  operationalProfile,
9711
9849
  document,
9712
9850
  chunks: [],
@@ -14721,6 +14859,7 @@ var AGENT_TOOLS = [
14721
14859
  normalizeDoclingDocument,
14722
14860
  normalizeDocumentSourceTreePaths,
14723
14861
  normalizeForMatch,
14862
+ normalizeSourceSpans,
14724
14863
  orderSourceEvidence,
14725
14864
  overlayTextOnPdf,
14726
14865
  pLimit,