Conversation
canfuu
commented
Jan 15, 2026
- Trigger现在会启动新的沙箱运行计划任务了
- 提供了Agent阶段的概念,现在允许Hook定义不同的Codeact运行阶段
- mcp定义的方式做了修改
此次重构将`TriggerExecutor`中的代码执行部分改用`GraalCodeExecutor`处理,并移除了原有的`CodeExecutionEnvironment`等相关类。这样不仅减少了代码冗余,还提升了整体的一致性和安全性。
更新多个子模块及父项目的pom.xml中的版本号,从0.1.0升级到0.1.1-SNAPSHOT,以便进行后续开发迭代。
# Conflicts: # assistant-agent-autoconfigure/pom.xml # assistant-agent-common/pom.xml # assistant-agent-core/pom.xml # assistant-agent-evaluation/pom.xml # assistant-agent-extensions/pom.xml # assistant-agent-prompt-builder/pom.xml # assistant-agent-start/pom.xml # pom.xml
…a/AssistantAgent into feature/upgrade_feature
There was a problem hiding this comment.
Pull request overview
This PR introduces several enhancements to the assistant-agent system as version 0.1.2, addressing developer feedback. The changes enable triggers to run in isolated sandboxes, introduce an agent phase concept for better hook management, and improve MCP tool definition flexibility.
Changes:
- Added trigger sandbox execution capability with session snapshot support and executor framework
- Introduced
AgentPhasesystem (REACT,CODEACT,ALL) with@HookPhasesannotation for granular hook control - Enhanced MCP dynamic tool factory with
McpServerAwareToolCallbackinterface for flexible server-aware tool definitions
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml (root + 7 modules) | Version bump from 0.1.1 to 0.1.2 |
| CodeactAgentConfig.java | Updated system prompt documentation to describe React/Codeact phases |
| SessionSnapshot.java | New model for storing session context for trigger execution |
| SessionSnapshotRepository.java | New SPI for session snapshot persistence |
| InMemorySessionSnapshotRepository.java | In-memory implementation of session snapshot storage |
| TriggerExecutionResult.java | New model capturing trigger execution outcomes |
| TriggerDefinition.java | Added fields for abandon function, function code snapshot, and confirmation settings |
| TriggerExecutor.java | Core executor implementing trigger execution in isolated sandbox using GraalCodeExecutor |
| TriggerExecutionCallback.java | Functional interface decoupling scheduling from execution |
| TriggerProperties.java | Added execution config for IO, native access, and timeout settings |
| TriggerAutoConfiguration.java | Wired up executor, snapshot repository, and execution callback |
| ExecutionBackend.java | Added setExecutionCallback method with default implementation |
| SpringSchedulerExecutionBackend.java | Integrated execution callback for actual trigger logic execution |
| AgentPhase.java | New enum defining REACT, CODEACT, and ALL phases |
| HookPhases.java | Annotation for declaring hook applicability to agent phases |
| HookPhaseUtils.java | Utility class for filtering and grouping hooks by phase |
| AfterAgentLearningHook.java | Added @HookPhases(AgentPhase.REACT) annotation |
| FastIntentReactHook.java | Added @HookPhases(AgentPhase.REACT) annotation |
| McpServerAwareToolCallback.java | New interface for server-aware MCP tool callbacks |
| McpDynamicToolFactory.java | Enhanced to support McpServerAwareToolCallback interface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Collections.emptyList(), // ToolCallback列表 | ||
| null, // OverAllState |
There was a problem hiding this comment.
The inline comments use Chinese characters which may cause issues in some development environments. Consider using English comments for better compatibility, or ensure the project's character encoding is consistently set to UTF-8.
| * 执行超时时间(毫秒),0表示不限制 | ||
| */ | ||
| private long executionTimeout = 0; | ||
| private long executionTimeout = 30000; |
There was a problem hiding this comment.
The default execution timeout was changed from 0 (unlimited) to 30000ms (30 seconds). This is a breaking change in default behavior. Consider documenting this change in a migration guide or changelog, as existing triggers that take longer than 30 seconds will now fail unless explicitly configured.
| private long executionTimeout = 30000; | |
| private long executionTimeout = 0; |
| 2. write_condition_code: 编写触发器条件判断函数(返回bool值) | ||
| 3. execute_code: 执行已编写的函数 | ||
| 4. search/reply/notification: 可在代码中调用的辅助工具 | ||
| 4. 其它工具: 可以在思考过后调用的其他工具 |
There was a problem hiding this comment.
Inconsistent punctuation style. Line 82 uses Chinese colon ':' while the original line used English colon. For consistency with lines 79-81 which use English colons, this should also use an English colon.