Commit Graph

21 Commits

Author SHA1 Message Date
592e2604d9 refactor(mcp): move InProcessMcpTransport into Partner-Common module
Context:
Action modules in Partner-Main and SandboxRunner module rely on in-process MCP transport to support dynamically action generating.
2025-12-24 19:34:04 +08:00
88a14f36b2 refactor(runner): relocate InProcessMcpTransport to experimental and move local MCP client logic into LocalRunnerClient
Context:
Recent changes blurred the responsibility boundary between RunnerClient and LocalRunnerClient.
This refactor moves local MCP client–specific logic into LocalRunnerClient and isolates InProcessMcpTransport and related code under the experimental package.
RunnerClient only defines indispensable methods and attributes.
2025-12-22 14:56:23 +08:00
9762739138 refactor(action): replace HashMap with ConcurrentHashMap for thread-safe MetaAction storage 2025-12-19 23:30:27 +08:00
1f5509c17d refactor(RunnerClient): redesign existedMetaActions update strategy
Context:
Resource-change events cannot reliably represent tool changes.
The previous approach attempted to externalize descriptive content into files, but the meta attribute of McpSchema.Tool can provide this information.
2025-12-19 23:22:36 +08:00
4dea948f82 refactor(MetaAction): separate key attribute into name and location
Context:
This change adapts MetaAction locating to support different MetaAction types,
including loading from the local filesystem and from MCP tools.
2025-12-19 21:35:39 +08:00
dc4074715e chore(MetaAction): remove unused order attribute 2025-12-19 20:53:01 +08:00
e851e33b2e feat(RunnerClient): support MCP type-based dynamic client/server registration
This allows implementations of RunnerClient to dynamically register different types of MCP service, and also provides a shutdown hook to close client/server properly.
2025-12-18 22:25:32 +08:00
cb28a5b068 feat(RunnerClient): add InProcessMcpTransport to support in-process MCP communication
Context:
This allows RunnerClient implementations to host local MCP servers without spawning another process.
2025-12-18 21:48:35 +08:00
1947f25ed6 feat(LocalRunnerClient): support executing origin actions
Context:
Origin actions are generated by DynamicActionGenerator and may optionally be
persistently serialized. This feature adds the basic execution flow for origin
actions within LocalRunnerClient.

Notes:
The current mapping between action files and their extensions is hardcoded. This should later be replaced with a configurable registry or loaded dynamically
during application startup.
2025-12-16 21:59:53 +08:00
ad58c0cc7c refactor(LocalRunnerClient): allow injecting action watch path
Context:
The hardcoded action watch path made LocalRunnerClient difficult to test and
tightened it to a specific runtime layout. Injecting the watch path improves
testability and allows the runner to work in different runtime environments.
2025-12-16 21:02:29 +08:00
d546148d69 chore(test): organize experimental tests and test resources 2025-12-16 19:58:08 +08:00
4b852e0049 推进 ActionExecutor 下的‘行动生成与执行’部分
- 新增 RunnerClient 抽象类,并划分 SandboxRunnerClient、LocalRunnerClient两个子类(内容待完善)。前者负责对接 SandboxRunner 模块,后者直接使用本地作为执行环境(但不推荐)。
- 将 ActionWatchService 划为 LocalRunnerClient 的内部类,负责采用本地执行环境时,监听行动程序变化
- 完善 ActionRepairer 处的修复逻辑
- 调整 MetaAction 中路径获取逻辑

这提交方式真该调整一下了,这阶段推进容易攒太多,但又不好停手。或许阶段目标可以保留,但推进点应该可以细化🤔
2025-12-15 21:54:24 +08:00
746fda1a5e 干预意图提取模块初步完成,Prompt 待制定; 在 ChatClient 中添加了默认的超时设定,超时时间后续可能需要调整。
另: 发现很多细节错误,比如“各个后置模块允许执行的条件”、“主模块出现异常时需要如何处理”、“模块Prompt的构建方式、采用格式不统一”等,需要后续进行修复或调整
2025-10-31 21:26:45 +08:00
7094a8a68b 推进 ActionExtractor 语义缓存机制: 两种嵌入模型的连接方式测试完毕,在高性能主机上,可以通过ollama调用mxbai-embed-large这类模型,但放到4核8G香橙派3B就会出现推理时长过长,哪怕换成ONNX RUNTIME JAVA 也难以避免,但如果更换成 nomic-embed-text + ONNX RUNTIME JAVA ,仍能够拿到70左右ms的推理时长,远低于提取模型以及向量模型API的调用时长。预期可提供两种语义缓存所用的嵌入模型接入方式: 通过 http 调用 本地ollama接口; 指定 ONNX 格式的嵌入模型直接调用。 2025-10-16 23:04:41 +08:00
a10a149edb 开始推进行动模块(ActionModule); 针对框架与本体分别进行了一系列架构优化。
框架:
- 调整模块注册以及AgentRunningFlow的相关逻辑,以支持同组模块并发执行,将以@AgentModule注解中的order属性区分组间顺序先后及是否同组
- 针对@CoordinateManager注解新增了Core的自动注入处理,以便更好的协调不同Core的逻辑

本体: - 开始推进行动模块。将采取类似记忆模块的分层思路,分为ActionPlanner与ActionDispatcher两个主要模块,再各自细分子模块划分
- 将CognationCore从核心统筹的身份下降至与其他核心平级,同时将其中的序列化逻辑抽取至统一的PartnerCore父类,所有核心都将继承该类以获得序列化能力,不同core的内容将序列化至各自的memory文件
- 将SessionManager移除,相关逻辑迁移至CognationCore,统一序列化逻辑的同时又保证语义正确
- 将CognationCore中的某些缓存性质逻辑移动至CacheCore,确保语义正确
- 调整了目录结构以适应优化过的架构
2025-10-12 16:23:11 +08:00
41bf19f43e 将 .java 重命名为 .kt 2025-10-12 16:23:11 +08:00
3c2ac32708 完成了本体与框架的适配工作,并修复了某些问题。需要进一步进行测试
- 修复了 CognationCapability 相关的注解使用错误
- 将前置模块中的 setAppendedPrompt 与 setActiveModule 方法抽取到 execute 模板方法中
- 完善了已有模块的适配工作, 并去除了不必要的单例配置
2025-09-18 16:03:59 +08:00
47684c78e0 进行 Partner 本体对于框架的适配,以及框架层的部分调整
框架:

- 调整 ActivateModel 中模型初始化设置的 initHook 权重为-1(最优先)
- 为 AgentGateway 中 receive 操作提供模板方法,子类需实现发送逻辑并提供适配器
- 取消了 AgentInteractionAdapter 的单例配置
- 调整 RunningFlow 的异常处理,并在RunningFlowContext中提供错误码进行判断
- 调整模块基类
-

本体:
- 新增配置加载异常,继承自Agent启动异常
- 修改 GlobalExceptionData 获取逻辑
- 移除 MessageSender 等交互接口,适配框架的交互逻辑
- 异常处理已适配
- 配置加载逻辑已适配
- Gateway 已适配
- CoreModel 已适配
2025-09-09 20:42:28 +08:00
cf1578fd14 模块注解机制完成,待测试。
- 调整Api包下的目录结构
- 抽取方法‘递归收集某类的继承链上的所有类’中
- 移除 ModuleFactoryContext、ModuleRegisterFactory 中关于 Init 方法的加载逻辑,将在 ModuleInitHookExecuteFactory 中加载并执行
- 完善了 ActivateModel 接口中prompt通用加载的实现
- 移除原有的框架Demo实现,开始进行测试Demo的编写
2025-08-07 23:33:11 +08:00
ade922cbc2 推进核心服务与模块注册机制
- 完善Agent流程执行框架
- Api包下新增flow流程包,该部分对应模块的执行流程
- 明确ModuleFactory与CapabilityFactory以及ModuleHook的共同运作流程
- 调整了Hook注解名称
2025-07-25 23:46:54 +08:00
954095aa55 - 新建模块Partner-Api,推进Partner适配核心服务注册机制。
- 将原有的模块体系进一步区分,分离模型持有能力与调用能力,Model将有Module自身持有,可通过ActivateModel开启相应能力
2025-07-21 23:47:52 +08:00