@claritylabs/cl-sdk 3.0.3 → 3.0.4
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 +12 -11
- package/dist/index.d.ts +12 -11
- package/dist/index.js +124 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +123 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
|
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 ??
|
|
4522
|
+
return span.pageEnd ?? span.location?.endPage ?? spanPage2(span);
|
|
4414
4523
|
}
|
|
4415
4524
|
function sourceSpansForPage(sourceSpans, page) {
|
|
4416
|
-
return sourceSpans.filter((span) =>
|
|
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) => (
|
|
4518
|
-
const title = span.sectionId ?? span.formNumber ?? (sourceUnit4(span) === "page" &&
|
|
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:
|
|
4635
|
+
pageStart: spanPage2(span),
|
|
4527
4636
|
pageEnd: spanPageEnd(span),
|
|
4528
4637
|
formNumber: span.formNumber,
|
|
4529
4638
|
excerpt: span.text.slice(0, 500),
|
|
@@ -9603,7 +9712,8 @@ function materializeDocument(params) {
|
|
|
9603
9712
|
};
|
|
9604
9713
|
}
|
|
9605
9714
|
async function runSourceTreeExtraction(params) {
|
|
9606
|
-
|
|
9715
|
+
const sourceSpans = normalizeSourceSpans(params.sourceSpans);
|
|
9716
|
+
let sourceTree = buildDocumentSourceTree(sourceSpans, params.id);
|
|
9607
9717
|
const warnings = [];
|
|
9608
9718
|
let modelCalls = 0;
|
|
9609
9719
|
let callsWithUsage = 0;
|
|
@@ -9639,7 +9749,7 @@ async function runSourceTreeExtraction(params) {
|
|
|
9639
9749
|
maxTokens: budget.maxTokens,
|
|
9640
9750
|
taskKind: "extraction_source_tree",
|
|
9641
9751
|
budgetDiagnostics: budget,
|
|
9642
|
-
providerOptions: { ...params.providerOptions, sourceSpans
|
|
9752
|
+
providerOptions: { ...params.providerOptions, sourceSpans }
|
|
9643
9753
|
},
|
|
9644
9754
|
{
|
|
9645
9755
|
fallback: { labels: [], groups: [] },
|
|
@@ -9660,12 +9770,12 @@ async function runSourceTreeExtraction(params) {
|
|
|
9660
9770
|
}
|
|
9661
9771
|
const deterministicProfile = buildDeterministicOperationalProfile({
|
|
9662
9772
|
sourceTree,
|
|
9663
|
-
sourceSpans
|
|
9773
|
+
sourceSpans
|
|
9664
9774
|
});
|
|
9665
9775
|
let operationalProfile = deterministicProfile;
|
|
9666
9776
|
try {
|
|
9667
9777
|
const validNodeIds = new Set(sourceTree.map((node) => node.id));
|
|
9668
|
-
const validSpanIds = new Set(
|
|
9778
|
+
const validSpanIds = new Set(sourceSpans.map((span) => span.id));
|
|
9669
9779
|
const budget = params.resolveBudget("extraction_operational_profile", 8192);
|
|
9670
9780
|
const startedAt = Date.now();
|
|
9671
9781
|
const response = await safeGenerateObject(
|
|
@@ -9676,7 +9786,7 @@ async function runSourceTreeExtraction(params) {
|
|
|
9676
9786
|
maxTokens: budget.maxTokens,
|
|
9677
9787
|
taskKind: "extraction_operational_profile",
|
|
9678
9788
|
budgetDiagnostics: budget,
|
|
9679
|
-
providerOptions: { ...params.providerOptions, sourceSpans
|
|
9789
|
+
providerOptions: { ...params.providerOptions, sourceSpans, sourceTree }
|
|
9680
9790
|
},
|
|
9681
9791
|
{
|
|
9682
9792
|
fallback: deterministicProfile,
|
|
@@ -9705,8 +9815,8 @@ async function runSourceTreeExtraction(params) {
|
|
|
9705
9815
|
});
|
|
9706
9816
|
return {
|
|
9707
9817
|
sourceTree,
|
|
9708
|
-
sourceSpans
|
|
9709
|
-
sourceChunks: chunkSourceSpans(
|
|
9818
|
+
sourceSpans,
|
|
9819
|
+
sourceChunks: chunkSourceSpans(sourceSpans),
|
|
9710
9820
|
operationalProfile,
|
|
9711
9821
|
document,
|
|
9712
9822
|
chunks: [],
|
|
@@ -14721,6 +14831,7 @@ var AGENT_TOOLS = [
|
|
|
14721
14831
|
normalizeDoclingDocument,
|
|
14722
14832
|
normalizeDocumentSourceTreePaths,
|
|
14723
14833
|
normalizeForMatch,
|
|
14834
|
+
normalizeSourceSpans,
|
|
14724
14835
|
orderSourceEvidence,
|
|
14725
14836
|
overlayTextOnPdf,
|
|
14726
14837
|
pLimit,
|