package cn.iocoder.yudao.module.system.api.agent.imports; import cn.iocoder.yudao.module.system.framework.agent.AgentPrincipal; /** * 业务模块导入适配器:system 模块负责幂等、逐行事务与回执,适配器只负责单行校验和写入。 */ public interface AgentImportModuleAdapter { /** 与 Python 侧 ModuleSpec.module_id 对齐,如 srm.supplier。 */ String moduleId(); /** 提交该模块所需的业务权限。 */ String permission(); /** 只读预检;必须返回稳定的 preflightHash 供提交时比对。 */ AgentImportPreflightRespVO preflight(AgentPrincipal principal, AgentImportPreflightReqVO request); /** 单行写入;失败时抛出异常,由编排层写入 FAILED 回执。 */ AgentImportRowReceipt commitRow(AgentPrincipal principal, AgentImportCommitReqVO request, AgentImportPreflightRespVO.Row planned, AgentImportPreflightReqVO.Row row); }