refactor(framework): remove obsolete agent proxy and register test stubs

This commit is contained in:
2026-02-21 16:19:57 +08:00
parent 3c9ace8e56
commit 2870e79f79
4 changed files with 0 additions and 60 deletions

View File

@@ -1,7 +0,0 @@
package factory;
public class AgentRegisterTest {
public static void main(String[] args) {
}
}

View File

@@ -1,24 +0,0 @@
package module;
import net.bytebuddy.ByteBuddy;
import net.bytebuddy.implementation.MethodDelegation;
import net.bytebuddy.matcher.ElementMatchers;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
public class AbstractAgentRunningProxyTest {
@Test
public void test() throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException, IOException, ClassNotFoundException {
Class<? extends AbstractAgentRunningModule> clazz = new ByteBuddy().subclass(MyAbstractAgentRunningAbstractAgentModule.class)
.method(ElementMatchers.isOverriddenFrom(AbstractAgentRunningModule.class))
.intercept(MethodDelegation.to(
new MyModuleProxyInterceptor()
))
.make()
.load(AbstractAgentRunningProxyTest.class.getClassLoader())
.getLoaded();
clazz.getConstructor().newInstance().execute(null);
}
}

View File

@@ -1,10 +0,0 @@
package module;
import work.slhaf.partner.api.agent.runtime.interaction.flow.entity.RunningFlowContext;
public class MyAbstractAgentRunningAbstractAgentModule extends AbstractAgentRunningModule {
@Override
public void execute(RunningFlowContext context) {
System.out.println("MyAbstractAgentRunningAbstractAgentModule");
}
}

View File

@@ -1,19 +0,0 @@
package module;
import net.bytebuddy.implementation.bind.annotation.*;
import java.lang.reflect.Method;
import java.util.concurrent.Callable;
public class MyModuleProxyInterceptor {
public MyModuleProxyInterceptor() {
}
@RuntimeType
public Object intercept(@Origin Method method, @AllArguments Object[] allArguments, @SuperCall Callable<?> zuper, @This Object proxy) throws Exception {
System.out.println("22222");
Object res = zuper.call();
System.out.println("11111");
return res;
}
}