feat: ФОТ/ед в find_in_real_estimates + корпус-tools в агентный Claude-путь

Эксперимент подтвердил: агентный Claude (claude_bridge, Docker) сам вызывает
find_in_real_estimates и берёт РЕАЛЬНЫЕ коды/цены — без фабрикации (в отличие от
glm single-pass). Но НР/СП считал на сыром salary из cost_structure (неверный
масштаб). Фикс: find_in_real_estimates отдаёт fot_unit (ФОТ/ед, масштабирован к
цене/ед) — корректный базис для НР/СП обоим путям. В claude_bridge домонтированы
real_corpus/gge_deep/data + find_in_real_estimates/find_ka_price/find_in_vor в
allowedTools — агентный путь получил корпус.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
anor
2026-06-09 04:18:16 +10:00
co-authored by Claude Opus 4.8
parent 881c900a6d
commit cf17151bdb
3 changed files with 36 additions and 7 deletions
+15 -1
View File
@@ -142,10 +142,14 @@ async def stream_claude(
smeta_mcp_path = APP_DIR / "smeta_mcp.py"
smeta_complaints_path = APP_DIR / "complaints.py"
smeta_gge_tools_path = APP_DIR / "gge_tools.py"
smeta_gge_deep_path = APP_DIR / "gge_deep.py"
smeta_corpus_path = APP_DIR / "real_corpus.py"
smeta_corpus_data = APP_DIR / "data" / "real_corpus"
smeta_mcp_config = APP_DIR / "sandbox" / "mcp_config.json"
mcp_available = (smeta_mcp_path.exists() and smeta_complaints_path.exists()
and smeta_gge_tools_path.exists()
and smeta_mcp_config.exists())
corpus_available = smeta_corpus_path.exists() and smeta_corpus_data.exists()
claude_args = [
"-p", message,
@@ -159,7 +163,10 @@ async def stream_claude(
"mcp__smeta__apply_pukts_to_registry,"
"mcp__smeta__parse_gge_archive,"
"mcp__smeta__parse_gge_file,"
"mcp__smeta__update_xlsx_cells"),
"mcp__smeta__update_xlsx_cells,"
"mcp__smeta__find_in_real_estimates,"
"mcp__smeta__find_ka_price,"
"mcp__smeta__find_in_vor"),
]
if mcp_available:
claude_args.extend(["--mcp-config", "/app/mcp_config.json"])
@@ -192,6 +199,13 @@ async def stream_claude(
"-v", f"{smeta_gge_tools_path.resolve()}:/app/gge_tools.py:ro",
"-v", f"{smeta_mcp_config.resolve()}:/app/mcp_config.json:ro",
])
if corpus_available:
# Корпус реальных смет — для агентного расчёта (find_in_real_estimates)
cmd.extend([
"-v", f"{smeta_gge_deep_path.resolve()}:/app/gge_deep.py:ro",
"-v", f"{smeta_corpus_path.resolve()}:/app/real_corpus.py:ro",
"-v", f"{smeta_corpus_data.resolve()}:/app/data/real_corpus:ro",
])
if instructions.exists():
cmd.extend(["-v", f"{instructions.resolve()}:/instructions.md:ro"])