ГЛОБАЛЬНЫЙ РЕФАКТОРИНГ АРХИТЕКТУРЫ - Рефакторинг этапов 2.109 - 2.112 - Ужесточение типы plan-аудита и live-route аудита в deep grounding
This commit is contained in:
@@ -3,6 +3,7 @@ import type { ClaimBoundAnchorAudit } from "./assistantClaimBoundEvidence";
|
||||
import type { AssistantLiveTemporalHint } from "./assistantDeepTurnRetrievalRuntimeAdapter";
|
||||
import { isAssistantFollowupApplied, type AssistantFollowupUsage } from "./assistantFollowupUsage";
|
||||
import type { DomainPolarityGuardAudit, TemporalGuardAudit } from "./assistantRuntimeGuards";
|
||||
import type { CompanyAnchorSet } from "./companyAnchorResolver";
|
||||
|
||||
const KNOWN_P0_DOMAINS = new Set([
|
||||
"settlements_60_62",
|
||||
@@ -37,31 +38,28 @@ export interface BuildAssistantDeepTurnRuntimeContextInput {
|
||||
source: string | null;
|
||||
};
|
||||
followupUsage: AssistantFollowupUsage | null | undefined;
|
||||
resolveCompanyAnchors: (userMessage: string) => unknown;
|
||||
resolveCompanyAnchors: (userMessage: string) => CompanyAnchorSet;
|
||||
resolveBusinessScopeAlignment: (input: {
|
||||
userMessage: string;
|
||||
companyAnchors: unknown;
|
||||
companyAnchors: CompanyAnchorSet;
|
||||
normalized: NormalizeResponsePayload["normalized"];
|
||||
routeSummary: RouteHintSummary | null;
|
||||
}) => {
|
||||
route_summary_resolved: RouteHintSummary | null;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
}) => AssistantBusinessScopeResolution;
|
||||
inferP0DomainFromMessage: (userMessage: string) => string | null;
|
||||
resolveTemporalGuard: (input: {
|
||||
userMessage: string;
|
||||
normalized: NormalizeResponsePayload["normalized"];
|
||||
companyAnchors: unknown;
|
||||
companyAnchors: CompanyAnchorSet;
|
||||
analysisContext: AssistantLiveTemporalHint | null;
|
||||
}) => TemporalGuardAudit;
|
||||
resolveDomainPolarityGuard: (input: {
|
||||
userMessage: string;
|
||||
companyAnchors: unknown;
|
||||
companyAnchors: CompanyAnchorSet;
|
||||
focusDomainHint: string | null;
|
||||
}) => DomainPolarityGuardAudit;
|
||||
resolveClaimBoundAnchors: (input: {
|
||||
userMessage: string;
|
||||
companyAnchors: unknown;
|
||||
companyAnchors: CompanyAnchorSet;
|
||||
focusDomainHint: string | null;
|
||||
primaryPeriod: unknown;
|
||||
}) => ClaimBoundAnchorAudit;
|
||||
@@ -74,29 +72,29 @@ export interface BuildAssistantDeepTurnRuntimeContextInput {
|
||||
claimType: string;
|
||||
focusDomainHint: string | null;
|
||||
userMessage: string;
|
||||
companyAnchors: unknown;
|
||||
companyAnchors: CompanyAnchorSet;
|
||||
followupApplied: boolean;
|
||||
}) => {
|
||||
route_summary_resolved: RouteHintSummary | null;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
}) => AssistantBusinessScopeResolution;
|
||||
}
|
||||
|
||||
export interface AssistantBusinessScopeResolution {
|
||||
route_summary_resolved: RouteHintSummary | null;
|
||||
business_scope_raw?: string[];
|
||||
business_scope_resolved?: string[];
|
||||
company_grounding_applied?: boolean;
|
||||
scope_resolution_reason?: string[];
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface BuildAssistantDeepTurnRuntimeContextOutput {
|
||||
companyAnchors: unknown;
|
||||
initialBusinessScopeResolution: {
|
||||
route_summary_resolved: RouteHintSummary | null;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
companyAnchors: CompanyAnchorSet;
|
||||
initialBusinessScopeResolution: AssistantBusinessScopeResolution;
|
||||
inferredDomainByMessage: string | null;
|
||||
focusDomainForGuards: string | null;
|
||||
temporalGuard: TemporalGuardAudit;
|
||||
domainPolarityGuardInitial: DomainPolarityGuardAudit;
|
||||
claimAnchorAudit: ClaimBoundAnchorAudit;
|
||||
businessScopeResolution: {
|
||||
route_summary_resolved: RouteHintSummary | null;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
businessScopeResolution: AssistantBusinessScopeResolution;
|
||||
resolvedRouteSummary: RouteHintSummary | null;
|
||||
liveTemporalHint: AssistantLiveTemporalHint | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user