推进 Action 模块语义缓存机制

- 完善缓存命中部分;
- 调整 ActionExtractor 以适配缓存逻辑
- 缓存更新大致框架待填充具体更新逻辑;
This commit is contained in:
2025-10-18 21:56:50 +08:00
parent d1ea8dde79
commit aee6d879e9
21 changed files with 236 additions and 86 deletions

View File

@@ -25,11 +25,7 @@ public class AgentRunningFlow<C extends RunningFlowContext> {
List<MetaModule> moduleList = entry.getValue();
for (MetaModule module : moduleList) {
Future<?> future = executor.submit(() -> {
try {
module.getInstance().execute(interactionContext);
} catch (Exception e) {
throw new AgentRuntimeException("模块执行出错: " + module.getName(), e);
}
module.getInstance().execute(interactionContext);
});
futures.add(future);
}

View File

@@ -7,14 +7,12 @@ import work.slhaf.partner.api.agent.factory.module.annotation.BeforeExecute;
import work.slhaf.partner.api.agent.factory.module.annotation.CoreModule;
import work.slhaf.partner.api.agent.runtime.interaction.flow.entity.RunningFlowContext;
import java.io.IOException;
/**
* 流程执行模块基类
*/
@Slf4j
public abstract class AgentRunningModule<C extends RunningFlowContext> extends Module {
public abstract void execute(C context) throws IOException, ClassNotFoundException;
public abstract void execute(C context);
@BeforeExecute
private void beforeLog() {