ARCH: ввести broad business evaluation bridge
This commit is contained in:
@@ -7,9 +7,11 @@ import {
|
||||
buildRootScopedCarryoverFilters,
|
||||
buildInventoryRootFrameFromAddressDebug,
|
||||
hydrateInventoryRootFrameState,
|
||||
readAddressDebugIntent,
|
||||
readAddressDebugFilters,
|
||||
readAddressDebugItem,
|
||||
readAddressDebugTemporalScope,
|
||||
readAssistantMcpDiscoveryPilotScope,
|
||||
resolveOrganizationClarificationContinuation,
|
||||
resolveNavigationSessionContextState,
|
||||
resolveAddressDebugCarryoverFilters,
|
||||
@@ -171,19 +173,23 @@ export function createAssistantTransitionPolicy(deps) {
|
||||
return false;
|
||||
}
|
||||
const executionLane = deps.toNonEmptyString(debug.execution_lane);
|
||||
const detectedIntent = deps.toNonEmptyString(debug.detected_intent);
|
||||
const detectedIntent = readAddressDebugIntent(debug, deps.toNonEmptyString);
|
||||
const selectedRecipe = deps.toNonEmptyString(debug.selected_recipe);
|
||||
const answerGroundingCheck =
|
||||
debug.answer_grounding_check && typeof debug.answer_grounding_check === "object"
|
||||
? debug.answer_grounding_check
|
||||
: null;
|
||||
const groundingStatus = deps.toNonEmptyString(answerGroundingCheck?.status);
|
||||
const discoveryPilotScope = readAssistantMcpDiscoveryPilotScope(debug, deps.toNonEmptyString);
|
||||
if (groundingStatus === "grounded") {
|
||||
return true;
|
||||
}
|
||||
if (selectedRecipe) {
|
||||
return true;
|
||||
}
|
||||
if (debug.mcp_discovery_response_applied === true && discoveryPilotScope) {
|
||||
return true;
|
||||
}
|
||||
return executionLane === "address_query" && Boolean(detectedIntent && detectedIntent !== "unknown");
|
||||
}
|
||||
|
||||
@@ -438,7 +444,7 @@ export function createAssistantTransitionPolicy(deps) {
|
||||
(deps.toNonEmptyString(alternateMessage)
|
||||
? deps.isImplicitAddressContinuationByLlm(alternateMessage, llmPreDecomposeMeta)
|
||||
: false));
|
||||
const sourceIntentHint = deps.toNonEmptyString(carryoverSourceDebug?.detected_intent);
|
||||
const sourceIntentHint = readAddressDebugIntent(carryoverSourceDebug, deps.toNonEmptyString);
|
||||
const navigationSessionState = resolveNavigationSessionContextState(
|
||||
addressNavigationState,
|
||||
deps.toNonEmptyString,
|
||||
@@ -599,7 +605,8 @@ export function createAssistantTransitionPolicy(deps) {
|
||||
if (!carryoverSourceDebug) {
|
||||
return null;
|
||||
}
|
||||
const sourceIntent = deps.toNonEmptyString(carryoverSourceDebug.detected_intent);
|
||||
const sourceIntent = readAddressDebugIntent(carryoverSourceDebug, deps.toNonEmptyString);
|
||||
const sourceDiscoveryPilotScope = readAssistantMcpDiscoveryPilotScope(carryoverSourceDebug, deps.toNonEmptyString);
|
||||
const llmExplicitIntent = deps.toNonEmptyString(llmPreDecomposeMeta?.predecomposeContract?.intent);
|
||||
const llmSelectedObjectScopeDetected =
|
||||
llmPreDecomposeMeta?.predecomposeContract?.semantics?.selected_object_scope_detected === true;
|
||||
@@ -931,6 +938,7 @@ export function createAssistantTransitionPolicy(deps) {
|
||||
previous_filters: previousFilters,
|
||||
previous_anchor_type: previousAnchorType ?? undefined,
|
||||
previous_anchor_value: previousAnchor,
|
||||
previous_discovery_pilot_scope: sourceDiscoveryPilotScope ?? undefined,
|
||||
resolved_counterparty_from_display: resolvedCounterpartyFromDisplay || undefined,
|
||||
root_context_only: rootScopedPivot || undefined,
|
||||
root_intent: shouldAttachInventoryRootFrame ? inventoryRootFrame?.intent ?? undefined : undefined,
|
||||
|
||||
Reference in New Issue
Block a user