Planner Autonomy: выбрать comparison chain для явного bidirectional graph

This commit is contained in:
2026-05-01 14:20:24 +03:00
parent 1c1383b8b5
commit ea96df9ca1
5 changed files with 27 additions and 17 deletions
@@ -496,16 +496,19 @@ function recipeFor(input) {
});
}
if (graphFactFamily === "value_flow") {
if (dataNeedGraph?.comparison_need === "incoming_vs_outgoing" && !hasSubjectCandidates(dataNeedGraph)) {
if (dataNeedGraph?.comparison_need === "incoming_vs_outgoing") {
pushUnique(axes, "amount");
pushUnique(axes, "coverage_target");
if (requestedAggregationAxis === "month" || graphAggregation === "by_month") {
pushUnique(axes, "calendar_month");
}
const template = (0, assistantMcpCatalogIndex_1.getAssistantMcpCatalogChainTemplate)("value_flow_comparison");
const fallbackPrimitives = hasSubjectCandidates(dataNeedGraph)
? ["resolve_entity_reference", ...template.fallback_primitives]
: template.fallback_primitives;
const primitiveSelection = selectPrimitivesFromGraphAndCatalog({
dataNeedGraph,
fallbackPrimitives: template.fallback_primitives,
fallbackPrimitives,
requiredAxes: axes,
metadataSurface: input.metadataSurface,
actionFamily: action,