fix(sync): buildings 流补 ChangesTools import 与 ChangesToolsTest 断言

This commit is contained in:
my_local_kimi_dev2
2026-10-27 08:54:40 +08:00
parent 76ac8fd66f
commit fecbb2d95a
2 changed files with 6 additions and 4 deletions
@@ -5,6 +5,7 @@ import me.iiv.agent.mcp.McpErrorCode;
import me.iiv.agent.mcp.ToolCallException;
import me.iiv.agent.mcp.XqTool;
import me.iiv.agent.mcp.sync.BatteryFaultsSyncEntity;
import me.iiv.agent.mcp.sync.BuildingsSyncEntity;
import me.iiv.agent.mcp.sync.ChangesEngine;
import me.iiv.agent.mcp.sync.ContractsSyncEntity;
import me.iiv.agent.mcp.sync.DeviceLifecyclesSyncEntity;
@@ -34,9 +35,9 @@ import java.util.Map;
/**
* 增量同步工具(REQ-20260911-0013;P2 域扩展于 REQ-20260902-0002):
* users/properties/contracts/repayment-targets/repayment-details/mall-orders/
* users/properties/buildings/contracts/repayment-targets/repayment-details/mall-orders/
* device-lifecycles/battery-faults/devices/withdraw-orders/relocation-orders/
* install-orders 十二个 changes 工具,
* install-orders 十三个 changes 工具,
* 协议(snapshot/cursor/tombstone/sync_token)由 ChangesEngine 统一实现。
* 数据域硬约束:本类不声明 tenant_id/scope 入参,数据域只能从 Token 推导;
* GuardedToolCallback 对 *.changes.list 工具的原始入参做二次拦截,传 tenant_id/scope 一律拒绝。
@@ -41,8 +41,9 @@ class ChangesToolsTest {
callback -> callback.getToolDefinition().name(),
callback -> callback.getToolDefinition().inputSchema()));
assertEquals(14, schemas.size());
for (String name : new String[]{"users.changes.list", "properties.changes.list", "contracts.changes.list",
assertEquals(15, schemas.size());
for (String name : new String[]{"users.changes.list", "properties.changes.list", "buildings.changes.list",
"contracts.changes.list",
"repayment-targets.changes.list", "repayment-details.changes.list",
"mall-orders.changes.list", "device-lifecycles.changes.list", "battery-faults.changes.list",
"devices.changes.list", "withdraw-orders.changes.list", "relocation-orders.changes.list",