Planner Autonomy: закрепить boundary inventory templates

This commit is contained in:
2026-05-01 13:17:09 +03:00
parent 9243642400
commit 3f7caae668
5 changed files with 114 additions and 2 deletions
@@ -46,6 +46,7 @@ function isInternalMechanicsLine(value) {
text.includes("runtime_") ||
text.includes("planner_") ||
text.includes("catalog_") ||
text.includes("scope is not implemented yet") ||
text.includes("needs more scope before execution") ||
text.includes("mcp_execution_performed"));
}
@@ -97,6 +98,9 @@ function isMovementPilot(pilot) {
function isMetadataPilot(pilot) {
return pilot.pilot_scope === "metadata_inspection_v1";
}
function isInventoryTemplatePilot(pilot) {
return pilot.pilot_scope === "inventory_route_template_v1";
}
function isCatalogDrilldownPilot(pilot) {
return (isMetadataPilot(pilot) &&
(pilot.reason_codes.includes("planner_selected_catalog_drilldown_from_confirmed_metadata_surface_ref") ||
@@ -292,6 +296,9 @@ function headlineFor(mode, pilot) {
if (isEntityResolutionPilot(pilot) && mode === "confirmed_with_bounded_inference") {
return "По каталогу 1С найден вероятный контрагент; это заземление сущности для следующего шага, а не еще бизнес-ответ по данным.";
}
if (isInventoryTemplatePilot(pilot) && mode === "checked_sources_only") {
return "Инвентарный route-template уже выбран, но live-исполнение этого generic MCP контура еще не подключено; складской/товарный факт не подтвержден.";
}
if (isEntityResolutionPilot(pilot) && mode === "needs_clarification") {
return "По каталогу 1С нашлось несколько похожих контрагентов, и без уточнения нельзя честно выбрать правильную сущность.";
}
@@ -422,6 +429,9 @@ function nextStepFor(mode, pilot) {
if (mode === "needs_clarification") {
return "Уточните контрагента, период или организацию, и я смогу выполнить проверку по 1С.";
}
if (mode === "checked_sources_only" && isInventoryTemplatePilot(pilot)) {
return "Следующий шаг - связать inventory route-template с exact inventory runtime и затем проверить live-прогоном.";
}
if (mode === "confirmed_with_bounded_inference" && pilot.derived_metadata_surface) {
const surface = pilot.derived_metadata_surface;
if (surface.ambiguity_detected && surface.ambiguity_entity_sets.length > 0) {
@@ -475,6 +485,10 @@ function buildMustNotClaim(pilot) {
claims.push("Do not claim legal identity uniqueness when several catalog candidates are still plausible.");
claims.push("Do not imply that the resolved entity has already been used in a downstream data probe.");
}
if (isInventoryTemplatePilot(pilot)) {
claims.push("Do not present inventory route-template planning as executed stock, supplier, purchase, or sale evidence.");
claims.push("Do not expose inventory_route_template_v1 or MCP primitive names in the user answer.");
}
if (pilot.evidence.confirmed_facts.length === 0) {
claims.push("Do not claim a confirmed business fact when confirmed_facts is empty.");
}